CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-azure-mgmt-appconfiguration

Microsoft Azure App Configuration Management Client Library for Python

Pending

Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

Overview
Eval results
Files

models-and-types.mddocs/

Models and Types Reference

This document provides a comprehensive reference for all model classes and enumerations in the azure-mgmt-appconfiguration package. These types represent the data structures used throughout the Azure App Configuration Management API.

Base Resource Models

Resource

class Resource:
    """
    Base class for all Azure resources.
    
    Attributes:
        id (str): Fully qualified resource ID (read-only).
        name (str): Resource name (read-only).
        type (str): Resource type (read-only).
    """

TrackedResource

class TrackedResource(Resource):
    """
    Base class for tracked Azure resources that have location and tags.
    
    Attributes:
        location (str): The geographic location of the resource.
        tags (Dict[str, str]): Resource tags as key-value pairs.
    """
    
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[Dict[str, str]] = None,
        **kwargs: Any
    ) -> None:
        """
        Initialize a TrackedResource.
        
        Args:
            location: Azure region where the resource is located.
            tags: Optional dictionary of tags to apply to the resource.
        """

Configuration Store Models

ConfigurationStore

class ConfigurationStore(TrackedResource):
    """
    Represents an Azure App Configuration store resource.
    
    Attributes:
        identity (ResourceIdentity): Managed identity configuration.
        sku (Sku): SKU of the configuration store.
        provisioning_state (ProvisioningState): Current provisioning state (read-only).
        creation_date (datetime): When the store was created (read-only).
        endpoint (str): DNS endpoint for the configuration store (read-only).
        encryption (EncryptionProperties): Encryption configuration.
        private_endpoint_connections (List[PrivateEndpointConnectionReference]): 
            Private endpoint connections (read-only).
        public_network_access (PublicNetworkAccess): Public network access setting.
        disable_local_auth (bool): Whether local authentication is disabled.
        soft_delete_retention_in_days (int): Soft delete retention period (1-7 days).
        enable_purge_protection (bool): Whether purge protection is enabled.
        create_mode (CreateMode): Store creation mode.
        data_plane_proxy (DataPlaneProxyProperties): Data plane proxy configuration.
        system_data (SystemData): System metadata (read-only).
    """
    
    def __init__(
        self,
        *,
        location: str,
        sku: Sku,
        tags: Optional[Dict[str, str]] = None,
        identity: Optional[ResourceIdentity] = None,
        encryption: Optional[EncryptionProperties] = None,
        public_network_access: Optional[PublicNetworkAccess] = None,
        disable_local_auth: Optional[bool] = None,
        soft_delete_retention_in_days: Optional[int] = None,
        enable_purge_protection: Optional[bool] = None,
        create_mode: Optional[CreateMode] = None,
        data_plane_proxy: Optional[DataPlaneProxyProperties] = None,
        **kwargs: Any
    ) -> None:
        """
        Initialize a ConfigurationStore.
        
        Args:
            location: Azure region for the store.
            sku: SKU configuration (Free or Standard).
            tags: Optional resource tags.
            identity: Managed identity configuration.
            encryption: Customer-managed encryption settings.
            public_network_access: Public network access policy.
            disable_local_auth: Disable connection string authentication.
            soft_delete_retention_in_days: Days to retain deleted store (1-7).
            enable_purge_protection: Prevent permanent deletion.
            create_mode: Creation mode (Default or Recover).
            data_plane_proxy: Data plane proxy configuration.
        """

ConfigurationStoreUpdateParameters

class ConfigurationStoreUpdateParameters:
    """
    Parameters for updating an existing configuration store.
    
    Attributes:
        identity (ResourceIdentity): Updated managed identity configuration.
        sku (Sku): Updated SKU configuration.
        tags (Dict[str, str]): Updated resource tags.
        encryption (EncryptionProperties): Updated encryption settings.
        disable_local_auth (bool): Updated local auth setting.
        public_network_access (PublicNetworkAccess): Updated public access setting.
        enable_purge_protection (bool): Updated purge protection setting.
        data_plane_proxy (DataPlaneProxyProperties): Updated proxy configuration.
    """

DeletedConfigurationStore

class DeletedConfigurationStore:
    """
    Represents a soft-deleted configuration store.
    
    Attributes:
        id (str): Resource ID of the deleted store (read-only).
        name (str): Name of the deleted store (read-only).
        type (str): Resource type (read-only).
        location (str): Location where the store was deleted.
        deletion_date (datetime): When the store was deleted (read-only).
        scheduled_purge_date (datetime): When the store will be purged (read-only).
        tags (Dict[str, str]): Tags from the original store (read-only).
        purge_protection_enabled (bool): Whether purge protection was enabled (read-only).
    """

SKU and Pricing Models

Sku

class Sku:
    """
    Represents the pricing tier and capacity of a configuration store.
    
    Attributes:
        name (str): SKU name - "Free" or "Standard".
    """
    
    def __init__(self, *, name: str, **kwargs: Any) -> None:
        """
        Initialize a SKU.
        
        Args:
            name: SKU tier name ("Free" or "Standard").
        """

Identity and Security Models

ResourceIdentity

class ResourceIdentity:
    """
    Managed identity configuration for a configuration store.
    
    Attributes:
        type (IdentityType): Type of managed identity.
        user_assigned_identities (Dict[str, UserIdentity]): User-assigned identities.
        principal_id (str): Service principal ID (read-only).
        tenant_id (str): Tenant ID (read-only).
    """
    
    def __init__(
        self,
        *,
        type: Optional[IdentityType] = None,
        user_assigned_identities: Optional[Dict[str, UserIdentity]] = None,
        **kwargs: Any
    ) -> None:
        """
        Initialize ResourceIdentity.
        
        Args:
            type: Identity type (None, SystemAssigned, UserAssigned, or both).
            user_assigned_identities: Dictionary of user-assigned identities.
        """

UserIdentity

class UserIdentity:
    """
    User-assigned managed identity details.
    
    Attributes:
        principal_id (str): Principal ID of the identity (read-only).
        client_id (str): Client ID of the identity (read-only).
    """

EncryptionProperties

class EncryptionProperties:
    """
    Customer-managed encryption configuration.
    
    Attributes:
        key_vault_properties (KeyVaultProperties): Key Vault settings for encryption.
    """
    
    def __init__(
        self,
        *,
        key_vault_properties: Optional[KeyVaultProperties] = None,
        **kwargs: Any
    ) -> None:
        """
        Initialize EncryptionProperties.
        
        Args:
            key_vault_properties: Key Vault configuration for customer-managed keys.
        """

KeyVaultProperties

class KeyVaultProperties:
    """
    Key Vault configuration for customer-managed encryption.
    
    Attributes:
        key_identifier (str): URI of the Key Vault key for encryption.
        identity_client_id (str): Client ID of the managed identity for Key Vault access.
    """
    
    def __init__(
        self,
        *,
        key_identifier: Optional[str] = None,
        identity_client_id: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        """
        Initialize KeyVaultProperties.
        
        Args:
            key_identifier: Full URI to the Key Vault key.
            identity_client_id: Client ID of user-assigned identity for Key Vault access.
        """

API Key Models

ApiKey

class ApiKey:
    """
    Represents an access key for a configuration store.
    
    Attributes:
        id (str): Key identifier (read-only).
        name (str): Key name (read-only).
        value (str): Key value (read-only).
        connection_string (str): Connection string using this key (read-only).
        last_modified (datetime): When the key was last regenerated (read-only).
        read_only (bool): Whether the key is read-only (read-only).
    """

RegenerateKeyParameters

class RegenerateKeyParameters:
    """
    Parameters for regenerating an access key.
    
    Attributes:
        id (str): ID of the key to regenerate.
    """
    
    def __init__(self, *, id: str, **kwargs: Any) -> None:
        """
        Initialize RegenerateKeyParameters.
        
        Args:
            id: Identifier of the access key to regenerate.
        """

Key-Value Models

KeyValue

class KeyValue:
    """
    Represents a configuration key-value pair.
    
    Attributes:
        id (str): Resource ID of the key-value (read-only).
        name (str): Name of the key-value (read-only).
        type (str): Resource type (read-only).
        key (str): The configuration key (read-only).
        label (str): The configuration label (read-only).
        value (str): The configuration value.
        content_type (str): Content type of the value.
        etag (str): ETag for concurrency control (read-only).
        last_modified (datetime): Last modification time (read-only).
        locked (bool): Whether the key-value is locked (read-only).
        tags (Dict[str, str]): Tags associated with the key-value.
    """
    
    def __init__(
        self,
        *,
        value: Optional[str] = None,
        content_type: Optional[str] = None,
        tags: Optional[Dict[str, str]] = None,
        **kwargs: Any
    ) -> None:
        """
        Initialize a KeyValue.
        
        Args:
            value: The configuration value.
            content_type: MIME type of the value content.
            tags: Optional tags for the key-value pair.
        """

KeyValueFilter

class KeyValueFilter:
    """
    Filter for selecting key-value pairs in snapshots.
    
    Attributes:
        key (str): Key pattern to match (supports wildcards).
        label (str): Label to match (optional).
    """
    
    def __init__(
        self,
        *,
        key: str,
        label: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        """
        Initialize a KeyValueFilter.
        
        Args:
            key: Key pattern with wildcard support (e.g., "MyApp:*").
            label: Specific label to match (empty string matches unlabeled keys).
        """

Private Networking Models

PrivateEndpointConnection

class PrivateEndpointConnection:
    """
    Represents a private endpoint connection to a configuration store.
    
    Attributes:
        id (str): Resource ID of the connection (read-only).
        name (str): Name of the connection (read-only).
        type (str): Resource type (read-only).
        private_endpoint (PrivateEndpoint): Private endpoint details.
        private_link_service_connection_state (PrivateLinkServiceConnectionState): 
            Connection state information.
        provisioning_state (str): ARM provisioning state (read-only).
    """
    
    def __init__(
        self,
        *,
        private_link_service_connection_state: Optional[PrivateLinkServiceConnectionState] = None,
        **kwargs: Any
    ) -> None:
        """
        Initialize a PrivateEndpointConnection.
        
        Args:
            private_link_service_connection_state: Connection state configuration.
        """

PrivateEndpoint

class PrivateEndpoint:
    """
    Represents a private endpoint resource reference.
    
    Attributes:
        id (str): Resource ID of the private endpoint (read-only).
    """

PrivateLinkServiceConnectionState

class PrivateLinkServiceConnectionState:
    """
    State information for a private link service connection.
    
    Attributes:
        status (ConnectionStatus): Connection approval status.
        description (str): Description of the connection state.
        actions_required (ActionsRequired): Required actions for the connection.
    """
    
    def __init__(
        self,
        *,
        status: Optional[ConnectionStatus] = None,
        description: Optional[str] = None,
        actions_required: Optional[ActionsRequired] = None,
        **kwargs: Any
    ) -> None:
        """
        Initialize PrivateLinkServiceConnectionState.
        
        Args:
            status: Connection status (Pending, Approved, Rejected, Disconnected).
            description: Human-readable state description.
            actions_required: Actions needed beyond normal workflow.
        """

PrivateLinkResource

class PrivateLinkResource:
    """
    Represents a private link resource for a configuration store.
    
    Attributes:
        id (str): Resource ID (read-only).
        name (str): Resource name (read-only).
        type (str): Resource type (read-only).
        group_id (str): Private link resource group ID.
        required_members (List[str]): Required member names.
        required_zone_names (List[str]): Required private DNS zone names.
    """

Replica Models

Replica

class Replica:
    """
    Represents a configuration store replica in another region.
    
    Attributes:
        id (str): Resource ID of the replica (read-only).
        name (str): Name of the replica (read-only).
        type (str): Resource type (read-only).
        location (str): Azure region of the replica.
        endpoint (str): DNS endpoint of the replica (read-only).
        provisioning_state (ReplicaProvisioningState): Provisioning state (read-only).
        system_data (SystemData): System metadata (read-only).
    """
    
    def __init__(self, *, location: str, **kwargs: Any) -> None:
        """
        Initialize a Replica.
        
        Args:
            location: Azure region where the replica will be created.
        """

Snapshot Models

Snapshot

class Snapshot:
    """
    Represents a configuration snapshot capturing state at a point in time.
    
    Attributes:
        id (str): Resource ID of the snapshot (read-only).
        name (str): Name of the snapshot (read-only).
        type (str): Resource type (read-only).
        provisioning_state (str): ARM provisioning state (read-only).
        status (SnapshotStatus): Snapshot status (read-only).
        filters (List[KeyValueFilter]): Filters defining included key-values.
        composition_type (CompositionType): How key-values are composed.
        created (datetime): Creation timestamp (read-only).
        expires (datetime): Expiration timestamp (read-only).
        retention_period (int): Retention period in seconds.
        size_in_bytes (int): Size of the snapshot in bytes (read-only).
        items_count (int): Number of key-value pairs (read-only).
        tags (Dict[str, str]): Tags associated with the snapshot.
        etag (str): ETag for concurrency control (read-only).
    """
    
    def __init__(
        self,
        *,
        filters: List[KeyValueFilter],
        composition_type: CompositionType,
        retention_period: Optional[int] = None,
        tags: Optional[Dict[str, str]] = None,
        **kwargs: Any
    ) -> None:
        """
        Initialize a Snapshot.
        
        Args:
            filters: List of filters to determine included key-values.
            composition_type: How to compose key-value pairs (KEY or KEY_LABEL).
            retention_period: Retention period in seconds (default 30 days).
            tags: Optional tags for the snapshot.
        """

Operations Models

OperationDefinition

class OperationDefinition:
    """
    Represents an available API operation.
    
    Attributes:
        name (str): Operation name.
        is_data_action (bool): Whether this is a data plane operation.
        display (OperationDefinitionDisplay): Display information for the operation.
        origin (str): Origin of the operation.
        properties (OperationProperties): Additional operation properties.
    """

OperationDefinitionDisplay

class OperationDefinitionDisplay:
    """
    Display properties for an operation definition.
    
    Attributes:
        provider (str): Resource provider name.
        resource (str): Resource type name.
        operation (str): Operation name.
        description (str): Operation description.
    """

Name Availability Models

CheckNameAvailabilityParameters

class CheckNameAvailabilityParameters:
    """
    Parameters for checking configuration store name availability.
    
    Attributes:
        name (str): Name to check for availability.
        type (ConfigurationResourceType): Resource type for the name check.
    """
    
    def __init__(
        self,
        *,
        name: str,
        type: ConfigurationResourceType,
        **kwargs: Any
    ) -> None:
        """
        Initialize CheckNameAvailabilityParameters.
        
        Args:
            name: Configuration store name to check.
            type: Resource type (Microsoft.AppConfiguration/configurationStores).
        """

NameAvailabilityStatus

class NameAvailabilityStatus:
    """
    Result of a name availability check.
    
    Attributes:
        name_available (bool): Whether the name is available.
        reason (str): Reason why the name is unavailable (if applicable).
        message (str): Detailed message about availability.
    """

Data Plane Proxy Models

DataPlaneProxyProperties

class DataPlaneProxyProperties:
    """
    Configuration for data plane proxy functionality.
    
    Attributes:
        authentication_mode (AuthenticationMode): Authentication mode for proxy.
        private_link_delegation (PrivateLinkDelegation): Private link delegation setting.
    """
    
    def __init__(
        self,
        *,
        authentication_mode: Optional[AuthenticationMode] = None,
        private_link_delegation: Optional[PrivateLinkDelegation] = None,
        **kwargs: Any
    ) -> None:
        """
        Initialize DataPlaneProxyProperties.
        
        Args:
            authentication_mode: Authentication mode (Local or Pass-through).
            private_link_delegation: Private link delegation (Enabled or Disabled).
        """

System Metadata Models

SystemData

class SystemData:
    """
    Metadata about resource creation and modification.
    
    Attributes:
        created_by (str): Identity that created the resource.
        created_by_type (CreatedByType): Type of identity that created the resource.
        created_at (datetime): When the resource was created.
        last_modified_by (str): Identity that last modified the resource.
        last_modified_by_type (CreatedByType): Type of identity that last modified.
        last_modified_at (datetime): When the resource was last modified.
    """

Error Models

ErrorResponse

class ErrorResponse:
    """
    Standard error response format.
    
    Attributes:
        error (ErrorDetail): Error details.
    """

ErrorDetail

class ErrorDetail:
    """
    Detailed error information.
    
    Attributes:
        code (str): Error code.
        message (str): Error message.
        target (str): Error target.
        details (List[ErrorDetail]): Additional error details.
        additional_info (List[ErrorAdditionalInfo]): Additional error information.
    """

ErrorAdditionalInfo

class ErrorAdditionalInfo:
    """
    Additional error information.
    
    Attributes:
        type (str): Additional info type.
        info (object): Additional info data.
    """

Enumerations

ActionsRequired

class ActionsRequired(str, Enum):
    """
    Actions required beyond basic workflow.
    
    Values:
        NONE: No additional actions required.
        RECREATE: Resource needs to be recreated.
    """
    NONE = "None"
    RECREATE = "Recreate"

AuthenticationMode

class AuthenticationMode(str, Enum):
    """
    Data plane proxy authentication mode.
    
    Values:
        LOCAL: Use local authentication.
        PASS_THROUGH: Pass authentication through to the target.
    """
    LOCAL = "Local"
    PASS_THROUGH = "Pass-through"

CompositionType

class CompositionType(str, Enum):
    """
    Snapshot composition type for key-value pairs.
    
    Values:
        KEY: Compose by key only (ignore labels).
        KEY_LABEL: Compose by both key and label.
    """
    KEY = "Key"
    KEY_LABEL = "Key_Label"

ConfigurationResourceType

class ConfigurationResourceType(str, Enum):
    """
    Resource type for configuration store name availability checks.
    
    Values:
        MICROSOFT_APP_CONFIGURATION_CONFIGURATION_STORES: 
            App Configuration store resource type.
    """
    MICROSOFT_APP_CONFIGURATION_CONFIGURATION_STORES = "Microsoft.AppConfiguration/configurationStores"

ConnectionStatus

class ConnectionStatus(str, Enum):
    """
    Private link service connection status.
    
    Values:
        PENDING: Connection is pending approval.
        APPROVED: Connection has been approved.
        REJECTED: Connection has been rejected.
        DISCONNECTED: Connection has been disconnected.
    """
    PENDING = "Pending"
    APPROVED = "Approved"
    REJECTED = "Rejected"
    DISCONNECTED = "Disconnected"

CreateMode

class CreateMode(str, Enum):
    """
    Configuration store creation mode.
    
    Values:
        RECOVER: Recover a soft-deleted store.
        DEFAULT: Create a new store normally.
    """
    RECOVER = "Recover"
    DEFAULT = "Default"

CreatedByType

class CreatedByType(str, Enum):
    """
    Type of identity that created or modified a resource.
    
    Values:
        USER: Created by a user.
        APPLICATION: Created by an application.
        MANAGED_IDENTITY: Created by a managed identity.
        KEY: Created using a key-based authentication.
    """
    USER = "User"
    APPLICATION = "Application"
    MANAGED_IDENTITY = "ManagedIdentity"
    KEY = "Key"

IdentityType

class IdentityType(str, Enum):
    """
    Type of managed identity for a resource.
    
    Values:
        NONE: No managed identity.
        SYSTEM_ASSIGNED: System-assigned managed identity.
        USER_ASSIGNED: User-assigned managed identity.
        SYSTEM_ASSIGNED_USER_ASSIGNED: Both system and user-assigned identities.
    """
    NONE = "None"
    SYSTEM_ASSIGNED = "SystemAssigned"
    USER_ASSIGNED = "UserAssigned"
    SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned"

PrivateLinkDelegation

class PrivateLinkDelegation(str, Enum):
    """
    Data plane proxy private link delegation setting.
    
    Values:
        ENABLED: Private link delegation is enabled.
        DISABLED: Private link delegation is disabled.
    """
    ENABLED = "Enabled"
    DISABLED = "Disabled"

ProvisioningState

class ProvisioningState(str, Enum):
    """
    Azure Resource Manager provisioning state.
    
    Values:
        CREATING: Resource is being created.
        UPDATING: Resource is being updated.
        DELETING: Resource is being deleted.
        SUCCEEDED: Operation completed successfully.
        FAILED: Operation failed.
        CANCELED: Operation was canceled.
    """
    CREATING = "Creating"
    UPDATING = "Updating"
    DELETING = "Deleting"
    SUCCEEDED = "Succeeded"
    FAILED = "Failed"
    CANCELED = "Canceled"

PublicNetworkAccess

class PublicNetworkAccess(str, Enum):
    """
    Public network access control setting.
    
    Values:
        ENABLED: Public network access is allowed.
        DISABLED: Public network access is blocked.
    """
    ENABLED = "Enabled"
    DISABLED = "Disabled"

ReplicaProvisioningState

class ReplicaProvisioningState(str, Enum):
    """
    Provisioning state specific to replicas.
    
    Values:
        CREATING: Replica is being created.
        SUCCEEDED: Replica creation completed successfully.
        DELETING: Replica is being deleted.
        FAILED: Replica operation failed.
        CANCELED: Replica operation was canceled.
    """
    CREATING = "Creating"
    SUCCEEDED = "Succeeded"
    DELETING = "Deleting"
    FAILED = "Failed"
    CANCELED = "Canceled"

SnapshotStatus

class SnapshotStatus(str, Enum):
    """
    Status of a configuration snapshot.
    
    Values:
        PROVISIONING: Snapshot is being created.
        READY: Snapshot is ready for use.
        ARCHIVED: Snapshot has been archived.
        FAILED: Snapshot creation failed.
    """
    PROVISIONING = "Provisioning"
    READY = "Ready"
    ARCHIVED = "Archived"
    FAILED = "Failed"

List Result Models

ConfigurationStoreListResult

class ConfigurationStoreListResult:
    """
    List of configuration stores with pagination support.
    
    Attributes:
        value (List[ConfigurationStore]): List of configuration stores.
        next_link (str): URL for the next page of results.
    """

DeletedConfigurationStoreListResult

class DeletedConfigurationStoreListResult:
    """
    List of deleted configuration stores.
    
    Attributes:
        value (List[DeletedConfigurationStore]): List of deleted stores.
        next_link (str): URL for the next page of results.
    """

ApiKeyListResult

class ApiKeyListResult:
    """
    List of API keys for a configuration store.
    
    Attributes:
        value (List[ApiKey]): List of API keys.
        next_link (str): URL for the next page of results.
    """

KeyValueListResult

class KeyValueListResult:
    """
    List of key-value pairs.
    
    Attributes:
        value (List[KeyValue]): List of key-value pairs.
        next_link (str): URL for the next page of results.
    """

PrivateEndpointConnectionListResult

class PrivateEndpointConnectionListResult:
    """
    List of private endpoint connections.
    
    Attributes:
        value (List[PrivateEndpointConnection]): List of connections.
        next_link (str): URL for the next page of results.
    """

PrivateLinkResourceListResult

class PrivateLinkResourceListResult:
    """
    List of private link resources.
    
    Attributes:
        value (List[PrivateLinkResource]): List of private link resources.
        next_link (str): URL for the next page of results.
    """

ReplicaListResult

class ReplicaListResult:
    """
    List of configuration store replicas.
    
    Attributes:
        value (List[Replica]): List of replicas.
        next_link (str): URL for the next page of results.
    """

OperationDefinitionListResult

class OperationDefinitionListResult:
    """
    List of available operations.
    
    Attributes:
        value (List[OperationDefinition]): List of operation definitions.
        next_link (str): URL for the next page of results.
    """

Service Specification Models

ServiceSpecification

class ServiceSpecification:
    """
    Specification of the service for monitoring and diagnostics.
    
    Attributes:
        log_specifications (List[LogSpecification]): Log specifications.
        metric_specifications (List[MetricSpecification]): Metric specifications.
    """

LogSpecification

class LogSpecification:
    """
    Specification for log collection.
    
    Attributes:
        name (str): Log category name.
        display_name (str): Display name for the log category.
        blob_duration (str): Duration for blob storage.
    """

MetricSpecification

class MetricSpecification:
    """
    Specification for metric collection.
    
    Attributes:
        name (str): Metric name.
        display_name (str): Display name for the metric.
        display_description (str): Description of the metric.
        unit (str): Unit of measurement.
        aggregation_type (str): Aggregation type.
        internal_metric_name (str): Internal metric name.
        dimensions (List[MetricDimension]): Metric dimensions.
        fill_gap_with_zero (bool): Whether to fill gaps with zero.
    """

MetricDimension

class MetricDimension:
    """
    Dimension for metric specification.
    
    Attributes:
        name (str): Dimension name.
        display_name (str): Display name for the dimension.
        internal_name (str): Internal dimension name.
        to_be_exported_for_shoebox (bool): Whether to export for Shoebox.
    """

Usage Examples

Working with Model Validation

def demonstrate_model_validation():
    """Show how to work with model validation and type checking."""
    
    # Valid SKU creation
    try:
        free_sku = Sku(name="Free")
        standard_sku = Sku(name="Standard")
        print("✅ Valid SKUs created")
    except ValueError as e:
        print(f"❌ SKU validation error: {e}")
    
    # Valid identity configuration
    try:
        system_identity = ResourceIdentity(type=IdentityType.SYSTEM_ASSIGNED)
        
        user_identity = ResourceIdentity(
            type=IdentityType.USER_ASSIGNED,
            user_assigned_identities={
                "/subscriptions/.../resourceGroups/.../providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity": UserIdentity()
            }
        )
        print("✅ Valid identities created")
    except Exception as e:
        print(f"❌ Identity validation error: {e}")
    
    # Model composition
    try:
        store = ConfigurationStore(
            location="East US",
            sku=standard_sku,
            identity=system_identity,
            tags={"Environment": "Production"},
            public_network_access=PublicNetworkAccess.ENABLED,
            disable_local_auth=False
        )
        print("✅ Configuration store model created")
        print(f"   Location: {store.location}")
        print(f"   SKU: {store.sku.name}")
        print(f"   Identity: {store.identity.type}")
    except Exception as e:
        print(f"❌ Store creation error: {e}")

demonstrate_model_validation()

Enum Usage Patterns

def demonstrate_enum_usage():
    """Show common patterns for using enumerations."""
    
    # Connection status checking
    def handle_connection_status(status: ConnectionStatus):
        if status == ConnectionStatus.PENDING:
            print("🟡 Connection is pending approval")
            return "waiting"
        elif status == ConnectionStatus.APPROVED:
            print("✅ Connection is approved and active")
            return "active"
        elif status == ConnectionStatus.REJECTED:
            print("❌ Connection was rejected")
            return "rejected"
        elif status == ConnectionStatus.DISCONNECTED:
            print("🔌 Connection is disconnected")
            return "disconnected"
    
    # Test different statuses
    for status in ConnectionStatus:
        result = handle_connection_status(status)
        print(f"   Status {status} -> {result}")
    
    # Provisioning state patterns
    def is_terminal_state(state: ProvisioningState) -> bool:
        """Check if a provisioning state is terminal (no further changes expected)."""
        return state in [
            ProvisioningState.SUCCEEDED,
            ProvisioningState.FAILED,
            ProvisioningState.CANCELED
        ]
    
    # Test provisioning states
    print(f"\nTerminal state checking:")
    for state in ProvisioningState:
        is_terminal = is_terminal_state(state)
        print(f"   {state}: {'Terminal' if is_terminal else 'In Progress'}")
    
    # Snapshot composition type usage
    def get_snapshot_description(composition: CompositionType) -> str:
        descriptions = {
            CompositionType.KEY: "Keys only (labels ignored)",
            CompositionType.KEY_LABEL: "Keys with labels"
        }
        return descriptions.get(composition, "Unknown composition type")
    
    print(f"\nSnapshot composition types:")
    for comp_type in CompositionType:
        desc = get_snapshot_description(comp_type)
        print(f"   {comp_type}: {desc}")

demonstrate_enum_usage()

Model Serialization

def demonstrate_model_serialization():
    """Show how models serialize to/from dictionaries and JSON."""
    
    # Create a complex model
    store = ConfigurationStore(
        location="West US 2",
        sku=Sku(name="Standard"),
        tags={
            "Environment": "Production",
            "Team": "Platform",
            "CostCenter": "Engineering"
        },
        identity=ResourceIdentity(type=IdentityType.SYSTEM_ASSIGNED),
        public_network_access=PublicNetworkAccess.ENABLED,
        disable_local_auth=False,
        soft_delete_retention_in_days=7,
        enable_purge_protection=True
    )
    
    print("Model created with properties:")
    print(f"   Location: {store.location}")
    print(f"   SKU: {store.sku.name}")
    print(f"   Identity: {store.identity.type}")
    print(f"   Public Access: {store.public_network_access}")
    print(f"   Local Auth Disabled: {store.disable_local_auth}")
    print(f"   Soft Delete Retention: {store.soft_delete_retention_in_days} days")
    print(f"   Purge Protection: {store.enable_purge_protection}")
    print(f"   Tags: {store.tags}")
    
    # Working with snapshot filters
    filters = [
        KeyValueFilter(key="MyApp:*", label="Production"),
        KeyValueFilter(key="Shared:*", label="Production"),
        KeyValueFilter(key="FeatureFlags:*")  # No label specified
    ]
    
    snapshot = Snapshot(
        filters=filters,
        composition_type=CompositionType.KEY_LABEL,
        retention_period=7776000,  # 90 days
        tags={"Type": "Release", "Version": "2.1.0"}
    )
    
    print(f"\nSnapshot configuration:")
    print(f"   Filters: {len(snapshot.filters)} filter(s)")
    for i, filter_obj in enumerate(snapshot.filters):
        label_info = f"label='{filter_obj.label}'" if filter_obj.label else "no label"
        print(f"     {i+1}. key='{filter_obj.key}', {label_info}")
    print(f"   Composition: {snapshot.composition_type}")
    print(f"   Retention: {snapshot.retention_period} seconds")
    print(f"   Tags: {snapshot.tags}")

demonstrate_model_serialization()

This comprehensive models and types reference provides complete coverage of all data structures in the azure-mgmt-appconfiguration package, enabling developers to understand and work with every aspect of the Azure App Configuration Management API.

Install with Tessl CLI

npx tessl i tessl/pypi-azure-mgmt-appconfiguration

docs

configuration-stores.md

index.md

key-values.md

models-and-types.md

operations.md

private-networking.md

replicas.md

snapshots.md

tile.json