Azure¶
Validated types for Microsoft Azure resource identifiers.
Azure cloud resource types.
Modules:
-
compute–Azure compute types.
-
containers–Azure container types.
-
database–Azure database types.
-
identity–Azure identity types.
-
keyvault–Azure Key Vault types.
-
messaging–Azure messaging types.
-
region–Azure region types.
-
resource–Azure Resource ID type.
-
storage–Azure storage types.
Classes:
-
BlobStorageUri–Azure Blob Storage URI (https://{account}.blob.core.windows.net/{container}/{blob}).
-
KeyVaultUri–Azure Key Vault URI (https://{vault_name}.vault.azure.net/).
-
Region–Azure region identifiers.
-
ResourceId–Azure Resource ID with support for nested resources.
Attributes:
-
AksClusterName–Azure AKS cluster name (e.g.
my-aks-cluster). -
ApiManagementName–Azure API Management name (e.g.
my-apim). -
AppServiceName–Azure App Service name (e.g.
my-app-service). -
ContainerAppName–Azure Container App name (e.g.
my-container-app). -
ContainerRegistryName–Azure Container Registry name (e.g.
mycontainerregistry). -
CosmosDbAccountName–Azure Cosmos DB account name (e.g.
my-cosmos-account). -
DataFactoryName–Azure Data Factory name (e.g.
my-data-factory). -
DatabricksWorkspaceName–Azure Databricks workspace name (e.g.
my-databricks-ws). -
EventHubNamespaceName–Azure Event Hub namespace name (e.g.
my-eventhub-ns). -
FunctionAppName–Azure Function App name (e.g.
my-function-app). -
KeyVaultName–Azure Key Vault name (e.g.
my-key-vault). -
KeyVaultSecretName–Azure Key Vault secret name (e.g.
my-secret). -
LogAnalyticsWorkspaceName–Azure Log Analytics workspace name (e.g.
my-log-analytics). -
RedisCacheName–Azure Redis Cache name (e.g.
my-redis-cache). -
ResourceGroupName–Azure Resource Group name (e.g.
my-resource-group). -
ServiceBusNamespace–Azure Service Bus namespace (e.g.
my-servicebus-ns). -
SqlServerName–Azure SQL Server name (e.g.
my-sql-server). -
StorageAccountName–Azure Storage account name (e.g.
mystorageaccount). -
SubscriptionId–Azure Subscription ID (UUID) (e.g.
12345678-1234-1234-1234-123456789012). -
TenantId–Azure Tenant ID (UUID) (e.g.
12345678-1234-1234-1234-123456789012).
AksClusterName
module-attribute
¶
AksClusterName = Annotated[str, AfterValidator(_validate_aks_cluster_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z0-9]([a-zA-Z0-9_-]{0,61}[a-zA-Z0-9])?$', 'description': 'Azure AKS cluster name.', 'examples': ['my-aks-cluster'], 'title': 'AksClusterName'})]
Azure AKS cluster name (e.g. my-aks-cluster).
ApiManagementName
module-attribute
¶
ApiManagementName = Annotated[str, AfterValidator(_validate_api_management_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z]([a-zA-Z0-9-]{0,48}[a-zA-Z0-9])?$', 'description': 'Azure API Management name.', 'examples': ['my-apim'], 'title': 'ApiManagementName'})]
Azure API Management name (e.g. my-apim).
AppServiceName
module-attribute
¶
AppServiceName = Annotated[str, AfterValidator(_validate_app_service_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z0-9]([a-zA-Z0-9-]{0,57}[a-zA-Z0-9])?$', 'description': 'Azure App Service name.', 'examples': ['my-app-service'], 'title': 'AppServiceName'})]
Azure App Service name (e.g. my-app-service).
ContainerAppName
module-attribute
¶
ContainerAppName = Annotated[str, AfterValidator(_validate_container_app_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-z]([a-z0-9-]{0,29}[a-z0-9])?$', 'description': 'Azure Container App name.', 'examples': ['my-container-app'], 'title': 'ContainerAppName'})]
Azure Container App name (e.g. my-container-app).
ContainerRegistryName
module-attribute
¶
ContainerRegistryName = Annotated[str, AfterValidator(_validate_container_registry_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z0-9]{5,50}$', 'description': 'Azure Container Registry name.', 'examples': ['mycontainerregistry'], 'title': 'ContainerRegistryName', 'minLength': 5, 'maxLength': 50})]
Azure Container Registry name (e.g. mycontainerregistry).
CosmosDbAccountName
module-attribute
¶
CosmosDbAccountName = Annotated[str, AfterValidator(_validate_cosmos_db_account_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-z0-9][a-z0-9-]{1,42}[a-z0-9]$', 'description': 'Azure Cosmos DB account name.', 'examples': ['my-cosmos-account'], 'title': 'CosmosDbAccountName'})]
Azure Cosmos DB account name (e.g. my-cosmos-account).
DataFactoryName
module-attribute
¶
DataFactoryName = Annotated[str, AfterValidator(_validate_data_factory_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z0-9](?!.*--)[a-zA-Z0-9-]{1,61}[a-zA-Z0-9]$', 'description': 'Azure Data Factory name.', 'examples': ['my-data-factory'], 'title': 'DataFactoryName'})]
Azure Data Factory name (e.g. my-data-factory).
DatabricksWorkspaceName
module-attribute
¶
DatabricksWorkspaceName = Annotated[str, AfterValidator(_validate_databricks_workspace_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z0-9][a-zA-Z0-9_-]{1,62}[a-zA-Z0-9]$', 'description': 'Azure Databricks workspace name.', 'examples': ['my-databricks-ws'], 'title': 'DatabricksWorkspaceName'})]
Azure Databricks workspace name (e.g. my-databricks-ws).
EventHubNamespaceName
module-attribute
¶
EventHubNamespaceName = Annotated[str, AfterValidator(_validate_event_hub_namespace_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z][a-zA-Z0-9-]{4,48}[a-zA-Z0-9]$', 'description': 'Azure Event Hub namespace name.', 'examples': ['my-eventhub-ns'], 'title': 'EventHubNamespaceName'})]
Azure Event Hub namespace name (e.g. my-eventhub-ns).
FunctionAppName
module-attribute
¶
FunctionAppName = Annotated[str, AfterValidator(_validate_function_app_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z0-9][a-zA-Z0-9-]{0,58}[a-zA-Z0-9]$', 'description': 'Azure Function App name.', 'examples': ['my-function-app'], 'title': 'FunctionAppName'})]
Azure Function App name (e.g. my-function-app).
KeyVaultName
module-attribute
¶
KeyVaultName = Annotated[str, AfterValidator(_validate_key_vault_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z](?!.*--)[a-zA-Z0-9-]{1,22}[a-zA-Z0-9]$', 'description': 'Azure Key Vault name.', 'examples': ['my-key-vault'], 'title': 'KeyVaultName'})]
Azure Key Vault name (e.g. my-key-vault).
KeyVaultSecretName
module-attribute
¶
KeyVaultSecretName = Annotated[str, AfterValidator(_validate_key_vault_secret_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z0-9-]{1,127}$', 'description': 'Azure Key Vault secret name.', 'examples': ['my-secret'], 'title': 'KeyVaultSecretName', 'maxLength': 127})]
Azure Key Vault secret name (e.g. my-secret).
LogAnalyticsWorkspaceName
module-attribute
¶
LogAnalyticsWorkspaceName = Annotated[str, AfterValidator(_validate_log_analytics_workspace_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z0-9][a-zA-Z0-9-]{2,61}[a-zA-Z0-9]$', 'description': 'Azure Log Analytics workspace name.', 'examples': ['my-log-analytics'], 'title': 'LogAnalyticsWorkspaceName'})]
Azure Log Analytics workspace name (e.g. my-log-analytics).
RedisCacheName
module-attribute
¶
RedisCacheName = Annotated[str, AfterValidator(_validate_redis_cache_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z0-9](?!.*--)[a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$', 'description': 'Azure Redis Cache name.', 'examples': ['my-redis-cache'], 'title': 'RedisCacheName'})]
Azure Redis Cache name (e.g. my-redis-cache).
ResourceGroupName
module-attribute
¶
ResourceGroupName = Annotated[str, AfterValidator(_validate_resource_group_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z0-9_\\-.()]{1,90}$', 'description': 'Azure Resource Group name.', 'examples': ['my-resource-group'], 'title': 'ResourceGroupName'})]
Azure Resource Group name (e.g. my-resource-group).
ServiceBusNamespace
module-attribute
¶
ServiceBusNamespace = Annotated[str, AfterValidator(_validate_service_bus_namespace), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z][a-zA-Z0-9-]{4,48}[a-zA-Z0-9]$', 'description': 'Azure Service Bus namespace.', 'examples': ['my-servicebus-ns'], 'title': 'ServiceBusNamespace'})]
Azure Service Bus namespace (e.g. my-servicebus-ns).
SqlServerName
module-attribute
¶
SqlServerName = Annotated[str, AfterValidator(_validate_sql_server_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$', 'description': 'Azure SQL Server name.', 'examples': ['my-sql-server'], 'title': 'SqlServerName'})]
Azure SQL Server name (e.g. my-sql-server).
StorageAccountName
module-attribute
¶
StorageAccountName = Annotated[str, AfterValidator(_validate_storage_account_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-z0-9]{3,24}$', 'description': 'Azure Storage account name.', 'examples': ['mystorageaccount'], 'title': 'StorageAccountName', 'minLength': 3, 'maxLength': 24})]
Azure Storage account name (e.g. mystorageaccount).
SubscriptionId
module-attribute
¶
SubscriptionId = Annotated[str, AfterValidator(_validate_subscription_id), WithJsonSchema({'type': 'string', 'pattern': '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$', 'description': 'Azure Subscription ID (UUID).', 'examples': ['12345678-1234-1234-1234-123456789012'], 'title': 'SubscriptionId'})]
Azure Subscription ID (UUID) (e.g. 12345678-1234-1234-1234-123456789012).
TenantId
module-attribute
¶
TenantId = Annotated[str, AfterValidator(_validate_tenant_id), WithJsonSchema({'type': 'string', 'pattern': '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$', 'description': 'Azure Tenant ID (UUID).', 'examples': ['12345678-1234-1234-1234-123456789012'], 'title': 'TenantId'})]
Azure Tenant ID (UUID) (e.g. 12345678-1234-1234-1234-123456789012).
BlobStorageUri
¶
Bases: CloudStorageUri
Azure Blob Storage URI (https://{account}.blob.core.windows.net/{container}/{blob}).
Methods:
-
__get_pydantic_core_schema__–Return the Pydantic core schema for BlobStorageUri.
-
__get_pydantic_json_schema__–Return the JSON schema for BlobStorageUri.
-
__new__–Create and validate a new BlobStorageUri instance.
__get_pydantic_core_schema__
classmethod
¶
Return the Pydantic core schema for BlobStorageUri.
Source code in src/pydantypes/cloud/azure/storage.py
__get_pydantic_json_schema__
classmethod
¶
__get_pydantic_json_schema__(_core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> JsonSchemaValue
Return the JSON schema for BlobStorageUri.
Source code in src/pydantypes/cloud/azure/storage.py
__new__
¶
__new__(value: str) -> BlobStorageUri
Create and validate a new BlobStorageUri instance.
Source code in src/pydantypes/cloud/azure/storage.py
KeyVaultUri
¶
Bases: str
Azure Key Vault URI (https://{vault_name}.vault.azure.net/).
Methods:
-
__get_pydantic_core_schema__–Return the Pydantic core schema for KeyVaultUri.
-
__get_pydantic_json_schema__–Return the JSON schema for KeyVaultUri.
-
__new__–Create and validate a new KeyVaultUri instance.
__get_pydantic_core_schema__
classmethod
¶
Return the Pydantic core schema for KeyVaultUri.
__get_pydantic_json_schema__
classmethod
¶
__get_pydantic_json_schema__(_core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> JsonSchemaValue
Return the JSON schema for KeyVaultUri.
Source code in src/pydantypes/cloud/azure/keyvault.py
__new__
¶
__new__(value: str) -> KeyVaultUri
Create and validate a new KeyVaultUri instance.
Source code in src/pydantypes/cloud/azure/keyvault.py
Region
¶
Bases: StrEnum
Azure region identifiers.
ResourceId
¶
Bases: str
Azure Resource ID with support for nested resources.
Methods:
-
__get_pydantic_core_schema__–Return the Pydantic core schema for ResourceId.
-
__get_pydantic_json_schema__–Return the JSON schema for ResourceId.
-
__new__–Create and validate a new ResourceId instance.
__get_pydantic_core_schema__
classmethod
¶
Return the Pydantic core schema for ResourceId.
__get_pydantic_json_schema__
classmethod
¶
__get_pydantic_json_schema__(_core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> JsonSchemaValue
Return the JSON schema for ResourceId.
Source code in src/pydantypes/cloud/azure/resource.py
__new__
¶
__new__(value: str) -> ResourceId
Create and validate a new ResourceId instance.