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

operations.mddocs/

General Operations

The Operations class provides utility operations for the Azure App Configuration service, including name availability checks and listing all available API operations.

Operations Class

class Operations:
    """
    General operations for Azure App Configuration service.
    
    This class provides utility methods for checking resource name availability
    and discovering available API operations for the service.
    """

Capabilities

Check Name Availability

Checks whether a configuration store name is available for use globally across Azure.

def check_name_availability(
    self,
    check_name_availability_parameters: CheckNameAvailabilityParameters,
    **kwargs: Any
) -> NameAvailabilityStatus:
    """
    Checks whether the configuration store name is available for use.
    
    Args:
        check_name_availability_parameters: Parameters for checking name availability
        **kwargs: Additional keyword arguments for the request
        
    Returns:
        NameAvailabilityStatus: The availability status and reason if unavailable
        
    Example:
        >>> from azure.mgmt.appconfiguration.models import CheckNameAvailabilityParameters
        >>> params = CheckNameAvailabilityParameters(
        ...     name="my-config-store",
        ...     type="Microsoft.AppConfiguration/configurationStores"
        ... )
        >>> result = client.operations.check_name_availability(params)
        >>> print(f"Available: {result.name_available}")
        >>> if not result.name_available:
        ...     print(f"Reason: {result.reason} - {result.message}")
    """

Regional Check Name Availability

Checks whether a configuration store name is available for use within a specific Azure region.

def regional_check_name_availability(
    self,
    location: str,
    check_name_availability_parameters: CheckNameAvailabilityParameters,
    **kwargs: Any
) -> NameAvailabilityStatus:
    """
    Checks whether the configuration store name is available for use in a specific region.
    
    Args:
        location: The Azure region to check availability in
        check_name_availability_parameters: Parameters for checking name availability
        **kwargs: Additional keyword arguments for the request
        
    Returns:
        NameAvailabilityStatus: The availability status and reason if unavailable
        
    Example:
        >>> from azure.mgmt.appconfiguration.models import CheckNameAvailabilityParameters
        >>> params = CheckNameAvailabilityParameters(
        ...     name="my-regional-store",
        ...     type="Microsoft.AppConfiguration/configurationStores"
        ... )
        >>> result = client.operations.regional_check_name_availability(
        ...     location="East US",
        ...     check_name_availability_parameters=params
        ... )
        >>> print(f"Available in East US: {result.name_available}")
    """

List Operations

Lists all available operations for the Azure App Configuration resource provider.

def list(
    self,
    skip_token: Optional[str] = None,
    **kwargs: Any
) -> ItemPaged[OperationDefinition]:
    """
    Lists the operations available from this provider.
    
    Args:
        skip_token: A skip token to retrieve the next set of results, if any
        **kwargs: Additional keyword arguments for the request
        
    Returns:
        ItemPaged[OperationDefinition]: A paged collection of operation definitions
        
    Example:
        >>> operations = client.operations.list()
        >>> for operation in operations:
        ...     print(f"Operation: {operation.name}")
        ...     print(f"Display name: {operation.display.operation}")
        ...     print(f"Description: {operation.display.description}")
    """

Usage Examples

Check Store Name Availability

from azure.mgmt.appconfiguration import AppConfigurationManagementClient
from azure.mgmt.appconfiguration.models import CheckNameAvailabilityParameters
from azure.identity import DefaultAzureCredential

# Initialize client
credential = DefaultAzureCredential()
client = AppConfigurationManagementClient(credential, "your-subscription-id")

# Check if a store name is available globally
params = CheckNameAvailabilityParameters(
    name="my-unique-config-store",
    type="Microsoft.AppConfiguration/configurationStores"
)

availability = client.operations.check_name_availability(params)
if availability.name_available:
    print("Name is available - you can create the store")
else:
    print(f"Name not available: {availability.reason}")
    print(f"Message: {availability.message}")

Check Regional Name Availability

# Check if a store name is available in a specific region
regional_availability = client.operations.regional_check_name_availability(
    location="West US 2",
    check_name_availability_parameters=params
)

if regional_availability.name_available:
    print("Name is available in West US 2")
else:
    print(f"Name not available in West US 2: {regional_availability.reason}")

Discover Available Operations

# List all available operations for the service
print("Available Azure App Configuration operations:")
operations = client.operations.list()

for operation in operations:
    print(f"\nOperation: {operation.name}")
    if operation.display:
        print(f"  Provider: {operation.display.provider}")
        print(f"  Resource: {operation.display.resource}")
        print(f"  Operation: {operation.display.operation}")
        print(f"  Description: {operation.display.description}")
    
    if operation.properties and operation.properties.service_specification:
        print(f"  Service specification available: Yes")

Related Models

CheckNameAvailabilityParameters

class CheckNameAvailabilityParameters:
    """
    Parameters for checking name availability.
    
    Attributes:
        name: The name to check for availability
        type: The resource type (always "Microsoft.AppConfiguration/configurationStores")
    """
    
    def __init__(
        self,
        *,
        name: str,
        type: str = "Microsoft.AppConfiguration/configurationStores"
    ) -> None: ...

NameAvailabilityStatus

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

OperationDefinition

class OperationDefinition:
    """
    Definition of an available operation.
    
    Attributes:
        name: Operation name
        display: Display information for the operation
        properties: Additional properties and specifications
    """
    
    name: Optional[str]
    display: Optional[OperationDefinitionDisplay]
    properties: Optional[OperationProperties]

OperationDefinitionDisplay

class OperationDefinitionDisplay:
    """
    Display information for an operation.
    
    Attributes:
        provider: The resource provider name
        resource: The resource type
        operation: The operation name for display
        description: Description of the operation
    """
    
    provider: Optional[str]
    resource: Optional[str]
    operation: Optional[str]
    description: Optional[str]

Error Handling

Name availability operations can fail with various errors:

from azure.core.exceptions import HttpResponseError

try:
    availability = client.operations.check_name_availability(params)
except HttpResponseError as e:
    print(f"Error checking name availability: {e.status_code}")
    print(f"Error message: {e.message}")

Best Practices

  1. Always check name availability before attempting to create a configuration store
  2. Use regional checks when you know the target region to get more accurate availability information
  3. Handle unavailable names gracefully by suggesting alternatives or prompting for different names
  4. Cache operation listings if you need to repeatedly check available operations
  5. Consider name uniqueness requirements - configuration store names must be globally unique across all Azure subscriptions

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