diff --git a/sdk/keyvault/azure-mgmt-keyvault/CHANGELOG.md b/sdk/keyvault/azure-mgmt-keyvault/CHANGELOG.md index b3f51a5aec7d..360c7ddd66cd 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/CHANGELOG.md +++ b/sdk/keyvault/azure-mgmt-keyvault/CHANGELOG.md @@ -1,5 +1,21 @@ # Release History +## 15.0.0 (2026-07-22) + +### Features Added + + - Enum `JsonWebKeyType` added member `OCT_HSM` + - Model `VaultPatchProperties` added property `token_binding_parameters` + - Model `VaultProperties` added property `token_binding_parameters` + - Added enum `ManagedHsmSkuNameV2` + - Added enum `TokenBindingMode` + - Added model `TokenBindingParameters` + - Added enum `TokenBindingStrength` + +### Breaking Changes + + - Deleted or renamed model `ManagedHsmSkuName` + ## 14.0.1 (2026-03-27) ### Bugs Fixed diff --git a/sdk/keyvault/azure-mgmt-keyvault/README.md b/sdk/keyvault/azure-mgmt-keyvault/README.md index a53ae99ef64d..a5927967702c 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/README.md +++ b/sdk/keyvault/azure-mgmt-keyvault/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Key Vault Management Client Library. -This package has been tested with Python 3.9+. +This package has been tested with Python 3.10+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.9+ is required to use this package. +- Python 3.10+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package @@ -24,7 +24,7 @@ pip install azure-identity ### Authentication -By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables. +By default, [Microsoft Entra](https://learn.microsoft.com/entra/fundamentals/what-is-entra) token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. diff --git a/sdk/keyvault/azure-mgmt-keyvault/_metadata.json b/sdk/keyvault/azure-mgmt-keyvault/_metadata.json index 1bd32d37fcb9..d9708c8c854a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/_metadata.json +++ b/sdk/keyvault/azure-mgmt-keyvault/_metadata.json @@ -1,10 +1,11 @@ { - "apiVersion": "2026-02-01", + "apiVersion": "2026-03-01-preview", "apiVersions": { - "Microsoft.KeyVault": "2026-02-01" + "Microsoft.KeyVault": "2026-03-01-preview" }, - "commit": "2607e4bac26ea35059d8bd6addd3b6c81b0fca4f", + "commit": "7b08703f0340226430bd8838aad0d7ac4ab5a665", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/keyvault/resource-manager/Microsoft.KeyVault/KeyVault", - "emitterVersion": "0.61.0" + "emitterVersion": "0.63.3", + "httpClientPythonVersion": "^0.34.2" } \ No newline at end of file diff --git a/sdk/keyvault/azure-mgmt-keyvault/api.md b/sdk/keyvault/azure-mgmt-keyvault/api.md new file mode 100644 index 000000000000..58e076c9c4d7 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/api.md @@ -0,0 +1,4283 @@ +```py +namespace azure.mgmt.keyvault + + class azure.mgmt.keyvault.KeyVaultManagementClient: implements ContextManager + keys: KeysOperations + managed_hsm_keys: ManagedHsmKeysOperations + managed_hsms: ManagedHsmsOperations + mhsm_private_endpoint_connections: MHSMPrivateEndpointConnectionsOperations + mhsm_private_link_resources: MHSMPrivateLinkResourcesOperations + mhsm_regions: MHSMRegionsOperations + operations: Operations + private_endpoint_connections: PrivateEndpointConnectionsOperations + private_link_resources: PrivateLinkResourcesOperations + secrets: SecretsOperations + vaults: VaultsOperations + + def __init__( + self, + credential: TokenCredential, + subscription_id: str, + base_url: Optional[str] = None, + *, + api_version: str = ..., + cloud_setting: Optional[AzureClouds] = ..., + polling_interval: Optional[int] = ..., + **kwargs: Any + ) -> None: ... + + def close(self) -> None: ... + + def send_request( + self, + request: HttpRequest, + *, + stream: bool = False, + **kwargs: Any + ) -> HttpResponse: ... + + +namespace azure.mgmt.keyvault.aio + + class azure.mgmt.keyvault.aio.KeyVaultManagementClient: implements AsyncContextManager + keys: KeysOperations + managed_hsm_keys: ManagedHsmKeysOperations + managed_hsms: ManagedHsmsOperations + mhsm_private_endpoint_connections: MHSMPrivateEndpointConnectionsOperations + mhsm_private_link_resources: MHSMPrivateLinkResourcesOperations + mhsm_regions: MHSMRegionsOperations + operations: Operations + private_endpoint_connections: PrivateEndpointConnectionsOperations + private_link_resources: PrivateLinkResourcesOperations + secrets: SecretsOperations + vaults: VaultsOperations + + def __init__( + self, + credential: AsyncTokenCredential, + subscription_id: str, + base_url: Optional[str] = None, + *, + api_version: str = ..., + cloud_setting: Optional[AzureClouds] = ..., + polling_interval: Optional[int] = ..., + **kwargs: Any + ) -> None: ... + + async def close(self) -> None: ... + + def send_request( + self, + request: HttpRequest, + *, + stream: bool = False, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: ... + + +namespace azure.mgmt.keyvault.aio.operations + + class azure.mgmt.keyvault.aio.operations.KeysOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def create_if_not_exist( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + parameters: KeyCreateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Key: ... + + @overload + async def create_if_not_exist( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + parameters: KeyCreateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Key: ... + + @overload + async def create_if_not_exist( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Key: ... + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + **kwargs: Any + ) -> Key: ... + + @distributed_trace_async + async def get_version( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + key_version: str, + **kwargs: Any + ) -> Key: ... + + @distributed_trace + def list( + self, + resource_group_name: str, + vault_name: str, + **kwargs: Any + ) -> AsyncItemPaged[Key]: ... + + @distributed_trace + def list_versions( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + **kwargs: Any + ) -> AsyncItemPaged[Key]: ... + + + class azure.mgmt.keyvault.aio.operations.MHSMPrivateEndpointConnectionsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[MHSMPrivateEndpointConnection]: ... + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> MHSMPrivateEndpointConnection: ... + + @distributed_trace + def list_by_resource( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> AsyncItemPaged[MHSMPrivateEndpointConnection]: ... + + @overload + async def put( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + properties: MHSMPrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> MHSMPrivateEndpointConnection: ... + + @overload + async def put( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + properties: MHSMPrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> MHSMPrivateEndpointConnection: ... + + @overload + async def put( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> MHSMPrivateEndpointConnection: ... + + + class azure.mgmt.keyvault.aio.operations.MHSMPrivateLinkResourcesOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace_async + async def list_by_mhsm_resource( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> MHSMPrivateLinkResourceListResult: ... + + + class azure.mgmt.keyvault.aio.operations.MHSMRegionsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + def list_by_resource( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> AsyncItemPaged[MHSMGeoReplicatedRegion]: ... + + + class azure.mgmt.keyvault.aio.operations.ManagedHsmKeysOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def create_if_not_exist( + self, + resource_group_name: str, + name: str, + key_name: str, + parameters: ManagedHsmKeyCreateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ManagedHsmKey: ... + + @overload + async def create_if_not_exist( + self, + resource_group_name: str, + name: str, + key_name: str, + parameters: ManagedHsmKeyCreateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ManagedHsmKey: ... + + @overload + async def create_if_not_exist( + self, + resource_group_name: str, + name: str, + key_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ManagedHsmKey: ... + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + name: str, + key_name: str, + **kwargs: Any + ) -> ManagedHsmKey: ... + + @distributed_trace_async + async def get_version( + self, + resource_group_name: str, + name: str, + key_name: str, + key_version: str, + **kwargs: Any + ) -> ManagedHsmKey: ... + + @distributed_trace + def list( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> AsyncItemPaged[ManagedHsmKey]: ... + + @distributed_trace + def list_versions( + self, + resource_group_name: str, + name: str, + key_name: str, + **kwargs: Any + ) -> AsyncItemPaged[ManagedHsmKey]: ... + + + class azure.mgmt.keyvault.aio.operations.ManagedHsmsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + name: str, + parameters: ManagedHsm, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ManagedHsm]: ... + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + name: str, + parameters: ManagedHsm, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ManagedHsm]: ... + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ManagedHsm]: ... + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @distributed_trace_async + async def begin_purge_deleted( + self, + name: str, + location: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @overload + async def begin_update( + self, + resource_group_name: str, + name: str, + parameters: ManagedHsm, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ManagedHsm]: ... + + @overload + async def begin_update( + self, + resource_group_name: str, + name: str, + parameters: ManagedHsm, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ManagedHsm]: ... + + @overload + async def begin_update( + self, + resource_group_name: str, + name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ManagedHsm]: ... + + @overload + async def check_mhsm_name_availability( + self, + mhsm_name: CheckMhsmNameAvailabilityParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckMhsmNameAvailabilityResult: ... + + @overload + async def check_mhsm_name_availability( + self, + mhsm_name: CheckMhsmNameAvailabilityParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckMhsmNameAvailabilityResult: ... + + @overload + async def check_mhsm_name_availability( + self, + mhsm_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckMhsmNameAvailabilityResult: ... + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> Optional[ManagedHsm]: ... + + @distributed_trace_async + async def get_deleted( + self, + name: str, + location: str, + **kwargs: Any + ) -> DeletedManagedHsm: ... + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + *, + top: Optional[int] = ..., + **kwargs: Any + ) -> AsyncItemPaged[ManagedHsm]: ... + + @distributed_trace + def list_by_subscription( + self, + *, + top: Optional[int] = ..., + **kwargs: Any + ) -> AsyncItemPaged[ManagedHsm]: ... + + @distributed_trace + def list_deleted(self, **kwargs: Any) -> AsyncItemPaged[DeletedManagedHsm]: ... + + + class azure.mgmt.keyvault.aio.operations.Operations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged[Operation]: ... + + + class azure.mgmt.keyvault.aio.operations.PrivateEndpointConnectionsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + vault_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[PrivateEndpointConnection]: ... + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + vault_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> Optional[PrivateEndpointConnection]: ... + + @distributed_trace + def list_by_resource( + self, + resource_group_name: str, + vault_name: str, + **kwargs: Any + ) -> AsyncItemPaged[PrivateEndpointConnection]: ... + + @overload + async def put( + self, + resource_group_name: str, + vault_name: str, + private_endpoint_connection_name: str, + properties: PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> PrivateEndpointConnection: ... + + @overload + async def put( + self, + resource_group_name: str, + vault_name: str, + private_endpoint_connection_name: str, + properties: PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> PrivateEndpointConnection: ... + + @overload + async def put( + self, + resource_group_name: str, + vault_name: str, + private_endpoint_connection_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> PrivateEndpointConnection: ... + + + class azure.mgmt.keyvault.aio.operations.PrivateLinkResourcesOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace_async + async def list_by_vault( + self, + resource_group_name: str, + vault_name: str, + **kwargs: Any + ) -> PrivateLinkResourceListResult: ... + + + class azure.mgmt.keyvault.aio.operations.SecretsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def create_or_update( + self, + resource_group_name: str, + vault_name: str, + secret_name: str, + parameters: SecretCreateOrUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Secret: ... + + @overload + async def create_or_update( + self, + resource_group_name: str, + vault_name: str, + secret_name: str, + parameters: SecretCreateOrUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Secret: ... + + @overload + async def create_or_update( + self, + resource_group_name: str, + vault_name: str, + secret_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Secret: ... + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + vault_name: str, + secret_name: str, + **kwargs: Any + ) -> Secret: ... + + @distributed_trace + def list( + self, + resource_group_name: str, + vault_name: str, + *, + top: Optional[int] = ..., + **kwargs: Any + ) -> AsyncItemPaged[Secret]: ... + + @overload + async def update( + self, + resource_group_name: str, + vault_name: str, + secret_name: str, + parameters: SecretPatchParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Secret: ... + + @overload + async def update( + self, + resource_group_name: str, + vault_name: str, + secret_name: str, + parameters: SecretPatchParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Secret: ... + + @overload + async def update( + self, + resource_group_name: str, + vault_name: str, + secret_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Secret: ... + + + class azure.mgmt.keyvault.aio.operations.VaultsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + vault_name: str, + parameters: VaultCreateOrUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[Vault]: ... + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + vault_name: str, + parameters: VaultCreateOrUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[Vault]: ... + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + vault_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[Vault]: ... + + @distributed_trace_async + async def begin_purge_deleted( + self, + vault_name: str, + location: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @overload + async def check_name_availability( + self, + vault_name: VaultCheckNameAvailabilityParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckNameAvailabilityResult: ... + + @overload + async def check_name_availability( + self, + vault_name: VaultCheckNameAvailabilityParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckNameAvailabilityResult: ... + + @overload + async def check_name_availability( + self, + vault_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckNameAvailabilityResult: ... + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + vault_name: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + vault_name: str, + **kwargs: Any + ) -> Vault: ... + + @distributed_trace_async + async def get_deleted( + self, + vault_name: str, + location: str, + **kwargs: Any + ) -> DeletedVault: ... + + @distributed_trace + def list( + self, + *, + top: Optional[int] = ..., + **kwargs: Any + ) -> AsyncItemPaged[TrackedResource]: ... + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + *, + top: Optional[int] = ..., + **kwargs: Any + ) -> AsyncItemPaged[Vault]: ... + + @distributed_trace + def list_by_subscription( + self, + *, + top: Optional[int] = ..., + **kwargs: Any + ) -> AsyncItemPaged[Vault]: ... + + @distributed_trace + def list_deleted(self, **kwargs: Any) -> AsyncItemPaged[DeletedVault]: ... + + @overload + async def update( + self, + resource_group_name: str, + vault_name: str, + parameters: VaultPatchParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Vault: ... + + @overload + async def update( + self, + resource_group_name: str, + vault_name: str, + parameters: VaultPatchParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Vault: ... + + @overload + async def update( + self, + resource_group_name: str, + vault_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Vault: ... + + @overload + async def update_access_policy( + self, + resource_group_name: str, + vault_name: str, + operation_kind: Union[str, AccessPolicyUpdateKind], + parameters: VaultAccessPolicyParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> VaultAccessPolicyParameters: ... + + @overload + async def update_access_policy( + self, + resource_group_name: str, + vault_name: str, + operation_kind: Union[str, AccessPolicyUpdateKind], + parameters: VaultAccessPolicyParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> VaultAccessPolicyParameters: ... + + @overload + async def update_access_policy( + self, + resource_group_name: str, + vault_name: str, + operation_kind: Union[str, AccessPolicyUpdateKind], + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> VaultAccessPolicyParameters: ... + + +namespace azure.mgmt.keyvault.models + + class azure.mgmt.keyvault.models.AccessPolicyEntry(_Model): + application_id: Optional[str] + object_id: str + permissions: Permissions + tenant_id: str + + @overload + def __init__( + self, + *, + application_id: Optional[str] = ..., + object_id: str, + permissions: Permissions, + tenant_id: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.AccessPolicyUpdateKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ADD = "add" + REMOVE = "remove" + REPLACE = "replace" + + + class azure.mgmt.keyvault.models.Action(_Model): + type: Optional[Union[str, KeyRotationPolicyActionType]] + + @overload + def __init__( + self, + *, + type: Optional[Union[str, KeyRotationPolicyActionType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.ActionsRequired(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NONE = "None" + + + class azure.mgmt.keyvault.models.ActivationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACTIVE = "Active" + FAILED = "Failed" + NOT_ACTIVATED = "NotActivated" + UNKNOWN = "Unknown" + + + class azure.mgmt.keyvault.models.Attributes(_Model): + created: Optional[datetime] + enabled: Optional[bool] + expires: Optional[datetime] + not_before: Optional[datetime] + updated: Optional[datetime] + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = ..., + expires: Optional[datetime] = ..., + not_before: Optional[datetime] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.CertificatePermissions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALL = "all" + BACKUP = "backup" + CREATE = "create" + DELETE = "delete" + DELETEISSUERS = "deleteissuers" + GET = "get" + GETISSUERS = "getissuers" + IMPORT = "import" + LIST = "list" + LISTISSUERS = "listissuers" + MANAGECONTACTS = "managecontacts" + MANAGEISSUERS = "manageissuers" + PURGE = "purge" + RECOVER = "recover" + RESTORE = "restore" + SETISSUERS = "setissuers" + UPDATE = "update" + + + class azure.mgmt.keyvault.models.CheckMhsmNameAvailabilityParameters(_Model): + name: str + + @overload + def __init__( + self, + *, + name: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.CheckMhsmNameAvailabilityResult(_Model): + message: Optional[str] + name_available: Optional[bool] + reason: Optional[Union[str, Reason]] + + + class azure.mgmt.keyvault.models.CheckNameAvailabilityResult(_Model): + message: Optional[str] + name_available: Optional[bool] + reason: Optional[Union[str, Reason]] + + + class azure.mgmt.keyvault.models.CloudError(_Model): + error: Optional[CloudErrorBody] + + @overload + def __init__( + self, + *, + error: Optional[CloudErrorBody] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.CloudErrorBody(_Model): + code: Optional[str] + message: Optional[str] + + @overload + def __init__( + self, + *, + code: Optional[str] = ..., + message: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.CreateMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DEFAULT = "default" + RECOVER = "recover" + + + class azure.mgmt.keyvault.models.DeletedManagedHsm(ProxyResource): + id: str + name: str + properties: Optional[DeletedManagedHsmProperties] + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + properties: Optional[DeletedManagedHsmProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.DeletedManagedHsmProperties(_Model): + deletion_date: Optional[datetime] + location: Optional[str] + mhsm_id: Optional[str] + purge_protection_enabled: Optional[bool] + scheduled_purge_date: Optional[datetime] + tags: Optional[dict[str, str]] + + + class azure.mgmt.keyvault.models.DeletedVault(ProxyResource): + id: str + name: str + properties: Optional[DeletedVaultProperties] + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + properties: Optional[DeletedVaultProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.DeletedVaultProperties(_Model): + deletion_date: Optional[datetime] + location: Optional[str] + purge_protection_enabled: Optional[bool] + scheduled_purge_date: Optional[datetime] + tags: Optional[dict[str, str]] + vault_id: Optional[str] + + + class azure.mgmt.keyvault.models.DeletionRecoveryLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): + PURGEABLE = "Purgeable" + RECOVERABLE = "Recoverable" + RECOVERABLE_PROTECTED_SUBSCRIPTION = "Recoverable+ProtectedSubscription" + RECOVERABLE_PURGEABLE = "Recoverable+Purgeable" + + + class azure.mgmt.keyvault.models.DimensionProperties(_Model): + display_name: Optional[str] + name: Optional[str] + to_be_exported_for_shoebox: Optional[bool] + + @overload + def __init__( + self, + *, + display_name: Optional[str] = ..., + name: Optional[str] = ..., + to_be_exported_for_shoebox: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.Error(_Model): + code: Optional[str] + inner_error: Optional[Error] + message: Optional[str] + + + class azure.mgmt.keyvault.models.GeoReplicationRegionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CLEANUP = "Cleanup" + DELETING = "Deleting" + FAILED = "Failed" + PREPROVISIONING = "Preprovisioning" + PROVISIONING = "Provisioning" + SUCCEEDED = "Succeeded" + + + class azure.mgmt.keyvault.models.IPRule(_Model): + value: str + + @overload + def __init__( + self, + *, + value: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.IdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + APPLICATION = "Application" + KEY = "Key" + MANAGED_IDENTITY = "ManagedIdentity" + USER = "User" + + + class azure.mgmt.keyvault.models.JsonWebKeyCurveName(str, Enum, metaclass=CaseInsensitiveEnumMeta): + P256 = "P-256" + P256_K = "P-256K" + P384 = "P-384" + P521 = "P-521" + + + class azure.mgmt.keyvault.models.JsonWebKeyOperation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DECRYPT = "decrypt" + ENCRYPT = "encrypt" + IMPORT = "import" + RELEASE = "release" + SIGN = "sign" + UNWRAP_KEY = "unwrapKey" + VERIFY = "verify" + WRAP_KEY = "wrapKey" + + + class azure.mgmt.keyvault.models.JsonWebKeyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + EC = "EC" + EC_HSM = "EC-HSM" + OCT_HSM = "oct-HSM" + RSA = "RSA" + RSA_HSM = "RSA-HSM" + + + class azure.mgmt.keyvault.models.Key(ProxyResource): + id: str + location: Optional[str] + name: str + properties: KeyProperties + system_data: SystemData + tags: Optional[dict[str, str]] + type: str + + def __getattr__(self, name: str) -> Any: ... + + @overload + def __init__( + self, + *, + properties: KeyProperties + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... + + + class azure.mgmt.keyvault.models.KeyAttributes(_Model): + created: Optional[int] + enabled: Optional[bool] + expires: Optional[int] + exportable: Optional[bool] + not_before: Optional[int] + recovery_level: Optional[Union[str, DeletionRecoveryLevel]] + updated: Optional[int] + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = ..., + expires: Optional[int] = ..., + exportable: Optional[bool] = ..., + not_before: Optional[int] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.KeyCreateParameters(_Model): + properties: KeyProperties + tags: Optional[dict[str, str]] + + @overload + def __init__( + self, + *, + properties: KeyProperties, + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.KeyPermissions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALL = "all" + BACKUP = "backup" + CREATE = "create" + DECRYPT = "decrypt" + DELETE = "delete" + ENCRYPT = "encrypt" + GET = "get" + GETROTATIONPOLICY = "getrotationpolicy" + IMPORT = "import" + LIST = "list" + PURGE = "purge" + RECOVER = "recover" + RELEASE = "release" + RESTORE = "restore" + ROTATE = "rotate" + SETROTATIONPOLICY = "setrotationpolicy" + SIGN = "sign" + UNWRAP_KEY = "unwrapKey" + UPDATE = "update" + VERIFY = "verify" + WRAP_KEY = "wrapKey" + + + class azure.mgmt.keyvault.models.KeyProperties(_Model): + attributes: Optional[KeyAttributes] + curve_name: Optional[Union[str, JsonWebKeyCurveName]] + key_ops: Optional[list[Union[str, JsonWebKeyOperation]]] + key_size: Optional[int] + key_uri: Optional[str] + key_uri_with_version: Optional[str] + kty: Optional[Union[str, JsonWebKeyType]] + release_policy: Optional[KeyReleasePolicy] + rotation_policy: Optional[RotationPolicy] + + @overload + def __init__( + self, + *, + attributes: Optional[KeyAttributes] = ..., + curve_name: Optional[Union[str, JsonWebKeyCurveName]] = ..., + key_ops: Optional[list[Union[str, JsonWebKeyOperation]]] = ..., + key_size: Optional[int] = ..., + kty: Optional[Union[str, JsonWebKeyType]] = ..., + release_policy: Optional[KeyReleasePolicy] = ..., + rotation_policy: Optional[RotationPolicy] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.KeyReleasePolicy(_Model): + content_type: Optional[str] + data: Optional[bytes] + + @overload + def __init__( + self, + *, + content_type: Optional[str] = ..., + data: Optional[bytes] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.KeyRotationPolicyActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NOTIFY = "notify" + ROTATE = "rotate" + + + class azure.mgmt.keyvault.models.KeyRotationPolicyAttributes(_Model): + created: Optional[int] + expiry_time: Optional[str] + updated: Optional[int] + + @overload + def __init__( + self, + *, + expiry_time: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.LifetimeAction(_Model): + action: Optional[Action] + trigger: Optional[Trigger] + + @overload + def __init__( + self, + *, + action: Optional[Action] = ..., + trigger: Optional[Trigger] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.LogSpecification(_Model): + blob_duration: Optional[str] + display_name: Optional[str] + name: Optional[str] + + @overload + def __init__( + self, + *, + blob_duration: Optional[str] = ..., + display_name: Optional[str] = ..., + name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.MHSMGeoReplicatedRegion(_Model): + is_primary: Optional[bool] + name: Optional[str] + provisioning_state: Optional[Union[str, GeoReplicationRegionProvisioningState]] + + @overload + def __init__( + self, + *, + is_primary: Optional[bool] = ..., + name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.MHSMIPRule(_Model): + value: str + + @overload + def __init__( + self, + *, + value: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.MHSMNetworkRuleSet(_Model): + bypass: Optional[Union[str, NetworkRuleBypassOptions]] + default_action: Optional[Union[str, NetworkRuleAction]] + ip_rules: Optional[list[MHSMIPRule]] + service_tags: Optional[list[MHSMServiceTagRule]] + virtual_network_rules: Optional[list[MHSMVirtualNetworkRule]] + + @overload + def __init__( + self, + *, + bypass: Optional[Union[str, NetworkRuleBypassOptions]] = ..., + default_action: Optional[Union[str, NetworkRuleAction]] = ..., + ip_rules: Optional[list[MHSMIPRule]] = ..., + service_tags: Optional[list[MHSMServiceTagRule]] = ..., + virtual_network_rules: Optional[list[MHSMVirtualNetworkRule]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.MHSMPrivateEndpoint(_Model): + id: Optional[str] + + + class azure.mgmt.keyvault.models.MHSMPrivateEndpointConnection(ProxyResource): + etag: Optional[str] + id: str + identity: Optional[ManagedServiceIdentity] + location: Optional[str] + name: str + properties: Optional[MHSMPrivateEndpointConnectionProperties] + sku: Optional[ManagedHsmSku] + system_data: SystemData + tags: Optional[dict[str, str]] + type: str + + def __getattr__(self, name: str) -> Any: ... + + @overload + def __init__( + self, + *, + etag: Optional[str] = ..., + identity: Optional[ManagedServiceIdentity] = ..., + location: Optional[str] = ..., + properties: Optional[MHSMPrivateEndpointConnectionProperties] = ..., + sku: Optional[ManagedHsmSku] = ..., + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... + + + class azure.mgmt.keyvault.models.MHSMPrivateEndpointConnectionItem(_Model): + etag: Optional[str] + id: Optional[str] + properties: Optional[MHSMPrivateEndpointConnectionProperties] + + def __getattr__(self, name: str) -> Any: ... + + @overload + def __init__( + self, + *, + etag: Optional[str] = ..., + id: Optional[str] = ..., + properties: Optional[MHSMPrivateEndpointConnectionProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... + + + class azure.mgmt.keyvault.models.MHSMPrivateEndpointConnectionProperties(_Model): + private_endpoint: Optional[MHSMPrivateEndpoint] + private_link_service_connection_state: Optional[MHSMPrivateLinkServiceConnectionState] + provisioning_state: Optional[Union[str, PrivateEndpointConnectionProvisioningState]] + + @overload + def __init__( + self, + *, + private_endpoint: Optional[MHSMPrivateEndpoint] = ..., + private_link_service_connection_state: Optional[MHSMPrivateLinkServiceConnectionState] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.MHSMPrivateLinkResource(TrackedResource): + id: str + identity: Optional[ManagedServiceIdentity] + location: str + name: str + properties: Optional[MHSMPrivateLinkResourceProperties] + sku: Optional[ManagedHsmSku] + system_data: SystemData + tags: dict[str, str] + type: str + + def __getattr__(self, name: str) -> Any: ... + + @overload + def __init__( + self, + *, + identity: Optional[ManagedServiceIdentity] = ..., + location: str, + properties: Optional[MHSMPrivateLinkResourceProperties] = ..., + sku: Optional[ManagedHsmSku] = ..., + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... + + + class azure.mgmt.keyvault.models.MHSMPrivateLinkResourceListResult(_Model): + value: Optional[list[MHSMPrivateLinkResource]] + + @overload + def __init__( + self, + *, + value: Optional[list[MHSMPrivateLinkResource]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.MHSMPrivateLinkResourceProperties(_Model): + group_id: Optional[str] + required_members: Optional[list[str]] + required_zone_names: Optional[list[str]] + + @overload + def __init__( + self, + *, + required_zone_names: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.MHSMPrivateLinkServiceConnectionState(_Model): + actions_required: Optional[Union[str, ActionsRequired]] + description: Optional[str] + status: Optional[Union[str, PrivateEndpointServiceConnectionStatus]] + + @overload + def __init__( + self, + *, + actions_required: Optional[Union[str, ActionsRequired]] = ..., + description: Optional[str] = ..., + status: Optional[Union[str, PrivateEndpointServiceConnectionStatus]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.MHSMServiceTagRule(_Model): + tag: str + + @overload + def __init__( + self, + *, + tag: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.MHSMVirtualNetworkRule(_Model): + id: str + + @overload + def __init__( + self, + *, + id: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.ManagedHSMSecurityDomainProperties(_Model): + activation_status: Optional[Union[str, ActivationStatus]] + activation_status_message: Optional[str] + + + class azure.mgmt.keyvault.models.ManagedHsm(ProxyResource): + id: str + identity: Optional[ManagedServiceIdentity] + location: Optional[str] + name: str + properties: Optional[ManagedHsmProperties] + sku: Optional[ManagedHsmSku] + system_data: SystemData + tags: Optional[dict[str, str]] + type: str + + @overload + def __init__( + self, + *, + identity: Optional[ManagedServiceIdentity] = ..., + location: Optional[str] = ..., + properties: Optional[ManagedHsmProperties] = ..., + sku: Optional[ManagedHsmSku] = ..., + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.ManagedHsmAction(_Model): + type: Optional[Union[str, KeyRotationPolicyActionType]] + + @overload + def __init__( + self, + *, + type: Optional[Union[str, KeyRotationPolicyActionType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.ManagedHsmError(_Model): + error: Optional[Error] + + + class azure.mgmt.keyvault.models.ManagedHsmKey(ProxyResource): + id: str + name: str + properties: ManagedHsmKeyProperties + system_data: SystemData + tags: Optional[dict[str, str]] + type: str + + def __getattr__(self, name: str) -> Any: ... + + @overload + def __init__( + self, + *, + properties: ManagedHsmKeyProperties, + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... + + + class azure.mgmt.keyvault.models.ManagedHsmKeyAttributes(_Model): + created: Optional[int] + enabled: Optional[bool] + expires: Optional[int] + exportable: Optional[bool] + not_before: Optional[int] + recovery_level: Optional[Union[str, DeletionRecoveryLevel]] + updated: Optional[int] + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = ..., + expires: Optional[int] = ..., + exportable: Optional[bool] = ..., + not_before: Optional[int] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.ManagedHsmKeyCreateParameters(_Model): + properties: ManagedHsmKeyProperties + tags: Optional[dict[str, str]] + + @overload + def __init__( + self, + *, + properties: ManagedHsmKeyProperties, + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.ManagedHsmKeyProperties(_Model): + attributes: Optional[ManagedHsmKeyAttributes] + curve_name: Optional[Union[str, JsonWebKeyCurveName]] + key_ops: Optional[list[Union[str, JsonWebKeyOperation]]] + key_size: Optional[int] + key_uri: Optional[str] + key_uri_with_version: Optional[str] + kty: Optional[Union[str, JsonWebKeyType]] + release_policy: Optional[ManagedHsmKeyReleasePolicy] + rotation_policy: Optional[ManagedHsmRotationPolicy] + + @overload + def __init__( + self, + *, + attributes: Optional[ManagedHsmKeyAttributes] = ..., + curve_name: Optional[Union[str, JsonWebKeyCurveName]] = ..., + key_ops: Optional[list[Union[str, JsonWebKeyOperation]]] = ..., + key_size: Optional[int] = ..., + kty: Optional[Union[str, JsonWebKeyType]] = ..., + release_policy: Optional[ManagedHsmKeyReleasePolicy] = ..., + rotation_policy: Optional[ManagedHsmRotationPolicy] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.ManagedHsmKeyReleasePolicy(_Model): + content_type: Optional[str] + data: Optional[bytes] + + @overload + def __init__( + self, + *, + content_type: Optional[str] = ..., + data: Optional[bytes] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.ManagedHsmKeyRotationPolicyAttributes(_Model): + created: Optional[int] + expiry_time: Optional[str] + updated: Optional[int] + + @overload + def __init__( + self, + *, + expiry_time: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.ManagedHsmLifetimeAction(_Model): + action: Optional[ManagedHsmAction] + trigger: Optional[ManagedHsmTrigger] + + @overload + def __init__( + self, + *, + action: Optional[ManagedHsmAction] = ..., + trigger: Optional[ManagedHsmTrigger] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.ManagedHsmProperties(_Model): + create_mode: Optional[Union[str, CreateMode]] + enable_purge_protection: Optional[bool] + enable_soft_delete: Optional[bool] + hsm_uri: Optional[str] + initial_admin_object_ids: Optional[list[str]] + network_acls: Optional[MHSMNetworkRuleSet] + private_endpoint_connections: Optional[list[MHSMPrivateEndpointConnectionItem]] + provisioning_state: Optional[Union[str, ProvisioningState]] + public_network_access: Optional[Union[str, PublicNetworkAccess]] + regions: Optional[list[MHSMGeoReplicatedRegion]] + scheduled_purge_date: Optional[datetime] + security_domain_properties: Optional[ManagedHSMSecurityDomainProperties] + soft_delete_retention_in_days: Optional[int] + status_message: Optional[str] + tenant_id: Optional[str] + + @overload + def __init__( + self, + *, + create_mode: Optional[Union[str, CreateMode]] = ..., + enable_purge_protection: Optional[bool] = ..., + enable_soft_delete: Optional[bool] = ..., + initial_admin_object_ids: Optional[list[str]] = ..., + network_acls: Optional[MHSMNetworkRuleSet] = ..., + public_network_access: Optional[Union[str, PublicNetworkAccess]] = ..., + regions: Optional[list[MHSMGeoReplicatedRegion]] = ..., + soft_delete_retention_in_days: Optional[int] = ..., + tenant_id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.ManagedHsmRotationPolicy(_Model): + attributes: Optional[ManagedHsmKeyRotationPolicyAttributes] + lifetime_actions: Optional[list[ManagedHsmLifetimeAction]] + + @overload + def __init__( + self, + *, + attributes: Optional[ManagedHsmKeyRotationPolicyAttributes] = ..., + lifetime_actions: Optional[list[ManagedHsmLifetimeAction]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.ManagedHsmSku(_Model): + family: Union[str, ManagedHsmSkuFamily] + name: Union[str, ManagedHsmSkuNameV2] + + @overload + def __init__( + self, + *, + family: Union[str, ManagedHsmSkuFamily], + name: Union[str, ManagedHsmSkuNameV2] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.ManagedHsmSkuFamily(str, Enum, metaclass=CaseInsensitiveEnumMeta): + B = "B" + C = "C" + + + class azure.mgmt.keyvault.models.ManagedHsmSkuNameV2(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CUSTOM_B32 = "Custom_B32" + CUSTOM_B6 = "Custom_B6" + CUSTOM_C10 = "Custom_C10" + CUSTOM_C42 = "Custom_C42" + STANDARD_B1 = "Standard_B1" + + + class azure.mgmt.keyvault.models.ManagedHsmTrigger(_Model): + time_after_create: Optional[str] + time_before_expiry: Optional[str] + + @overload + def __init__( + self, + *, + time_after_create: Optional[str] = ..., + time_before_expiry: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.ManagedServiceIdentity(_Model): + principal_id: Optional[str] + tenant_id: Optional[str] + type: Union[str, ManagedServiceIdentityType] + user_assigned_identities: Optional[dict[str, UserAssignedIdentity]] + + @overload + def __init__( + self, + *, + type: Union[str, ManagedServiceIdentityType], + user_assigned_identities: Optional[dict[str, UserAssignedIdentity]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NONE = "None" + SYSTEM_ASSIGNED = "SystemAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" + USER_ASSIGNED = "UserAssigned" + + + class azure.mgmt.keyvault.models.MetricSpecification(_Model): + aggregation_type: Optional[str] + dimensions: Optional[list[DimensionProperties]] + display_description: Optional[str] + display_name: Optional[str] + fill_gap_with_zero: Optional[bool] + internal_metric_name: Optional[str] + lock_aggregation_type: Optional[str] + name: Optional[str] + supported_aggregation_types: Optional[list[str]] + supported_time_grain_types: Optional[list[str]] + unit: Optional[str] + + @overload + def __init__( + self, + *, + aggregation_type: Optional[str] = ..., + dimensions: Optional[list[DimensionProperties]] = ..., + display_description: Optional[str] = ..., + display_name: Optional[str] = ..., + fill_gap_with_zero: Optional[bool] = ..., + internal_metric_name: Optional[str] = ..., + lock_aggregation_type: Optional[str] = ..., + name: Optional[str] = ..., + supported_aggregation_types: Optional[list[str]] = ..., + supported_time_grain_types: Optional[list[str]] = ..., + unit: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.NetworkRuleAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALLOW = "Allow" + DENY = "Deny" + + + class azure.mgmt.keyvault.models.NetworkRuleBypassOptions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AZURE_SERVICES = "AzureServices" + NONE = "None" + + + class azure.mgmt.keyvault.models.NetworkRuleSet(_Model): + bypass: Optional[Union[str, NetworkRuleBypassOptions]] + default_action: Optional[Union[str, NetworkRuleAction]] + ip_rules: Optional[list[IPRule]] + virtual_network_rules: Optional[list[VirtualNetworkRule]] + + @overload + def __init__( + self, + *, + bypass: Optional[Union[str, NetworkRuleBypassOptions]] = ..., + default_action: Optional[Union[str, NetworkRuleAction]] = ..., + ip_rules: Optional[list[IPRule]] = ..., + virtual_network_rules: Optional[list[VirtualNetworkRule]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.Operation(_Model): + display: Optional[OperationDisplay] + is_data_action: Optional[bool] + name: Optional[str] + operation_properties: Optional[OperationProperties] + origin: Optional[str] + + def __getattr__(self, name: str) -> Any: ... + + @overload + def __init__( + self, + *, + display: Optional[OperationDisplay] = ..., + is_data_action: Optional[bool] = ..., + name: Optional[str] = ..., + operation_properties: Optional[OperationProperties] = ..., + origin: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... + + + class azure.mgmt.keyvault.models.OperationDisplay(_Model): + description: Optional[str] + operation: Optional[str] + provider: Optional[str] + resource: Optional[str] + + @overload + def __init__( + self, + *, + description: Optional[str] = ..., + operation: Optional[str] = ..., + provider: Optional[str] = ..., + resource: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.OperationProperties(_Model): + service_specification: Optional[ServiceSpecification] + + @overload + def __init__( + self, + *, + service_specification: Optional[ServiceSpecification] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.Permissions(_Model): + certificates: Optional[list[Union[str, CertificatePermissions]]] + keys_property: Optional[list[Union[str, KeyPermissions]]] + secrets: Optional[list[Union[str, SecretPermissions]]] + storage: Optional[list[Union[str, StoragePermissions]]] + + @overload + def __init__( + self, + *, + certificates: Optional[list[Union[str, CertificatePermissions]]] = ..., + keys_property: Optional[list[Union[str, KeyPermissions]]] = ..., + secrets: Optional[list[Union[str, SecretPermissions]]] = ..., + storage: Optional[list[Union[str, StoragePermissions]]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.PrivateEndpoint(_Model): + id: Optional[str] + + + class azure.mgmt.keyvault.models.PrivateEndpointConnection(ProxyResource): + etag: Optional[str] + id: str + location: Optional[str] + name: str + properties: Optional[PrivateEndpointConnectionProperties] + system_data: SystemData + tags: Optional[dict[str, str]] + type: str + + def __getattr__(self, name: str) -> Any: ... + + @overload + def __init__( + self, + *, + etag: Optional[str] = ..., + properties: Optional[PrivateEndpointConnectionProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... + + + class azure.mgmt.keyvault.models.PrivateEndpointConnectionItem(_Model): + etag: Optional[str] + id: Optional[str] + properties: Optional[PrivateEndpointConnectionProperties] + + def __getattr__(self, name: str) -> Any: ... + + @overload + def __init__( + self, + *, + etag: Optional[str] = ..., + id: Optional[str] = ..., + properties: Optional[PrivateEndpointConnectionProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... + + + class azure.mgmt.keyvault.models.PrivateEndpointConnectionProperties(_Model): + private_endpoint: Optional[PrivateEndpoint] + private_link_service_connection_state: Optional[PrivateLinkServiceConnectionState] + provisioning_state: Optional[Union[str, PrivateEndpointConnectionProvisioningState]] + + @overload + def __init__( + self, + *, + private_endpoint: Optional[PrivateEndpoint] = ..., + private_link_service_connection_state: Optional[PrivateLinkServiceConnectionState] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CREATING = "Creating" + DELETING = "Deleting" + DISCONNECTED = "Disconnected" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + UPDATING = "Updating" + + + class azure.mgmt.keyvault.models.PrivateEndpointServiceConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + APPROVED = "Approved" + DISCONNECTED = "Disconnected" + PENDING = "Pending" + REJECTED = "Rejected" + + + class azure.mgmt.keyvault.models.PrivateLinkResource(ProxyResource): + id: str + location: Optional[str] + name: str + properties: Optional[PrivateLinkResourceProperties] + system_data: SystemData + tags: Optional[dict[str, str]] + type: str + + def __getattr__(self, name: str) -> Any: ... + + @overload + def __init__( + self, + *, + properties: Optional[PrivateLinkResourceProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... + + + class azure.mgmt.keyvault.models.PrivateLinkResourceListResult(_Model): + value: Optional[list[PrivateLinkResource]] + + @overload + def __init__( + self, + *, + value: Optional[list[PrivateLinkResource]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.PrivateLinkResourceProperties(_Model): + group_id: Optional[str] + required_members: Optional[list[str]] + required_zone_names: Optional[list[str]] + + @overload + def __init__( + self, + *, + required_zone_names: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.PrivateLinkServiceConnectionState(_Model): + actions_required: Optional[Union[str, ActionsRequired]] + description: Optional[str] + status: Optional[Union[str, PrivateEndpointServiceConnectionStatus]] + + @overload + def __init__( + self, + *, + actions_required: Optional[Union[str, ActionsRequired]] = ..., + description: Optional[str] = ..., + status: Optional[Union[str, PrivateEndpointServiceConnectionStatus]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACTIVATED = "Activated" + DELETING = "Deleting" + FAILED = "Failed" + PROVISIONING = "Provisioning" + RESTORING = "Restoring" + SECURITY_DOMAIN_RESTORE = "SecurityDomainRestore" + SUCCEEDED = "Succeeded" + UPDATING = "Updating" + + + class azure.mgmt.keyvault.models.ProxyResource(Resource): + id: str + name: str + system_data: SystemData + type: str + + + class azure.mgmt.keyvault.models.PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" + + + class azure.mgmt.keyvault.models.Reason(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACCOUNT_NAME_INVALID = "AccountNameInvalid" + ALREADY_EXISTS = "AlreadyExists" + + + class azure.mgmt.keyvault.models.Resource(_Model): + id: Optional[str] + name: Optional[str] + system_data: Optional[SystemData] + type: Optional[str] + + + class azure.mgmt.keyvault.models.RotationPolicy(_Model): + attributes: Optional[KeyRotationPolicyAttributes] + lifetime_actions: Optional[list[LifetimeAction]] + + @overload + def __init__( + self, + *, + attributes: Optional[KeyRotationPolicyAttributes] = ..., + lifetime_actions: Optional[list[LifetimeAction]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.Secret(ProxyResource): + id: str + location: Optional[str] + name: str + properties: SecretProperties + system_data: SystemData + tags: Optional[dict[str, str]] + type: str + + @overload + def __init__( + self, + *, + properties: SecretProperties + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.SecretAttributes(Attributes): + created: datetime + enabled: bool + expires: datetime + not_before: datetime + updated: datetime + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = ..., + expires: Optional[datetime] = ..., + not_before: Optional[datetime] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.SecretCreateOrUpdateParameters(_Model): + properties: SecretProperties + tags: Optional[dict[str, str]] + + @overload + def __init__( + self, + *, + properties: SecretProperties, + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.SecretPatchParameters(_Model): + properties: Optional[SecretPatchProperties] + tags: Optional[dict[str, str]] + + @overload + def __init__( + self, + *, + properties: Optional[SecretPatchProperties] = ..., + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.SecretPatchProperties(_Model): + attributes: Optional[SecretAttributes] + content_type: Optional[str] + value: Optional[str] + + @overload + def __init__( + self, + *, + attributes: Optional[SecretAttributes] = ..., + content_type: Optional[str] = ..., + value: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.SecretPermissions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALL = "all" + BACKUP = "backup" + DELETE = "delete" + GET = "get" + LIST = "list" + PURGE = "purge" + RECOVER = "recover" + RESTORE = "restore" + SET = "set" + + + class azure.mgmt.keyvault.models.SecretProperties(_Model): + attributes: Optional[SecretAttributes] + content_type: Optional[str] + secret_uri: Optional[str] + secret_uri_with_version: Optional[str] + value: Optional[str] + + @overload + def __init__( + self, + *, + attributes: Optional[SecretAttributes] = ..., + content_type: Optional[str] = ..., + value: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.ServiceSpecification(_Model): + log_specifications: Optional[list[LogSpecification]] + metric_specifications: Optional[list[MetricSpecification]] + + @overload + def __init__( + self, + *, + log_specifications: Optional[list[LogSpecification]] = ..., + metric_specifications: Optional[list[MetricSpecification]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.Sku(_Model): + family: Union[str, SkuFamily] + name: Union[str, SkuName] + + @overload + def __init__( + self, + *, + family: Union[str, SkuFamily], + name: Union[str, SkuName] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.SkuFamily(str, Enum, metaclass=CaseInsensitiveEnumMeta): + A = "A" + + + class azure.mgmt.keyvault.models.SkuName(str, Enum, metaclass=CaseInsensitiveEnumMeta): + PREMIUM = "premium" + STANDARD = "standard" + + + class azure.mgmt.keyvault.models.StoragePermissions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALL = "all" + BACKUP = "backup" + DELETE = "delete" + DELETESAS = "deletesas" + GET = "get" + GETSAS = "getsas" + LIST = "list" + LISTSAS = "listsas" + PURGE = "purge" + RECOVER = "recover" + REGENERATEKEY = "regeneratekey" + RESTORE = "restore" + SET = "set" + SETSAS = "setsas" + UPDATE = "update" + + + class azure.mgmt.keyvault.models.SystemData(_Model): + created_at: Optional[datetime] + created_by: Optional[str] + created_by_type: Optional[Union[str, IdentityType]] + last_modified_at: Optional[datetime] + last_modified_by: Optional[str] + last_modified_by_type: Optional[Union[str, IdentityType]] + + @overload + def __init__( + self, + *, + created_at: Optional[datetime] = ..., + created_by: Optional[str] = ..., + created_by_type: Optional[Union[str, IdentityType]] = ..., + last_modified_at: Optional[datetime] = ..., + last_modified_by: Optional[str] = ..., + last_modified_by_type: Optional[Union[str, IdentityType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.TokenBindingMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ENFORCED = "Enforced" + NOT_ENFORCED = "NotEnforced" + + + class azure.mgmt.keyvault.models.TokenBindingParameters(_Model): + minimum_token_binding_strength: Optional[Union[str, TokenBindingStrength]] + mode: Optional[Union[str, TokenBindingMode]] + + @overload + def __init__( + self, + *, + minimum_token_binding_strength: Optional[Union[str, TokenBindingStrength]] = ..., + mode: Optional[Union[str, TokenBindingMode]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.TokenBindingStrength(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ATTESTED_CONFIDENTIAL = "AttestedConfidential" + ATTESTED_TRUSTED_LAUNCH = "AttestedTrustedLaunch" + NO_VALIDATION = "NoValidation" + UNATTESTED = "Unattested" + + + class azure.mgmt.keyvault.models.TrackedResource(Resource): + id: str + location: str + name: str + system_data: SystemData + tags: Optional[dict[str, str]] + type: str + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.Trigger(_Model): + time_after_create: Optional[str] + time_before_expiry: Optional[str] + + @overload + def __init__( + self, + *, + time_after_create: Optional[str] = ..., + time_before_expiry: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.UserAssignedIdentity(_Model): + client_id: Optional[str] + principal_id: Optional[str] + + + class azure.mgmt.keyvault.models.Vault(ProxyResource): + id: str + location: Optional[str] + name: str + properties: VaultProperties + system_data: SystemData + tags: Optional[dict[str, str]] + type: str + + @overload + def __init__( + self, + *, + location: Optional[str] = ..., + properties: VaultProperties, + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.VaultAccessPolicyParameters(_Model): + id: Optional[str] + location: Optional[str] + name: Optional[str] + properties: VaultAccessPolicyProperties + type: Optional[str] + + @overload + def __init__( + self, + *, + properties: VaultAccessPolicyProperties + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.VaultAccessPolicyProperties(_Model): + access_policies: list[AccessPolicyEntry] + + @overload + def __init__( + self, + *, + access_policies: list[AccessPolicyEntry] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.VaultCheckNameAvailabilityParameters(_Model): + name: str + type: Literal["KeyVault/vaults"] + + @overload + def __init__( + self, + *, + name: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.VaultCreateOrUpdateParameters(_Model): + location: str + properties: VaultProperties + tags: Optional[dict[str, str]] + + @overload + def __init__( + self, + *, + location: str, + properties: VaultProperties, + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.VaultPatchParameters(_Model): + properties: Optional[VaultPatchProperties] + tags: Optional[dict[str, str]] + + @overload + def __init__( + self, + *, + properties: Optional[VaultPatchProperties] = ..., + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.VaultPatchProperties(_Model): + access_policies: Optional[list[AccessPolicyEntry]] + create_mode: Optional[Union[str, CreateMode]] + enable_purge_protection: Optional[bool] + enable_rbac_authorization: Optional[bool] + enable_soft_delete: Optional[bool] + enabled_for_deployment: Optional[bool] + enabled_for_disk_encryption: Optional[bool] + enabled_for_template_deployment: Optional[bool] + network_acls: Optional[NetworkRuleSet] + public_network_access: Optional[str] + sku: Optional[Sku] + soft_delete_retention_in_days: Optional[int] + tenant_id: Optional[str] + token_binding_parameters: Optional[TokenBindingParameters] + + @overload + def __init__( + self, + *, + access_policies: Optional[list[AccessPolicyEntry]] = ..., + create_mode: Optional[Union[str, CreateMode]] = ..., + enable_purge_protection: Optional[bool] = ..., + enable_rbac_authorization: Optional[bool] = ..., + enable_soft_delete: Optional[bool] = ..., + enabled_for_deployment: Optional[bool] = ..., + enabled_for_disk_encryption: Optional[bool] = ..., + enabled_for_template_deployment: Optional[bool] = ..., + network_acls: Optional[NetworkRuleSet] = ..., + public_network_access: Optional[str] = ..., + sku: Optional[Sku] = ..., + soft_delete_retention_in_days: Optional[int] = ..., + tenant_id: Optional[str] = ..., + token_binding_parameters: Optional[TokenBindingParameters] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.VaultProperties(_Model): + access_policies: Optional[list[AccessPolicyEntry]] + create_mode: Optional[Union[str, CreateMode]] + enable_purge_protection: Optional[bool] + enable_rbac_authorization: Optional[bool] + enable_soft_delete: Optional[bool] + enabled_for_deployment: Optional[bool] + enabled_for_disk_encryption: Optional[bool] + enabled_for_template_deployment: Optional[bool] + hsm_pool_resource_id: Optional[str] + network_acls: Optional[NetworkRuleSet] + private_endpoint_connections: Optional[list[PrivateEndpointConnectionItem]] + provisioning_state: Optional[Union[str, VaultProvisioningState]] + public_network_access: Optional[str] + sku: Sku + soft_delete_retention_in_days: Optional[int] + tenant_id: str + token_binding_parameters: Optional[TokenBindingParameters] + vault_uri: Optional[str] + + @overload + def __init__( + self, + *, + access_policies: Optional[list[AccessPolicyEntry]] = ..., + create_mode: Optional[Union[str, CreateMode]] = ..., + enable_purge_protection: Optional[bool] = ..., + enable_rbac_authorization: Optional[bool] = ..., + enable_soft_delete: Optional[bool] = ..., + enabled_for_deployment: Optional[bool] = ..., + enabled_for_disk_encryption: Optional[bool] = ..., + enabled_for_template_deployment: Optional[bool] = ..., + network_acls: Optional[NetworkRuleSet] = ..., + provisioning_state: Optional[Union[str, VaultProvisioningState]] = ..., + public_network_access: Optional[str] = ..., + sku: Sku, + soft_delete_retention_in_days: Optional[int] = ..., + tenant_id: str, + token_binding_parameters: Optional[TokenBindingParameters] = ..., + vault_uri: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.keyvault.models.VaultProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + REGISTERING_DNS = "RegisteringDns" + SUCCEEDED = "Succeeded" + + + class azure.mgmt.keyvault.models.VirtualNetworkRule(_Model): + id: str + ignore_missing_vnet_service_endpoint: Optional[bool] + + @overload + def __init__( + self, + *, + id: str, + ignore_missing_vnet_service_endpoint: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + +namespace azure.mgmt.keyvault.operations + + class azure.mgmt.keyvault.operations.KeysOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def create_if_not_exist( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + parameters: KeyCreateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Key: ... + + @overload + def create_if_not_exist( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + parameters: KeyCreateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Key: ... + + @overload + def create_if_not_exist( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Key: ... + + @distributed_trace + def get( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + **kwargs: Any + ) -> Key: ... + + @distributed_trace + def get_version( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + key_version: str, + **kwargs: Any + ) -> Key: ... + + @distributed_trace + def list( + self, + resource_group_name: str, + vault_name: str, + **kwargs: Any + ) -> ItemPaged[Key]: ... + + @distributed_trace + def list_versions( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + **kwargs: Any + ) -> ItemPaged[Key]: ... + + + class azure.mgmt.keyvault.operations.MHSMPrivateEndpointConnectionsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> LROPoller[MHSMPrivateEndpointConnection]: ... + + @distributed_trace + def get( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> MHSMPrivateEndpointConnection: ... + + @distributed_trace + def list_by_resource( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> ItemPaged[MHSMPrivateEndpointConnection]: ... + + @overload + def put( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + properties: MHSMPrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> MHSMPrivateEndpointConnection: ... + + @overload + def put( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + properties: MHSMPrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> MHSMPrivateEndpointConnection: ... + + @overload + def put( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> MHSMPrivateEndpointConnection: ... + + + class azure.mgmt.keyvault.operations.MHSMPrivateLinkResourcesOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + def list_by_mhsm_resource( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> MHSMPrivateLinkResourceListResult: ... + + + class azure.mgmt.keyvault.operations.MHSMRegionsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + def list_by_resource( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> ItemPaged[MHSMGeoReplicatedRegion]: ... + + + class azure.mgmt.keyvault.operations.ManagedHsmKeysOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def create_if_not_exist( + self, + resource_group_name: str, + name: str, + key_name: str, + parameters: ManagedHsmKeyCreateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ManagedHsmKey: ... + + @overload + def create_if_not_exist( + self, + resource_group_name: str, + name: str, + key_name: str, + parameters: ManagedHsmKeyCreateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ManagedHsmKey: ... + + @overload + def create_if_not_exist( + self, + resource_group_name: str, + name: str, + key_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ManagedHsmKey: ... + + @distributed_trace + def get( + self, + resource_group_name: str, + name: str, + key_name: str, + **kwargs: Any + ) -> ManagedHsmKey: ... + + @distributed_trace + def get_version( + self, + resource_group_name: str, + name: str, + key_name: str, + key_version: str, + **kwargs: Any + ) -> ManagedHsmKey: ... + + @distributed_trace + def list( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> ItemPaged[ManagedHsmKey]: ... + + @distributed_trace + def list_versions( + self, + resource_group_name: str, + name: str, + key_name: str, + **kwargs: Any + ) -> ItemPaged[ManagedHsmKey]: ... + + + class azure.mgmt.keyvault.operations.ManagedHsmsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + name: str, + parameters: ManagedHsm, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ManagedHsm]: ... + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + name: str, + parameters: ManagedHsm, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ManagedHsm]: ... + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ManagedHsm]: ... + + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> LROPoller[None]: ... + + @distributed_trace + def begin_purge_deleted( + self, + name: str, + location: str, + **kwargs: Any + ) -> LROPoller[None]: ... + + @overload + def begin_update( + self, + resource_group_name: str, + name: str, + parameters: ManagedHsm, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ManagedHsm]: ... + + @overload + def begin_update( + self, + resource_group_name: str, + name: str, + parameters: ManagedHsm, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ManagedHsm]: ... + + @overload + def begin_update( + self, + resource_group_name: str, + name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ManagedHsm]: ... + + @overload + def check_mhsm_name_availability( + self, + mhsm_name: CheckMhsmNameAvailabilityParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckMhsmNameAvailabilityResult: ... + + @overload + def check_mhsm_name_availability( + self, + mhsm_name: CheckMhsmNameAvailabilityParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckMhsmNameAvailabilityResult: ... + + @overload + def check_mhsm_name_availability( + self, + mhsm_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckMhsmNameAvailabilityResult: ... + + @distributed_trace + def get( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> Optional[ManagedHsm]: ... + + @distributed_trace + def get_deleted( + self, + name: str, + location: str, + **kwargs: Any + ) -> DeletedManagedHsm: ... + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + *, + top: Optional[int] = ..., + **kwargs: Any + ) -> ItemPaged[ManagedHsm]: ... + + @distributed_trace + def list_by_subscription( + self, + *, + top: Optional[int] = ..., + **kwargs: Any + ) -> ItemPaged[ManagedHsm]: ... + + @distributed_trace + def list_deleted(self, **kwargs: Any) -> ItemPaged[DeletedManagedHsm]: ... + + + class azure.mgmt.keyvault.operations.Operations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged[Operation]: ... + + + class azure.mgmt.keyvault.operations.PrivateEndpointConnectionsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + vault_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> LROPoller[PrivateEndpointConnection]: ... + + @distributed_trace + def get( + self, + resource_group_name: str, + vault_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> Optional[PrivateEndpointConnection]: ... + + @distributed_trace + def list_by_resource( + self, + resource_group_name: str, + vault_name: str, + **kwargs: Any + ) -> ItemPaged[PrivateEndpointConnection]: ... + + @overload + def put( + self, + resource_group_name: str, + vault_name: str, + private_endpoint_connection_name: str, + properties: PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> PrivateEndpointConnection: ... + + @overload + def put( + self, + resource_group_name: str, + vault_name: str, + private_endpoint_connection_name: str, + properties: PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> PrivateEndpointConnection: ... + + @overload + def put( + self, + resource_group_name: str, + vault_name: str, + private_endpoint_connection_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> PrivateEndpointConnection: ... + + + class azure.mgmt.keyvault.operations.PrivateLinkResourcesOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + def list_by_vault( + self, + resource_group_name: str, + vault_name: str, + **kwargs: Any + ) -> PrivateLinkResourceListResult: ... + + + class azure.mgmt.keyvault.operations.SecretsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def create_or_update( + self, + resource_group_name: str, + vault_name: str, + secret_name: str, + parameters: SecretCreateOrUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Secret: ... + + @overload + def create_or_update( + self, + resource_group_name: str, + vault_name: str, + secret_name: str, + parameters: SecretCreateOrUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Secret: ... + + @overload + def create_or_update( + self, + resource_group_name: str, + vault_name: str, + secret_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Secret: ... + + @distributed_trace + def get( + self, + resource_group_name: str, + vault_name: str, + secret_name: str, + **kwargs: Any + ) -> Secret: ... + + @distributed_trace + def list( + self, + resource_group_name: str, + vault_name: str, + *, + top: Optional[int] = ..., + **kwargs: Any + ) -> ItemPaged[Secret]: ... + + @overload + def update( + self, + resource_group_name: str, + vault_name: str, + secret_name: str, + parameters: SecretPatchParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Secret: ... + + @overload + def update( + self, + resource_group_name: str, + vault_name: str, + secret_name: str, + parameters: SecretPatchParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Secret: ... + + @overload + def update( + self, + resource_group_name: str, + vault_name: str, + secret_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Secret: ... + + + class azure.mgmt.keyvault.operations.VaultsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + vault_name: str, + parameters: VaultCreateOrUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Vault]: ... + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + vault_name: str, + parameters: VaultCreateOrUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Vault]: ... + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + vault_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Vault]: ... + + @distributed_trace + def begin_purge_deleted( + self, + vault_name: str, + location: str, + **kwargs: Any + ) -> LROPoller[None]: ... + + @overload + def check_name_availability( + self, + vault_name: VaultCheckNameAvailabilityParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckNameAvailabilityResult: ... + + @overload + def check_name_availability( + self, + vault_name: VaultCheckNameAvailabilityParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckNameAvailabilityResult: ... + + @overload + def check_name_availability( + self, + vault_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckNameAvailabilityResult: ... + + @distributed_trace + def delete( + self, + resource_group_name: str, + vault_name: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace + def get( + self, + resource_group_name: str, + vault_name: str, + **kwargs: Any + ) -> Vault: ... + + @distributed_trace + def get_deleted( + self, + vault_name: str, + location: str, + **kwargs: Any + ) -> DeletedVault: ... + + @distributed_trace + def list( + self, + *, + top: Optional[int] = ..., + **kwargs: Any + ) -> ItemPaged[TrackedResource]: ... + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + *, + top: Optional[int] = ..., + **kwargs: Any + ) -> ItemPaged[Vault]: ... + + @distributed_trace + def list_by_subscription( + self, + *, + top: Optional[int] = ..., + **kwargs: Any + ) -> ItemPaged[Vault]: ... + + @distributed_trace + def list_deleted(self, **kwargs: Any) -> ItemPaged[DeletedVault]: ... + + @overload + def update( + self, + resource_group_name: str, + vault_name: str, + parameters: VaultPatchParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Vault: ... + + @overload + def update( + self, + resource_group_name: str, + vault_name: str, + parameters: VaultPatchParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Vault: ... + + @overload + def update( + self, + resource_group_name: str, + vault_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Vault: ... + + @overload + def update_access_policy( + self, + resource_group_name: str, + vault_name: str, + operation_kind: Union[str, AccessPolicyUpdateKind], + parameters: VaultAccessPolicyParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> VaultAccessPolicyParameters: ... + + @overload + def update_access_policy( + self, + resource_group_name: str, + vault_name: str, + operation_kind: Union[str, AccessPolicyUpdateKind], + parameters: VaultAccessPolicyParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> VaultAccessPolicyParameters: ... + + @overload + def update_access_policy( + self, + resource_group_name: str, + vault_name: str, + operation_kind: Union[str, AccessPolicyUpdateKind], + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> VaultAccessPolicyParameters: ... + + +namespace azure.mgmt.keyvault.types + + class azure.mgmt.keyvault.types.AccessPolicyEntry(TypedDict, total=False): + key "applicationId": str + key "objectId": Required[str] + key "permissions": Required[Permissions] + key "tenantId": Required[str] + application_id: str + object_id: str + permissions: Permissions + tenant_id: str + + + class azure.mgmt.keyvault.types.Action(TypedDict, total=False): + key "type": Union[str, KeyRotationPolicyActionType] + type: Union[str, KeyRotationPolicyActionType] + + + class azure.mgmt.keyvault.types.Attributes(TypedDict, total=False): + key "created": int + key "enabled": bool + key "exp": int + key "nbf": int + key "updated": int + created: int + enabled: bool + expires: int + not_before: int + updated: int + + + class azure.mgmt.keyvault.types.CheckMhsmNameAvailabilityParameters(TypedDict, total=False): + key "name": Required[str] + name: str + + + class azure.mgmt.keyvault.types.IPRule(TypedDict, total=False): + key "value": Required[str] + value: str + + + class azure.mgmt.keyvault.types.KeyAttributes(TypedDict, total=False): + key "created": int + key "enabled": bool + key "exp": int + key "exportable": bool + key "nbf": int + key "recoveryLevel": Union[str, DeletionRecoveryLevel] + key "updated": int + created: int + enabled: bool + expires: int + exportable: bool + not_before: int + recovery_level: Union[str, DeletionRecoveryLevel] + updated: int + + + class azure.mgmt.keyvault.types.KeyCreateParameters(TypedDict, total=False): + key "properties": Required[KeyProperties] + properties: KeyProperties + tags: dict[str, str] + + + class azure.mgmt.keyvault.types.KeyProperties(TypedDict, total=False): + key "attributes": ForwardRef('KeyAttributes', module='types') + key "curveName": Union[str, JsonWebKeyCurveName] + key "keySize": int + key "keyUri": str + key "keyUriWithVersion": str + key "kty": Union[str, JsonWebKeyType] + key "release_policy": ForwardRef('KeyReleasePolicy', module='types') + key "rotationPolicy": ForwardRef('RotationPolicy', module='types') + attributes: KeyAttributes + curve_name: Union[str, JsonWebKeyCurveName] + keyOps: list[Union[str, JsonWebKeyOperation]] + key_ops: list[Union[str, JsonWebKeyOperation]] + key_size: int + key_uri: str + key_uri_with_version: str + kty: Union[str, JsonWebKeyType] + release_policy: KeyReleasePolicy + rotation_policy: RotationPolicy + + + class azure.mgmt.keyvault.types.KeyReleasePolicy(TypedDict, total=False): + key "contentType": str + key "data": str + content_type: str + data: str + + + class azure.mgmt.keyvault.types.KeyRotationPolicyAttributes(TypedDict, total=False): + key "created": int + key "expiryTime": str + key "updated": int + created: int + expiry_time: str + updated: int + + + class azure.mgmt.keyvault.types.LifetimeAction(TypedDict, total=False): + key "action": ForwardRef('Action', module='types') + key "trigger": ForwardRef('Trigger', module='types') + action: Action + trigger: Trigger + + + class azure.mgmt.keyvault.types.MHSMGeoReplicatedRegion(TypedDict, total=False): + key "isPrimary": bool + key "name": str + key "provisioningState": Union[str, GeoReplicationRegionProvisioningState] + is_primary: bool + name: str + provisioning_state: Union[str, GeoReplicationRegionProvisioningState] + + + class azure.mgmt.keyvault.types.MHSMIPRule(TypedDict, total=False): + key "value": Required[str] + value: str + + + class azure.mgmt.keyvault.types.MHSMNetworkRuleSet(TypedDict, total=False): + key "bypass": Union[str, NetworkRuleBypassOptions] + key "defaultAction": Union[str, NetworkRuleAction] + bypass: Union[str, NetworkRuleBypassOptions] + default_action: Union[str, NetworkRuleAction] + ipRules: list[MHSMIPRule] + ip_rules: list[MHSMIPRule] + serviceTags: list[MHSMServiceTagRule] + service_tags: list[MHSMServiceTagRule] + virtualNetworkRules: list[MHSMVirtualNetworkRule] + virtual_network_rules: list[MHSMVirtualNetworkRule] + + + class azure.mgmt.keyvault.types.MHSMPrivateEndpoint(TypedDict, total=False): + key "id": str + id: str + + + class azure.mgmt.keyvault.types.MHSMPrivateEndpointConnection(ProxyResource): + key "etag": str + key "id": str + key "identity": ForwardRef('ManagedServiceIdentity', module='types') + key "location": str + key "name": str + key "properties": ForwardRef('MHSMPrivateEndpointConnectionProperties', module='types') + key "sku": ForwardRef('ManagedHsmSku', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + etag: str + id: str + identity: ManagedServiceIdentity + location: str + name: str + properties: MHSMPrivateEndpointConnectionProperties + sku: ManagedHsmSku + system_data: SystemData + tags: dict[str, str] + type: str + + + class azure.mgmt.keyvault.types.MHSMPrivateEndpointConnectionItem(TypedDict, total=False): + key "etag": str + key "id": str + key "properties": ForwardRef('MHSMPrivateEndpointConnectionProperties', module='types') + etag: str + id: str + properties: MHSMPrivateEndpointConnectionProperties + + + class azure.mgmt.keyvault.types.MHSMPrivateEndpointConnectionProperties(TypedDict, total=False): + key "privateEndpoint": ForwardRef('MHSMPrivateEndpoint', module='types') + key "privateLinkServiceConnectionState": ForwardRef('MHSMPrivateLinkServiceConnectionState', module='types') + key "provisioningState": Union[str, PrivateEndpointConnectionProvisioningState] + private_endpoint: MHSMPrivateEndpoint + private_link_service_connection_state: MHSMPrivateLinkServiceConnectionState + provisioning_state: Union[str, PrivateEndpointConnectionProvisioningState] + + + class azure.mgmt.keyvault.types.MHSMPrivateLinkServiceConnectionState(TypedDict, total=False): + key "actionsRequired": Union[str, ActionsRequired] + key "description": str + key "status": Union[str, PrivateEndpointServiceConnectionStatus] + actions_required: Union[str, ActionsRequired] + description: str + status: Union[str, PrivateEndpointServiceConnectionStatus] + + + class azure.mgmt.keyvault.types.MHSMServiceTagRule(TypedDict, total=False): + key "tag": Required[str] + tag: str + + + class azure.mgmt.keyvault.types.MHSMVirtualNetworkRule(TypedDict, total=False): + key "id": Required[str] + id: str + + + class azure.mgmt.keyvault.types.ManagedHSMSecurityDomainProperties(TypedDict, total=False): + key "activationStatus": Union[str, ActivationStatus] + key "activationStatusMessage": str + activation_status: Union[str, ActivationStatus] + activation_status_message: str + + + class azure.mgmt.keyvault.types.ManagedHsm(ProxyResource): + key "id": str + key "identity": ForwardRef('ManagedServiceIdentity', module='types') + key "location": str + key "name": str + key "properties": ForwardRef('ManagedHsmProperties', module='types') + key "sku": ForwardRef('ManagedHsmSku', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + identity: ManagedServiceIdentity + location: str + name: str + properties: ManagedHsmProperties + sku: ManagedHsmSku + system_data: SystemData + tags: dict[str, str] + type: str + + + class azure.mgmt.keyvault.types.ManagedHsmAction(TypedDict, total=False): + key "type": Union[str, KeyRotationPolicyActionType] + type: Union[str, KeyRotationPolicyActionType] + + + class azure.mgmt.keyvault.types.ManagedHsmKeyAttributes(TypedDict, total=False): + key "created": int + key "enabled": bool + key "exp": int + key "exportable": bool + key "nbf": int + key "recoveryLevel": Union[str, DeletionRecoveryLevel] + key "updated": int + created: int + enabled: bool + expires: int + exportable: bool + not_before: int + recovery_level: Union[str, DeletionRecoveryLevel] + updated: int + + + class azure.mgmt.keyvault.types.ManagedHsmKeyCreateParameters(TypedDict, total=False): + key "properties": Required[ManagedHsmKeyProperties] + properties: ManagedHsmKeyProperties + tags: dict[str, str] + + + class azure.mgmt.keyvault.types.ManagedHsmKeyProperties(TypedDict, total=False): + key "attributes": ForwardRef('ManagedHsmKeyAttributes', module='types') + key "curveName": Union[str, JsonWebKeyCurveName] + key "keySize": int + key "keyUri": str + key "keyUriWithVersion": str + key "kty": Union[str, JsonWebKeyType] + key "release_policy": ForwardRef('ManagedHsmKeyReleasePolicy', module='types') + key "rotationPolicy": ForwardRef('ManagedHsmRotationPolicy', module='types') + attributes: ManagedHsmKeyAttributes + curve_name: Union[str, JsonWebKeyCurveName] + keyOps: list[Union[str, JsonWebKeyOperation]] + key_ops: list[Union[str, JsonWebKeyOperation]] + key_size: int + key_uri: str + key_uri_with_version: str + kty: Union[str, JsonWebKeyType] + release_policy: ManagedHsmKeyReleasePolicy + rotation_policy: ManagedHsmRotationPolicy + + + class azure.mgmt.keyvault.types.ManagedHsmKeyReleasePolicy(TypedDict, total=False): + key "contentType": str + key "data": str + content_type: str + data: str + + + class azure.mgmt.keyvault.types.ManagedHsmKeyRotationPolicyAttributes(TypedDict, total=False): + key "created": int + key "expiryTime": str + key "updated": int + created: int + expiry_time: str + updated: int + + + class azure.mgmt.keyvault.types.ManagedHsmLifetimeAction(TypedDict, total=False): + key "action": ForwardRef('ManagedHsmAction', module='types') + key "trigger": ForwardRef('ManagedHsmTrigger', module='types') + action: ManagedHsmAction + trigger: ManagedHsmTrigger + + + class azure.mgmt.keyvault.types.ManagedHsmProperties(TypedDict, total=False): + key "createMode": Union[str, CreateMode] + key "enablePurgeProtection": bool + key "enableSoftDelete": bool + key "hsmUri": str + key "networkAcls": ForwardRef('MHSMNetworkRuleSet', module='types') + key "provisioningState": Union[str, ProvisioningState] + key "publicNetworkAccess": Union[str, PublicNetworkAccess] + key "scheduledPurgeDate": str + key "securityDomainProperties": ForwardRef('ManagedHSMSecurityDomainProperties', module='types') + key "softDeleteRetentionInDays": int + key "statusMessage": str + key "tenantId": str + create_mode: Union[str, CreateMode] + enable_purge_protection: bool + enable_soft_delete: bool + hsm_uri: str + initialAdminObjectIds: list[str] + initial_admin_object_ids: list[str] + network_acls: MHSMNetworkRuleSet + privateEndpointConnections: list[MHSMPrivateEndpointConnectionItem] + private_endpoint_connections: list[MHSMPrivateEndpointConnectionItem] + provisioning_state: Union[str, ProvisioningState] + public_network_access: Union[str, PublicNetworkAccess] + regions: list[MHSMGeoReplicatedRegion] + scheduled_purge_date: str + security_domain_properties: ManagedHSMSecurityDomainProperties + soft_delete_retention_in_days: int + status_message: str + tenant_id: str + + + class azure.mgmt.keyvault.types.ManagedHsmRotationPolicy(TypedDict, total=False): + key "attributes": ForwardRef('ManagedHsmKeyRotationPolicyAttributes', module='types') + attributes: ManagedHsmKeyRotationPolicyAttributes + lifetimeActions: list[ManagedHsmLifetimeAction] + lifetime_actions: list[ManagedHsmLifetimeAction] + + + class azure.mgmt.keyvault.types.ManagedHsmSku(TypedDict, total=False): + key "family": Required[Union[str, ManagedHsmSkuFamily]] + key "name": Required[Union[str, ManagedHsmSkuNameV2]] + family: Union[str, ManagedHsmSkuFamily] + name: Union[str, ManagedHsmSkuNameV2] + + + class azure.mgmt.keyvault.types.ManagedHsmTrigger(TypedDict, total=False): + key "timeAfterCreate": str + key "timeBeforeExpiry": str + time_after_create: str + time_before_expiry: str + + + class azure.mgmt.keyvault.types.ManagedServiceIdentity(TypedDict, total=False): + key "principalId": str + key "tenantId": str + key "type": Required[Union[str, ManagedServiceIdentityType]] + principal_id: str + tenant_id: str + type: Union[str, ManagedServiceIdentityType] + userAssignedIdentities: dict[str, UserAssignedIdentity] + user_assigned_identities: dict[str, UserAssignedIdentity] + + + class azure.mgmt.keyvault.types.NetworkRuleSet(TypedDict, total=False): + key "bypass": Union[str, NetworkRuleBypassOptions] + key "defaultAction": Union[str, NetworkRuleAction] + bypass: Union[str, NetworkRuleBypassOptions] + default_action: Union[str, NetworkRuleAction] + ipRules: list[IPRule] + ip_rules: list[IPRule] + virtualNetworkRules: list[VirtualNetworkRule] + virtual_network_rules: list[VirtualNetworkRule] + + + class azure.mgmt.keyvault.types.Permissions(TypedDict, total=False): + certificates: list[Union[str, CertificatePermissions]] + keys: list[Union[str, KeyPermissions]] + keys_property: list[Union[str, KeyPermissions]] + secrets: list[Union[str, SecretPermissions]] + storage: list[Union[str, StoragePermissions]] + + + class azure.mgmt.keyvault.types.PrivateEndpoint(TypedDict, total=False): + key "id": str + id: str + + + class azure.mgmt.keyvault.types.PrivateEndpointConnection(ProxyResource): + key "etag": str + key "id": str + key "location": str + key "name": str + key "properties": ForwardRef('PrivateEndpointConnectionProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + etag: str + id: str + location: str + name: str + properties: PrivateEndpointConnectionProperties + system_data: SystemData + tags: dict[str, str] + type: str + + + class azure.mgmt.keyvault.types.PrivateEndpointConnectionItem(TypedDict, total=False): + key "etag": str + key "id": str + key "properties": ForwardRef('PrivateEndpointConnectionProperties', module='types') + etag: str + id: str + properties: PrivateEndpointConnectionProperties + + + class azure.mgmt.keyvault.types.PrivateEndpointConnectionProperties(TypedDict, total=False): + key "privateEndpoint": ForwardRef('PrivateEndpoint', module='types') + key "privateLinkServiceConnectionState": ForwardRef('PrivateLinkServiceConnectionState', module='types') + key "provisioningState": Union[str, PrivateEndpointConnectionProvisioningState] + private_endpoint: PrivateEndpoint + private_link_service_connection_state: PrivateLinkServiceConnectionState + provisioning_state: Union[str, PrivateEndpointConnectionProvisioningState] + + + class azure.mgmt.keyvault.types.PrivateLinkServiceConnectionState(TypedDict, total=False): + key "actionsRequired": Union[str, ActionsRequired] + key "description": str + key "status": Union[str, PrivateEndpointServiceConnectionStatus] + actions_required: Union[str, ActionsRequired] + description: str + status: Union[str, PrivateEndpointServiceConnectionStatus] + + + class azure.mgmt.keyvault.types.ProxyResource(Resource): + key "id": str + key "name": str + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + system_data: SystemData + type: str + + + class azure.mgmt.keyvault.types.Resource(TypedDict, total=False): + key "id": str + key "name": str + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + system_data: SystemData + type: str + + + class azure.mgmt.keyvault.types.RotationPolicy(TypedDict, total=False): + key "attributes": ForwardRef('KeyRotationPolicyAttributes', module='types') + attributes: KeyRotationPolicyAttributes + lifetimeActions: list[LifetimeAction] + lifetime_actions: list[LifetimeAction] + + + class azure.mgmt.keyvault.types.SecretAttributes(Attributes): + key "created": int + key "enabled": bool + key "exp": int + key "nbf": int + key "updated": int + created: int + enabled: bool + expires: int + not_before: int + updated: int + + + class azure.mgmt.keyvault.types.SecretCreateOrUpdateParameters(TypedDict, total=False): + key "properties": Required[SecretProperties] + properties: SecretProperties + tags: dict[str, str] + + + class azure.mgmt.keyvault.types.SecretPatchParameters(TypedDict, total=False): + key "properties": ForwardRef('SecretPatchProperties', module='types') + properties: SecretPatchProperties + tags: dict[str, str] + + + class azure.mgmt.keyvault.types.SecretPatchProperties(TypedDict, total=False): + key "attributes": ForwardRef('SecretAttributes', module='types') + key "contentType": str + key "value": str + attributes: SecretAttributes + content_type: str + value: str + + + class azure.mgmt.keyvault.types.SecretProperties(TypedDict, total=False): + key "attributes": ForwardRef('SecretAttributes', module='types') + key "contentType": str + key "secretUri": str + key "secretUriWithVersion": str + key "value": str + attributes: SecretAttributes + content_type: str + secret_uri: str + secret_uri_with_version: str + value: str + + + class azure.mgmt.keyvault.types.Sku(TypedDict, total=False): + key "family": Required[Union[str, SkuFamily]] + key "name": Required[Union[str, SkuName]] + family: Union[str, SkuFamily] + name: Union[str, SkuName] + + + class azure.mgmt.keyvault.types.SystemData(TypedDict, total=False): + key "createdAt": str + key "createdBy": str + key "createdByType": Union[str, IdentityType] + key "lastModifiedAt": str + key "lastModifiedBy": str + key "lastModifiedByType": Union[str, IdentityType] + created_at: str + created_by: str + created_by_type: Union[str, IdentityType] + last_modified_at: str + last_modified_by: str + last_modified_by_type: Union[str, IdentityType] + + + class azure.mgmt.keyvault.types.TokenBindingParameters(TypedDict, total=False): + key "minimumTokenBindingStrength": Union[str, TokenBindingStrength] + key "mode": Union[str, TokenBindingMode] + minimum_token_binding_strength: Union[str, TokenBindingStrength] + mode: Union[str, TokenBindingMode] + + + class azure.mgmt.keyvault.types.Trigger(TypedDict, total=False): + key "timeAfterCreate": str + key "timeBeforeExpiry": str + time_after_create: str + time_before_expiry: str + + + class azure.mgmt.keyvault.types.UserAssignedIdentity(TypedDict, total=False): + key "clientId": str + key "principalId": str + client_id: str + principal_id: str + + + class azure.mgmt.keyvault.types.VaultAccessPolicyParameters(TypedDict, total=False): + key "id": str + key "location": str + key "name": str + key "properties": Required[VaultAccessPolicyProperties] + key "type": str + id: str + location: str + name: str + properties: VaultAccessPolicyProperties + type: str + + + class azure.mgmt.keyvault.types.VaultAccessPolicyProperties(TypedDict, total=False): + key "accessPolicies": Required[list[AccessPolicyEntry]] + access_policies: list[AccessPolicyEntry] + + + class azure.mgmt.keyvault.types.VaultCheckNameAvailabilityParameters(TypedDict, total=False): + key "name": Required[str] + key "type": Required[Literal["KeyVault/vaults"]] + name: str + type: Literal[KeyVault/vaults] + + + class azure.mgmt.keyvault.types.VaultCreateOrUpdateParameters(TypedDict, total=False): + key "location": Required[str] + key "properties": Required[VaultProperties] + location: str + properties: VaultProperties + tags: dict[str, str] + + + class azure.mgmt.keyvault.types.VaultPatchParameters(TypedDict, total=False): + key "properties": ForwardRef('VaultPatchProperties', module='types') + properties: VaultPatchProperties + tags: dict[str, str] + + + class azure.mgmt.keyvault.types.VaultPatchProperties(TypedDict, total=False): + key "createMode": Union[str, CreateMode] + key "enablePurgeProtection": bool + key "enableRbacAuthorization": bool + key "enableSoftDelete": bool + key "enabledForDeployment": bool + key "enabledForDiskEncryption": bool + key "enabledForTemplateDeployment": bool + key "networkAcls": ForwardRef('NetworkRuleSet', module='types') + key "publicNetworkAccess": str + key "sku": ForwardRef('Sku', module='types') + key "softDeleteRetentionInDays": int + key "tenantId": str + key "tokenBindingParameters": ForwardRef('TokenBindingParameters', module='types') + accessPolicies: list[AccessPolicyEntry] + access_policies: list[AccessPolicyEntry] + create_mode: Union[str, CreateMode] + enable_purge_protection: bool + enable_rbac_authorization: bool + enable_soft_delete: bool + enabled_for_deployment: bool + enabled_for_disk_encryption: bool + enabled_for_template_deployment: bool + network_acls: NetworkRuleSet + public_network_access: str + sku: Sku + soft_delete_retention_in_days: int + tenant_id: str + token_binding_parameters: TokenBindingParameters + + + class azure.mgmt.keyvault.types.VaultProperties(TypedDict, total=False): + key "createMode": Union[str, CreateMode] + key "enablePurgeProtection": bool + key "enableRbacAuthorization": bool + key "enableSoftDelete": bool + key "enabledForDeployment": bool + key "enabledForDiskEncryption": bool + key "enabledForTemplateDeployment": bool + key "hsmPoolResourceId": str + key "networkAcls": ForwardRef('NetworkRuleSet', module='types') + key "provisioningState": Union[str, VaultProvisioningState] + key "publicNetworkAccess": str + key "sku": Required[Sku] + key "softDeleteRetentionInDays": int + key "tenantId": Required[str] + key "tokenBindingParameters": ForwardRef('TokenBindingParameters', module='types') + key "vaultUri": str + accessPolicies: list[AccessPolicyEntry] + access_policies: list[AccessPolicyEntry] + create_mode: Union[str, CreateMode] + enable_purge_protection: bool + enable_rbac_authorization: bool + enable_soft_delete: bool + enabled_for_deployment: bool + enabled_for_disk_encryption: bool + enabled_for_template_deployment: bool + hsm_pool_resource_id: str + network_acls: NetworkRuleSet + privateEndpointConnections: list[PrivateEndpointConnectionItem] + private_endpoint_connections: list[PrivateEndpointConnectionItem] + provisioning_state: Union[str, VaultProvisioningState] + public_network_access: str + sku: Sku + soft_delete_retention_in_days: int + tenant_id: str + token_binding_parameters: TokenBindingParameters + vault_uri: str + + + class azure.mgmt.keyvault.types.VirtualNetworkRule(TypedDict, total=False): + key "id": Required[str] + key "ignoreMissingVnetServiceEndpoint": bool + id: str + ignore_missing_vnet_service_endpoint: bool + + +``` \ No newline at end of file diff --git a/sdk/keyvault/azure-mgmt-keyvault/api.metadata.yml b/sdk/keyvault/azure-mgmt-keyvault/api.metadata.yml new file mode 100644 index 000000000000..8580068b38c8 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/api.metadata.yml @@ -0,0 +1,3 @@ +apiMdSha256: d7d4a45d083140d4e14f2c6ea0fd3d784c7fb3e5022ba395de3a8104f82a249e +parserVersion: 0.3.30 +pythonVersion: 3.13.14 diff --git a/sdk/keyvault/azure-mgmt-keyvault/apiview-properties.json b/sdk/keyvault/azure-mgmt-keyvault/apiview-properties.json index e36e2ae0ee4f..85f702cc5fb0 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/apiview-properties.json +++ b/sdk/keyvault/azure-mgmt-keyvault/apiview-properties.json @@ -80,6 +80,7 @@ "azure.mgmt.keyvault.models.ServiceSpecification": "Microsoft.KeyVault.ServiceSpecification", "azure.mgmt.keyvault.models.Sku": "Microsoft.KeyVault.Sku", "azure.mgmt.keyvault.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData", + "azure.mgmt.keyvault.models.TokenBindingParameters": "Microsoft.KeyVault.TokenBindingParameters", "azure.mgmt.keyvault.models.Trigger": "Microsoft.KeyVault.Trigger", "azure.mgmt.keyvault.models.UserAssignedIdentity": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", "azure.mgmt.keyvault.models.Vault": "Microsoft.KeyVault.Vault", @@ -105,6 +106,8 @@ "azure.mgmt.keyvault.models.PrivateEndpointServiceConnectionStatus": "Microsoft.KeyVault.PrivateEndpointServiceConnectionStatus", "azure.mgmt.keyvault.models.ActionsRequired": "Microsoft.KeyVault.ActionsRequired", "azure.mgmt.keyvault.models.PrivateEndpointConnectionProvisioningState": "Microsoft.KeyVault.PrivateEndpointConnectionProvisioningState", + "azure.mgmt.keyvault.models.TokenBindingMode": "Microsoft.KeyVault.TokenBindingMode", + "azure.mgmt.keyvault.models.TokenBindingStrength": "Microsoft.KeyVault.TokenBindingStrength", "azure.mgmt.keyvault.models.AccessPolicyUpdateKind": "Microsoft.KeyVault.AccessPolicyUpdateKind", "azure.mgmt.keyvault.models.Reason": "Microsoft.KeyVault.Reason", "azure.mgmt.keyvault.models.ProvisioningState": "Microsoft.KeyVault.ProvisioningState", @@ -112,7 +115,7 @@ "azure.mgmt.keyvault.models.PublicNetworkAccess": "Microsoft.KeyVault.PublicNetworkAccess", "azure.mgmt.keyvault.models.ActivationStatus": "Microsoft.KeyVault.ActivationStatus", "azure.mgmt.keyvault.models.ManagedHsmSkuFamily": "Microsoft.KeyVault.ManagedHsmSkuFamily", - "azure.mgmt.keyvault.models.ManagedHsmSkuName": "Microsoft.KeyVault.ManagedHsmSkuName", + "azure.mgmt.keyvault.models.ManagedHsmSkuNameV2": "Microsoft.KeyVault.ManagedHsmSkuNameV2", "azure.mgmt.keyvault.models.ManagedServiceIdentityType": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", "azure.mgmt.keyvault.models.DeletionRecoveryLevel": "Microsoft.KeyVault.DeletionRecoveryLevel", "azure.mgmt.keyvault.models.JsonWebKeyType": "Microsoft.KeyVault.JsonWebKeyType", @@ -215,5 +218,6 @@ "azure.mgmt.keyvault.aio.operations.MHSMPrivateEndpointConnectionsOperations.begin_delete": "Microsoft.KeyVault.MhsmPrivateEndpointConnections.delete", "azure.mgmt.keyvault.operations.MHSMPrivateEndpointConnectionsOperations.list_by_resource": "Microsoft.KeyVault.MhsmPrivateEndpointConnections.listByResource", "azure.mgmt.keyvault.aio.operations.MHSMPrivateEndpointConnectionsOperations.list_by_resource": "Microsoft.KeyVault.MhsmPrivateEndpointConnections.listByResource" - } + }, + "CrossLanguageVersion": "b437e4d795d6" } \ No newline at end of file diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_client.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_client.py index 6888509184e1..3059701687b3 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_client.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_client.py @@ -7,8 +7,8 @@ # -------------------------------------------------------------------------- from copy import deepcopy +import sys from typing import Any, Optional, TYPE_CHECKING, cast -from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse @@ -33,6 +33,11 @@ VaultsOperations, ) +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self # type: ignore + if TYPE_CHECKING: from azure.core import AzureClouds from azure.core.credentials import TokenCredential @@ -76,9 +81,10 @@ class KeyVaultManagementClient: # pylint: disable=too-many-instance-attributes :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: The API version to use for this operation. Known values are "2026-02-01" - and None. Default value is "2026-02-01". Note that overriding this default value may result in - unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2026-03-01-preview" and None. Default value is None. If not set, the operation's default API + version will be used. Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_configuration.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_configuration.py index af528d0a0dad..6311de7daa15 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_configuration.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_configuration.py @@ -33,9 +33,10 @@ class KeyVaultManagementClientConfiguration: # pylint: disable=too-many-instanc :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: The API version to use for this operation. Known values are "2026-02-01" - and None. Default value is "2026-02-01". Note that overriding this default value may result in - unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2026-03-01-preview" and None. Default value is None. If not set, the operation's default API + version will be used. Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str """ @@ -47,7 +48,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2026-02-01") + api_version: str = kwargs.pop("api_version", "2026-03-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_utils/model_base.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_utils/model_base.py index a75a22adbb97..1934415c1369 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_utils/model_base.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_utils/model_base.py @@ -23,14 +23,19 @@ from json import JSONEncoder import xml.etree.ElementTree as ET from collections.abc import MutableMapping -from typing_extensions import Self import isodate from azure.core.exceptions import DeserializationError from azure.core import CaseInsensitiveEnumMeta from azure.core.pipeline import PipelineResponse from azure.core.serialization import _Null + from azure.core.rest import HttpResponse +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self + _LOGGER = logging.getLogger(__name__) __all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] @@ -104,6 +109,29 @@ def _serialize_bytes(o, format: typing.Optional[str] = None) -> str: return encoded +def _serialize_duration(td: timedelta, format: typing.Optional[str] = None): + """Serialize a timedelta to its wire representation. + + For the ``seconds``/``milliseconds`` encodings the value is converted to a + numeric value, otherwise it falls back to an ISO 8601 duration string. + + :param timedelta td: The timedelta to serialize. + :param str format: The duration encoding format. + :rtype: int or float or str + :return: serialized duration + """ + seconds = td.total_seconds() + if format == "duration-seconds-int": + return int(seconds) + if format == "duration-seconds-float": + return seconds + if format == "duration-milliseconds-int": + return int(seconds * 1000) + if format == "duration-milliseconds-float": + return seconds * 1000 + return _timedelta_as_isostr(td) + + def _serialize_datetime(o, format: typing.Optional[str] = None): if hasattr(o, "year") and hasattr(o, "hour"): if format == "rfc7231": @@ -296,6 +324,12 @@ def _deserialize_duration(attr): return isodate.parse_duration(attr) +def _deserialize_duration_numeric(attr, unit): + if isinstance(attr, timedelta): + return attr + return timedelta(**{unit: float(attr)}) + + def _deserialize_decimal(attr): if isinstance(attr, decimal.Decimal): return attr @@ -325,6 +359,10 @@ def _deserialize_int_as_str(attr): "unix-timestamp": _deserialize_datetime_unix_timestamp, "base64": _deserialize_bytes, "base64url": _deserialize_bytes_base64, + "duration-seconds-int": functools.partial(_deserialize_duration_numeric, unit="seconds"), + "duration-seconds-float": functools.partial(_deserialize_duration_numeric, unit="seconds"), + "duration-milliseconds-int": functools.partial(_deserialize_duration_numeric, unit="milliseconds"), + "duration-milliseconds-float": functools.partial(_deserialize_duration_numeric, unit="milliseconds"), } @@ -420,21 +458,21 @@ def __ne__(self, other: typing.Any) -> bool: def keys(self) -> typing.KeysView[str]: """ - :returns: a set-like object providing a view on D's keys + :returns: a set-like object providing a view on the mapping's keys :rtype: ~typing.KeysView """ return self._data.keys() def values(self) -> typing.ValuesView[typing.Any]: """ - :returns: an object providing a view on D's values + :returns: an object providing a view on the mapping's values :rtype: ~typing.ValuesView """ return self._data.values() def items(self) -> typing.ItemsView[str, typing.Any]: """ - :returns: set-like object providing a view on D's items + :returns: a set-like object providing a view on the mapping's items :rtype: ~typing.ItemsView """ return self._data.items() @@ -444,7 +482,7 @@ def get(self, key: str, default: typing.Any = None) -> typing.Any: Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None - :returns: D[k] if k in D, else d. + :returns: The value for key if key is in the dictionary, else default. :rtype: any """ try: @@ -479,19 +517,19 @@ def popitem(self) -> tuple[str, typing.Any]: Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple - :raises KeyError: if D is empty. + :raises KeyError: if the dictionary is empty. """ return self._data.popitem() def clear(self) -> None: """ - Remove all items from D. + Remove all items from the dictionary. """ self._data.clear() def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ """ - Updates D from mapping/iterable E and F. + Update the dictionary from a mapping or an iterable of key-value pairs. :param any args: Either a mapping object or an iterable of key-value pairs. """ self._data.update(*args, **kwargs) @@ -504,10 +542,11 @@ def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: """ - Same as calling D.get(k, d), and setting D[k]=d if k not found + Return the value for key if key is in the dictionary; otherwise set the key to + default and return default. :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary - :returns: D[k] if k in D, else d. + :returns: The value for key if key is in the dictionary, else default. :rtype: any """ if default is _UNSET: @@ -559,7 +598,7 @@ def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-m pass # Last, try datetime.timedelta try: - return _timedelta_as_isostr(o) + return _serialize_duration(o, format) except AttributeError: # This will be raised when it hits value.total_seconds in the method above pass @@ -585,6 +624,239 @@ def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typin return _serialize(value, rf._format) +# ============================================================================ +# Fast-path scalar deserializer functions for rest_field(deserializer=...) +# These are referenced from rest_field declarations to bypass the generic +# _deserialize -> _deserialize_with_callable chain. +# Only simple/primitive types — no models or container types. +# ============================================================================ + + +def _xml_deser_str(value): + if isinstance(value, ET.Element): + return value.text or "" + return str(value) if value is not None else None + + +def _xml_deser_int(value): + if isinstance(value, ET.Element): + return int(value.text) if value.text else None + return int(value) if value is not None else None + + +def _xml_deser_float(value): + if isinstance(value, ET.Element): + return float(value.text) if value.text else None + return float(value) if value is not None else None + + +def _xml_deser_bool(value): + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + if text in (True, False): + return text + return text.lower() == "true" + + +# pylint: disable=docstring-missing-param +def _xml_deser_bytes(value): + """Deserialize bytes from XML (base64).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_bytes(text) + + +def _xml_deser_bytes_base64url(value): + """Deserialize bytes from XML (base64url).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_bytes_base64(text) + + +def _xml_deser_datetime(value): + """Deserialize a datetime from XML (ISO 8601 / rfc3339).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_datetime(text) + + +def _xml_deser_datetime_rfc7231(value): + """Deserialize a datetime from XML (RFC7231 format).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_datetime_rfc7231(text) + + +def _xml_deser_datetime_unix_timestamp(value): + """Deserialize a datetime from XML (Unix timestamp).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_datetime_unix_timestamp(float(text)) + + +def _xml_deser_date(value): + """Deserialize a date from XML (ISO 8601).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_date(text) + + +def _xml_deser_time(value): + """Deserialize a time from XML (ISO 8601).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_time(text) + + +def _xml_deser_duration(value): + """Deserialize a timedelta from XML (ISO 8601 duration).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_duration(text) + + +def _xml_deser_decimal(value): + """Deserialize a Decimal from XML.""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_decimal(text) + + +def _xml_deser_enum_or_str(enum_cls, value): + """Deserialize a Union[EnumType, str] from XML.""" + text = value.text if isinstance(value, ET.Element) else value + if text is None: + return None + try: + return enum_cls(text) + except ValueError: + return text + + +def _extract_xml_model_type(rf_type): + """Extract the concrete Model class from a resolved rf._type partial chain. + + Unwraps ``Optional[Model]`` and ``_deserialize_model(Model, ...)`` + wrappers. Only handles Model and Optional[Model] — other composite + types (List, Dict, Union, etc.) return None and fall through to the + generic ``_deserialize`` path at runtime. + """ + if rf_type is None: + return None + if isinstance(rf_type, type) and _is_model(rf_type): + return rf_type + if not isinstance(rf_type, functools.partial): + return None + func = rf_type.func + args = rf_type.args + if func is _deserialize_with_optional and args: + return _extract_xml_model_type(args[0]) + if func is _deserialize_model and args: + cls = args[0] + return cls if isinstance(cls, type) and _is_model(cls) else None + return None + + +def _build_xml_field_plan( # pylint: disable=docstring-missing-return, docstring-missing-rtype, unused-variable + cls, attr_to_rest_field: dict +) -> list: + """Build a precomputed XML field plan for fast _init_from_xml iteration. + + Called once per model class in __new__. Returns a list of tuples: + (rest_name, xml_name, kind, deser, rf_type, is_optional, items_name) + + kind: 0=wrapped, 1=attribute, 2=unwrapped, 3=text + + For Model and Optional[Model] fields that lack a scalar + ``_deserializer``, this function precomputes the Model class as the + deserializer so ``_init_from_xml`` can call ``ModelClass(element)`` + directly instead of going through the expensive + ``_get_deserialize_callable_from_annotation`` chain at runtime. + """ + model_meta = getattr(cls, "_xml", {}) + model_ns = model_meta.get("ns") or model_meta.get("namespace") + plan = [] + + for rf in attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + deser = rf._deserializer + + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + is_optional = rf._is_optional + + # For Model / Optional[Model] fields without a scalar deserializer, + # precompute the Model class as the deserializer. + if deser is None and rf._type is not None: + model_cls = _extract_xml_model_type(rf._type) + if model_cls is not None: + deser = model_cls + + if prop_meta.get("attribute", False): + plan.append((rf._rest_name, xml_name, 1, deser, rf._type, is_optional, None)) + elif prop_meta.get("unwrapped", False): + items_name = prop_meta.get("itemsName") + if items_name: + items_ns = prop_meta.get("itemsNs") + if items_ns is not None: + xml_ns = items_ns + if xml_ns: + items_name = "{" + xml_ns + "}" + items_name + else: + items_name = xml_name + plan.append((rf._rest_name, xml_name, 2, deser, rf._type, is_optional, items_name)) + elif prop_meta.get("text", False): + plan.append((rf._rest_name, xml_name, 3, deser, rf._type, is_optional, None)) + else: + plan.append((rf._rest_name, xml_name, 0, deser, rf._type, is_optional, None)) + + return plan + + +# pylint: enable=docstring-missing-param class Model(_MyMutableMapping): _is_model = True # label whether current class's _attr_to_rest_field has been calculated @@ -595,62 +867,10 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: class_name = self.__class__.__name__ if len(args) > 1: raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") - dict_to_pass = { - rest_field._rest_name: rest_field._default - for rest_field in self._attr_to_rest_field.values() - if rest_field._default is not _UNSET - } - if args: # pylint: disable=too-many-nested-blocks + dict_to_pass: dict[str, typing.Any] = {} + if args: if isinstance(args[0], ET.Element): - existed_attr_keys = [] - model_meta = getattr(self, "_xml", {}) - - for rf in self._attr_to_rest_field.values(): - prop_meta = getattr(rf, "_xml", {}) - xml_name = prop_meta.get("name", rf._rest_name) - xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) - if xml_ns: - xml_name = "{" + xml_ns + "}" + xml_name - - # attribute - if prop_meta.get("attribute", False) and args[0].get(xml_name) is not None: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].get(xml_name)) - continue - - # unwrapped element is array - if prop_meta.get("unwrapped", False): - # unwrapped array could either use prop items meta/prop meta - if prop_meta.get("itemsName"): - xml_name = prop_meta.get("itemsName") - xml_ns = prop_meta.get("itemNs") - if xml_ns: - xml_name = "{" + xml_ns + "}" + xml_name - items = args[0].findall(xml_name) # pyright: ignore - if len(items) > 0: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, items) - elif not rf._is_optional: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = [] - continue - - # text element is primitive type - if prop_meta.get("text", False): - if args[0].text is not None: - dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].text) - continue - - # wrapped element could be normal property or array, it should only have one element - item = args[0].find(xml_name) - if item is not None: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, item) - - # rest thing is additional properties - for e in args[0]: - if e.tag not in existed_attr_keys: - dict_to_pass[e.tag] = _convert_element(e) + dict_to_pass.update(self._init_from_xml(args[0])) else: dict_to_pass.update( {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} @@ -667,8 +887,117 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: if v is not None } ) + # Apply client default values for fields the caller didn't set so that + # defaults are part of `_data` and therefore included during serialization. + for rf in self._attr_to_rest_field.values(): + if rf._default is _UNSET: + continue + if rf._rest_name in dict_to_pass: + continue + dict_to_pass[rf._rest_name] = _create_value(rf, rf._default) super().__init__(dict_to_pass) + def _init_from_xml( # pylint: disable=too-many-branches, too-many-statements + self, element: ET.Element + ) -> dict[str, typing.Any]: + """Deserialize an XML element into a dict mapping rest field names to values. + + :param ET.Element element: The XML element to deserialize from. + :returns: A dictionary of rest_name to deserialized value pairs. + :rtype: dict + """ + result: dict[str, typing.Any] = {} + existed_attr_keys: list[str] = [] + + field_plan = getattr(self, "_xml_field_plan", None) + if field_plan: + for rest_name, xml_name, kind, deser, rf_type, is_optional, items_name in field_plan: + if kind == 0: # wrapped element (most common) + item = element.find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + if deser: + result[rest_name] = deser(item) + else: + result[rest_name] = _deserialize(rf_type, item) + elif kind == 1: # attribute + attr_val = element.get(xml_name) + if attr_val is not None: + existed_attr_keys.append(xml_name) + if deser: + result[rest_name] = deser(attr_val) + else: + result[rest_name] = attr_val + elif kind == 2: # unwrapped array + items = element.findall(items_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(items_name) + if deser: + result[rest_name] = deser(items) + else: + result[rest_name] = _deserialize(rf_type, items) + elif not is_optional: + existed_attr_keys.append(items_name) + result[rest_name] = [] + elif kind == 3: # text + if element.text is not None: + if deser: + result[rest_name] = deser(element.text) + else: + result[rest_name] = element.text + else: + model_meta = getattr(self, "_xml", {}) + for rf in self._attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + # attribute + if prop_meta.get("attribute", False) and element.get(xml_name) is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, element.get(xml_name)) + continue + + # unwrapped element is array + if prop_meta.get("unwrapped", False): + _items_name = prop_meta.get("itemsName") + if _items_name: + xml_name = _items_name + _items_ns = prop_meta.get("itemsNs") + if _items_ns is not None: + xml_ns = _items_ns + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + items = element.findall(xml_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, items) + elif not rf._is_optional: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = [] + continue + + # text element is primitive type + if prop_meta.get("text", False): + if element.text is not None: + result[rf._rest_name] = _deserialize(rf._type, element.text) + continue + + # wrapped element could be normal property or array + item = element.find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, item) + + # rest thing is additional properties + for e in element: + if e.tag not in existed_attr_keys: + result[e.tag] = _convert_element(e) + + return result + def copy(self) -> "Model": return Model(self.__dict__) @@ -697,6 +1026,9 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: Model._get_backcompat_attribute_name(cls._attr_to_rest_field, attr): rf for attr, rf in cls._attr_to_rest_field.items() } + # Build XML field plan for fast _init_from_xml (only for XML models) + if getattr(cls, "_xml", None): + cls._xml_field_plan = _build_xml_field_plan(cls, attr_to_rest_field) cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") return super().__new__(cls) @@ -735,7 +1067,7 @@ def _deserialize(cls, data, exist_discriminators): model_meta = getattr(cls, "_xml", {}) prop_meta = getattr(discriminator, "_xml", {}) xml_name = prop_meta.get("name", discriminator._rest_name) - xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) if xml_ns: xml_name = "{" + xml_ns + "}" + xml_name @@ -1081,6 +1413,7 @@ def __init__( format: typing.Optional[str] = None, is_multipart_file_input: bool = False, xml: typing.Optional[dict[str, typing.Any]] = None, + deserializer: typing.Optional[typing.Callable] = None, original_tsp_name: typing.Optional[str] = None, ): self._type = type @@ -1094,6 +1427,7 @@ def __init__( self._format = format self._is_multipart_file_input = is_multipart_file_input self._xml = xml if xml is not None else {} + self._deserializer = deserializer self._original_tsp_name = original_tsp_name @property @@ -1114,7 +1448,10 @@ def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin # by this point, type and rest_name will have a value bc we default # them in __new__ of the Model class # Use _data.get() directly to avoid triggering __getitem__ which clears the cache - item = obj._data.get(self._rest_name) + item = obj._data.get(self._rest_name, _UNSET) + if item is _UNSET: + # Field not set by user; return the client default if one exists, otherwise None + return self._default if self._default is not _UNSET else None if item is None: return item if self._is_model: @@ -1127,7 +1464,11 @@ def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin # Return the value from _data directly (it's been deserialized in place) return obj._data.get(self._rest_name) - deserialized = _deserialize(self._type, _serialize(item, self._format), rf=self) + # Fast path: use _deserializer directly (avoids _serialize/_deserialize chain) + if self._deserializer: + deserialized = self._deserializer(item) + else: + deserialized = _deserialize(self._type, _serialize(item, self._format), rf=self) # For mutable types, store the deserialized value back in _data # so mutations directly affect _data @@ -1173,6 +1514,7 @@ def rest_field( format: typing.Optional[str] = None, is_multipart_file_input: bool = False, xml: typing.Optional[dict[str, typing.Any]] = None, + deserializer: typing.Optional[typing.Callable] = None, original_tsp_name: typing.Optional[str] = None, ) -> typing.Any: return _RestField( @@ -1183,6 +1525,7 @@ def rest_field( format=format, is_multipart_file_input=is_multipart_file_input, xml=xml, + deserializer=deserializer, original_tsp_name=original_tsp_name, ) @@ -1208,6 +1551,56 @@ def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore +def _get_xml_ns(meta: dict[str, typing.Any]) -> typing.Optional[str]: + """Return the XML namespace from a metadata dict, checking both 'ns' (old-style) and 'namespace' (DPG) keys. + + :param dict meta: The metadata dictionary to extract namespace from. + :returns: The namespace string if 'ns' or 'namespace' key is present, None otherwise. + :rtype: str or None + """ + ns = meta.get("ns") + if ns is None: + ns = meta.get("namespace") + return ns + + +def _resolve_xml_ns( + prop_meta: dict[str, typing.Any], model_meta: typing.Optional[dict[str, typing.Any]] = None +) -> typing.Optional[str]: + """Resolve XML namespace for a property, falling back to model namespace when appropriate. + + Checks the property metadata first; if no namespace is found and the model does not declare + an explicit prefix, falls back to the model-level namespace. + + :param dict prop_meta: The property metadata dictionary. + :param dict model_meta: The model metadata dictionary, used as fallback. + :returns: The resolved namespace string, or None. + :rtype: str or None + """ + ns = _get_xml_ns(prop_meta) + if ns is None and model_meta is not None and not model_meta.get("prefix"): + ns = _get_xml_ns(model_meta) + return ns + + +def _set_xml_attribute(element: ET.Element, name: str, value: typing.Any, prop_meta: dict[str, typing.Any]) -> None: + """Set an XML attribute on an element, handling namespace prefix registration. + + :param ET.Element element: The element to set the attribute on. + :param str name: The default attribute name (wire name). + :param any value: The attribute value. + :param dict prop_meta: The property metadata dictionary. + """ + xml_name = prop_meta.get("name", name) + _attr_ns = _get_xml_ns(prop_meta) + if _attr_ns: + _attr_prefix = prop_meta.get("prefix") + if _attr_prefix: + _safe_register_namespace(_attr_prefix, _attr_ns) + xml_name = "{" + _attr_ns + "}" + xml_name + element.set(xml_name, _get_primitive_type_value(value)) + + def _get_element( o: typing.Any, exclude_readonly: bool = False, @@ -1219,10 +1612,16 @@ def _get_element( # if prop is a model, then use the prop element directly, else generate a wrapper of model if wrapped_element is None: + # When serializing as an array item (parent_meta is set), check if the parent has an + # explicit itemsName. This ensures correct element names for unwrapped arrays (where + # the element tag is the property/items name, not the model type name). + _items_name = parent_meta.get("itemsName") if parent_meta is not None else None + element_name = _items_name if _items_name else (model_meta.get("name") or o.__class__.__name__) + _model_ns = _get_xml_ns(model_meta) wrapped_element = _create_xml_element( - model_meta.get("name", o.__class__.__name__), + element_name, model_meta.get("prefix"), - model_meta.get("ns"), + _model_ns, ) readonly_props = [] @@ -1244,7 +1643,9 @@ def _get_element( # additional properties will not have rest field, use the wire name as xml name prop_meta = {"name": k} - # if no ns for prop, use model's + # Propagate model namespace to properties only for old-style "ns"-keyed models. + # DPG-generated models use the "namespace" key and explicitly declare namespace on + # each property that needs it, so propagation is intentionally skipped for them. if prop_meta.get("ns") is None and model_meta.get("ns"): prop_meta["ns"] = model_meta.get("ns") prop_meta["prefix"] = model_meta.get("prefix") @@ -1256,12 +1657,7 @@ def _get_element( # text could only set on primitive type wrapped_element.text = _get_primitive_type_value(v) elif prop_meta.get("attribute", False): - xml_name = prop_meta.get("name", k) - if prop_meta.get("ns"): - ET.register_namespace(prop_meta.get("prefix"), prop_meta.get("ns")) # pyright: ignore - xml_name = "{" + prop_meta.get("ns") + "}" + xml_name # pyright: ignore - # attribute should be primitive type - wrapped_element.set(xml_name, _get_primitive_type_value(v)) + _set_xml_attribute(wrapped_element, k, v, prop_meta) else: # other wrapped prop element wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) @@ -1270,6 +1666,7 @@ def _get_element( return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore if isinstance(o, dict): result = [] + _dict_ns = _get_xml_ns(parent_meta) if parent_meta else None for k, v in o.items(): result.append( _get_wrapped_element( @@ -1277,7 +1674,7 @@ def _get_element( exclude_readonly, { "name": k, - "ns": parent_meta.get("ns") if parent_meta else None, + "ns": _dict_ns, "prefix": parent_meta.get("prefix") if parent_meta else None, }, ) @@ -1286,13 +1683,16 @@ def _get_element( # primitive case need to create element based on parent_meta if parent_meta: + _items_ns = parent_meta.get("itemsNs") + if _items_ns is None: + _items_ns = _get_xml_ns(parent_meta) return _get_wrapped_element( o, exclude_readonly, { "name": parent_meta.get("itemsName", parent_meta.get("name")), "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), - "ns": parent_meta.get("itemsNs", parent_meta.get("ns")), + "ns": _items_ns, }, ) @@ -1304,8 +1704,9 @@ def _get_wrapped_element( exclude_readonly: bool, meta: typing.Optional[dict[str, typing.Any]], ) -> ET.Element: + _meta_ns = _get_xml_ns(meta) if meta else None wrapped_element = _create_xml_element( - meta.get("name") if meta else None, meta.get("prefix") if meta else None, meta.get("ns") if meta else None + meta.get("name") if meta else None, meta.get("prefix") if meta else None, _meta_ns ) if isinstance(v, (dict, list)): wrapped_element.extend(_get_element(v, exclude_readonly, meta)) @@ -1326,11 +1727,29 @@ def _get_primitive_type_value(v) -> str: return str(v) +def _safe_register_namespace(prefix: str, ns: str) -> None: + """Register an XML namespace prefix, handling reserved prefix patterns. + + Some prefixes (e.g. 'ns2') match Python's reserved 'ns\\d+' pattern used for + auto-generated prefixes, causing register_namespace to raise ValueError. + Falls back to directly registering in the internal namespace map. + + :param str prefix: The namespace prefix to register. + :param str ns: The namespace URI. + """ + try: + ET.register_namespace(prefix, ns) + except ValueError: + _ns_map = getattr(ET, "_namespace_map", None) + if _ns_map is not None: + _ns_map[ns] = prefix + + def _create_xml_element( tag: typing.Any, prefix: typing.Optional[str] = None, ns: typing.Optional[str] = None ) -> ET.Element: if prefix and ns: - ET.register_namespace(prefix, ns) + _safe_register_namespace(prefix, ns) if ns: return ET.Element("{" + ns + "}" + tag) return ET.Element(tag) @@ -1341,6 +1760,8 @@ def _deserialize_xml( value: str, ) -> typing.Any: element = ET.fromstring(value) # nosec + if _is_model(deserializer): + return deserializer._deserialize(element, []) return _deserialize(deserializer, element) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_utils/serialization.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_utils/serialization.py index 81ec1de5922b..75906e2eb77f 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_utils/serialization.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_utils/serialization.py @@ -39,11 +39,15 @@ import xml.etree.ElementTree as ET import isodate # type: ignore -from typing_extensions import Self from azure.core.exceptions import DeserializationError, SerializationError from azure.core.serialization import NULL as CoreNull +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self + _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") JSON = MutableMapping[str, Any] @@ -516,6 +520,10 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: "rfc-1123": Serializer.serialize_rfc, "unix-time": Serializer.serialize_unix, "duration": Serializer.serialize_duration, + "duration-seconds-int": Serializer.serialize_duration_seconds_int, + "duration-seconds-float": Serializer.serialize_duration_seconds_float, + "duration-milliseconds-int": Serializer.serialize_duration_milliseconds_int, + "duration-milliseconds-float": Serializer.serialize_duration_milliseconds_float, "date": Serializer.serialize_date, "time": Serializer.serialize_time, "decimal": Serializer.serialize_decimal, @@ -1105,6 +1113,61 @@ def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument attr = isodate.parse_duration(attr) return isodate.duration_isoformat(attr) + @staticmethod + def _serialize_duration_numeric(attr, scale, as_int): + """Serialize a TimeDelta into a numeric value scaled to the wire unit. + + :param TimeDelta attr: Object to be serialized. + :param int scale: Multiplier applied to total seconds (1 for seconds, 1000 for milliseconds). + :param bool as_int: Whether to truncate the result to an int. + :rtype: int or float + :return: serialized duration + """ + if isinstance(attr, str): + attr = isodate.parse_duration(attr) + value = attr.total_seconds() * scale if isinstance(attr, datetime.timedelta) else attr + return int(value) if as_int else float(value) + + @staticmethod + def serialize_duration_seconds_int(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into an integer number of seconds. + + :param TimeDelta attr: Object to be serialized. + :rtype: int + :return: serialized duration + """ + return Serializer._serialize_duration_numeric(attr, 1, True) + + @staticmethod + def serialize_duration_seconds_float(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into a floating point number of seconds. + + :param TimeDelta attr: Object to be serialized. + :rtype: float + :return: serialized duration + """ + return Serializer._serialize_duration_numeric(attr, 1, False) + + @staticmethod + def serialize_duration_milliseconds_int(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into an integer number of milliseconds. + + :param TimeDelta attr: Object to be serialized. + :rtype: int + :return: serialized duration + """ + return Serializer._serialize_duration_numeric(attr, 1000, True) + + @staticmethod + def serialize_duration_milliseconds_float(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into a floating point number of milliseconds. + + :param TimeDelta attr: Object to be serialized. + :rtype: float + :return: serialized duration + """ + return Serializer._serialize_duration_numeric(attr, 1000, False) + @staticmethod def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into RFC-1123 formatted string. @@ -1377,6 +1440,10 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: "rfc-1123": Deserializer.deserialize_rfc, "unix-time": Deserializer.deserialize_unix, "duration": Deserializer.deserialize_duration, + "duration-seconds-int": Deserializer.deserialize_duration_seconds, + "duration-seconds-float": Deserializer.deserialize_duration_seconds, + "duration-milliseconds-int": Deserializer.deserialize_duration_milliseconds, + "duration-milliseconds-float": Deserializer.deserialize_duration_milliseconds, "date": Deserializer.deserialize_date, "time": Deserializer.deserialize_time, "decimal": Deserializer.deserialize_decimal, @@ -1389,6 +1456,10 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: } self.deserialize_expected_types = { "duration": (isodate.Duration, datetime.timedelta), + "duration-seconds-int": (isodate.Duration, datetime.timedelta), + "duration-seconds-float": (isodate.Duration, datetime.timedelta), + "duration-milliseconds-int": (isodate.Duration, datetime.timedelta), + "duration-milliseconds-float": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } self.dependencies: dict[str, type] = dict(classes) if classes else {} @@ -1401,7 +1472,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: # Otherwise, result are unexpected self.additional_properties_detection = True - def __call__(self, target_obj, response_data, content_type=None): + def __call__(self, target_obj, response_data, content_type=None): # pylint: disable=too-many-return-statements """Call the deserializer to process a REST response. :param str target_obj: Target data type to deserialize to. @@ -1411,6 +1482,27 @@ def __call__(self, target_obj, response_data, content_type=None): :return: Deserialized object. :rtype: object """ + # Fast path for header deserialization: response_data is a plain str or None + # and target_obj is a simple scalar type. This avoids the expensive + # _unpack_content → _deserialize → _classify_target → deserialize_data chain. + if response_data is None: + return None + if target_obj == "str" and isinstance(response_data, str): + return response_data + if isinstance(response_data, str): + if target_obj == "int": + return int(response_data) + if target_obj == "bool": + if response_data in ("true", "1", "True"): + return True + if response_data in ("false", "0", "False"): + return False + return bool(response_data) + if target_obj == "rfc-1123": + return Deserializer.deserialize_rfc(response_data) + if target_obj == "bytearray": + return Deserializer.deserialize_bytearray(response_data) + data = self._unpack_content(response_data, content_type) return self._deserialize(target_obj, data) @@ -1929,6 +2021,48 @@ def deserialize_duration(attr): raise DeserializationError(msg) from err return duration + @staticmethod + def _deserialize_duration_numeric(attr, unit): + """Deserialize a numeric duration value into a TimeDelta object. + + :param float attr: response value to be deserialized. + :param str unit: The wire unit, used as the ``timedelta`` keyword + (``"seconds"`` or ``"milliseconds"``). + :return: Deserialized duration + :rtype: TimeDelta + :raises DeserializationError: if value is invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + duration = datetime.timedelta(**{unit: float(attr)}) # type: ignore + except (ValueError, OverflowError, TypeError) as err: + msg = "Cannot deserialize duration object." + raise DeserializationError(msg) from err + return duration + + @staticmethod + def deserialize_duration_seconds(attr): + """Deserialize a numeric number of seconds into a TimeDelta object. + + :param float attr: response value to be deserialized. + :return: Deserialized duration + :rtype: TimeDelta + :raises DeserializationError: if value is invalid. + """ + return Deserializer._deserialize_duration_numeric(attr, "seconds") + + @staticmethod + def deserialize_duration_milliseconds(attr): + """Deserialize a numeric number of milliseconds into a TimeDelta object. + + :param float attr: response value to be deserialized. + :return: Deserialized duration + :rtype: TimeDelta + :raises DeserializationError: if value is invalid. + """ + return Deserializer._deserialize_duration_numeric(attr, "milliseconds") + @staticmethod def deserialize_date(attr): """Deserialize ISO-8601 formatted string into Date object. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_version.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_version.py index 2b32414d408d..256979095a07 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_version.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "14.0.1" +VERSION = "15.0.0" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_client.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_client.py index 3dbb19bb2b5c..c6efb24228bd 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_client.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_client.py @@ -7,8 +7,8 @@ # -------------------------------------------------------------------------- from copy import deepcopy +import sys from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast -from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest @@ -33,6 +33,11 @@ VaultsOperations, ) +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self # type: ignore + if TYPE_CHECKING: from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential @@ -77,9 +82,10 @@ class KeyVaultManagementClient: # pylint: disable=too-many-instance-attributes :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: The API version to use for this operation. Known values are "2026-02-01" - and None. Default value is "2026-02-01". Note that overriding this default value may result in - unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2026-03-01-preview" and None. Default value is None. If not set, the operation's default API + version will be used. Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_configuration.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_configuration.py index 3e42451f2ad3..aec823128ce2 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_configuration.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_configuration.py @@ -33,9 +33,10 @@ class KeyVaultManagementClientConfiguration: # pylint: disable=too-many-instanc :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: The API version to use for this operation. Known values are "2026-02-01" - and None. Default value is "2026-02-01". Note that overriding this default value may result in - unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2026-03-01-preview" and None. Default value is None. If not set, the operation's default API + version will be used. Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str """ @@ -47,7 +48,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2026-02-01") + api_version: str = kwargs.pop("api_version", "2026-03-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/operations/_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/operations/_operations.py index 13b9c8a8adb5..b61959ee6847 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/operations/_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/operations/_operations.py @@ -33,7 +33,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models as _models +from ... import models as _models, types as _types from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( @@ -90,7 +90,6 @@ T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -JSON = MutableMapping[str, Any] List = list @@ -158,7 +157,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -292,7 +294,7 @@ async def _create_or_update_initial( self, resource_group_name: str, vault_name: str, - parameters: Union[_models.VaultCreateOrUpdateParameters, JSON, IO[bytes]], + parameters: Union[_models.VaultCreateOrUpdateParameters, _types.VaultCreateOrUpdateParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -396,7 +398,7 @@ async def begin_create_or_update( self, resource_group_name: str, vault_name: str, - parameters: JSON, + parameters: _types.VaultCreateOrUpdateParameters, *, content_type: str = "application/json", **kwargs: Any @@ -409,7 +411,7 @@ async def begin_create_or_update( :param vault_name: The name of the vault. Required. :type vault_name: str :param parameters: Parameters to create or update the vault. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.VaultCreateOrUpdateParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -452,7 +454,7 @@ async def begin_create_or_update( self, resource_group_name: str, vault_name: str, - parameters: Union[_models.VaultCreateOrUpdateParameters, JSON, IO[bytes]], + parameters: Union[_models.VaultCreateOrUpdateParameters, _types.VaultCreateOrUpdateParameters, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.Vault]: """Create or update a key vault in the specified subscription. @@ -462,10 +464,10 @@ async def begin_create_or_update( :type resource_group_name: str :param vault_name: The name of the vault. Required. :type vault_name: str - :param parameters: Parameters to create or update the vault. Is one of the following types: - VaultCreateOrUpdateParameters, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.VaultCreateOrUpdateParameters or JSON or - IO[bytes] + :param parameters: Parameters to create or update the vault. Is either a + VaultCreateOrUpdateParameters type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.VaultCreateOrUpdateParameters or + ~azure.mgmt.keyvault.types.VaultCreateOrUpdateParameters or IO[bytes] :return: An instance of AsyncLROPoller that returns Vault. The Vault is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.keyvault.models.Vault] @@ -555,7 +557,7 @@ async def update( self, resource_group_name: str, vault_name: str, - parameters: JSON, + parameters: _types.VaultPatchParameters, *, content_type: str = "application/json", **kwargs: Any @@ -568,7 +570,7 @@ async def update( :param vault_name: The name of the vault. Required. :type vault_name: str :param parameters: Parameters to patch the vault. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.VaultPatchParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -609,7 +611,7 @@ async def update( self, resource_group_name: str, vault_name: str, - parameters: Union[_models.VaultPatchParameters, JSON, IO[bytes]], + parameters: Union[_models.VaultPatchParameters, _types.VaultPatchParameters, IO[bytes]], **kwargs: Any ) -> _models.Vault: """Update a key vault in the specified subscription. @@ -619,9 +621,10 @@ async def update( :type resource_group_name: str :param vault_name: The name of the vault. Required. :type vault_name: str - :param parameters: Parameters to patch the vault. Is one of the following types: - VaultPatchParameters, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.VaultPatchParameters or JSON or IO[bytes] + :param parameters: Parameters to patch the vault. Is either a VaultPatchParameters type or a + IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.VaultPatchParameters or + ~azure.mgmt.keyvault.types.VaultPatchParameters or IO[bytes] :return: Vault. The Vault is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.Vault :raises ~azure.core.exceptions.HttpResponseError: @@ -808,7 +811,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -901,7 +907,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -981,7 +990,7 @@ async def update_access_policy( resource_group_name: str, vault_name: str, operation_kind: Union[str, _models.AccessPolicyUpdateKind], - parameters: JSON, + parameters: _types.VaultAccessPolicyParameters, *, content_type: str = "application/json", **kwargs: Any @@ -997,7 +1006,7 @@ async def update_access_policy( Required. :type operation_kind: str or ~azure.mgmt.keyvault.models.AccessPolicyUpdateKind :param parameters: Access policy to merge into the vault. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.VaultAccessPolicyParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1045,7 +1054,7 @@ async def update_access_policy( resource_group_name: str, vault_name: str, operation_kind: Union[str, _models.AccessPolicyUpdateKind], - parameters: Union[_models.VaultAccessPolicyParameters, JSON, IO[bytes]], + parameters: Union[_models.VaultAccessPolicyParameters, _types.VaultAccessPolicyParameters, IO[bytes]], **kwargs: Any ) -> _models.VaultAccessPolicyParameters: """Update access policies in a key vault in the specified subscription. @@ -1058,9 +1067,10 @@ async def update_access_policy( :param operation_kind: Name of the operation. Known values are: "add", "replace", and "remove". Required. :type operation_kind: str or ~azure.mgmt.keyvault.models.AccessPolicyUpdateKind - :param parameters: Access policy to merge into the vault. Is one of the following types: - VaultAccessPolicyParameters, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.VaultAccessPolicyParameters or JSON or IO[bytes] + :param parameters: Access policy to merge into the vault. Is either a + VaultAccessPolicyParameters type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.VaultAccessPolicyParameters or + ~azure.mgmt.keyvault.types.VaultAccessPolicyParameters or IO[bytes] :return: VaultAccessPolicyParameters. The VaultAccessPolicyParameters is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.VaultAccessPolicyParameters @@ -1366,7 +1376,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -1462,9 +1475,12 @@ def prepare_request(next_link=None): for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) - _next_request_params["api-version"] = api_version + _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -1529,12 +1545,16 @@ async def check_name_availability( @overload async def check_name_availability( - self, vault_name: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + vault_name: _types.VaultCheckNameAvailabilityParameters, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.CheckNameAvailabilityResult: """Checks that the vault name is valid and is not already in use. :param vault_name: The name of the vault. Required. - :type vault_name: JSON + :type vault_name: ~azure.mgmt.keyvault.types.VaultCheckNameAvailabilityParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1563,14 +1583,18 @@ async def check_name_availability( @distributed_trace_async async def check_name_availability( - self, vault_name: Union[_models.VaultCheckNameAvailabilityParameters, JSON, IO[bytes]], **kwargs: Any + self, + vault_name: Union[ + _models.VaultCheckNameAvailabilityParameters, _types.VaultCheckNameAvailabilityParameters, IO[bytes] + ], + **kwargs: Any ) -> _models.CheckNameAvailabilityResult: """Checks that the vault name is valid and is not already in use. - :param vault_name: The name of the vault. Is one of the following types: - VaultCheckNameAvailabilityParameters, JSON, IO[bytes] Required. - :type vault_name: ~azure.mgmt.keyvault.models.VaultCheckNameAvailabilityParameters or JSON or - IO[bytes] + :param vault_name: The name of the vault. Is either a VaultCheckNameAvailabilityParameters type + or a IO[bytes] type. Required. + :type vault_name: ~azure.mgmt.keyvault.models.VaultCheckNameAvailabilityParameters or + ~azure.mgmt.keyvault.types.VaultCheckNameAvailabilityParameters or IO[bytes] :return: CheckNameAvailabilityResult. The CheckNameAvailabilityResult is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.CheckNameAvailabilityResult @@ -1776,7 +1800,7 @@ async def put( resource_group_name: str, vault_name: str, private_endpoint_connection_name: str, - properties: JSON, + properties: _types.PrivateEndpointConnection, *, content_type: str = "application/json", **kwargs: Any @@ -1792,7 +1816,7 @@ async def put( with the key vault. Required. :type private_endpoint_connection_name: str :param properties: The intended state of private endpoint connection. Required. - :type properties: JSON + :type properties: ~azure.mgmt.keyvault.types.PrivateEndpointConnection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1840,7 +1864,7 @@ async def put( resource_group_name: str, vault_name: str, private_endpoint_connection_name: str, - properties: Union[_models.PrivateEndpointConnection, JSON, IO[bytes]], + properties: Union[_models.PrivateEndpointConnection, _types.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: """Updates the specified private endpoint connection associated with the key vault. @@ -1853,9 +1877,10 @@ async def put( :param private_endpoint_connection_name: Name of the private endpoint connection associated with the key vault. Required. :type private_endpoint_connection_name: str - :param properties: The intended state of private endpoint connection. Is one of the following - types: PrivateEndpointConnection, JSON, IO[bytes] Required. - :type properties: ~azure.mgmt.keyvault.models.PrivateEndpointConnection or JSON or IO[bytes] + :param properties: The intended state of private endpoint connection. Is either a + PrivateEndpointConnection type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.keyvault.models.PrivateEndpointConnection or + ~azure.mgmt.keyvault.types.PrivateEndpointConnection or IO[bytes] :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.PrivateEndpointConnection @@ -2126,7 +2151,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -2259,7 +2287,11 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> Optio return deserialized # type: ignore async def _create_or_update_initial( - self, resource_group_name: str, name: str, parameters: Union[_models.ManagedHsm, JSON, IO[bytes]], **kwargs: Any + self, + resource_group_name: str, + name: str, + parameters: Union[_models.ManagedHsm, _types.ManagedHsm, IO[bytes]], + **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -2362,7 +2394,7 @@ async def begin_create_or_update( self, resource_group_name: str, name: str, - parameters: JSON, + parameters: _types.ManagedHsm, *, content_type: str = "application/json", **kwargs: Any @@ -2375,7 +2407,7 @@ async def begin_create_or_update( :param name: The name of the managed HSM Pool. Required. :type name: str :param parameters: Parameters to create or update the managed HSM Pool. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.ManagedHsm :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -2415,7 +2447,11 @@ async def begin_create_or_update( @distributed_trace_async async def begin_create_or_update( - self, resource_group_name: str, name: str, parameters: Union[_models.ManagedHsm, JSON, IO[bytes]], **kwargs: Any + self, + resource_group_name: str, + name: str, + parameters: Union[_models.ManagedHsm, _types.ManagedHsm, IO[bytes]], + **kwargs: Any ) -> AsyncLROPoller[_models.ManagedHsm]: """Create or update a managed HSM Pool in the specified subscription. @@ -2424,9 +2460,10 @@ async def begin_create_or_update( :type resource_group_name: str :param name: The name of the managed HSM Pool. Required. :type name: str - :param parameters: Parameters to create or update the managed HSM Pool. Is one of the following - types: ManagedHsm, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.ManagedHsm or JSON or IO[bytes] + :param parameters: Parameters to create or update the managed HSM Pool. Is either a ManagedHsm + type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.ManagedHsm or + ~azure.mgmt.keyvault.types.ManagedHsm or IO[bytes] :return: An instance of AsyncLROPoller that returns ManagedHsm. The ManagedHsm is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.keyvault.models.ManagedHsm] @@ -2485,7 +2522,11 @@ def get_long_running_output(pipeline_response): ) async def _update_initial( - self, resource_group_name: str, name: str, parameters: Union[_models.ManagedHsm, JSON, IO[bytes]], **kwargs: Any + self, + resource_group_name: str, + name: str, + parameters: Union[_models.ManagedHsm, _types.ManagedHsm, IO[bytes]], + **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -2588,7 +2629,7 @@ async def begin_update( self, resource_group_name: str, name: str, - parameters: JSON, + parameters: _types.ManagedHsm, *, content_type: str = "application/json", **kwargs: Any @@ -2601,7 +2642,7 @@ async def begin_update( :param name: The name of the managed HSM Pool. Required. :type name: str :param parameters: Parameters to patch the managed HSM Pool. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.ManagedHsm :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -2641,7 +2682,11 @@ async def begin_update( @distributed_trace_async async def begin_update( - self, resource_group_name: str, name: str, parameters: Union[_models.ManagedHsm, JSON, IO[bytes]], **kwargs: Any + self, + resource_group_name: str, + name: str, + parameters: Union[_models.ManagedHsm, _types.ManagedHsm, IO[bytes]], + **kwargs: Any ) -> AsyncLROPoller[_models.ManagedHsm]: """Update a managed HSM Pool in the specified subscription. @@ -2650,9 +2695,10 @@ async def begin_update( :type resource_group_name: str :param name: The name of the managed HSM Pool. Required. :type name: str - :param parameters: Parameters to patch the managed HSM Pool. Is one of the following types: - ManagedHsm, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.ManagedHsm or JSON or IO[bytes] + :param parameters: Parameters to patch the managed HSM Pool. Is either a ManagedHsm type or a + IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.ManagedHsm or + ~azure.mgmt.keyvault.types.ManagedHsm or IO[bytes] :return: An instance of AsyncLROPoller that returns ManagedHsm. The ManagedHsm is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.keyvault.models.ManagedHsm] @@ -2884,7 +2930,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -2978,7 +3027,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -3247,7 +3299,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -3312,12 +3367,16 @@ async def check_mhsm_name_availability( @overload async def check_mhsm_name_availability( - self, mhsm_name: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + mhsm_name: _types.CheckMhsmNameAvailabilityParameters, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.CheckMhsmNameAvailabilityResult: """Checks that the managed hsm name is valid and is not already in use. :param mhsm_name: The request body. Required. - :type mhsm_name: JSON + :type mhsm_name: ~azure.mgmt.keyvault.types.CheckMhsmNameAvailabilityParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -3346,14 +3405,18 @@ async def check_mhsm_name_availability( @distributed_trace_async async def check_mhsm_name_availability( - self, mhsm_name: Union[_models.CheckMhsmNameAvailabilityParameters, JSON, IO[bytes]], **kwargs: Any + self, + mhsm_name: Union[ + _models.CheckMhsmNameAvailabilityParameters, _types.CheckMhsmNameAvailabilityParameters, IO[bytes] + ], + **kwargs: Any ) -> _models.CheckMhsmNameAvailabilityResult: """Checks that the managed hsm name is valid and is not already in use. - :param mhsm_name: The request body. Is one of the following types: - CheckMhsmNameAvailabilityParameters, JSON, IO[bytes] Required. - :type mhsm_name: ~azure.mgmt.keyvault.models.CheckMhsmNameAvailabilityParameters or JSON or - IO[bytes] + :param mhsm_name: The request body. Is either a CheckMhsmNameAvailabilityParameters type or a + IO[bytes] type. Required. + :type mhsm_name: ~azure.mgmt.keyvault.models.CheckMhsmNameAvailabilityParameters or + ~azure.mgmt.keyvault.types.CheckMhsmNameAvailabilityParameters or IO[bytes] :return: CheckMhsmNameAvailabilityResult. The CheckMhsmNameAvailabilityResult is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.CheckMhsmNameAvailabilityResult @@ -3554,7 +3617,7 @@ async def create_or_update( resource_group_name: str, vault_name: str, secret_name: str, - parameters: JSON, + parameters: _types.SecretCreateOrUpdateParameters, *, content_type: str = "application/json", **kwargs: Any @@ -3571,7 +3634,7 @@ async def create_or_update( :param secret_name: The name of the secret. Required. :type secret_name: str :param parameters: Parameters to create or update the secret. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.SecretCreateOrUpdateParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -3618,7 +3681,7 @@ async def create_or_update( resource_group_name: str, vault_name: str, secret_name: str, - parameters: Union[_models.SecretCreateOrUpdateParameters, JSON, IO[bytes]], + parameters: Union[_models.SecretCreateOrUpdateParameters, _types.SecretCreateOrUpdateParameters, IO[bytes]], **kwargs: Any ) -> _models.Secret: """Create or update a secret in a key vault in the specified subscription. NOTE: This API is @@ -3632,10 +3695,10 @@ async def create_or_update( :type vault_name: str :param secret_name: The name of the secret. Required. :type secret_name: str - :param parameters: Parameters to create or update the secret. Is one of the following types: - SecretCreateOrUpdateParameters, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.SecretCreateOrUpdateParameters or JSON or - IO[bytes] + :param parameters: Parameters to create or update the secret. Is either a + SecretCreateOrUpdateParameters type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.SecretCreateOrUpdateParameters or + ~azure.mgmt.keyvault.types.SecretCreateOrUpdateParameters or IO[bytes] :return: Secret. The Secret is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.Secret :raises ~azure.core.exceptions.HttpResponseError: @@ -3746,7 +3809,7 @@ async def update( resource_group_name: str, vault_name: str, secret_name: str, - parameters: JSON, + parameters: _types.SecretPatchParameters, *, content_type: str = "application/json", **kwargs: Any @@ -3763,7 +3826,7 @@ async def update( :param secret_name: The name of the secret. Required. :type secret_name: str :param parameters: Parameters to patch the secret. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.SecretPatchParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -3810,7 +3873,7 @@ async def update( resource_group_name: str, vault_name: str, secret_name: str, - parameters: Union[_models.SecretPatchParameters, JSON, IO[bytes]], + parameters: Union[_models.SecretPatchParameters, _types.SecretPatchParameters, IO[bytes]], **kwargs: Any ) -> _models.Secret: """Update a secret in the specified subscription. NOTE: This API is intended for internal use in @@ -3824,9 +3887,10 @@ async def update( :type vault_name: str :param secret_name: The name of the secret. Required. :type secret_name: str - :param parameters: Parameters to patch the secret. Is one of the following types: - SecretPatchParameters, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.SecretPatchParameters or JSON or IO[bytes] + :param parameters: Parameters to patch the secret. Is either a SecretPatchParameters type or a + IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.SecretPatchParameters or + ~azure.mgmt.keyvault.types.SecretPatchParameters or IO[bytes] :return: Secret. The Secret is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.Secret :raises ~azure.core.exceptions.HttpResponseError: @@ -3961,7 +4025,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -4132,7 +4199,7 @@ async def create_if_not_exist( resource_group_name: str, vault_name: str, key_name: str, - parameters: JSON, + parameters: _types.KeyCreateParameters, *, content_type: str = "application/json", **kwargs: Any @@ -4149,7 +4216,7 @@ async def create_if_not_exist( :param key_name: The name of the key to be retrieved. Required. :type key_name: str :param parameters: The parameters used to create the specified key. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.KeyCreateParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -4196,7 +4263,7 @@ async def create_if_not_exist( resource_group_name: str, vault_name: str, key_name: str, - parameters: Union[_models.KeyCreateParameters, JSON, IO[bytes]], + parameters: Union[_models.KeyCreateParameters, _types.KeyCreateParameters, IO[bytes]], **kwargs: Any ) -> _models.Key: """Creates the first version of a new key if it does not exist. If it already exists, then the @@ -4210,9 +4277,10 @@ async def create_if_not_exist( :type vault_name: str :param key_name: The name of the key to be retrieved. Required. :type key_name: str - :param parameters: The parameters used to create the specified key. Is one of the following - types: KeyCreateParameters, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.KeyCreateParameters or JSON or IO[bytes] + :param parameters: The parameters used to create the specified key. Is either a + KeyCreateParameters type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.KeyCreateParameters or + ~azure.mgmt.keyvault.types.KeyCreateParameters or IO[bytes] :return: Key. The Key is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.Key :raises ~azure.core.exceptions.HttpResponseError: @@ -4340,7 +4408,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -4522,7 +4593,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -4697,7 +4771,7 @@ async def create_if_not_exist( resource_group_name: str, name: str, key_name: str, - parameters: JSON, + parameters: _types.ManagedHsmKeyCreateParameters, *, content_type: str = "application/json", **kwargs: Any @@ -4716,7 +4790,7 @@ async def create_if_not_exist( personally identifiable or sensitive information. Required. :type key_name: str :param parameters: The parameters used to create the specified key. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.ManagedHsmKeyCreateParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -4765,7 +4839,7 @@ async def create_if_not_exist( resource_group_name: str, name: str, key_name: str, - parameters: Union[_models.ManagedHsmKeyCreateParameters, JSON, IO[bytes]], + parameters: Union[_models.ManagedHsmKeyCreateParameters, _types.ManagedHsmKeyCreateParameters, IO[bytes]], **kwargs: Any ) -> _models.ManagedHsmKey: """Creates the first version of a new key if it does not exist. If it already exists, then the @@ -4781,10 +4855,10 @@ async def create_if_not_exist( globally for the purpose of running the service. The value provided should not include personally identifiable or sensitive information. Required. :type key_name: str - :param parameters: The parameters used to create the specified key. Is one of the following - types: ManagedHsmKeyCreateParameters, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.ManagedHsmKeyCreateParameters or JSON or - IO[bytes] + :param parameters: The parameters used to create the specified key. Is either a + ManagedHsmKeyCreateParameters type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.ManagedHsmKeyCreateParameters or + ~azure.mgmt.keyvault.types.ManagedHsmKeyCreateParameters or IO[bytes] :return: ManagedHsmKey. The ManagedHsmKey is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.ManagedHsmKey :raises ~azure.core.exceptions.HttpResponseError: @@ -4912,7 +4986,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -5096,7 +5173,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -5396,7 +5476,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -5571,7 +5654,7 @@ async def put( resource_group_name: str, name: str, private_endpoint_connection_name: str, - properties: JSON, + properties: _types.MHSMPrivateEndpointConnection, *, content_type: str = "application/json", **kwargs: Any @@ -5587,7 +5670,7 @@ async def put( with the managed hsm pool. Required. :type private_endpoint_connection_name: str :param properties: The intended state of private endpoint connection. Required. - :type properties: JSON + :type properties: ~azure.mgmt.keyvault.types.MHSMPrivateEndpointConnection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -5635,7 +5718,7 @@ async def put( resource_group_name: str, name: str, private_endpoint_connection_name: str, - properties: Union[_models.MHSMPrivateEndpointConnection, JSON, IO[bytes]], + properties: Union[_models.MHSMPrivateEndpointConnection, _types.MHSMPrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.MHSMPrivateEndpointConnection: """Updates the specified private endpoint connection associated with the managed hsm pool. @@ -5648,10 +5731,10 @@ async def put( :param private_endpoint_connection_name: Name of the private endpoint connection associated with the managed hsm pool. Required. :type private_endpoint_connection_name: str - :param properties: The intended state of private endpoint connection. Is one of the following - types: MHSMPrivateEndpointConnection, JSON, IO[bytes] Required. - :type properties: ~azure.mgmt.keyvault.models.MHSMPrivateEndpointConnection or JSON or - IO[bytes] + :param properties: The intended state of private endpoint connection. Is either a + MHSMPrivateEndpointConnection type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.keyvault.models.MHSMPrivateEndpointConnection or + ~azure.mgmt.keyvault.types.MHSMPrivateEndpointConnection or IO[bytes] :return: MHSMPrivateEndpointConnection. The MHSMPrivateEndpointConnection is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.MHSMPrivateEndpointConnection @@ -5922,7 +6005,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/models/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/models/__init__.py index 7771e978d20c..71f4542c4d5c 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/models/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/models/__init__.py @@ -92,6 +92,7 @@ ServiceSpecification, Sku, SystemData, + TokenBindingParameters, TrackedResource, Trigger, UserAssignedIdentity, @@ -121,7 +122,7 @@ KeyPermissions, KeyRotationPolicyActionType, ManagedHsmSkuFamily, - ManagedHsmSkuName, + ManagedHsmSkuNameV2, ManagedServiceIdentityType, NetworkRuleAction, NetworkRuleBypassOptions, @@ -134,6 +135,8 @@ SkuFamily, SkuName, StoragePermissions, + TokenBindingMode, + TokenBindingStrength, VaultProvisioningState, ) from ._patch import __all__ as _patch_all @@ -219,6 +222,7 @@ "ServiceSpecification", "Sku", "SystemData", + "TokenBindingParameters", "TrackedResource", "Trigger", "UserAssignedIdentity", @@ -245,7 +249,7 @@ "KeyPermissions", "KeyRotationPolicyActionType", "ManagedHsmSkuFamily", - "ManagedHsmSkuName", + "ManagedHsmSkuNameV2", "ManagedServiceIdentityType", "NetworkRuleAction", "NetworkRuleBypassOptions", @@ -258,6 +262,8 @@ "SkuFamily", "SkuName", "StoragePermissions", + "TokenBindingMode", + "TokenBindingStrength", "VaultProvisioningState", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/models/_enums.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/models/_enums.py index 556bc9c98cc9..c24f8dbdb4ed 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/models/_enums.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/models/_enums.py @@ -184,6 +184,8 @@ class JsonWebKeyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """RSA.""" RSA_HSM = "RSA-HSM" """RSA_HSM.""" + OCT_HSM = "oct-HSM" + """OCT_HSM.""" class KeyPermissions(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -251,19 +253,19 @@ class ManagedHsmSkuFamily(str, Enum, metaclass=CaseInsensitiveEnumMeta): """C.""" -class ManagedHsmSkuName(str, Enum, metaclass=CaseInsensitiveEnumMeta): +class ManagedHsmSkuNameV2(str, Enum, metaclass=CaseInsensitiveEnumMeta): """SKU of the managed HSM Pool.""" STANDARD_B1 = "Standard_B1" - """STANDARD_B1.""" + """Standard_B1 SKU.""" CUSTOM_B32 = "Custom_B32" - """CUSTOM_B32.""" + """Custom_B32 SKU.""" CUSTOM_B6 = "Custom_B6" - """CUSTOM_B6.""" + """Custom_B6 SKU.""" CUSTOM_C42 = "Custom_C42" - """CUSTOM_C42.""" + """Custom_C42 SKU.""" CUSTOM_C10 = "Custom_C10" - """CUSTOM_C10.""" + """Custom_C10 SKU.""" class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -450,6 +452,33 @@ class StoragePermissions(str, Enum, metaclass=CaseInsensitiveEnumMeta): """DELETESAS.""" +class TokenBindingMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """This specifies whether token binding is disabled, enabled or enforced.""" + + ENFORCED = "Enforced" + """Token binding is enforced for the vault. Only bounded tokens will be accepted. Bearer tokens + will be rejected.""" + NOT_ENFORCED = "NotEnforced" + """Token binding is not enforced for the vault. Bounded tokens will be rejected.""" + + +class TokenBindingStrength(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Must be one of the following values "NoValidation", "Unattested", "AttestedTrustedLaunch", + "AttestedConfidential". Strength of the token binding increases with each value in that order. + """ + + NO_VALIDATION = "NoValidation" + """This is default when token binding is not enabled.""" + UNATTESTED = "Unattested" + """No attestation proof is required for the bounded token.""" + ATTESTED_TRUSTED_LAUNCH = "AttestedTrustedLaunch" + """Bounded Entra token must originate from a trusted launch VM with attestation proof from the + attestation authority like Microsoft Azure Attestation.""" + ATTESTED_CONFIDENTIAL = "AttestedConfidential" + """Bounded Entra token must originate from a confidential VM with attestation proof from the + attestation authority like Microsoft Azure Attestation.""" + + class VaultProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Provisioning state of the vault.""" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/models/_models.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/models/_models.py index e98becaa811c..ee5e3ac6c2c2 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/models/_models.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/models/_models.py @@ -753,7 +753,7 @@ class KeyProperties(_Model): :ivar attributes: The attributes of the key. :vartype attributes: ~azure.mgmt.keyvault.models.KeyAttributes :ivar kty: The type of the key. For valid values, see JsonWebKeyType. Known values are: "EC", - "EC-HSM", "RSA", and "RSA-HSM". + "EC-HSM", "RSA", "RSA-HSM", and "oct-HSM". :vartype kty: str or ~azure.mgmt.keyvault.models.JsonWebKeyType :ivar key_ops: :vartype key_ops: list[str or ~azure.mgmt.keyvault.models.JsonWebKeyOperation] @@ -784,7 +784,7 @@ class KeyProperties(_Model): visibility=["read", "create", "update", "delete", "query"] ) """The type of the key. For valid values, see JsonWebKeyType. Known values are: \"EC\", - \"EC-HSM\", \"RSA\", and \"RSA-HSM\".""" + \"EC-HSM\", \"RSA\", \"RSA-HSM\", and \"oct-HSM\".""" key_ops: Optional[list[Union[str, "_models.JsonWebKeyOperation"]]] = rest_field( name="keyOps", visibility=["read", "create", "update", "delete", "query"] ) @@ -1267,7 +1267,7 @@ class ManagedHsmKeyProperties(_Model): :ivar attributes: The attributes of the key. :vartype attributes: ~azure.mgmt.keyvault.models.ManagedHsmKeyAttributes :ivar kty: The type of the key. For valid values, see JsonWebKeyType. Known values are: "EC", - "EC-HSM", "RSA", and "RSA-HSM". + "EC-HSM", "RSA", "RSA-HSM", and "oct-HSM". :vartype kty: str or ~azure.mgmt.keyvault.models.JsonWebKeyType :ivar key_ops: :vartype key_ops: list[str or ~azure.mgmt.keyvault.models.JsonWebKeyOperation] @@ -1298,7 +1298,7 @@ class ManagedHsmKeyProperties(_Model): visibility=["read", "create", "update", "delete", "query"] ) """The type of the key. For valid values, see JsonWebKeyType. Known values are: \"EC\", - \"EC-HSM\", \"RSA\", and \"RSA-HSM\".""" + \"EC-HSM\", \"RSA\", \"RSA-HSM\", and \"oct-HSM\".""" key_ops: Optional[list[Union[str, "_models.JsonWebKeyOperation"]]] = rest_field( name="keyOps", visibility=["read", "create", "update", "delete", "query"] ) @@ -1662,14 +1662,14 @@ class ManagedHsmSku(_Model): :vartype family: str or ~azure.mgmt.keyvault.models.ManagedHsmSkuFamily :ivar name: SKU of the managed HSM Pool. Required. Known values are: "Standard_B1", "Custom_B32", "Custom_B6", "Custom_C42", and "Custom_C10". - :vartype name: str or ~azure.mgmt.keyvault.models.ManagedHsmSkuName + :vartype name: str or ~azure.mgmt.keyvault.models.ManagedHsmSkuNameV2 """ family: Union[str, "_models.ManagedHsmSkuFamily"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) """SKU Family of the managed HSM Pool. Required. Known values are: \"B\" and \"C\".""" - name: Union[str, "_models.ManagedHsmSkuName"] = rest_field( + name: Union[str, "_models.ManagedHsmSkuNameV2"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) """SKU of the managed HSM Pool. Required. Known values are: \"Standard_B1\", \"Custom_B32\", @@ -1680,7 +1680,7 @@ def __init__( self, *, family: Union[str, "_models.ManagedHsmSkuFamily"], - name: Union[str, "_models.ManagedHsmSkuName"], + name: Union[str, "_models.ManagedHsmSkuNameV2"], ) -> None: ... @overload @@ -3578,6 +3578,52 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class TokenBindingParameters(_Model): + """Configuration for Token Binding for Entra tokens. + + :ivar mode: This specifies whether token binding is disabled, enabled or enforced. Known values + are: "Enforced" and "NotEnforced". + :vartype mode: str or ~azure.mgmt.keyvault.models.TokenBindingMode + :ivar minimum_token_binding_strength: Must be one of the following values "NoValidation", + "Unattested", "AttestedTrustedLaunch", "AttestedConfidential". Strength of the token binding + increases with each value in that order. Known values are: "NoValidation", "Unattested", + "AttestedTrustedLaunch", and "AttestedConfidential". + :vartype minimum_token_binding_strength: str or + ~azure.mgmt.keyvault.models.TokenBindingStrength + """ + + mode: Optional[Union[str, "_models.TokenBindingMode"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """This specifies whether token binding is disabled, enabled or enforced. Known values are: + \"Enforced\" and \"NotEnforced\".""" + minimum_token_binding_strength: Optional[Union[str, "_models.TokenBindingStrength"]] = rest_field( + name="minimumTokenBindingStrength", visibility=["read", "create", "update", "delete", "query"] + ) + """Must be one of the following values \"NoValidation\", \"Unattested\", + \"AttestedTrustedLaunch\", \"AttestedConfidential\". Strength of the token binding increases + with each value in that order. Known values are: \"NoValidation\", \"Unattested\", + \"AttestedTrustedLaunch\", and \"AttestedConfidential\".""" + + @overload + def __init__( + self, + *, + mode: Optional[Union[str, "_models.TokenBindingMode"]] = None, + minimum_token_binding_strength: Optional[Union[str, "_models.TokenBindingStrength"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class Trigger(_Model): """Trigger. @@ -3918,6 +3964,8 @@ class VaultPatchProperties(_Model): originates from trusted services will be blocked. This will override the set firewall rules, meaning that even if the firewall rules are present we will not honor the rules. :vartype public_network_access: str + :ivar token_binding_parameters: Configuration for Token Binding for Entra tokens. + :vartype token_binding_parameters: ~azure.mgmt.keyvault.models.TokenBindingParameters """ tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read", "create", "update", "delete", "query"]) @@ -3986,6 +4034,10 @@ class VaultPatchProperties(_Model): 'disabled' all traffic except private endpoint traffic and that that originates from trusted services will be blocked. This will override the set firewall rules, meaning that even if the firewall rules are present we will not honor the rules.""" + token_binding_parameters: Optional["_models.TokenBindingParameters"] = rest_field( + name="tokenBindingParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """Configuration for Token Binding for Entra tokens.""" @overload def __init__( @@ -4004,6 +4056,7 @@ def __init__( enable_purge_protection: Optional[bool] = None, network_acls: Optional["_models.NetworkRuleSet"] = None, public_network_access: Optional[str] = None, + token_binding_parameters: Optional["_models.TokenBindingParameters"] = None, ) -> None: ... @overload @@ -4080,6 +4133,8 @@ class VaultProperties(_Model): originates from trusted services will be blocked. This will override the set firewall rules, meaning that even if the firewall rules are present we will not honor the rules. :vartype public_network_access: str + :ivar token_binding_parameters: Configuration for Token Binding for Entra tokens. + :vartype token_binding_parameters: ~azure.mgmt.keyvault.models.TokenBindingParameters """ tenant_id: str = rest_field(name="tenantId", visibility=["read", "create", "update", "delete", "query"]) @@ -4163,6 +4218,10 @@ class VaultProperties(_Model): 'disabled' all traffic except private endpoint traffic and that that originates from trusted services will be blocked. This will override the set firewall rules, meaning that even if the firewall rules are present we will not honor the rules.""" + token_binding_parameters: Optional["_models.TokenBindingParameters"] = rest_field( + name="tokenBindingParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """Configuration for Token Binding for Entra tokens.""" @overload def __init__( @@ -4183,6 +4242,7 @@ def __init__( network_acls: Optional["_models.NetworkRuleSet"] = None, provisioning_state: Optional[Union[str, "_models.VaultProvisioningState"]] = None, public_network_access: Optional[str] = None, + token_binding_parameters: Optional["_models.TokenBindingParameters"] = None, ) -> None: ... @overload diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/_operations.py index 816acc4f184e..28333ac5e7f8 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/_operations.py @@ -32,14 +32,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models as _models +from .. import models as _models, types as _types from .._configuration import KeyVaultManagementClientConfiguration from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -JSON = MutableMapping[str, Any] List = list _SERIALIZER = Serializer() @@ -50,7 +49,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -71,7 +70,7 @@ def build_vaults_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -100,7 +99,7 @@ def build_vaults_create_or_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -131,7 +130,7 @@ def build_vaults_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -160,7 +159,7 @@ def build_vaults_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" path_format_arguments = { @@ -183,7 +182,7 @@ def build_vaults_list_by_resource_group_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -212,7 +211,7 @@ def build_vaults_list_by_subscription_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -245,7 +244,7 @@ def build_vaults_update_access_policy_request( # pylint: disable=name-too-long _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -276,7 +275,7 @@ def build_vaults_get_deleted_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -303,7 +302,7 @@ def build_vaults_purge_deleted_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}/purge" path_format_arguments = { @@ -324,7 +323,7 @@ def build_vaults_list_deleted_request(subscription_id: str, **kwargs: Any) -> Ht _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -381,7 +380,7 @@ def build_vaults_check_name_availability_request( # pylint: disable=name-too-lo _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -413,7 +412,7 @@ def build_private_endpoint_connections_get_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -449,7 +448,7 @@ def build_private_endpoint_connections_put_request( # pylint: disable=name-too- _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -486,7 +485,7 @@ def build_private_endpoint_connections_delete_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -517,7 +516,7 @@ def build_private_endpoint_connections_list_by_resource_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -545,7 +544,7 @@ def build_managed_hsms_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -574,7 +573,7 @@ def build_managed_hsms_create_or_update_request( # pylint: disable=name-too-lon _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -605,7 +604,7 @@ def build_managed_hsms_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -634,7 +633,7 @@ def build_managed_hsms_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}" path_format_arguments = { @@ -657,7 +656,7 @@ def build_managed_hsms_list_by_resource_group_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -686,7 +685,7 @@ def build_managed_hsms_list_by_subscription_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -714,7 +713,7 @@ def build_managed_hsms_get_deleted_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -741,7 +740,7 @@ def build_managed_hsms_purge_deleted_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedManagedHSMs/{name}/purge" path_format_arguments = { @@ -762,7 +761,7 @@ def build_managed_hsms_list_deleted_request(subscription_id: str, **kwargs: Any) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -789,7 +788,7 @@ def build_managed_hsms_check_mhsm_name_availability_request( # pylint: disable= _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -817,7 +816,7 @@ def build_secrets_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -847,7 +846,7 @@ def build_secrets_create_or_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -879,7 +878,7 @@ def build_secrets_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -910,7 +909,7 @@ def build_secrets_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -940,7 +939,7 @@ def build_keys_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -970,7 +969,7 @@ def build_keys_create_if_not_exist_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1001,7 +1000,7 @@ def build_keys_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1029,7 +1028,7 @@ def build_keys_get_version_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1059,7 +1058,7 @@ def build_keys_list_versions_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1088,7 +1087,7 @@ def build_managed_hsm_keys_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1118,7 +1117,7 @@ def build_managed_hsm_keys_create_if_not_exist_request( # pylint: disable=name- _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1149,7 +1148,7 @@ def build_managed_hsm_keys_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1177,7 +1176,7 @@ def build_managed_hsm_keys_get_version_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1207,7 +1206,7 @@ def build_managed_hsm_keys_list_versions_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1236,7 +1235,7 @@ def build_private_link_resources_list_by_vault_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1264,7 +1263,7 @@ def build_mhsm_private_link_resources_list_by_mhsm_resource_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1292,7 +1291,7 @@ def build_mhsm_regions_list_by_resource_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1320,7 +1319,7 @@ def build_mhsm_private_endpoint_connections_get_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1352,7 +1351,7 @@ def build_mhsm_private_endpoint_connections_put_request( # pylint: disable=name _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1385,7 +1384,7 @@ def build_mhsm_private_endpoint_connections_delete_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1416,7 +1415,7 @@ def build_mhsm_private_endpoint_connections_list_by_resource_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1502,7 +1501,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -1636,7 +1638,7 @@ def _create_or_update_initial( self, resource_group_name: str, vault_name: str, - parameters: Union[_models.VaultCreateOrUpdateParameters, JSON, IO[bytes]], + parameters: Union[_models.VaultCreateOrUpdateParameters, _types.VaultCreateOrUpdateParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -1740,7 +1742,7 @@ def begin_create_or_update( self, resource_group_name: str, vault_name: str, - parameters: JSON, + parameters: _types.VaultCreateOrUpdateParameters, *, content_type: str = "application/json", **kwargs: Any @@ -1753,7 +1755,7 @@ def begin_create_or_update( :param vault_name: The name of the vault. Required. :type vault_name: str :param parameters: Parameters to create or update the vault. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.VaultCreateOrUpdateParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1796,7 +1798,7 @@ def begin_create_or_update( self, resource_group_name: str, vault_name: str, - parameters: Union[_models.VaultCreateOrUpdateParameters, JSON, IO[bytes]], + parameters: Union[_models.VaultCreateOrUpdateParameters, _types.VaultCreateOrUpdateParameters, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.Vault]: """Create or update a key vault in the specified subscription. @@ -1806,10 +1808,10 @@ def begin_create_or_update( :type resource_group_name: str :param vault_name: The name of the vault. Required. :type vault_name: str - :param parameters: Parameters to create or update the vault. Is one of the following types: - VaultCreateOrUpdateParameters, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.VaultCreateOrUpdateParameters or JSON or - IO[bytes] + :param parameters: Parameters to create or update the vault. Is either a + VaultCreateOrUpdateParameters type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.VaultCreateOrUpdateParameters or + ~azure.mgmt.keyvault.types.VaultCreateOrUpdateParameters or IO[bytes] :return: An instance of LROPoller that returns Vault. The Vault is compatible with MutableMapping :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.keyvault.models.Vault] @@ -1899,7 +1901,7 @@ def update( self, resource_group_name: str, vault_name: str, - parameters: JSON, + parameters: _types.VaultPatchParameters, *, content_type: str = "application/json", **kwargs: Any @@ -1912,7 +1914,7 @@ def update( :param vault_name: The name of the vault. Required. :type vault_name: str :param parameters: Parameters to patch the vault. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.VaultPatchParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1953,7 +1955,7 @@ def update( self, resource_group_name: str, vault_name: str, - parameters: Union[_models.VaultPatchParameters, JSON, IO[bytes]], + parameters: Union[_models.VaultPatchParameters, _types.VaultPatchParameters, IO[bytes]], **kwargs: Any ) -> _models.Vault: """Update a key vault in the specified subscription. @@ -1963,9 +1965,10 @@ def update( :type resource_group_name: str :param vault_name: The name of the vault. Required. :type vault_name: str - :param parameters: Parameters to patch the vault. Is one of the following types: - VaultPatchParameters, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.VaultPatchParameters or JSON or IO[bytes] + :param parameters: Parameters to patch the vault. Is either a VaultPatchParameters type or a + IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.VaultPatchParameters or + ~azure.mgmt.keyvault.types.VaultPatchParameters or IO[bytes] :return: Vault. The Vault is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.Vault :raises ~azure.core.exceptions.HttpResponseError: @@ -2154,7 +2157,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -2247,7 +2253,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -2327,7 +2336,7 @@ def update_access_policy( resource_group_name: str, vault_name: str, operation_kind: Union[str, _models.AccessPolicyUpdateKind], - parameters: JSON, + parameters: _types.VaultAccessPolicyParameters, *, content_type: str = "application/json", **kwargs: Any @@ -2343,7 +2352,7 @@ def update_access_policy( Required. :type operation_kind: str or ~azure.mgmt.keyvault.models.AccessPolicyUpdateKind :param parameters: Access policy to merge into the vault. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.VaultAccessPolicyParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -2391,7 +2400,7 @@ def update_access_policy( resource_group_name: str, vault_name: str, operation_kind: Union[str, _models.AccessPolicyUpdateKind], - parameters: Union[_models.VaultAccessPolicyParameters, JSON, IO[bytes]], + parameters: Union[_models.VaultAccessPolicyParameters, _types.VaultAccessPolicyParameters, IO[bytes]], **kwargs: Any ) -> _models.VaultAccessPolicyParameters: """Update access policies in a key vault in the specified subscription. @@ -2404,9 +2413,10 @@ def update_access_policy( :param operation_kind: Name of the operation. Known values are: "add", "replace", and "remove". Required. :type operation_kind: str or ~azure.mgmt.keyvault.models.AccessPolicyUpdateKind - :param parameters: Access policy to merge into the vault. Is one of the following types: - VaultAccessPolicyParameters, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.VaultAccessPolicyParameters or JSON or IO[bytes] + :param parameters: Access policy to merge into the vault. Is either a + VaultAccessPolicyParameters type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.VaultAccessPolicyParameters or + ~azure.mgmt.keyvault.types.VaultAccessPolicyParameters or IO[bytes] :return: VaultAccessPolicyParameters. The VaultAccessPolicyParameters is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.VaultAccessPolicyParameters @@ -2712,7 +2722,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -2808,9 +2821,12 @@ def prepare_request(next_link=None): for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) - _next_request_params["api-version"] = api_version + _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -2875,12 +2891,16 @@ def check_name_availability( @overload def check_name_availability( - self, vault_name: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + vault_name: _types.VaultCheckNameAvailabilityParameters, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.CheckNameAvailabilityResult: """Checks that the vault name is valid and is not already in use. :param vault_name: The name of the vault. Required. - :type vault_name: JSON + :type vault_name: ~azure.mgmt.keyvault.types.VaultCheckNameAvailabilityParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -2909,14 +2929,18 @@ def check_name_availability( @distributed_trace def check_name_availability( - self, vault_name: Union[_models.VaultCheckNameAvailabilityParameters, JSON, IO[bytes]], **kwargs: Any + self, + vault_name: Union[ + _models.VaultCheckNameAvailabilityParameters, _types.VaultCheckNameAvailabilityParameters, IO[bytes] + ], + **kwargs: Any ) -> _models.CheckNameAvailabilityResult: """Checks that the vault name is valid and is not already in use. - :param vault_name: The name of the vault. Is one of the following types: - VaultCheckNameAvailabilityParameters, JSON, IO[bytes] Required. - :type vault_name: ~azure.mgmt.keyvault.models.VaultCheckNameAvailabilityParameters or JSON or - IO[bytes] + :param vault_name: The name of the vault. Is either a VaultCheckNameAvailabilityParameters type + or a IO[bytes] type. Required. + :type vault_name: ~azure.mgmt.keyvault.models.VaultCheckNameAvailabilityParameters or + ~azure.mgmt.keyvault.types.VaultCheckNameAvailabilityParameters or IO[bytes] :return: CheckNameAvailabilityResult. The CheckNameAvailabilityResult is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.CheckNameAvailabilityResult @@ -3122,7 +3146,7 @@ def put( resource_group_name: str, vault_name: str, private_endpoint_connection_name: str, - properties: JSON, + properties: _types.PrivateEndpointConnection, *, content_type: str = "application/json", **kwargs: Any @@ -3138,7 +3162,7 @@ def put( with the key vault. Required. :type private_endpoint_connection_name: str :param properties: The intended state of private endpoint connection. Required. - :type properties: JSON + :type properties: ~azure.mgmt.keyvault.types.PrivateEndpointConnection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -3186,7 +3210,7 @@ def put( resource_group_name: str, vault_name: str, private_endpoint_connection_name: str, - properties: Union[_models.PrivateEndpointConnection, JSON, IO[bytes]], + properties: Union[_models.PrivateEndpointConnection, _types.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: """Updates the specified private endpoint connection associated with the key vault. @@ -3199,9 +3223,10 @@ def put( :param private_endpoint_connection_name: Name of the private endpoint connection associated with the key vault. Required. :type private_endpoint_connection_name: str - :param properties: The intended state of private endpoint connection. Is one of the following - types: PrivateEndpointConnection, JSON, IO[bytes] Required. - :type properties: ~azure.mgmt.keyvault.models.PrivateEndpointConnection or JSON or IO[bytes] + :param properties: The intended state of private endpoint connection. Is either a + PrivateEndpointConnection type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.keyvault.models.PrivateEndpointConnection or + ~azure.mgmt.keyvault.types.PrivateEndpointConnection or IO[bytes] :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.PrivateEndpointConnection @@ -3470,7 +3495,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -3603,7 +3631,11 @@ def get(self, resource_group_name: str, name: str, **kwargs: Any) -> Optional[_m return deserialized # type: ignore def _create_or_update_initial( - self, resource_group_name: str, name: str, parameters: Union[_models.ManagedHsm, JSON, IO[bytes]], **kwargs: Any + self, + resource_group_name: str, + name: str, + parameters: Union[_models.ManagedHsm, _types.ManagedHsm, IO[bytes]], + **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -3706,7 +3738,7 @@ def begin_create_or_update( self, resource_group_name: str, name: str, - parameters: JSON, + parameters: _types.ManagedHsm, *, content_type: str = "application/json", **kwargs: Any @@ -3719,7 +3751,7 @@ def begin_create_or_update( :param name: The name of the managed HSM Pool. Required. :type name: str :param parameters: Parameters to create or update the managed HSM Pool. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.ManagedHsm :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -3759,7 +3791,11 @@ def begin_create_or_update( @distributed_trace def begin_create_or_update( - self, resource_group_name: str, name: str, parameters: Union[_models.ManagedHsm, JSON, IO[bytes]], **kwargs: Any + self, + resource_group_name: str, + name: str, + parameters: Union[_models.ManagedHsm, _types.ManagedHsm, IO[bytes]], + **kwargs: Any ) -> LROPoller[_models.ManagedHsm]: """Create or update a managed HSM Pool in the specified subscription. @@ -3768,9 +3804,10 @@ def begin_create_or_update( :type resource_group_name: str :param name: The name of the managed HSM Pool. Required. :type name: str - :param parameters: Parameters to create or update the managed HSM Pool. Is one of the following - types: ManagedHsm, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.ManagedHsm or JSON or IO[bytes] + :param parameters: Parameters to create or update the managed HSM Pool. Is either a ManagedHsm + type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.ManagedHsm or + ~azure.mgmt.keyvault.types.ManagedHsm or IO[bytes] :return: An instance of LROPoller that returns ManagedHsm. The ManagedHsm is compatible with MutableMapping :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.keyvault.models.ManagedHsm] @@ -3829,7 +3866,11 @@ def get_long_running_output(pipeline_response): ) def _update_initial( - self, resource_group_name: str, name: str, parameters: Union[_models.ManagedHsm, JSON, IO[bytes]], **kwargs: Any + self, + resource_group_name: str, + name: str, + parameters: Union[_models.ManagedHsm, _types.ManagedHsm, IO[bytes]], + **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -3932,7 +3973,7 @@ def begin_update( self, resource_group_name: str, name: str, - parameters: JSON, + parameters: _types.ManagedHsm, *, content_type: str = "application/json", **kwargs: Any @@ -3945,7 +3986,7 @@ def begin_update( :param name: The name of the managed HSM Pool. Required. :type name: str :param parameters: Parameters to patch the managed HSM Pool. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.ManagedHsm :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -3985,7 +4026,11 @@ def begin_update( @distributed_trace def begin_update( - self, resource_group_name: str, name: str, parameters: Union[_models.ManagedHsm, JSON, IO[bytes]], **kwargs: Any + self, + resource_group_name: str, + name: str, + parameters: Union[_models.ManagedHsm, _types.ManagedHsm, IO[bytes]], + **kwargs: Any ) -> LROPoller[_models.ManagedHsm]: """Update a managed HSM Pool in the specified subscription. @@ -3994,9 +4039,10 @@ def begin_update( :type resource_group_name: str :param name: The name of the managed HSM Pool. Required. :type name: str - :param parameters: Parameters to patch the managed HSM Pool. Is one of the following types: - ManagedHsm, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.ManagedHsm or JSON or IO[bytes] + :param parameters: Parameters to patch the managed HSM Pool. Is either a ManagedHsm type or a + IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.ManagedHsm or + ~azure.mgmt.keyvault.types.ManagedHsm or IO[bytes] :return: An instance of LROPoller that returns ManagedHsm. The ManagedHsm is compatible with MutableMapping :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.keyvault.models.ManagedHsm] @@ -4228,7 +4274,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -4322,7 +4371,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -4591,7 +4643,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -4656,12 +4711,16 @@ def check_mhsm_name_availability( @overload def check_mhsm_name_availability( - self, mhsm_name: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + mhsm_name: _types.CheckMhsmNameAvailabilityParameters, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.CheckMhsmNameAvailabilityResult: """Checks that the managed hsm name is valid and is not already in use. :param mhsm_name: The request body. Required. - :type mhsm_name: JSON + :type mhsm_name: ~azure.mgmt.keyvault.types.CheckMhsmNameAvailabilityParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -4690,14 +4749,18 @@ def check_mhsm_name_availability( @distributed_trace def check_mhsm_name_availability( - self, mhsm_name: Union[_models.CheckMhsmNameAvailabilityParameters, JSON, IO[bytes]], **kwargs: Any + self, + mhsm_name: Union[ + _models.CheckMhsmNameAvailabilityParameters, _types.CheckMhsmNameAvailabilityParameters, IO[bytes] + ], + **kwargs: Any ) -> _models.CheckMhsmNameAvailabilityResult: """Checks that the managed hsm name is valid and is not already in use. - :param mhsm_name: The request body. Is one of the following types: - CheckMhsmNameAvailabilityParameters, JSON, IO[bytes] Required. - :type mhsm_name: ~azure.mgmt.keyvault.models.CheckMhsmNameAvailabilityParameters or JSON or - IO[bytes] + :param mhsm_name: The request body. Is either a CheckMhsmNameAvailabilityParameters type or a + IO[bytes] type. Required. + :type mhsm_name: ~azure.mgmt.keyvault.models.CheckMhsmNameAvailabilityParameters or + ~azure.mgmt.keyvault.types.CheckMhsmNameAvailabilityParameters or IO[bytes] :return: CheckMhsmNameAvailabilityResult. The CheckMhsmNameAvailabilityResult is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.CheckMhsmNameAvailabilityResult @@ -4898,7 +4961,7 @@ def create_or_update( resource_group_name: str, vault_name: str, secret_name: str, - parameters: JSON, + parameters: _types.SecretCreateOrUpdateParameters, *, content_type: str = "application/json", **kwargs: Any @@ -4915,7 +4978,7 @@ def create_or_update( :param secret_name: The name of the secret. Required. :type secret_name: str :param parameters: Parameters to create or update the secret. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.SecretCreateOrUpdateParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -4962,7 +5025,7 @@ def create_or_update( resource_group_name: str, vault_name: str, secret_name: str, - parameters: Union[_models.SecretCreateOrUpdateParameters, JSON, IO[bytes]], + parameters: Union[_models.SecretCreateOrUpdateParameters, _types.SecretCreateOrUpdateParameters, IO[bytes]], **kwargs: Any ) -> _models.Secret: """Create or update a secret in a key vault in the specified subscription. NOTE: This API is @@ -4976,10 +5039,10 @@ def create_or_update( :type vault_name: str :param secret_name: The name of the secret. Required. :type secret_name: str - :param parameters: Parameters to create or update the secret. Is one of the following types: - SecretCreateOrUpdateParameters, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.SecretCreateOrUpdateParameters or JSON or - IO[bytes] + :param parameters: Parameters to create or update the secret. Is either a + SecretCreateOrUpdateParameters type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.SecretCreateOrUpdateParameters or + ~azure.mgmt.keyvault.types.SecretCreateOrUpdateParameters or IO[bytes] :return: Secret. The Secret is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.Secret :raises ~azure.core.exceptions.HttpResponseError: @@ -5090,7 +5153,7 @@ def update( resource_group_name: str, vault_name: str, secret_name: str, - parameters: JSON, + parameters: _types.SecretPatchParameters, *, content_type: str = "application/json", **kwargs: Any @@ -5107,7 +5170,7 @@ def update( :param secret_name: The name of the secret. Required. :type secret_name: str :param parameters: Parameters to patch the secret. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.SecretPatchParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -5154,7 +5217,7 @@ def update( resource_group_name: str, vault_name: str, secret_name: str, - parameters: Union[_models.SecretPatchParameters, JSON, IO[bytes]], + parameters: Union[_models.SecretPatchParameters, _types.SecretPatchParameters, IO[bytes]], **kwargs: Any ) -> _models.Secret: """Update a secret in the specified subscription. NOTE: This API is intended for internal use in @@ -5168,9 +5231,10 @@ def update( :type vault_name: str :param secret_name: The name of the secret. Required. :type secret_name: str - :param parameters: Parameters to patch the secret. Is one of the following types: - SecretPatchParameters, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.SecretPatchParameters or JSON or IO[bytes] + :param parameters: Parameters to patch the secret. Is either a SecretPatchParameters type or a + IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.SecretPatchParameters or + ~azure.mgmt.keyvault.types.SecretPatchParameters or IO[bytes] :return: Secret. The Secret is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.Secret :raises ~azure.core.exceptions.HttpResponseError: @@ -5305,7 +5369,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -5476,7 +5543,7 @@ def create_if_not_exist( resource_group_name: str, vault_name: str, key_name: str, - parameters: JSON, + parameters: _types.KeyCreateParameters, *, content_type: str = "application/json", **kwargs: Any @@ -5493,7 +5560,7 @@ def create_if_not_exist( :param key_name: The name of the key to be retrieved. Required. :type key_name: str :param parameters: The parameters used to create the specified key. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.KeyCreateParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -5540,7 +5607,7 @@ def create_if_not_exist( resource_group_name: str, vault_name: str, key_name: str, - parameters: Union[_models.KeyCreateParameters, JSON, IO[bytes]], + parameters: Union[_models.KeyCreateParameters, _types.KeyCreateParameters, IO[bytes]], **kwargs: Any ) -> _models.Key: """Creates the first version of a new key if it does not exist. If it already exists, then the @@ -5554,9 +5621,10 @@ def create_if_not_exist( :type vault_name: str :param key_name: The name of the key to be retrieved. Required. :type key_name: str - :param parameters: The parameters used to create the specified key. Is one of the following - types: KeyCreateParameters, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.KeyCreateParameters or JSON or IO[bytes] + :param parameters: The parameters used to create the specified key. Is either a + KeyCreateParameters type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.KeyCreateParameters or + ~azure.mgmt.keyvault.types.KeyCreateParameters or IO[bytes] :return: Key. The Key is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.Key :raises ~azure.core.exceptions.HttpResponseError: @@ -5684,7 +5752,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -5866,7 +5937,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -6041,7 +6115,7 @@ def create_if_not_exist( resource_group_name: str, name: str, key_name: str, - parameters: JSON, + parameters: _types.ManagedHsmKeyCreateParameters, *, content_type: str = "application/json", **kwargs: Any @@ -6060,7 +6134,7 @@ def create_if_not_exist( personally identifiable or sensitive information. Required. :type key_name: str :param parameters: The parameters used to create the specified key. Required. - :type parameters: JSON + :type parameters: ~azure.mgmt.keyvault.types.ManagedHsmKeyCreateParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -6109,7 +6183,7 @@ def create_if_not_exist( resource_group_name: str, name: str, key_name: str, - parameters: Union[_models.ManagedHsmKeyCreateParameters, JSON, IO[bytes]], + parameters: Union[_models.ManagedHsmKeyCreateParameters, _types.ManagedHsmKeyCreateParameters, IO[bytes]], **kwargs: Any ) -> _models.ManagedHsmKey: """Creates the first version of a new key if it does not exist. If it already exists, then the @@ -6125,10 +6199,10 @@ def create_if_not_exist( globally for the purpose of running the service. The value provided should not include personally identifiable or sensitive information. Required. :type key_name: str - :param parameters: The parameters used to create the specified key. Is one of the following - types: ManagedHsmKeyCreateParameters, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.keyvault.models.ManagedHsmKeyCreateParameters or JSON or - IO[bytes] + :param parameters: The parameters used to create the specified key. Is either a + ManagedHsmKeyCreateParameters type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.keyvault.models.ManagedHsmKeyCreateParameters or + ~azure.mgmt.keyvault.types.ManagedHsmKeyCreateParameters or IO[bytes] :return: ManagedHsmKey. The ManagedHsmKey is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.ManagedHsmKey :raises ~azure.core.exceptions.HttpResponseError: @@ -6256,7 +6330,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -6440,7 +6517,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -6739,7 +6819,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( @@ -6914,7 +6997,7 @@ def put( resource_group_name: str, name: str, private_endpoint_connection_name: str, - properties: JSON, + properties: _types.MHSMPrivateEndpointConnection, *, content_type: str = "application/json", **kwargs: Any @@ -6930,7 +7013,7 @@ def put( with the managed hsm pool. Required. :type private_endpoint_connection_name: str :param properties: The intended state of private endpoint connection. Required. - :type properties: JSON + :type properties: ~azure.mgmt.keyvault.types.MHSMPrivateEndpointConnection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -6978,7 +7061,7 @@ def put( resource_group_name: str, name: str, private_endpoint_connection_name: str, - properties: Union[_models.MHSMPrivateEndpointConnection, JSON, IO[bytes]], + properties: Union[_models.MHSMPrivateEndpointConnection, _types.MHSMPrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.MHSMPrivateEndpointConnection: """Updates the specified private endpoint connection associated with the managed hsm pool. @@ -6991,10 +7074,10 @@ def put( :param private_endpoint_connection_name: Name of the private endpoint connection associated with the managed hsm pool. Required. :type private_endpoint_connection_name: str - :param properties: The intended state of private endpoint connection. Is one of the following - types: MHSMPrivateEndpointConnection, JSON, IO[bytes] Required. - :type properties: ~azure.mgmt.keyvault.models.MHSMPrivateEndpointConnection or JSON or - IO[bytes] + :param properties: The intended state of private endpoint connection. Is either a + MHSMPrivateEndpointConnection type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.keyvault.models.MHSMPrivateEndpointConnection or + ~azure.mgmt.keyvault.types.MHSMPrivateEndpointConnection or IO[bytes] :return: MHSMPrivateEndpointConnection. The MHSMPrivateEndpointConnection is compatible with MutableMapping :rtype: ~azure.mgmt.keyvault.models.MHSMPrivateEndpointConnection @@ -7264,7 +7347,10 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) path_format_arguments = { "endpoint": self._serialize.url( diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/types.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/types.py new file mode 100644 index 000000000000..5d3d4ec3c2b5 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/types.py @@ -0,0 +1,1660 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# 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 typing import Any, Literal, TYPE_CHECKING, Union +from typing_extensions import Required, TypedDict + +if TYPE_CHECKING: + from .models import ( + ActionsRequired, + ActivationStatus, + CertificatePermissions, + CreateMode, + DeletionRecoveryLevel, + GeoReplicationRegionProvisioningState, + IdentityType, + JsonWebKeyCurveName, + JsonWebKeyOperation, + JsonWebKeyType, + KeyPermissions, + KeyRotationPolicyActionType, + ManagedHsmSkuFamily, + ManagedHsmSkuNameV2, + ManagedServiceIdentityType, + NetworkRuleAction, + NetworkRuleBypassOptions, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + ProvisioningState, + PublicNetworkAccess, + SecretPermissions, + SkuFamily, + SkuName, + StoragePermissions, + TokenBindingMode, + TokenBindingStrength, + VaultProvisioningState, + ) + + +class AccessPolicyEntry(TypedDict, total=False): + """An identity that have access to the key vault. All identities in the array must use the same + tenant ID as the key vault's tenant ID. + + :ivar tenant_id: The Azure Active Directory tenant ID that should be used for authenticating + requests to the key vault. Required. + :vartype tenant_id: str + :ivar object_id: The object ID of a user, service principal or security group in the Azure + Active Directory tenant for the vault. The object ID must be unique for the list of access + policies. Required. + :vartype object_id: str + :ivar application_id: Application ID of the client making request on behalf of a principal. + :vartype application_id: str + :ivar permissions: Permissions the identity has for keys, secrets and certificates. Required. + :vartype permissions: "Permissions" + """ + + tenantId: Required[str] + """The Azure Active Directory tenant ID that should be used for authenticating requests to the key + vault. Required.""" + objectId: Required[str] + """The object ID of a user, service principal or security group in the Azure Active Directory + tenant for the vault. The object ID must be unique for the list of access policies. Required.""" + applicationId: str + """Application ID of the client making request on behalf of a principal.""" + permissions: Required["Permissions"] + """Permissions the identity has for keys, secrets and certificates. Required.""" + + +class Action(TypedDict, total=False): + """Action. + + :ivar type: The type of action. Known values are: "rotate" and "notify". + :vartype type: Union[str, "KeyRotationPolicyActionType"] + """ + + type: Union[str, "KeyRotationPolicyActionType"] + """The type of action. Known values are: \"rotate\" and \"notify\".""" + + +class Attributes(TypedDict, total=False): + """The object attributes managed by the KeyVault service. + + :ivar enabled: Determines whether the object is enabled. + :vartype enabled: bool + :ivar not_before: Not before date in seconds since 1970-01-01T00:00:00Z. + :vartype not_before: int + :ivar expires: Expiry date in seconds since 1970-01-01T00:00:00Z. + :vartype expires: int + :ivar created: Creation time in seconds since 1970-01-01T00:00:00Z. + :vartype created: int + :ivar updated: Last updated time in seconds since 1970-01-01T00:00:00Z. + :vartype updated: int + """ + + enabled: bool + """Determines whether the object is enabled.""" + nbf: int + """Not before date in seconds since 1970-01-01T00:00:00Z.""" + exp: int + """Expiry date in seconds since 1970-01-01T00:00:00Z.""" + created: int + """Creation time in seconds since 1970-01-01T00:00:00Z.""" + updated: int + """Last updated time in seconds since 1970-01-01T00:00:00Z.""" + + +class CheckMhsmNameAvailabilityParameters(TypedDict, total=False): + """The parameters used to check the availability of the managed hsm name. + + :ivar name: The managed hsm name. Required. + :vartype name: str + """ + + name: Required[str] + """The managed hsm name. Required.""" + + +class Resource(TypedDict, total=False): + """Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + """ + + id: str + """Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.""" + name: str + """The name of the resource.""" + type: str + """The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or + \"Microsoft.Storage/storageAccounts\".""" + systemData: "SystemData" + """Azure Resource Manager metadata containing createdBy and modifiedBy information.""" + + +class ProxyResource(Resource): + """Proxy Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + """ + + +class IPRule(TypedDict, total=False): + """A rule governing the accessibility of a vault from a specific ip address or ip range. + + :ivar value: An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) + or '124.56.78.0/24' (all addresses that start with 124.56.78). Required. + :vartype value: str + """ + + value: Required[str] + """An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or + '124.56.78.0/24' (all addresses that start with 124.56.78). Required.""" + + +class KeyAttributes(TypedDict, total=False): + """The object attributes managed by the Azure Key Vault service. + + :ivar enabled: Determines whether or not the object is enabled. + :vartype enabled: bool + :ivar not_before: Not before date in seconds since 1970-01-01T00:00:00Z. + :vartype not_before: int + :ivar expires: Expiry date in seconds since 1970-01-01T00:00:00Z. + :vartype expires: int + :ivar created: Creation time in seconds since 1970-01-01T00:00:00Z. + :vartype created: int + :ivar updated: Last updated time in seconds since 1970-01-01T00:00:00Z. + :vartype updated: int + :ivar recovery_level: The deletion recovery level currently in effect for the object. If it + contains 'Purgeable', then the object can be permanently deleted by a privileged user; + otherwise, only the system can purge the object at the end of the retention interval. Known + values are: "Purgeable", "Recoverable+Purgeable", "Recoverable", and + "Recoverable+ProtectedSubscription". + :vartype recovery_level: Union[str, "DeletionRecoveryLevel"] + :ivar exportable: Indicates if the private key can be exported. + :vartype exportable: bool + """ + + enabled: bool + """Determines whether or not the object is enabled.""" + nbf: int + """Not before date in seconds since 1970-01-01T00:00:00Z.""" + exp: int + """Expiry date in seconds since 1970-01-01T00:00:00Z.""" + created: int + """Creation time in seconds since 1970-01-01T00:00:00Z.""" + updated: int + """Last updated time in seconds since 1970-01-01T00:00:00Z.""" + recoveryLevel: Union[str, "DeletionRecoveryLevel"] + """The deletion recovery level currently in effect for the object. If it contains 'Purgeable', + then the object can be permanently deleted by a privileged user; otherwise, only the system can + purge the object at the end of the retention interval. Known values are: \"Purgeable\", + \"Recoverable+Purgeable\", \"Recoverable\", and \"Recoverable+ProtectedSubscription\".""" + exportable: bool + """Indicates if the private key can be exported.""" + + +class KeyCreateParameters(TypedDict, total=False): + """The parameters used to create a key. + + :ivar tags: The tags that will be assigned to the key. + :vartype tags: dict[str, str] + :ivar properties: The properties of the key to be created. Required. + :vartype properties: "KeyProperties" + """ + + tags: dict[str, str] + """The tags that will be assigned to the key.""" + properties: Required["KeyProperties"] + """The properties of the key to be created. Required.""" + + +class KeyProperties(TypedDict, total=False): + """The properties of the key. + + :ivar attributes: The attributes of the key. + :vartype attributes: "KeyAttributes" + :ivar kty: The type of the key. For valid values, see JsonWebKeyType. Known values are: "EC", + "EC-HSM", "RSA", "RSA-HSM", and "oct-HSM". + :vartype kty: Union[str, "JsonWebKeyType"] + :ivar key_ops: + :vartype key_ops: list[Union[str, "JsonWebKeyOperation"]] + :ivar key_size: The key size in bits. For example: 2048, 3072, or 4096 for RSA. Default for RSA + and RSA-HSM keys is 2048. Exception made for bring your own key (BYOK), key exchange keys + default to 4096. + :vartype key_size: int + :ivar curve_name: The elliptic curve name. For valid values, see JsonWebKeyCurveName. Default + for EC and EC-HSM keys is P-256. Known values are: "P-256", "P-384", "P-521", and "P-256K". + :vartype curve_name: Union[str, "JsonWebKeyCurveName"] + :ivar key_uri: The URI to retrieve the current version of the key. + :vartype key_uri: str + :ivar key_uri_with_version: The URI to retrieve the specific version of the key. + :vartype key_uri_with_version: str + :ivar rotation_policy: Key rotation policy in response. It will be used for both output and + input. Omitted if empty. + :vartype rotation_policy: "RotationPolicy" + :ivar release_policy: Key release policy in response. It will be used for both output and + input. Omitted if empty. + :vartype release_policy: "KeyReleasePolicy" + """ + + attributes: "KeyAttributes" + """The attributes of the key.""" + kty: Union[str, "JsonWebKeyType"] + """The type of the key. For valid values, see JsonWebKeyType. Known values are: \"EC\", + \"EC-HSM\", \"RSA\", \"RSA-HSM\", and \"oct-HSM\".""" + keyOps: list[Union[str, "JsonWebKeyOperation"]] + keySize: int + """The key size in bits. For example: 2048, 3072, or 4096 for RSA. Default for RSA and RSA-HSM + keys is 2048. Exception made for bring your own key (BYOK), key exchange keys default to 4096.""" + curveName: Union[str, "JsonWebKeyCurveName"] + """The elliptic curve name. For valid values, see JsonWebKeyCurveName. Default for EC and EC-HSM + keys is P-256. Known values are: \"P-256\", \"P-384\", \"P-521\", and \"P-256K\".""" + keyUri: str + """The URI to retrieve the current version of the key.""" + keyUriWithVersion: str + """The URI to retrieve the specific version of the key.""" + rotationPolicy: "RotationPolicy" + """Key rotation policy in response. It will be used for both output and input. Omitted if empty.""" + release_policy: "KeyReleasePolicy" + """Key release policy in response. It will be used for both output and input. Omitted if empty.""" + + +class KeyReleasePolicy(TypedDict, total=False): + """KeyReleasePolicy. + + :ivar content_type: Content type and version of key release policy. + :vartype content_type: str + :ivar data: Blob encoding the policy rules under which the key can be released. + :vartype data: str + """ + + contentType: str + """Content type and version of key release policy.""" + data: str + """Blob encoding the policy rules under which the key can be released.""" + + +class KeyRotationPolicyAttributes(TypedDict, total=False): + """KeyRotationPolicyAttributes. + + :ivar created: Creation time in seconds since 1970-01-01T00:00:00Z. + :vartype created: int + :ivar updated: Last updated time in seconds since 1970-01-01T00:00:00Z. + :vartype updated: int + :ivar expiry_time: The expiration time for the new key version. It should be in ISO8601 format. + Eg: 'P90D', 'P1Y'. + :vartype expiry_time: str + """ + + created: int + """Creation time in seconds since 1970-01-01T00:00:00Z.""" + updated: int + """Last updated time in seconds since 1970-01-01T00:00:00Z.""" + expiryTime: str + """The expiration time for the new key version. It should be in ISO8601 format. Eg: 'P90D', 'P1Y'.""" + + +class LifetimeAction(TypedDict, total=False): + """LifetimeAction. + + :ivar trigger: The trigger of key rotation policy lifetimeAction. + :vartype trigger: "Trigger" + :ivar action: The action of key rotation policy lifetimeAction. + :vartype action: "Action" + """ + + trigger: "Trigger" + """The trigger of key rotation policy lifetimeAction.""" + action: "Action" + """The action of key rotation policy lifetimeAction.""" + + +class ManagedHsm(ProxyResource): + """Resource information with extended details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar properties: Properties of the managed HSM. + :vartype properties: "ManagedHsmProperties" + :ivar sku: SKU details. + :vartype sku: "ManagedHsmSku" + :ivar identity: Managed service identity. + :vartype identity: "ManagedServiceIdentity" + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + """ + + properties: "ManagedHsmProperties" + """Properties of the managed HSM.""" + sku: "ManagedHsmSku" + """SKU details.""" + identity: "ManagedServiceIdentity" + """Managed service identity.""" + location: str + """The geo-location where the resource lives.""" + tags: dict[str, str] + """Resource tags.""" + + +class ManagedHsmAction(TypedDict, total=False): + """ManagedHsmAction. + + :ivar type: The type of action. Known values are: "rotate" and "notify". + :vartype type: Union[str, "KeyRotationPolicyActionType"] + """ + + type: Union[str, "KeyRotationPolicyActionType"] + """The type of action. Known values are: \"rotate\" and \"notify\".""" + + +class ManagedHsmKeyAttributes(TypedDict, total=False): + """The object attributes managed by the Azure Key Vault service. + + :ivar enabled: Determines whether or not the object is enabled. + :vartype enabled: bool + :ivar not_before: Not before date in seconds since 1970-01-01T00:00:00Z. + :vartype not_before: int + :ivar expires: Expiry date in seconds since 1970-01-01T00:00:00Z. + :vartype expires: int + :ivar created: Creation time in seconds since 1970-01-01T00:00:00Z. + :vartype created: int + :ivar updated: Last updated time in seconds since 1970-01-01T00:00:00Z. + :vartype updated: int + :ivar recovery_level: The deletion recovery level currently in effect for the object. If it + contains 'Purgeable', then the object can be permanently deleted by a privileged user; + otherwise, only the system can purge the object at the end of the retention interval. Known + values are: "Purgeable", "Recoverable+Purgeable", "Recoverable", and + "Recoverable+ProtectedSubscription". + :vartype recovery_level: Union[str, "DeletionRecoveryLevel"] + :ivar exportable: Indicates if the private key can be exported. + :vartype exportable: bool + """ + + enabled: bool + """Determines whether or not the object is enabled.""" + nbf: int + """Not before date in seconds since 1970-01-01T00:00:00Z.""" + exp: int + """Expiry date in seconds since 1970-01-01T00:00:00Z.""" + created: int + """Creation time in seconds since 1970-01-01T00:00:00Z.""" + updated: int + """Last updated time in seconds since 1970-01-01T00:00:00Z.""" + recoveryLevel: Union[str, "DeletionRecoveryLevel"] + """The deletion recovery level currently in effect for the object. If it contains 'Purgeable', + then the object can be permanently deleted by a privileged user; otherwise, only the system can + purge the object at the end of the retention interval. Known values are: \"Purgeable\", + \"Recoverable+Purgeable\", \"Recoverable\", and \"Recoverable+ProtectedSubscription\".""" + exportable: bool + """Indicates if the private key can be exported.""" + + +class ManagedHsmKeyCreateParameters(TypedDict, total=False): + """The parameters used to create a key. + + :ivar tags: The tags that will be assigned to the key. + :vartype tags: dict[str, str] + :ivar properties: The properties of the key to be created. Required. + :vartype properties: "ManagedHsmKeyProperties" + """ + + tags: dict[str, str] + """The tags that will be assigned to the key.""" + properties: Required["ManagedHsmKeyProperties"] + """The properties of the key to be created. Required.""" + + +class ManagedHsmKeyProperties(TypedDict, total=False): + """The properties of the key. + + :ivar attributes: The attributes of the key. + :vartype attributes: "ManagedHsmKeyAttributes" + :ivar kty: The type of the key. For valid values, see JsonWebKeyType. Known values are: "EC", + "EC-HSM", "RSA", "RSA-HSM", and "oct-HSM". + :vartype kty: Union[str, "JsonWebKeyType"] + :ivar key_ops: + :vartype key_ops: list[Union[str, "JsonWebKeyOperation"]] + :ivar key_size: The key size in bits. For example: 2048, 3072, or 4096 for RSA. Default for RSA + and RSA-HSM keys is 2048. Exception made for bring your own key (BYOK), key exchange keys + default to 4096. + :vartype key_size: int + :ivar curve_name: The elliptic curve name. For valid values, see JsonWebKeyCurveName. Default + for EC and EC-HSM keys is P-256. Known values are: "P-256", "P-384", "P-521", and "P-256K". + :vartype curve_name: Union[str, "JsonWebKeyCurveName"] + :ivar key_uri: The URI to retrieve the current version of the key. + :vartype key_uri: str + :ivar key_uri_with_version: The URI to retrieve the specific version of the key. + :vartype key_uri_with_version: str + :ivar rotation_policy: Key rotation policy in response. It will be used for both output and + input. Omitted if empty. + :vartype rotation_policy: "ManagedHsmRotationPolicy" + :ivar release_policy: Key release policy in response. It will be used for both output and + input. Omitted if empty. + :vartype release_policy: "ManagedHsmKeyReleasePolicy" + """ + + attributes: "ManagedHsmKeyAttributes" + """The attributes of the key.""" + kty: Union[str, "JsonWebKeyType"] + """The type of the key. For valid values, see JsonWebKeyType. Known values are: \"EC\", + \"EC-HSM\", \"RSA\", \"RSA-HSM\", and \"oct-HSM\".""" + keyOps: list[Union[str, "JsonWebKeyOperation"]] + keySize: int + """The key size in bits. For example: 2048, 3072, or 4096 for RSA. Default for RSA and RSA-HSM + keys is 2048. Exception made for bring your own key (BYOK), key exchange keys default to 4096.""" + curveName: Union[str, "JsonWebKeyCurveName"] + """The elliptic curve name. For valid values, see JsonWebKeyCurveName. Default for EC and EC-HSM + keys is P-256. Known values are: \"P-256\", \"P-384\", \"P-521\", and \"P-256K\".""" + keyUri: str + """The URI to retrieve the current version of the key.""" + keyUriWithVersion: str + """The URI to retrieve the specific version of the key.""" + rotationPolicy: "ManagedHsmRotationPolicy" + """Key rotation policy in response. It will be used for both output and input. Omitted if empty.""" + release_policy: "ManagedHsmKeyReleasePolicy" + """Key release policy in response. It will be used for both output and input. Omitted if empty.""" + + +class ManagedHsmKeyReleasePolicy(TypedDict, total=False): + """ManagedHsmKeyReleasePolicy. + + :ivar content_type: Content type and version of key release policy. + :vartype content_type: str + :ivar data: Blob encoding the policy rules under which the key can be released. + :vartype data: str + """ + + contentType: str + """Content type and version of key release policy.""" + data: str + """Blob encoding the policy rules under which the key can be released.""" + + +class ManagedHsmKeyRotationPolicyAttributes(TypedDict, total=False): + """ManagedHsmKeyRotationPolicyAttributes. + + :ivar created: Creation time in seconds since 1970-01-01T00:00:00Z. + :vartype created: int + :ivar updated: Last updated time in seconds since 1970-01-01T00:00:00Z. + :vartype updated: int + :ivar expiry_time: The expiration time for the new key version. It should be in ISO8601 format. + Eg: 'P90D', 'P1Y'. + :vartype expiry_time: str + """ + + created: int + """Creation time in seconds since 1970-01-01T00:00:00Z.""" + updated: int + """Last updated time in seconds since 1970-01-01T00:00:00Z.""" + expiryTime: str + """The expiration time for the new key version. It should be in ISO8601 format. Eg: 'P90D', 'P1Y'.""" + + +class ManagedHsmLifetimeAction(TypedDict, total=False): + """ManagedHsmLifetimeAction. + + :ivar trigger: The trigger of key rotation policy lifetimeAction. + :vartype trigger: "ManagedHsmTrigger" + :ivar action: The action of key rotation policy lifetimeAction. + :vartype action: "ManagedHsmAction" + """ + + trigger: "ManagedHsmTrigger" + """The trigger of key rotation policy lifetimeAction.""" + action: "ManagedHsmAction" + """The action of key rotation policy lifetimeAction.""" + + +class ManagedHsmProperties(TypedDict, total=False): + """Properties of the managed HSM Pool. + + :ivar tenant_id: The Azure Active Directory tenant ID that should be used for authenticating + requests to the managed HSM pool. + :vartype tenant_id: str + :ivar initial_admin_object_ids: Array of initial administrators object ids for this managed hsm + pool. + :vartype initial_admin_object_ids: list[str] + :ivar hsm_uri: The URI of the managed hsm pool for performing operations on keys. + :vartype hsm_uri: str + :ivar enable_soft_delete: Property to specify whether the 'soft delete' functionality is + enabled for this managed HSM pool. Soft delete is enabled by default for all managed HSMs and + is immutable. + :vartype enable_soft_delete: bool + :ivar soft_delete_retention_in_days: Soft deleted data retention days. When you delete an HSM + or a key, it will remain recoverable for the configured retention period or for a default + period of 90 days. It accepts values between 7 and 90. + :vartype soft_delete_retention_in_days: int + :ivar enable_purge_protection: Property specifying whether protection against purge is enabled + for this managed HSM pool. Setting this property to true activates protection against purge for + this managed HSM pool and its content - only the Managed HSM service may initiate a hard, + irrecoverable deletion. Enabling this functionality is irreversible. + :vartype enable_purge_protection: bool + :ivar create_mode: The create mode to indicate whether the resource is being created or is + being recovered from a deleted resource. Known values are: "recover" and "default". + :vartype create_mode: Union[str, "CreateMode"] + :ivar status_message: Resource Status Message. + :vartype status_message: str + :ivar provisioning_state: Provisioning state. Known values are: "Succeeded", "Provisioning", + "Failed", "Updating", "Deleting", "Activated", "SecurityDomainRestore", and "Restoring". + :vartype provisioning_state: Union[str, "ProvisioningState"] + :ivar network_acls: Rules governing the accessibility of the key vault from specific network + locations. + :vartype network_acls: "MHSMNetworkRuleSet" + :ivar regions: List of all regions associated with the managed hsm pool. + :vartype regions: list["MHSMGeoReplicatedRegion"] + :ivar private_endpoint_connections: List of private endpoint connections associated with the + managed hsm pool. + :vartype private_endpoint_connections: list["MHSMPrivateEndpointConnectionItem"] + :ivar public_network_access: Control permission to the managed HSM from public networks. Known + values are: "Enabled" and "Disabled". + :vartype public_network_access: Union[str, "PublicNetworkAccess"] + :ivar scheduled_purge_date: The scheduled purge date in UTC. + :vartype scheduled_purge_date: str + :ivar security_domain_properties: Managed HSM security domain properties. + :vartype security_domain_properties: "ManagedHSMSecurityDomainProperties" + """ + + tenantId: str + """The Azure Active Directory tenant ID that should be used for authenticating requests to the + managed HSM pool.""" + initialAdminObjectIds: list[str] + """Array of initial administrators object ids for this managed hsm pool.""" + hsmUri: str + """The URI of the managed hsm pool for performing operations on keys.""" + enableSoftDelete: bool + """Property to specify whether the 'soft delete' functionality is enabled for this managed HSM + pool. Soft delete is enabled by default for all managed HSMs and is immutable.""" + softDeleteRetentionInDays: int + """Soft deleted data retention days. When you delete an HSM or a key, it will remain recoverable + for the configured retention period or for a default period of 90 days. It accepts values + between 7 and 90.""" + enablePurgeProtection: bool + """Property specifying whether protection against purge is enabled for this managed HSM pool. + Setting this property to true activates protection against purge for this managed HSM pool and + its content - only the Managed HSM service may initiate a hard, irrecoverable deletion. + Enabling this functionality is irreversible.""" + createMode: Union[str, "CreateMode"] + """The create mode to indicate whether the resource is being created or is being recovered from a + deleted resource. Known values are: \"recover\" and \"default\".""" + statusMessage: str + """Resource Status Message.""" + provisioningState: Union[str, "ProvisioningState"] + """Provisioning state. Known values are: \"Succeeded\", \"Provisioning\", \"Failed\", + \"Updating\", \"Deleting\", \"Activated\", \"SecurityDomainRestore\", and \"Restoring\".""" + networkAcls: "MHSMNetworkRuleSet" + """Rules governing the accessibility of the key vault from specific network locations.""" + regions: list["MHSMGeoReplicatedRegion"] + """List of all regions associated with the managed hsm pool.""" + privateEndpointConnections: list["MHSMPrivateEndpointConnectionItem"] + """List of private endpoint connections associated with the managed hsm pool.""" + publicNetworkAccess: Union[str, "PublicNetworkAccess"] + """Control permission to the managed HSM from public networks. Known values are: \"Enabled\" and + \"Disabled\".""" + scheduledPurgeDate: str + """The scheduled purge date in UTC.""" + securityDomainProperties: "ManagedHSMSecurityDomainProperties" + """Managed HSM security domain properties.""" + + +class ManagedHsmRotationPolicy(TypedDict, total=False): + """ManagedHsmRotationPolicy. + + :ivar attributes: The attributes of key rotation policy. + :vartype attributes: "ManagedHsmKeyRotationPolicyAttributes" + :ivar lifetime_actions: The lifetimeActions for key rotation action. + :vartype lifetime_actions: list["ManagedHsmLifetimeAction"] + """ + + attributes: "ManagedHsmKeyRotationPolicyAttributes" + """The attributes of key rotation policy.""" + lifetimeActions: list["ManagedHsmLifetimeAction"] + """The lifetimeActions for key rotation action.""" + + +class ManagedHSMSecurityDomainProperties(TypedDict, total=False): + """The security domain properties of the managed hsm. + + :ivar activation_status: Activation Status. Known values are: "Active", "NotActivated", + "Unknown", and "Failed". + :vartype activation_status: Union[str, "ActivationStatus"] + :ivar activation_status_message: Activation Status Message. + :vartype activation_status_message: str + """ + + activationStatus: Union[str, "ActivationStatus"] + """Activation Status. Known values are: \"Active\", \"NotActivated\", \"Unknown\", and \"Failed\".""" + activationStatusMessage: str + """Activation Status Message.""" + + +class ManagedHsmSku(TypedDict, total=False): + """SKU details. + + :ivar family: SKU Family of the managed HSM Pool. Required. Known values are: "B" and "C". + :vartype family: Union[str, "ManagedHsmSkuFamily"] + :ivar name: SKU of the managed HSM Pool. Required. Known values are: "Standard_B1", + "Custom_B32", "Custom_B6", "Custom_C42", and "Custom_C10". + :vartype name: Union[str, "ManagedHsmSkuNameV2"] + """ + + family: Required[Union[str, "ManagedHsmSkuFamily"]] + """SKU Family of the managed HSM Pool. Required. Known values are: \"B\" and \"C\".""" + name: Required[Union[str, "ManagedHsmSkuNameV2"]] + """SKU of the managed HSM Pool. Required. Known values are: \"Standard_B1\", \"Custom_B32\", + \"Custom_B6\", \"Custom_C42\", and \"Custom_C10\".""" + + +class ManagedHsmTrigger(TypedDict, total=False): + """ManagedHsmTrigger. + + :ivar time_after_create: The time duration after key creation to rotate the key. It only + applies to rotate. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. + :vartype time_after_create: str + :ivar time_before_expiry: The time duration before key expiring to rotate or notify. It will be + in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. + :vartype time_before_expiry: str + """ + + timeAfterCreate: str + """The time duration after key creation to rotate the key. It only applies to rotate. It will be + in ISO 8601 duration format. Eg: 'P90D', 'P1Y'.""" + timeBeforeExpiry: str + """The time duration before key expiring to rotate or notify. It will be in ISO 8601 duration + format. Eg: 'P90D', 'P1Y'.""" + + +class ManagedServiceIdentity(TypedDict, total=False): + """Managed service identity (system assigned and/or user assigned identities). + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :ivar type: The type of managed identity assigned to this resource. Required. Known values are: + "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned". + :vartype type: Union[str, "ManagedServiceIdentityType"] + :ivar user_assigned_identities: The identities assigned to this resource by the user. + :vartype user_assigned_identities: dict[str, "UserAssignedIdentity"] + """ + + principalId: str + """The service principal ID of the system assigned identity. This property will only be provided + for a system assigned identity.""" + tenantId: str + """The tenant ID of the system assigned identity. This property will only be provided for a system + assigned identity.""" + type: Required[Union[str, "ManagedServiceIdentityType"]] + """The type of managed identity assigned to this resource. Required. Known values are: \"None\", + \"SystemAssigned\", \"UserAssigned\", and \"SystemAssigned,UserAssigned\".""" + userAssignedIdentities: dict[str, "UserAssignedIdentity"] + """The identities assigned to this resource by the user.""" + + +class MHSMGeoReplicatedRegion(TypedDict, total=False): + """A region that this managed HSM Pool has been extended to. + + :ivar name: Name of the geo replicated region. + :vartype name: str + :ivar provisioning_state: Provisioning state of the geo replicated region. Known values are: + "Preprovisioning", "Provisioning", "Succeeded", "Failed", "Deleting", and "Cleanup". + :vartype provisioning_state: Union[str, "GeoReplicationRegionProvisioningState"] + :ivar is_primary: A boolean value that indicates whether the region is the primary region or a + secondary region. + :vartype is_primary: bool + """ + + name: str + """Name of the geo replicated region.""" + provisioningState: Union[str, "GeoReplicationRegionProvisioningState"] + """Provisioning state of the geo replicated region. Known values are: \"Preprovisioning\", + \"Provisioning\", \"Succeeded\", \"Failed\", \"Deleting\", and \"Cleanup\".""" + isPrimary: bool + """A boolean value that indicates whether the region is the primary region or a secondary region.""" + + +class MHSMIPRule(TypedDict, total=False): + """A rule governing the accessibility of a managed HSM pool from a specific IP address or IP + range. + + :ivar value: An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) + or '124.56.78.0/24' (all addresses that start with 124.56.78). Required. + :vartype value: str + """ + + value: Required[str] + """An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or + '124.56.78.0/24' (all addresses that start with 124.56.78). Required.""" + + +class MHSMNetworkRuleSet(TypedDict, total=False): + """A set of rules governing the network accessibility of a managed hsm pool. + + :ivar bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or + 'None'. If not specified the default is 'AzureServices'. Known values are: "AzureServices" and + "None". + :vartype bypass: Union[str, "NetworkRuleBypassOptions"] + :ivar default_action: The default action when no rule from ipRules and from virtualNetworkRules + match. This is only used after the bypass property has been evaluated. Known values are: + "Allow" and "Deny". + :vartype default_action: Union[str, "NetworkRuleAction"] + :ivar ip_rules: The list of IP address rules. + :vartype ip_rules: list["MHSMIPRule"] + :ivar service_tags: The list of service tags. + :vartype service_tags: list["MHSMServiceTagRule"] + :ivar virtual_network_rules: The list of virtual network rules. + :vartype virtual_network_rules: list["MHSMVirtualNetworkRule"] + """ + + bypass: Union[str, "NetworkRuleBypassOptions"] + """Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not + specified the default is 'AzureServices'. Known values are: \"AzureServices\" and \"None\".""" + defaultAction: Union[str, "NetworkRuleAction"] + """The default action when no rule from ipRules and from virtualNetworkRules match. This is only + used after the bypass property has been evaluated. Known values are: \"Allow\" and \"Deny\".""" + ipRules: list["MHSMIPRule"] + """The list of IP address rules.""" + serviceTags: list["MHSMServiceTagRule"] + """The list of service tags.""" + virtualNetworkRules: list["MHSMVirtualNetworkRule"] + """The list of virtual network rules.""" + + +class MHSMPrivateEndpoint(TypedDict, total=False): + """Private endpoint object properties. + + :ivar id: Full identifier of the private endpoint resource. + :vartype id: str + """ + + id: str + """Full identifier of the private endpoint resource.""" + + +class MHSMPrivateEndpointConnection(ProxyResource): + """Private endpoint connection resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar properties: Resource properties. + :vartype properties: "MHSMPrivateEndpointConnectionProperties" + :ivar sku: SKU details. + :vartype sku: "ManagedHsmSku" + :ivar identity: Managed service identity. + :vartype identity: "ManagedServiceIdentity" + :ivar etag: Modified whenever there is a change in the state of private endpoint connection. + :vartype etag: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + """ + + properties: "MHSMPrivateEndpointConnectionProperties" + """Resource properties.""" + sku: "ManagedHsmSku" + """SKU details.""" + identity: "ManagedServiceIdentity" + """Managed service identity.""" + etag: str + """Modified whenever there is a change in the state of private endpoint connection.""" + location: str + """The geo-location where the resource lives.""" + tags: dict[str, str] + """Resource tags.""" + + +class MHSMPrivateEndpointConnectionItem(TypedDict, total=False): + """Private endpoint connection item. + + :ivar id: Id of private endpoint connection. + :vartype id: str + :ivar etag: Modified whenever there is a change in the state of private endpoint connection. + :vartype etag: str + :ivar properties: Private endpoint connection properties. + :vartype properties: "MHSMPrivateEndpointConnectionProperties" + """ + + id: str + """Id of private endpoint connection.""" + etag: str + """Modified whenever there is a change in the state of private endpoint connection.""" + properties: "MHSMPrivateEndpointConnectionProperties" + """Private endpoint connection properties.""" + + +class MHSMPrivateEndpointConnectionProperties(TypedDict, total=False): + """Properties of the private endpoint connection resource. + + :ivar private_endpoint: Properties of the private endpoint object. + :vartype private_endpoint: "MHSMPrivateEndpoint" + :ivar private_link_service_connection_state: Approval state of the private link connection. + :vartype private_link_service_connection_state: "MHSMPrivateLinkServiceConnectionState" + :ivar provisioning_state: Provisioning state of the private endpoint connection. Known values + are: "Succeeded", "Creating", "Updating", "Deleting", "Failed", and "Disconnected". + :vartype provisioning_state: Union[str, "PrivateEndpointConnectionProvisioningState"] + """ + + privateEndpoint: "MHSMPrivateEndpoint" + """Properties of the private endpoint object.""" + privateLinkServiceConnectionState: "MHSMPrivateLinkServiceConnectionState" + """Approval state of the private link connection.""" + provisioningState: Union[str, "PrivateEndpointConnectionProvisioningState"] + """Provisioning state of the private endpoint connection. Known values are: \"Succeeded\", + \"Creating\", \"Updating\", \"Deleting\", \"Failed\", and \"Disconnected\".""" + + +class MHSMPrivateLinkServiceConnectionState(TypedDict, total=False): + """An object that represents the approval state of the private link connection. + + :ivar status: Indicates whether the connection has been approved, rejected or removed by the + key vault owner. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". + :vartype status: Union[str, "PrivateEndpointServiceConnectionStatus"] + :ivar description: The reason for approval or rejection. + :vartype description: str + :ivar actions_required: A message indicating if changes on the service provider require any + updates on the consumer. "None" + :vartype actions_required: Union[str, "ActionsRequired"] + """ + + status: Union[str, "PrivateEndpointServiceConnectionStatus"] + """Indicates whether the connection has been approved, rejected or removed by the key vault owner. + Known values are: \"Pending\", \"Approved\", \"Rejected\", and \"Disconnected\".""" + description: str + """The reason for approval or rejection.""" + actionsRequired: Union[str, "ActionsRequired"] + """A message indicating if changes on the service provider require any updates on the consumer. + \"None\"""" + + +class MHSMServiceTagRule(TypedDict, total=False): + """A rule governing the accessibility of a managed hsm pool from a specific service tags. + + :ivar tag: Name of the service tag. Required. + :vartype tag: str + """ + + tag: Required[str] + """Name of the service tag. Required.""" + + +class MHSMVirtualNetworkRule(TypedDict, total=False): + """A rule governing the accessibility of a managed hsm pool from a specific virtual network. + + :ivar id: Full resource id of a vnet subnet, such as + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. + Required. + :vartype id: str + """ + + id: Required[str] + """Full resource id of a vnet subnet, such as + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. + Required.""" + + +class NetworkRuleSet(TypedDict, total=False): + """A set of rules governing the network accessibility of a vault. + + :ivar bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or + 'None'. If not specified the default is 'AzureServices'. Known values are: "AzureServices" and + "None". + :vartype bypass: Union[str, "NetworkRuleBypassOptions"] + :ivar default_action: The default action when no rule from ipRules and from virtualNetworkRules + match. This is only used after the bypass property has been evaluated. Known values are: + "Allow" and "Deny". + :vartype default_action: Union[str, "NetworkRuleAction"] + :ivar ip_rules: The list of IP address rules. + :vartype ip_rules: list["IPRule"] + :ivar virtual_network_rules: The list of virtual network rules. + :vartype virtual_network_rules: list["VirtualNetworkRule"] + """ + + bypass: Union[str, "NetworkRuleBypassOptions"] + """Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not + specified the default is 'AzureServices'. Known values are: \"AzureServices\" and \"None\".""" + defaultAction: Union[str, "NetworkRuleAction"] + """The default action when no rule from ipRules and from virtualNetworkRules match. This is only + used after the bypass property has been evaluated. Known values are: \"Allow\" and \"Deny\".""" + ipRules: list["IPRule"] + """The list of IP address rules.""" + virtualNetworkRules: list["VirtualNetworkRule"] + """The list of virtual network rules.""" + + +class Permissions(TypedDict, total=False): + """Permissions the identity has for keys, secrets, certificates and storage. + + :ivar keys_property: Permissions to keys. + :vartype keys_property: list[Union[str, "KeyPermissions"]] + :ivar secrets: Permissions to secrets. + :vartype secrets: list[Union[str, "SecretPermissions"]] + :ivar certificates: Permissions to certificates. + :vartype certificates: list[Union[str, "CertificatePermissions"]] + :ivar storage: Permissions to storage accounts. + :vartype storage: list[Union[str, "StoragePermissions"]] + """ + + keys: list[Union[str, "KeyPermissions"]] + """Permissions to keys.""" + secrets: list[Union[str, "SecretPermissions"]] + """Permissions to secrets.""" + certificates: list[Union[str, "CertificatePermissions"]] + """Permissions to certificates.""" + storage: list[Union[str, "StoragePermissions"]] + """Permissions to storage accounts.""" + + +class PrivateEndpoint(TypedDict, total=False): + """Private endpoint object properties. + + :ivar id: Full identifier of the private endpoint resource. + :vartype id: str + """ + + id: str + """Full identifier of the private endpoint resource.""" + + +class PrivateEndpointConnection(ProxyResource): + """Private endpoint connection resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar properties: Resource properties. + :vartype properties: "PrivateEndpointConnectionProperties" + :ivar location: Azure location of the key vault resource. + :vartype location: str + :ivar tags: Tags assigned to the key vault resource. + :vartype tags: dict[str, str] + :ivar etag: Modified whenever there is a change in the state of private endpoint connection. + :vartype etag: str + """ + + properties: "PrivateEndpointConnectionProperties" + """Resource properties.""" + location: str + """Azure location of the key vault resource.""" + tags: dict[str, str] + """Tags assigned to the key vault resource.""" + etag: str + """Modified whenever there is a change in the state of private endpoint connection.""" + + +class PrivateEndpointConnectionItem(TypedDict, total=False): + """Private endpoint connection item. + + :ivar id: Id of private endpoint connection. + :vartype id: str + :ivar etag: Modified whenever there is a change in the state of private endpoint connection. + :vartype etag: str + :ivar properties: Private endpoint connection properties. + :vartype properties: "PrivateEndpointConnectionProperties" + """ + + id: str + """Id of private endpoint connection.""" + etag: str + """Modified whenever there is a change in the state of private endpoint connection.""" + properties: "PrivateEndpointConnectionProperties" + """Private endpoint connection properties.""" + + +class PrivateEndpointConnectionProperties(TypedDict, total=False): + """Properties of the private endpoint connection resource. + + :ivar private_endpoint: Properties of the private endpoint object. + :vartype private_endpoint: "PrivateEndpoint" + :ivar private_link_service_connection_state: Approval state of the private link connection. + :vartype private_link_service_connection_state: "PrivateLinkServiceConnectionState" + :ivar provisioning_state: Provisioning state of the private endpoint connection. Known values + are: "Succeeded", "Creating", "Updating", "Deleting", "Failed", and "Disconnected". + :vartype provisioning_state: Union[str, "PrivateEndpointConnectionProvisioningState"] + """ + + privateEndpoint: "PrivateEndpoint" + """Properties of the private endpoint object.""" + privateLinkServiceConnectionState: "PrivateLinkServiceConnectionState" + """Approval state of the private link connection.""" + provisioningState: Union[str, "PrivateEndpointConnectionProvisioningState"] + """Provisioning state of the private endpoint connection. Known values are: \"Succeeded\", + \"Creating\", \"Updating\", \"Deleting\", \"Failed\", and \"Disconnected\".""" + + +class PrivateLinkServiceConnectionState(TypedDict, total=False): + """An object that represents the approval state of the private link connection. + + :ivar status: Indicates whether the connection has been approved, rejected or removed by the + key vault owner. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". + :vartype status: Union[str, "PrivateEndpointServiceConnectionStatus"] + :ivar description: The reason for approval or rejection. + :vartype description: str + :ivar actions_required: A message indicating if changes on the service provider require any + updates on the consumer. "None" + :vartype actions_required: Union[str, "ActionsRequired"] + """ + + status: Union[str, "PrivateEndpointServiceConnectionStatus"] + """Indicates whether the connection has been approved, rejected or removed by the key vault owner. + Known values are: \"Pending\", \"Approved\", \"Rejected\", and \"Disconnected\".""" + description: str + """The reason for approval or rejection.""" + actionsRequired: Union[str, "ActionsRequired"] + """A message indicating if changes on the service provider require any updates on the consumer. + \"None\"""" + + +class RotationPolicy(TypedDict, total=False): + """RotationPolicy. + + :ivar attributes: The attributes of key rotation policy. + :vartype attributes: "KeyRotationPolicyAttributes" + :ivar lifetime_actions: The lifetimeActions for key rotation action. + :vartype lifetime_actions: list["LifetimeAction"] + """ + + attributes: "KeyRotationPolicyAttributes" + """The attributes of key rotation policy.""" + lifetimeActions: list["LifetimeAction"] + """The lifetimeActions for key rotation action.""" + + +class SecretAttributes(Attributes): + """The secret management attributes. + + :ivar enabled: Determines whether the object is enabled. + :vartype enabled: bool + :ivar not_before: Not before date in seconds since 1970-01-01T00:00:00Z. + :vartype not_before: int + :ivar expires: Expiry date in seconds since 1970-01-01T00:00:00Z. + :vartype expires: int + :ivar created: Creation time in seconds since 1970-01-01T00:00:00Z. + :vartype created: int + :ivar updated: Last updated time in seconds since 1970-01-01T00:00:00Z. + :vartype updated: int + """ + + +class SecretCreateOrUpdateParameters(TypedDict, total=False): + """Parameters for creating or updating a secret. + + :ivar tags: The tags that will be assigned to the secret. + :vartype tags: dict[str, str] + :ivar properties: Properties of the secret. Required. + :vartype properties: "SecretProperties" + """ + + tags: dict[str, str] + """The tags that will be assigned to the secret.""" + properties: Required["SecretProperties"] + """Properties of the secret. Required.""" + + +class SecretPatchParameters(TypedDict, total=False): + """Parameters for patching a secret. + + :ivar tags: The tags that will be assigned to the secret. + :vartype tags: dict[str, str] + :ivar properties: Properties of the secret. + :vartype properties: "SecretPatchProperties" + """ + + tags: dict[str, str] + """The tags that will be assigned to the secret.""" + properties: "SecretPatchProperties" + """Properties of the secret.""" + + +class SecretPatchProperties(TypedDict, total=False): + """Properties of the secret. + + :ivar value: The value of the secret. + :vartype value: str + :ivar content_type: The content type of the secret. + :vartype content_type: str + :ivar attributes: The attributes of the secret. + :vartype attributes: "SecretAttributes" + """ + + value: str + """The value of the secret.""" + contentType: str + """The content type of the secret.""" + attributes: "SecretAttributes" + """The attributes of the secret.""" + + +class SecretProperties(TypedDict, total=False): + """Properties of the secret. + + :ivar value: The value of the secret. NOTE: 'value' will never be returned from the service, as + APIs using this model are is intended for internal use in ARM deployments. Users should use the + data-plane REST service for interaction with vault secrets. + :vartype value: str + :ivar content_type: The content type of the secret. + :vartype content_type: str + :ivar attributes: The attributes of the secret. + :vartype attributes: "SecretAttributes" + :ivar secret_uri: The URI to retrieve the current version of the secret. + :vartype secret_uri: str + :ivar secret_uri_with_version: The URI to retrieve the specific version of the secret. + :vartype secret_uri_with_version: str + """ + + value: str + """The value of the secret. NOTE: 'value' will never be returned from the service, as APIs using + this model are is intended for internal use in ARM deployments. Users should use the data-plane + REST service for interaction with vault secrets.""" + contentType: str + """The content type of the secret.""" + attributes: "SecretAttributes" + """The attributes of the secret.""" + secretUri: str + """The URI to retrieve the current version of the secret.""" + secretUriWithVersion: str + """The URI to retrieve the specific version of the secret.""" + + +class Sku(TypedDict, total=False): + """SKU details. + + :ivar family: SKU family name. Required. "A" + :vartype family: Union[str, "SkuFamily"] + :ivar name: SKU name to specify whether the key vault is a standard vault or a premium vault. + Required. Known values are: "standard" and "premium". + :vartype name: Union[str, "SkuName"] + """ + + family: Required[Union[str, "SkuFamily"]] + """SKU family name. Required. \"A\"""" + name: Required[Union[str, "SkuName"]] + """SKU name to specify whether the key vault is a standard vault or a premium vault. Required. + Known values are: \"standard\" and \"premium\".""" + + +class SystemData(TypedDict, total=False): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :vartype created_by_type: Union[str, "IdentityType"] + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: str + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", and "Key". + :vartype last_modified_by_type: Union[str, "IdentityType"] + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: str + """ + + createdBy: str + """The identity that created the resource.""" + createdByType: Union[str, "IdentityType"] + """The type of identity that created the resource. Known values are: \"User\", \"Application\", + \"ManagedIdentity\", and \"Key\".""" + createdAt: str + """The timestamp of resource creation (UTC).""" + lastModifiedBy: str + """The identity that last modified the resource.""" + lastModifiedByType: Union[str, "IdentityType"] + """The type of identity that last modified the resource. Known values are: \"User\", + \"Application\", \"ManagedIdentity\", and \"Key\".""" + lastModifiedAt: str + """The timestamp of resource last modification (UTC).""" + + +class TokenBindingParameters(TypedDict, total=False): + """Configuration for Token Binding for Entra tokens. + + :ivar mode: This specifies whether token binding is disabled, enabled or enforced. Known values + are: "Enforced" and "NotEnforced". + :vartype mode: Union[str, "TokenBindingMode"] + :ivar minimum_token_binding_strength: Must be one of the following values "NoValidation", + "Unattested", "AttestedTrustedLaunch", "AttestedConfidential". Strength of the token binding + increases with each value in that order. Known values are: "NoValidation", "Unattested", + "AttestedTrustedLaunch", and "AttestedConfidential". + :vartype minimum_token_binding_strength: Union[str, "TokenBindingStrength"] + """ + + mode: Union[str, "TokenBindingMode"] + """This specifies whether token binding is disabled, enabled or enforced. Known values are: + \"Enforced\" and \"NotEnforced\".""" + minimumTokenBindingStrength: Union[str, "TokenBindingStrength"] + """Must be one of the following values \"NoValidation\", \"Unattested\", + \"AttestedTrustedLaunch\", \"AttestedConfidential\". Strength of the token binding increases + with each value in that order. Known values are: \"NoValidation\", \"Unattested\", + \"AttestedTrustedLaunch\", and \"AttestedConfidential\".""" + + +class Trigger(TypedDict, total=False): + """Trigger. + + :ivar time_after_create: The time duration after key creation to rotate the key. It only + applies to rotate. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. + :vartype time_after_create: str + :ivar time_before_expiry: The time duration before key expiring to rotate or notify. It will be + in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. + :vartype time_before_expiry: str + """ + + timeAfterCreate: str + """The time duration after key creation to rotate the key. It only applies to rotate. It will be + in ISO 8601 duration format. Eg: 'P90D', 'P1Y'.""" + timeBeforeExpiry: str + """The time duration before key expiring to rotate or notify. It will be in ISO 8601 duration + format. Eg: 'P90D', 'P1Y'.""" + + +class UserAssignedIdentity(TypedDict, total=False): + """User assigned identity properties. + + :ivar principal_id: The principal ID of the assigned identity. + :vartype principal_id: str + :ivar client_id: The client ID of the assigned identity. + :vartype client_id: str + """ + + principalId: str + """The principal ID of the assigned identity.""" + clientId: str + """The client ID of the assigned identity.""" + + +class VaultAccessPolicyParameters(TypedDict, total=False): + """Parameters for updating the access policy in a vault. + + :ivar id: The resource id of the access policy. + :vartype id: str + :ivar name: The resource name of the access policy. + :vartype name: str + :ivar type: The resource name of the access policy. + :vartype type: str + :ivar location: The resource type of the access policy. + :vartype location: str + :ivar properties: Properties of the access policy. Required. + :vartype properties: "VaultAccessPolicyProperties" + """ + + id: str + """The resource id of the access policy.""" + name: str + """The resource name of the access policy.""" + type: str + """The resource name of the access policy.""" + location: str + """The resource type of the access policy.""" + properties: Required["VaultAccessPolicyProperties"] + """Properties of the access policy. Required.""" + + +class VaultAccessPolicyProperties(TypedDict, total=False): + """Properties of the vault access policy. + + :ivar access_policies: An array of 0 to 16 identities that have access to the key vault. All + identities in the array must use the same tenant ID as the key vault's tenant ID. Required. + :vartype access_policies: list["AccessPolicyEntry"] + """ + + accessPolicies: Required[list["AccessPolicyEntry"]] + """An array of 0 to 16 identities that have access to the key vault. All identities in the array + must use the same tenant ID as the key vault's tenant ID. Required.""" + + +class VaultCheckNameAvailabilityParameters(TypedDict, total=False): + """The parameters used to check the availability of the vault name. + + :ivar name: The vault name. Required. + :vartype name: str + :ivar type: The type of resource, Microsoft.KeyVault/vaults. Required. Default value is + "Microsoft.KeyVault/vaults". + :vartype type: Literal["Microsoft.KeyVault/vaults"] + """ + + name: Required[str] + """The vault name. Required.""" + type: Required[Literal["Microsoft.KeyVault/vaults"]] + """The type of resource, Microsoft.KeyVault/vaults. Required. Default value is + \"Microsoft.KeyVault/vaults\".""" + + +class VaultCreateOrUpdateParameters(TypedDict, total=False): + """Parameters for creating or updating a vault. + + :ivar location: The supported Azure location where the key vault should be created. Required. + :vartype location: str + :ivar tags: The tags that will be assigned to the key vault. + :vartype tags: dict[str, str] + :ivar properties: Properties of the vault. Required. + :vartype properties: "VaultProperties" + """ + + location: Required[str] + """The supported Azure location where the key vault should be created. Required.""" + tags: dict[str, str] + """The tags that will be assigned to the key vault.""" + properties: Required["VaultProperties"] + """Properties of the vault. Required.""" + + +class VaultPatchParameters(TypedDict, total=False): + """Parameters for creating or updating a vault. + + :ivar tags: The tags that will be assigned to the key vault. + :vartype tags: dict[str, str] + :ivar properties: Properties of the vault. + :vartype properties: "VaultPatchProperties" + """ + + tags: dict[str, str] + """The tags that will be assigned to the key vault.""" + properties: "VaultPatchProperties" + """Properties of the vault.""" + + +class VaultPatchProperties(TypedDict, total=False): + """Properties of the vault. + + :ivar tenant_id: The Azure Active Directory tenant ID that should be used for authenticating + requests to the key vault. + :vartype tenant_id: str + :ivar sku: SKU details. + :vartype sku: "Sku" + :ivar access_policies: An array of 0 to 16 identities that have access to the key vault. All + identities in the array must use the same tenant ID as the key vault's tenant ID. + :vartype access_policies: list["AccessPolicyEntry"] + :ivar enabled_for_deployment: Property to specify whether Azure Virtual Machines are permitted + to retrieve certificates stored as secrets from the key vault. + :vartype enabled_for_deployment: bool + :ivar enabled_for_disk_encryption: Property to specify whether Azure Disk Encryption is + permitted to retrieve secrets from the vault and unwrap keys. + :vartype enabled_for_disk_encryption: bool + :ivar enabled_for_template_deployment: Property to specify whether Azure Resource Manager is + permitted to retrieve secrets from the key vault. + :vartype enabled_for_template_deployment: bool + :ivar enable_soft_delete: Property to specify whether the 'soft delete' functionality is + enabled for this key vault. Once set to true, it cannot be reverted to false. + :vartype enable_soft_delete: bool + :ivar enable_rbac_authorization: Property that controls how data actions are authorized. When + true, the key vault will use Role Based Access Control (RBAC) for authorization of data + actions, and the access policies specified in vault properties will be ignored. When false, + the key vault will use the access policies specified in vault properties, and any policy stored + on Azure Resource Manager will be ignored. If null or not specified, the value of this property + will not change. + :vartype enable_rbac_authorization: bool + :ivar soft_delete_retention_in_days: softDelete data retention days. It accepts >=7 and <=90. + :vartype soft_delete_retention_in_days: int + :ivar create_mode: The vault's create mode to indicate whether the vault need to be recovered + or not. Known values are: "recover" and "default". + :vartype create_mode: Union[str, "CreateMode"] + :ivar enable_purge_protection: Property specifying whether protection against purge is enabled + for this vault. Setting this property to true activates protection against purge for this vault + and its content - only the Key Vault service may initiate a hard, irrecoverable deletion. The + setting is effective only if soft delete is also enabled. Enabling this functionality is + irreversible - that is, the property does not accept false as its value. + :vartype enable_purge_protection: bool + :ivar network_acls: A collection of rules governing the accessibility of the vault from + specific network locations. + :vartype network_acls: "NetworkRuleSet" + :ivar public_network_access: Property to specify whether the vault will accept traffic from + public internet. If set to 'disabled' all traffic except private endpoint traffic and that that + originates from trusted services will be blocked. This will override the set firewall rules, + meaning that even if the firewall rules are present we will not honor the rules. + :vartype public_network_access: str + :ivar token_binding_parameters: Configuration for Token Binding for Entra tokens. + :vartype token_binding_parameters: "TokenBindingParameters" + """ + + tenantId: str + """The Azure Active Directory tenant ID that should be used for authenticating requests to the key + vault.""" + sku: "Sku" + """SKU details.""" + accessPolicies: list["AccessPolicyEntry"] + """An array of 0 to 16 identities that have access to the key vault. All identities in the array + must use the same tenant ID as the key vault's tenant ID.""" + enabledForDeployment: bool + """Property to specify whether Azure Virtual Machines are permitted to retrieve certificates + stored as secrets from the key vault.""" + enabledForDiskEncryption: bool + """Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the + vault and unwrap keys.""" + enabledForTemplateDeployment: bool + """Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the + key vault.""" + enableSoftDelete: bool + """Property to specify whether the 'soft delete' functionality is enabled for this key vault. Once + set to true, it cannot be reverted to false.""" + enableRbacAuthorization: bool + """Property that controls how data actions are authorized. When true, the key vault will use Role + Based Access Control (RBAC) for authorization of data actions, and the access policies + specified in vault properties will be ignored. When false, the key vault will use the access + policies specified in vault properties, and any policy stored on Azure Resource Manager will be + ignored. If null or not specified, the value of this property will not change.""" + softDeleteRetentionInDays: int + """softDelete data retention days. It accepts >=7 and <=90.""" + createMode: Union[str, "CreateMode"] + """The vault's create mode to indicate whether the vault need to be recovered or not. Known values + are: \"recover\" and \"default\".""" + enablePurgeProtection: bool + """Property specifying whether protection against purge is enabled for this vault. Setting this + property to true activates protection against purge for this vault and its content - only the + Key Vault service may initiate a hard, irrecoverable deletion. The setting is effective only if + soft delete is also enabled. Enabling this functionality is irreversible - that is, the + property does not accept false as its value.""" + networkAcls: "NetworkRuleSet" + """A collection of rules governing the accessibility of the vault from specific network locations.""" + publicNetworkAccess: str + """Property to specify whether the vault will accept traffic from public internet. If set to + 'disabled' all traffic except private endpoint traffic and that that originates from trusted + services will be blocked. This will override the set firewall rules, meaning that even if the + firewall rules are present we will not honor the rules.""" + tokenBindingParameters: "TokenBindingParameters" + """Configuration for Token Binding for Entra tokens.""" + + +class VaultProperties(TypedDict, total=False): + """Properties of the vault. + + :ivar tenant_id: The Azure Active Directory tenant ID that should be used for authenticating + requests to the key vault. Required. + :vartype tenant_id: str + :ivar sku: SKU details. Required. + :vartype sku: "Sku" + :ivar access_policies: An array of 0 to 1024 identities that have access to the key vault. All + identities in the array must use the same tenant ID as the key vault's tenant ID. When + ``createMode`` is set to ``recover``, access policies are not required. Otherwise, access + policies are required. + :vartype access_policies: list["AccessPolicyEntry"] + :ivar vault_uri: The URI of the vault for performing operations on keys and secrets. + :vartype vault_uri: str + :ivar hsm_pool_resource_id: The resource id of HSM Pool. + :vartype hsm_pool_resource_id: str + :ivar enabled_for_deployment: Property to specify whether Azure Virtual Machines are permitted + to retrieve certificates stored as secrets from the key vault. + :vartype enabled_for_deployment: bool + :ivar enabled_for_disk_encryption: Property to specify whether Azure Disk Encryption is + permitted to retrieve secrets from the vault and unwrap keys. + :vartype enabled_for_disk_encryption: bool + :ivar enabled_for_template_deployment: Property to specify whether Azure Resource Manager is + permitted to retrieve secrets from the key vault. + :vartype enabled_for_template_deployment: bool + :ivar enable_soft_delete: Property to specify whether the 'soft delete' functionality is + enabled for this key vault. If it's not set to any value(true or false) when creating new key + vault, it will be set to true by default. Once set to true, it cannot be reverted to false. + :vartype enable_soft_delete: bool + :ivar soft_delete_retention_in_days: softDelete data retention days. It accepts >=7 and <=90. + :vartype soft_delete_retention_in_days: int + :ivar enable_rbac_authorization: Property that controls how data actions are authorized. When + true, the key vault will use Role Based Access Control (RBAC) for authorization of data + actions, and the access policies specified in vault properties will be ignored. When false, + the key vault will use the access policies specified in vault properties, and any policy stored + on Azure Resource Manager will be ignored. If null or not specified, the vault is created with + the default value of false. Note that management actions are always authorized with RBAC. + :vartype enable_rbac_authorization: bool + :ivar create_mode: The vault's create mode to indicate whether the vault need to be recovered + or not. Known values are: "recover" and "default". + :vartype create_mode: Union[str, "CreateMode"] + :ivar enable_purge_protection: Property specifying whether protection against purge is enabled + for this vault. Setting this property to true activates protection against purge for this vault + and its content - only the Key Vault service may initiate a hard, irrecoverable deletion. The + setting is effective only if soft delete is also enabled. Enabling this functionality is + irreversible - that is, the property does not accept false as its value. + :vartype enable_purge_protection: bool + :ivar network_acls: Rules governing the accessibility of the key vault from specific network + locations. + :vartype network_acls: "NetworkRuleSet" + :ivar provisioning_state: Provisioning state of the vault. Known values are: "Succeeded" and + "RegisteringDns". + :vartype provisioning_state: Union[str, "VaultProvisioningState"] + :ivar private_endpoint_connections: List of private endpoint connections associated with the + key vault. + :vartype private_endpoint_connections: list["PrivateEndpointConnectionItem"] + :ivar public_network_access: Property to specify whether the vault will accept traffic from + public internet. If set to 'disabled' all traffic except private endpoint traffic and that that + originates from trusted services will be blocked. This will override the set firewall rules, + meaning that even if the firewall rules are present we will not honor the rules. + :vartype public_network_access: str + :ivar token_binding_parameters: Configuration for Token Binding for Entra tokens. + :vartype token_binding_parameters: "TokenBindingParameters" + """ + + tenantId: Required[str] + """The Azure Active Directory tenant ID that should be used for authenticating requests to the key + vault. Required.""" + sku: Required["Sku"] + """SKU details. Required.""" + accessPolicies: list["AccessPolicyEntry"] + """An array of 0 to 1024 identities that have access to the key vault. All identities in the array + must use the same tenant ID as the key vault's tenant ID. When ``createMode`` is set to + ``recover``, access policies are not required. Otherwise, access policies are required.""" + vaultUri: str + """The URI of the vault for performing operations on keys and secrets.""" + hsmPoolResourceId: str + """The resource id of HSM Pool.""" + enabledForDeployment: bool + """Property to specify whether Azure Virtual Machines are permitted to retrieve certificates + stored as secrets from the key vault.""" + enabledForDiskEncryption: bool + """Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the + vault and unwrap keys.""" + enabledForTemplateDeployment: bool + """Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the + key vault.""" + enableSoftDelete: bool + """Property to specify whether the 'soft delete' functionality is enabled for this key vault. If + it's not set to any value(true or false) when creating new key vault, it will be set to true by + default. Once set to true, it cannot be reverted to false.""" + softDeleteRetentionInDays: int + """softDelete data retention days. It accepts >=7 and <=90.""" + enableRbacAuthorization: bool + """Property that controls how data actions are authorized. When true, the key vault will use Role + Based Access Control (RBAC) for authorization of data actions, and the access policies + specified in vault properties will be ignored. When false, the key vault will use the access + policies specified in vault properties, and any policy stored on Azure Resource Manager will be + ignored. If null or not specified, the vault is created with the default value of false. Note + that management actions are always authorized with RBAC.""" + createMode: Union[str, "CreateMode"] + """The vault's create mode to indicate whether the vault need to be recovered or not. Known values + are: \"recover\" and \"default\".""" + enablePurgeProtection: bool + """Property specifying whether protection against purge is enabled for this vault. Setting this + property to true activates protection against purge for this vault and its content - only the + Key Vault service may initiate a hard, irrecoverable deletion. The setting is effective only if + soft delete is also enabled. Enabling this functionality is irreversible - that is, the + property does not accept false as its value.""" + networkAcls: "NetworkRuleSet" + """Rules governing the accessibility of the key vault from specific network locations.""" + provisioningState: Union[str, "VaultProvisioningState"] + """Provisioning state of the vault. Known values are: \"Succeeded\" and \"RegisteringDns\".""" + privateEndpointConnections: list["PrivateEndpointConnectionItem"] + """List of private endpoint connections associated with the key vault.""" + publicNetworkAccess: str + """Property to specify whether the vault will accept traffic from public internet. If set to + 'disabled' all traffic except private endpoint traffic and that that originates from trusted + services will be blocked. This will override the set firewall rules, meaning that even if the + firewall rules are present we will not honor the rules.""" + tokenBindingParameters: "TokenBindingParameters" + """Configuration for Token Binding for Entra tokens.""" + + +class VirtualNetworkRule(TypedDict, total=False): + """A rule governing the accessibility of a vault from a specific virtual network. + + :ivar id: Full resource id of a vnet subnet, such as + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. + Required. + :vartype id: str + :ivar ignore_missing_vnet_service_endpoint: Property to specify whether NRP will ignore the + check if parent subnet has serviceEndpoints configured. + :vartype ignore_missing_vnet_service_endpoint: bool + """ + + id: Required[str] + """Full resource id of a vnet subnet, such as + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. + Required.""" + ignoreMissingVnetServiceEndpoint: bool + """Property to specify whether NRP will ignore the check if parent subnet has serviceEndpoints + configured.""" diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/check_vault_name_availability.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/check_vault_name_availability.py index 11531d5d19f2..9cb066583c74 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/check_vault_name_availability.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/check_vault_name_availability.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/checkVaultNameAvailability.json +# x-ms-original-file: 2026-03-01-preview/checkVaultNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/create_key.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/create_key.py index b771f8ec196c..816f2e5f9df1 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/create_key.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/create_key.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/createKey.json +# x-ms-original-file: 2026-03-01-preview/createKey.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/create_secret.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/create_secret.py index 4783ab15db60..05db92f74eb0 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/create_secret.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/create_secret.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/createSecret.json +# x-ms-original-file: 2026-03-01-preview/createSecret.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/create_vault.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/create_vault.py index 95fd3207a721..40642a456f07 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/create_vault.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/create_vault.py @@ -91,6 +91,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/createVault.json +# x-ms-original-file: 2026-03-01-preview/createVault.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/create_vault_with_network_acls.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/create_vault_with_network_acls.py index baced2b595c9..04e0737e8606 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/create_vault_with_network_acls.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/create_vault_with_network_acls.py @@ -58,6 +58,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/createVaultWithNetworkAcls.json +# x-ms-original-file: 2026-03-01-preview/createVaultWithNetworkAcls.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/delete_private_endpoint_connection.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/delete_private_endpoint_connection.py index cdc1f9a20110..58b8d72dd219 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/delete_private_endpoint_connection.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/delete_private_endpoint_connection.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/deletePrivateEndpointConnection.json +# x-ms-original-file: 2026-03-01-preview/deletePrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/delete_vault.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/delete_vault.py index facd8d1c3208..186f0bff55dc 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/delete_vault.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/delete_vault.py @@ -36,6 +36,6 @@ def main(): ) -# x-ms-original-file: 2026-02-01/deleteVault.json +# x-ms-original-file: 2026-03-01-preview/deleteVault.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/deleted_managed_hsm_get.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/deleted_managed_hsm_get.py index 5788df54a050..58cdab2588b5 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/deleted_managed_hsm_get.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/deleted_managed_hsm_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/DeletedManagedHsm_Get.json +# x-ms-original-file: 2026-03-01-preview/DeletedManagedHsm_Get.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/deleted_managed_hsm_list.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/deleted_managed_hsm_list.py index 78237c79a8dd..6a15ef87607c 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/deleted_managed_hsm_list.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/deleted_managed_hsm_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-01/DeletedManagedHsm_List.json +# x-ms-original-file: 2026-03-01-preview/DeletedManagedHsm_List.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/deleted_managed_hsm_purge.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/deleted_managed_hsm_purge.py index 687c074d7047..f319bec130db 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/deleted_managed_hsm_purge.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/deleted_managed_hsm_purge.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-01/DeletedManagedHsm_Purge.json +# x-ms-original-file: 2026-03-01-preview/DeletedManagedHsm_Purge.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_deleted_vault.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_deleted_vault.py index 6054261158f3..3c7a402feeea 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_deleted_vault.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_deleted_vault.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/getDeletedVault.json +# x-ms-original-file: 2026-03-01-preview/getDeletedVault.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_key.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_key.py index 0db9ffdc1095..03dc9812e2af 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_key.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_key.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/getKey.json +# x-ms-original-file: 2026-03-01-preview/getKey.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_key_version.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_key_version.py index adbe69d66b22..2737666f64be 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_key_version.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_key_version.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/getKeyVersion.json +# x-ms-original-file: 2026-03-01-preview/getKeyVersion.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_private_endpoint_connection.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_private_endpoint_connection.py index cfa71cba24c2..6b42f141b670 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_private_endpoint_connection.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_private_endpoint_connection.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/getPrivateEndpointConnection.json +# x-ms-original-file: 2026-03-01-preview/getPrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_secret.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_secret.py index 3e1309692bce..ffb2a8c26453 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_secret.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_secret.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/getSecret.json +# x-ms-original-file: 2026-03-01-preview/getSecret.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_vault.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_vault.py index 4224e21417af..93f5cd88647e 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_vault.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/get_vault.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/getVault.json +# x-ms-original-file: 2026-03-01-preview/getVault.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_deleted_vaults.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_deleted_vaults.py index fac4c4eb9850..6c2486a148f3 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_deleted_vaults.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_deleted_vaults.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-01/listDeletedVaults.json +# x-ms-original-file: 2026-03-01-preview/listDeletedVaults.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_key_versions.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_key_versions.py index 84e7d7c3519a..09853a1d5dfd 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_key_versions.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_key_versions.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-01/listKeyVersions.json +# x-ms-original-file: 2026-03-01-preview/listKeyVersions.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_keys.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_keys.py index 8a251e87d542..6453b20bc2ac 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_keys.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_keys.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-01/listKeys.json +# x-ms-original-file: 2026-03-01-preview/listKeys.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_operations.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_operations.py index a6e6e597ba7c..6b05a567c2bc 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_operations.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-01/listOperations.json +# x-ms-original-file: 2026-03-01-preview/listOperations.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_private_endpoint_connection.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_private_endpoint_connection.py index fcb9af0dbdd3..b5f7f69531da 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_private_endpoint_connection.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_private_endpoint_connection.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-01/listPrivateEndpointConnection.json +# x-ms-original-file: 2026-03-01-preview/listPrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_private_link_resources.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_private_link_resources.py index 76b291052b00..1d40840177e3 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_private_link_resources.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_private_link_resources.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/listPrivateLinkResources.json +# x-ms-original-file: 2026-03-01-preview/listPrivateLinkResources.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_secrets.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_secrets.py index e9b461db955a..74e037ca795b 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_secrets.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_secrets.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-01/listSecrets.json +# x-ms-original-file: 2026-03-01-preview/listSecrets.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_vault.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_vault.py index 958a92a5ae65..f12c3adc63a4 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_vault.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_vault.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-01/listVault.json +# x-ms-original-file: 2026-03-01-preview/listVault.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_vault_by_resource_group.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_vault_by_resource_group.py index 21edb48a118d..08a909332eb7 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_vault_by_resource_group.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_vault_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-01/listVaultByResourceGroup.json +# x-ms-original-file: 2026-03-01-preview/listVaultByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_vault_by_subscription.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_vault_by_subscription.py index a2697c5111ac..28587fcbb8ac 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_vault_by_subscription.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/list_vault_by_subscription.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-01/listVaultBySubscription.json +# x-ms-original-file: 2026-03-01-preview/listVaultBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_check_mhsm_name_availability.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_check_mhsm_name_availability.py index aad549b22d33..75079bbbbf82 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_check_mhsm_name_availability.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_check_mhsm_name_availability.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/ManagedHsm_checkMhsmNameAvailability.json +# x-ms-original-file: 2026-03-01-preview/ManagedHsm_checkMhsmNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_create_key.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_create_key.py index 806765aeabcb..f07f109915c6 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_create_key.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_create_key.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/managedHsmCreateKey.json +# x-ms-original-file: 2026-03-01-preview/managedHsmCreateKey.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_create_or_update.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_create_or_update.py index 3f4ad73bdeb5..4f39e8b160c4 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_create_or_update.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_create_or_update.py @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/ManagedHsm_CreateOrUpdate.json +# x-ms-original-file: 2026-03-01-preview/ManagedHsm_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_delete.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_delete.py index 2fe742324099..c7b3349861ca 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_delete.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-01/ManagedHsm_Delete.json +# x-ms-original-file: 2026-03-01-preview/ManagedHsm_Delete.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_delete_private_endpoint_connection.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_delete_private_endpoint_connection.py index db36036eada2..43cfee85051b 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_delete_private_endpoint_connection.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_delete_private_endpoint_connection.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/ManagedHsm_deletePrivateEndpointConnection.json +# x-ms-original-file: 2026-03-01-preview/ManagedHsm_deletePrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_get.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_get.py index 50ef080b3291..07c2505f1be6 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_get.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/ManagedHsm_Get.json +# x-ms-original-file: 2026-03-01-preview/ManagedHsm_Get.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_get_key.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_get_key.py index f8b1ec00f50b..a1239a545346 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_get_key.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_get_key.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/managedHsmGetKey.json +# x-ms-original-file: 2026-03-01-preview/managedHsmGetKey.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_get_key_version.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_get_key_version.py index c3e51437aca7..597bc6c41849 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_get_key_version.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_get_key_version.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/managedHsmGetKeyVersion.json +# x-ms-original-file: 2026-03-01-preview/managedHsmGetKeyVersion.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_get_private_endpoint_connection.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_get_private_endpoint_connection.py index 7d1fd8a43359..b27045b8dcb1 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_get_private_endpoint_connection.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_get_private_endpoint_connection.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/ManagedHsm_getPrivateEndpointConnection.json +# x-ms-original-file: 2026-03-01-preview/ManagedHsm_getPrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_by_resource_group.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_by_resource_group.py index c415f337c127..0f8d214b6527 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_by_resource_group.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-01/ManagedHsm_ListByResourceGroup.json +# x-ms-original-file: 2026-03-01-preview/ManagedHsm_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_by_subscription.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_by_subscription.py index e145dfe49932..0746a9d5fa8e 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_by_subscription.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_by_subscription.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-01/ManagedHsm_ListBySubscription.json +# x-ms-original-file: 2026-03-01-preview/ManagedHsm_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_key_versions.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_key_versions.py index 328581f7f8ef..43b70456da8d 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_key_versions.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_key_versions.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-01/managedHsmListKeyVersions.json +# x-ms-original-file: 2026-03-01-preview/managedHsmListKeyVersions.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_keys.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_keys.py index 0b97f988f51d..ddac9dc32af9 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_keys.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_keys.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-01/managedHsmListKeys.json +# x-ms-original-file: 2026-03-01-preview/managedHsmListKeys.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_private_endpoint_connections_by_resource.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_private_endpoint_connections_by_resource.py index 9d4c3a9e3a4b..168e9161bce4 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_private_endpoint_connections_by_resource.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_private_endpoint_connections_by_resource.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-01/ManagedHsm_ListPrivateEndpointConnectionsByResource.json +# x-ms-original-file: 2026-03-01-preview/ManagedHsm_ListPrivateEndpointConnectionsByResource.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_private_link_resources.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_private_link_resources.py index 1271acb8f06b..e68d0e1b9c30 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_private_link_resources.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_private_link_resources.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/ManagedHsm_listPrivateLinkResources.json +# x-ms-original-file: 2026-03-01-preview/ManagedHsm_listPrivateLinkResources.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_regions_by_resource.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_regions_by_resource.py index 816fd4db9cbf..9b53f2c03b7c 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_regions_by_resource.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_list_regions_by_resource.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-01/ManagedHsm_ListRegionsByResource.json +# x-ms-original-file: 2026-03-01-preview/ManagedHsm_ListRegionsByResource.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_put_private_endpoint_connection.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_put_private_endpoint_connection.py index 72bfe4fee952..219a612d1390 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_put_private_endpoint_connection.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_put_private_endpoint_connection.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/ManagedHsm_putPrivateEndpointConnection.json +# x-ms-original-file: 2026-03-01-preview/ManagedHsm_putPrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_update.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_update.py index 9f720663d0cf..65a2ab85e905 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_update.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/managed_hsm_update.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/ManagedHsm_Update.json +# x-ms-original-file: 2026-03-01-preview/ManagedHsm_Update.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/purge_deleted_vault.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/purge_deleted_vault.py index 436d015ccefa..650551564b36 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/purge_deleted_vault.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/purge_deleted_vault.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-01/purgeDeletedVault.json +# x-ms-original-file: 2026-03-01-preview/purgeDeletedVault.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/put_private_endpoint_connection.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/put_private_endpoint_connection.py index 520d54eb4c05..e5bdb9ebafc8 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/put_private_endpoint_connection.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/put_private_endpoint_connection.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/putPrivateEndpointConnection.json +# x-ms-original-file: 2026-03-01-preview/putPrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/update_access_policies_add.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/update_access_policies_add.py index 640e6355e4f5..01ccfe9adf38 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/update_access_policies_add.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/update_access_policies_add.py @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/updateAccessPoliciesAdd.json +# x-ms-original-file: 2026-03-01-preview/updateAccessPoliciesAdd.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/update_secret.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/update_secret.py index c4187b8741ab..1eba0459fe5d 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/update_secret.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/update_secret.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/updateSecret.json +# x-ms-original-file: 2026-03-01-preview/updateSecret.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/update_vault.py b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/update_vault.py index d0e6a92821a5..55c458d250ab 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_samples/update_vault.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_samples/update_vault.py @@ -90,6 +90,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-01/updateVault.json +# x-ms-original-file: 2026-03-01-preview/updateVault.json if __name__ == "__main__": main() diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_tests/test_key_vault_management_vaults_operations.py b/sdk/keyvault/azure-mgmt-keyvault/generated_tests/test_key_vault_management_vaults_operations.py index ee0fc69fa4b7..29c4ba3e0b88 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_tests/test_key_vault_management_vaults_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_tests/test_key_vault_management_vaults_operations.py @@ -85,6 +85,7 @@ def test_vaults_begin_create_or_update(self, resource_group): "provisioningState": "str", "publicNetworkAccess": "str", "softDeleteRetentionInDays": 0, + "tokenBindingParameters": {"minimumTokenBindingStrength": "str", "mode": "str"}, "vaultUri": "str", }, "tags": {"str": "str"}, @@ -132,6 +133,7 @@ def test_vaults_update(self, resource_group): "sku": {"family": "str", "name": "str"}, "softDeleteRetentionInDays": 0, "tenantId": "str", + "tokenBindingParameters": {"minimumTokenBindingStrength": "str", "mode": "str"}, }, "tags": {"str": "str"}, }, diff --git a/sdk/keyvault/azure-mgmt-keyvault/generated_tests/test_key_vault_management_vaults_operations_async.py b/sdk/keyvault/azure-mgmt-keyvault/generated_tests/test_key_vault_management_vaults_operations_async.py index e7345489349d..5f1831b94ca7 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/generated_tests/test_key_vault_management_vaults_operations_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/generated_tests/test_key_vault_management_vaults_operations_async.py @@ -87,6 +87,7 @@ async def test_vaults_begin_create_or_update(self, resource_group): "provisioningState": "str", "publicNetworkAccess": "str", "softDeleteRetentionInDays": 0, + "tokenBindingParameters": {"minimumTokenBindingStrength": "str", "mode": "str"}, "vaultUri": "str", }, "tags": {"str": "str"}, @@ -135,6 +136,7 @@ async def test_vaults_update(self, resource_group): "sku": {"family": "str", "name": "str"}, "softDeleteRetentionInDays": 0, "tenantId": "str", + "tokenBindingParameters": {"minimumTokenBindingStrength": "str", "mode": "str"}, }, "tags": {"str": "str"}, }, diff --git a/sdk/keyvault/azure-mgmt-keyvault/pyproject.toml b/sdk/keyvault/azure-mgmt-keyvault/pyproject.toml index 53df278bd915..4492d91310d8 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/pyproject.toml +++ b/sdk/keyvault/azure-mgmt-keyvault/pyproject.toml @@ -17,13 +17,13 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] -requires-python = ">=3.9" +requires-python = ">=3.10" keywords = [ "azure", "azure sdk", diff --git a/sdk/keyvault/azure-mgmt-keyvault/tests/conftest.py b/sdk/keyvault/azure-mgmt-keyvault/tests/conftest.py index 924599a32089..fe9899369c6e 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/tests/conftest.py +++ b/sdk/keyvault/azure-mgmt-keyvault/tests/conftest.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import os diff --git a/sdk/keyvault/azure-mgmt-keyvault/tests/test_unittest.py b/sdk/keyvault/azure-mgmt-keyvault/tests/disable_test_unittest.py similarity index 100% rename from sdk/keyvault/azure-mgmt-keyvault/tests/test_unittest.py rename to sdk/keyvault/azure-mgmt-keyvault/tests/disable_test_unittest.py diff --git a/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_managed_hsms_operations_async_test.py b/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_managed_hsms_operations_async_test.py new file mode 100644 index 000000000000..60ab7b092b09 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_managed_hsms_operations_async_test.py @@ -0,0 +1,43 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.keyvault.aio import KeyVaultManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestKeyVaultManagementManagedHsmsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(KeyVaultManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_managed_hsms_list_by_resource_group(self, resource_group): + response = self.client.managed_hsms.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert len(result) == 0 + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_managed_hsms_list_by_subscription(self, resource_group): + response = self.client.managed_hsms.list_by_subscription() + result = [r async for r in response] + assert len(result) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_managed_hsms_list_deleted(self, resource_group): + response = self.client.managed_hsms.list_deleted() + result = [r async for r in response] + assert len(result) diff --git a/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_managed_hsms_operations_test.py b/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_managed_hsms_operations_test.py new file mode 100644 index 000000000000..8ee1604688ed --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_managed_hsms_operations_test.py @@ -0,0 +1,42 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.keyvault import KeyVaultManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestKeyVaultManagementManagedHsmsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(KeyVaultManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_managed_hsms_list_by_resource_group(self, resource_group): + response = self.client.managed_hsms.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert len(result) == 0 + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_managed_hsms_list_by_subscription(self, resource_group): + response = self.client.managed_hsms.list_by_subscription() + result = [r for r in response] + assert len(result) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_managed_hsms_list_deleted(self, resource_group): + response = self.client.managed_hsms.list_deleted() + result = [r for r in response] + assert len(result) diff --git a/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_operations_async_test.py b/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_operations_async_test.py index 7885b81ed2cd..0500f373d66a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_operations_async_test.py +++ b/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_operations_async_test.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_operations_list(self, resource_group): response = self.client.operations.list() result = [r async for r in response] - assert result + assert len(result) diff --git a/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_operations_test.py b/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_operations_test.py index 80303642c5a7..cbcb00dbc74d 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_operations_test.py +++ b/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_operations_test.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_operations_list(self, resource_group): response = self.client.operations.list() result = [r for r in response] - assert result + assert len(result) diff --git a/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_vaults_operations_async_test.py b/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_vaults_operations_async_test.py index cafaac22a35b..f46e5db62af0 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_vaults_operations_async_test.py +++ b/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_vaults_operations_async_test.py @@ -1,13 +1,11 @@ -# pylint: disable=line-too-long,useless-suppression # 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) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -import json from azure.mgmt.keyvault.aio import KeyVaultManagementClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer @@ -23,53 +21,32 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_vaults_list_by_resource_group(self, resource_group): response = self.client.vaults.list_by_resource_group( resource_group_name=resource_group.name, ) result = [r async for r in response] - assert result == [] + assert len(result) == 0 @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self): - response = self.client.vaults.list( - filter="resourceType eq 'Microsoft.KeyVault/vaults'", - ) + async def test_vaults_list_by_subscription(self, resource_group): + response = self.client.vaults.list_by_subscription() result = [r async for r in response] - assert result + assert len(result) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_customized_api_version(self): - # This API is legacy paging API that api-version of init request and next link must be "2015-11-01". - # Although this API violates ARM guidelines, we have to support it for backward compatibility. - # So After SDK generation, you need to customize 2 lines like https://github.com/Azure/azure-sdk-for-python/pull/43559/commits/6e09d1d513da26c55c7960442f0f20f5e59e149a. - # And the test is to verify the customization works. - call_count = 0 - inject_next_link = True - - def raw_request_hook(request): - # api-version in next link must be "2015-11-01" - assert ( - request.http_request.url.count("api-version=2015-11-01") == 1 - ), "api-version query parameter is missing or duplicated" - nonlocal call_count - call_count += 1 - - def raw_response_hook(response): - nonlocal inject_next_link - if inject_next_link: - content = response.http_response._content.decode("utf-8") - data = json.loads(content) - if "nextLink" not in data: - # make sure there is nextLink for testing - data["nextLink"] = response.http_request.url.replace("&api-version=2015-11-01", "") - new_content = json.dumps(data).encode("utf-8") - response.http_response._content = new_content - inject_next_link = False # only inject nextLink once + async def test_vaults_list_deleted(self, resource_group): + response = self.client.vaults.list_deleted() + result = [r async for r in response] + assert len(result) - response = self.client.vaults.list(raw_request_hook=raw_request_hook, raw_response_hook=raw_response_hook) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_vaults_list(self, resource_group): + response = self.client.vaults.list( + filter="resourceType eq 'Microsoft.KeyVault/vaults'", + ) result = [r async for r in response] - assert result - assert call_count >= 2 # make sure paging happened + assert len(result) diff --git a/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_vaults_operations_test.py b/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_vaults_operations_test.py index 1be04185f326..b2b95f23ea8c 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_vaults_operations_test.py +++ b/sdk/keyvault/azure-mgmt-keyvault/tests/test_key_vault_management_vaults_operations_test.py @@ -1,13 +1,11 @@ -# pylint: disable=line-too-long,useless-suppression # 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) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -import json from azure.mgmt.keyvault import KeyVaultManagementClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -22,51 +20,32 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_vaults_list_by_resource_group(self, resource_group): response = self.client.vaults.list_by_resource_group( resource_group_name=resource_group.name, ) result = [r for r in response] - assert result == [] + assert len(result) == 0 + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self): - response = self.client.vaults.list( - filter="resourceType eq 'Microsoft.KeyVault/vaults'", - ) + def test_vaults_list_by_subscription(self, resource_group): + response = self.client.vaults.list_by_subscription() result = [r for r in response] - assert result + assert len(result) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_customized_api_version(self): - # This API is legacy paging API that api-version of init request and next link must be "2015-11-01". - # Although this API violates ARM guidelines, we have to support it for backward compatibility. - # So After SDK generation, you need to customize 2 lines like https://github.com/Azure/azure-sdk-for-python/pull/43559/commits/6e09d1d513da26c55c7960442f0f20f5e59e149a. - # And the test is to verify the customization works. - call_count = 0 - inject_next_link = True - - def raw_request_hook(request): - # api-version in next link must be "2015-11-01" - assert ( - request.http_request.url.count("api-version=2015-11-01") == 1 - ), "api-version query parameter is missing or duplicated" - nonlocal call_count - call_count += 1 - - def raw_response_hook(response): - nonlocal inject_next_link - if inject_next_link: - content = response.http_response._content.decode("utf-8") - data = json.loads(content) - if "nextLink" not in data: - # make sure there is nextLink for testing - data["nextLink"] = response.http_request.url.replace("&api-version=2015-11-01", "") - new_content = json.dumps(data).encode("utf-8") - response.http_response._content = new_content - inject_next_link = False # only inject nextLink once + def test_vaults_list_deleted(self, resource_group): + response = self.client.vaults.list_deleted() + result = [r for r in response] + assert len(result) - response = self.client.vaults.list(raw_request_hook=raw_request_hook, raw_response_hook=raw_response_hook) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_vaults_list(self, resource_group): + response = self.client.vaults.list( + filter="resourceType eq 'Microsoft.KeyVault/vaults'", + ) result = [r for r in response] - assert result - assert call_count >= 2 # make sure paging happened + assert len(result) diff --git a/sdk/keyvault/azure-mgmt-keyvault/tsp-location.yaml b/sdk/keyvault/azure-mgmt-keyvault/tsp-location.yaml index 00c5b496af38..07dc85d4dd75 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/tsp-location.yaml +++ b/sdk/keyvault/azure-mgmt-keyvault/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/keyvault/resource-manager/Microsoft.KeyVault/KeyVault -commit: 2607e4bac26ea35059d8bd6addd3b6c81b0fca4f +commit: 7b08703f0340226430bd8838aad0d7ac4ab5a665 repo: Azure/azure-rest-api-specs additionalDirectories: