diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/CHANGELOG.md b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/CHANGELOG.md index 564f71ffd601..e61dd80a39ed 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/CHANGELOG.md +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/CHANGELOG.md @@ -1,5 +1,215 @@ # Release History +## 2.0.0 (2025-05-13) + +### Features Added + + - Client `HybridConnectivityMgmtClient` added method `send_request` + - Client `HybridConnectivityMgmtClient` added operation group `generate_aws_template` + - Client `HybridConnectivityMgmtClient` added operation group `public_cloud_connectors` + - Client `HybridConnectivityMgmtClient` added operation group `solution_configurations` + - Client `HybridConnectivityMgmtClient` added operation group `inventory` + - Client `HybridConnectivityMgmtClient` added operation group `solution_types` + - Model `ServiceConfigurationResource` added property `properties` + - Added model `AADProfileProperties` + - Added model `AwsCloudProfile` + - Added model `AwsCloudProfileUpdate` + - Added enum `CloudNativeType` + - Added model `ExtensionResource` + - Added model `GenerateAwsTemplateRequest` + - Added model `GenerateAwsTemplateResponse` + - Added enum `HostType` + - Added model `IngressProfileProperties` + - Added model `InventoryProperties` + - Added model `InventoryResource` + - Added model `OperationStatusResult` + - Added model `PublicCloudConnector` + - Added model `PublicCloudConnectorProperties` + - Added model `PublicCloudConnectorPropertiesUpdate` + - Added model `PublicCloudConnectorUpdate` + - Added model `RelayNamespaceAccessProperties` + - Added enum `ResourceProvisioningState` + - Added model `ServiceConfigurationProperties` + - Added model `ServiceConfigurationPropertiesPatch` + - Added model `SolutionConfiguration` + - Added model `SolutionConfigurationProperties` + - Added model `SolutionConfigurationPropertiesUpdate` + - Added enum `SolutionConfigurationStatus` + - Added model `SolutionConfigurationUpdate` + - Added model `SolutionSettings` + - Added model `SolutionTypeProperties` + - Added model `SolutionTypeResource` + - Added model `SolutionTypeSettings` + - Added model `SolutionTypeSettingsProperties` + - Added model `TrackedResource` + - Added model `TrackedResourceUpdate` + - Added model `GenerateAwsTemplateOperations` + - Added model `InventoryOperations` + - Added model `PublicCloudConnectorsOperations` + - Added model `SolutionConfigurationsOperations` + - Added model `SolutionTypesOperations` + - Method `EndpointAccessResource.__init__` has a new overload `def __init__(self: None, relay: Optional[_models.RelayNamespaceAccessProperties])` + - Method `EndpointAccessResource.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `EndpointProperties.__init__` has a new overload `def __init__(self: None, type: Union[str, _models.Type], resource_id: Optional[str])` + - Method `EndpointProperties.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `EndpointResource.__init__` has a new overload `def __init__(self: None, properties: Optional[_models.EndpointProperties])` + - Method `EndpointResource.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `ErrorResponse.__init__` has a new overload `def __init__(self: None, error: Optional[_models.ErrorDetail])` + - Method `ErrorResponse.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `IngressGatewayResource.__init__` has a new overload `def __init__(self: None, relay: Optional[_models.RelayNamespaceAccessProperties], ingress: Optional[_models.IngressProfileProperties])` + - Method `IngressGatewayResource.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `ListCredentialsRequest.__init__` has a new overload `def __init__(self: None, service_name: Optional[Union[str, _models.ServiceName]])` + - Method `ListCredentialsRequest.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `ListIngressGatewayCredentialsRequest.__init__` has a new overload `def __init__(self: None, service_name: Optional[Union[str, _models.ServiceName]])` + - Method `ListIngressGatewayCredentialsRequest.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `ManagedProxyRequest.__init__` has a new overload `def __init__(self: None, service: str, hostname: Optional[str], service_name: Optional[Union[str, _models.ServiceName]])` + - Method `ManagedProxyRequest.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `ManagedProxyResource.__init__` has a new overload `def __init__(self: None, proxy: str, expires_on: int)` + - Method `ManagedProxyResource.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `Operation.__init__` has a new overload `def __init__(self: None, display: Optional[_models.OperationDisplay])` + - Method `Operation.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `ServiceConfigurationResource.__init__` has a new overload `def __init__(self: None, properties: Optional[_models.ServiceConfigurationProperties])` + - Method `ServiceConfigurationResource.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `ServiceConfigurationResourcePatch.__init__` has a new overload `def __init__(self: None, properties: Optional[_models.ServiceConfigurationPropertiesPatch])` + - Method `ServiceConfigurationResourcePatch.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `SystemData.__init__` has a new overload `def __init__(self: None, created_by: Optional[str], created_by_type: Optional[Union[str, _models.CreatedByType]], created_at: Optional[datetime], last_modified_by: Optional[str], last_modified_by_type: Optional[Union[str, _models.CreatedByType]], last_modified_at: Optional[datetime])` + - Method `SystemData.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `AADProfileProperties.__init__` has a new overload `def __init__(self: None, server_id: str, tenant_id: str)` + - Method `AADProfileProperties.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `AwsCloudProfile.__init__` has a new overload `def __init__(self: None, account_id: str, excluded_accounts: Optional[List[str]], is_organizational_account: Optional[bool])` + - Method `AwsCloudProfile.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `AwsCloudProfileUpdate.__init__` has a new overload `def __init__(self: None, excluded_accounts: Optional[List[str]])` + - Method `AwsCloudProfileUpdate.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `GenerateAwsTemplateRequest.__init__` has a new overload `def __init__(self: None, connector_id: str, solution_types: Optional[List[_models.SolutionTypeSettings]])` + - Method `GenerateAwsTemplateRequest.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `IngressProfileProperties.__init__` has a new overload `def __init__(self: None, hostname: str, aad_profile: _models.AADProfileProperties)` + - Method `IngressProfileProperties.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `InventoryProperties.__init__` has a new overload `def __init__(self: None, cloud_native_type: Optional[Union[str, _models.CloudNativeType]], cloud_native_resource_id: Optional[str], azure_resource_id: Optional[str], status: Optional[Union[str, _models.SolutionConfigurationStatus]], status_details: Optional[str])` + - Method `InventoryProperties.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `InventoryResource.__init__` has a new overload `def __init__(self: None, properties: Optional[_models.InventoryProperties])` + - Method `InventoryResource.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `OperationStatusResult.__init__` has a new overload `def __init__(self: None, status: str, id: Optional[str], name: Optional[str], percent_complete: Optional[float], start_time: Optional[datetime], end_time: Optional[datetime], operations: Optional[List[_models.OperationStatusResult]], error: Optional[_models.ErrorDetail])` + - Method `OperationStatusResult.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `PublicCloudConnector.__init__` has a new overload `def __init__(self: None, location: str, tags: Optional[Dict[str, str]], properties: Optional[_models.PublicCloudConnectorProperties])` + - Method `PublicCloudConnector.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `PublicCloudConnector.__init__` has a new overload `def __init__(self: None, location: str, tags: Optional[Dict[str, str]])` + - Method `PublicCloudConnector.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `PublicCloudConnectorProperties.__init__` has a new overload `def __init__(self: None, aws_cloud_profile: _models.AwsCloudProfile, host_type: Union[str, _models.HostType])` + - Method `PublicCloudConnectorProperties.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `PublicCloudConnectorPropertiesUpdate.__init__` has a new overload `def __init__(self: None, aws_cloud_profile: Optional[_models.AwsCloudProfileUpdate])` + - Method `PublicCloudConnectorPropertiesUpdate.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `PublicCloudConnectorUpdate.__init__` has a new overload `def __init__(self: None, tags: Optional[Dict[str, str]], properties: Optional[_models.PublicCloudConnectorPropertiesUpdate])` + - Method `PublicCloudConnectorUpdate.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `PublicCloudConnectorUpdate.__init__` has a new overload `def __init__(self: None, tags: Optional[Dict[str, str]])` + - Method `PublicCloudConnectorUpdate.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `RelayNamespaceAccessProperties.__init__` has a new overload `def __init__(self: None, namespace_name: str, namespace_name_suffix: str, hybrid_connection_name: str, expires_on: Optional[int], service_configuration_token: Optional[str])` + - Method `RelayNamespaceAccessProperties.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `ServiceConfigurationProperties.__init__` has a new overload `def __init__(self: None, service_name: Union[str, _models.ServiceName], resource_id: Optional[str], port: Optional[int])` + - Method `ServiceConfigurationProperties.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `ServiceConfigurationPropertiesPatch.__init__` has a new overload `def __init__(self: None, port: Optional[int])` + - Method `ServiceConfigurationPropertiesPatch.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `SolutionConfiguration.__init__` has a new overload `def __init__(self: None, properties: Optional[_models.SolutionConfigurationProperties])` + - Method `SolutionConfiguration.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `SolutionConfigurationProperties.__init__` has a new overload `def __init__(self: None, solution_type: str, solution_settings: Optional[_models.SolutionSettings])` + - Method `SolutionConfigurationProperties.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `SolutionConfigurationPropertiesUpdate.__init__` has a new overload `def __init__(self: None, solution_type: Optional[str], solution_settings: Optional[_models.SolutionSettings])` + - Method `SolutionConfigurationPropertiesUpdate.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `SolutionConfigurationUpdate.__init__` has a new overload `def __init__(self: None, properties: Optional[_models.SolutionConfigurationPropertiesUpdate])` + - Method `SolutionConfigurationUpdate.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `SolutionTypeProperties.__init__` has a new overload `def __init__(self: None, solution_type: Optional[str], description: Optional[str], supported_azure_regions: Optional[List[str]], solution_settings: Optional[List[_models.SolutionTypeSettingsProperties]])` + - Method `SolutionTypeProperties.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `SolutionTypeResource.__init__` has a new overload `def __init__(self: None, properties: Optional[_models.SolutionTypeProperties])` + - Method `SolutionTypeResource.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `SolutionTypeSettings.__init__` has a new overload `def __init__(self: None, solution_type: str, solution_settings: Optional[_models.SolutionSettings])` + - Method `SolutionTypeSettings.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `SolutionTypeSettingsProperties.__init__` has a new overload `def __init__(self: None, name: str, display_name: str, type: str, description: str, allowed_values: List[str], default_value: str)` + - Method `SolutionTypeSettingsProperties.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `TrackedResource.__init__` has a new overload `def __init__(self: None, location: str, tags: Optional[Dict[str, str]])` + - Method `TrackedResource.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `TrackedResourceUpdate.__init__` has a new overload `def __init__(self: None, tags: Optional[Dict[str, str]])` + - Method `TrackedResourceUpdate.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `EndpointsOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_uri: str, endpoint_name: str, endpoint_resource: IO[bytes], content_type: str)` + - Method `EndpointsOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_uri: str, endpoint_name: str, endpoint_resource: JSON, content_type: str)` + - Method `EndpointsOperations.list_credentials` has a new overload `def list_credentials(self: None, resource_uri: str, endpoint_name: str, list_credentials_request: Optional[ListCredentialsRequest], expiresin: Optional[int], content_type: str)` + - Method `EndpointsOperations.list_credentials` has a new overload `def list_credentials(self: None, resource_uri: str, endpoint_name: str, list_credentials_request: Optional[IO[bytes]], expiresin: Optional[int], content_type: str)` + - Method `EndpointsOperations.list_credentials` has a new overload `def list_credentials(self: None, resource_uri: str, endpoint_name: str, list_credentials_request: Optional[JSON], expiresin: Optional[int], content_type: str)` + - Method `EndpointsOperations.list_ingress_gateway_credentials` has a new overload `def list_ingress_gateway_credentials(self: None, resource_uri: str, endpoint_name: str, list_ingress_gateway_credentials_request: Optional[ListIngressGatewayCredentialsRequest], expiresin: Optional[int], content_type: str)` + - Method `EndpointsOperations.list_ingress_gateway_credentials` has a new overload `def list_ingress_gateway_credentials(self: None, resource_uri: str, endpoint_name: str, list_ingress_gateway_credentials_request: Optional[IO[bytes]], expiresin: Optional[int], content_type: str)` + - Method `EndpointsOperations.list_ingress_gateway_credentials` has a new overload `def list_ingress_gateway_credentials(self: None, resource_uri: str, endpoint_name: str, list_ingress_gateway_credentials_request: Optional[JSON], expiresin: Optional[int], content_type: str)` + - Method `EndpointsOperations.list_managed_proxy_details` has a new overload `def list_managed_proxy_details(self: None, resource_uri: str, endpoint_name: str, managed_proxy_request: IO[bytes], content_type: str)` + - Method `EndpointsOperations.list_managed_proxy_details` has a new overload `def list_managed_proxy_details(self: None, resource_uri: str, endpoint_name: str, managed_proxy_request: JSON, content_type: str)` + - Method `EndpointsOperations.update` has a new overload `def update(self: None, resource_uri: str, endpoint_name: str, endpoint_resource: IO[bytes], content_type: str)` + - Method `EndpointsOperations.update` has a new overload `def update(self: None, resource_uri: str, endpoint_name: str, endpoint_resource: JSON, content_type: str)` + - Method `ServiceConfigurationsOperations.create_orupdate` has a new overload `def create_orupdate(self: None, resource_uri: str, endpoint_name: str, service_configuration_name: str, service_configuration_resource: IO[bytes], content_type: str)` + - Method `ServiceConfigurationsOperations.create_orupdate` has a new overload `def create_orupdate(self: None, resource_uri: str, endpoint_name: str, service_configuration_name: str, service_configuration_resource: JSON, content_type: str)` + - Method `ServiceConfigurationsOperations.update` has a new overload `def update(self: None, resource_uri: str, endpoint_name: str, service_configuration_name: str, service_configuration_resource: IO[bytes], content_type: str)` + - Method `ServiceConfigurationsOperations.update` has a new overload `def update(self: None, resource_uri: str, endpoint_name: str, service_configuration_name: str, service_configuration_resource: JSON, content_type: str)` + - Method `GenerateAwsTemplateOperations.post` has a new overload `def post(self: None, generate_aws_template_request: GenerateAwsTemplateRequest, content_type: str)` + - Method `GenerateAwsTemplateOperations.post` has a new overload `def post(self: None, generate_aws_template_request: JSON, content_type: str)` + - Method `GenerateAwsTemplateOperations.post` has a new overload `def post(self: None, generate_aws_template_request: IO[bytes], content_type: str)` + - Method `PublicCloudConnectorsOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, public_cloud_connector: str, resource: PublicCloudConnector, content_type: str)` + - Method `PublicCloudConnectorsOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, public_cloud_connector: str, resource: JSON, content_type: str)` + - Method `PublicCloudConnectorsOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, public_cloud_connector: str, resource: IO[bytes], content_type: str)` + - Method `PublicCloudConnectorsOperations.update` has a new overload `def update(self: None, resource_group_name: str, public_cloud_connector: str, properties: PublicCloudConnectorUpdate, content_type: str)` + - Method `PublicCloudConnectorsOperations.update` has a new overload `def update(self: None, resource_group_name: str, public_cloud_connector: str, properties: JSON, content_type: str)` + - Method `PublicCloudConnectorsOperations.update` has a new overload `def update(self: None, resource_group_name: str, public_cloud_connector: str, properties: IO[bytes], content_type: str)` + - Method `SolutionConfigurationsOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_uri: str, solution_configuration: str, resource: SolutionConfiguration, content_type: str)` + - Method `SolutionConfigurationsOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_uri: str, solution_configuration: str, resource: JSON, content_type: str)` + - Method `SolutionConfigurationsOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_uri: str, solution_configuration: str, resource: IO[bytes], content_type: str)` + - Method `SolutionConfigurationsOperations.update` has a new overload `def update(self: None, resource_uri: str, solution_configuration: str, properties: SolutionConfigurationUpdate, content_type: str)` + - Method `SolutionConfigurationsOperations.update` has a new overload `def update(self: None, resource_uri: str, solution_configuration: str, properties: JSON, content_type: str)` + - Method `SolutionConfigurationsOperations.update` has a new overload `def update(self: None, resource_uri: str, solution_configuration: str, properties: IO[bytes], content_type: str)` + +### Breaking Changes + + - Method `HybridConnectivityMgmtClient.__init__` inserted a `positional_or_keyword` parameter `subscription_id` + - Model `EndpointAccessResource` deleted or renamed its instance variable `namespace_name` + - Model `EndpointAccessResource` deleted or renamed its instance variable `namespace_name_suffix` + - Model `EndpointAccessResource` deleted or renamed its instance variable `hybrid_connection_name` + - Model `EndpointAccessResource` deleted or renamed its instance variable `access_key` + - Model `EndpointAccessResource` deleted or renamed its instance variable `expires_on` + - Model `EndpointAccessResource` deleted or renamed its instance variable `service_configuration_token` + - Model `EndpointAccessResource` deleted or renamed its instance variable `additional_properties` + - Model `EndpointProperties` deleted or renamed its instance variable `additional_properties` + - Model `EndpointResource` deleted or renamed its instance variable `additional_properties` + - Model `ErrorAdditionalInfo` deleted or renamed its instance variable `additional_properties` + - Model `ErrorDetail` deleted or renamed its instance variable `additional_properties` + - Model `ErrorResponse` deleted or renamed its instance variable `additional_properties` + - Model `IngressGatewayResource` deleted or renamed its instance variable `hostname` + - Model `IngressGatewayResource` deleted or renamed its instance variable `server_id` + - Model `IngressGatewayResource` deleted or renamed its instance variable `tenant_id` + - Model `IngressGatewayResource` deleted or renamed its instance variable `namespace_name` + - Model `IngressGatewayResource` deleted or renamed its instance variable `namespace_name_suffix` + - Model `IngressGatewayResource` deleted or renamed its instance variable `hybrid_connection_name` + - Model `IngressGatewayResource` deleted or renamed its instance variable `access_key` + - Model `IngressGatewayResource` deleted or renamed its instance variable `expires_on` + - Model `IngressGatewayResource` deleted or renamed its instance variable `service_configuration_token` + - Model `IngressGatewayResource` deleted or renamed its instance variable `additional_properties` + - Model `ListCredentialsRequest` deleted or renamed its instance variable `additional_properties` + - Model `ListIngressGatewayCredentialsRequest` deleted or renamed its instance variable `additional_properties` + - Model `ManagedProxyRequest` deleted or renamed its instance variable `additional_properties` + - Model `ManagedProxyResource` deleted or renamed its instance variable `additional_properties` + - Model `Operation` deleted or renamed its instance variable `additional_properties` + - Model `OperationDisplay` deleted or renamed its instance variable `additional_properties` + - Model `ProxyResource` deleted or renamed its instance variable `additional_properties` + - Model `Resource` deleted or renamed its instance variable `additional_properties` + - Model `ServiceConfigurationResource` deleted or renamed its instance variable `service_name` + - Model `ServiceConfigurationResource` deleted or renamed its instance variable `resource_id` + - Model `ServiceConfigurationResource` deleted or renamed its instance variable `port` + - Model `ServiceConfigurationResource` deleted or renamed its instance variable `provisioning_state` + - Model `ServiceConfigurationResource` deleted or renamed its instance variable `additional_properties` + - Model `ServiceConfigurationResourcePatch` deleted or renamed its instance variable `port` + - Model `ServiceConfigurationResourcePatch` deleted or renamed its instance variable `additional_properties` + - Model `SystemData` deleted or renamed its instance variable `additional_properties` + - Deleted or renamed model `EndpointsList` + - Deleted or renamed model `ServiceConfigurationList` + - Method `EndpointsOperations.list_credentials` parameter `expiresin` changed default value from `int` to `none` + - Method `EndpointsOperations.list_credentials` changed its parameter `expiresin` from `positional_or_keyword` to `keyword_only` + - Method `EndpointsOperations.list_ingress_gateway_credentials` parameter `expiresin` changed default value from `int` to `none` + - Method `EndpointsOperations.list_ingress_gateway_credentials` changed its parameter `expiresin` from `positional_or_keyword` to `keyword_only` + - Method `EndpointsOperations.list_credentials` re-ordered its parameters from `['self', 'resource_uri', 'endpoint_name', 'expiresin', 'list_credentials_request', 'kwargs']` to `['self', 'resource_uri', 'endpoint_name', 'list_credentials_request', 'expiresin', 'kwargs']` + - Method `EndpointsOperations.list_ingress_gateway_credentials` re-ordered its parameters from `['self', 'resource_uri', 'endpoint_name', 'expiresin', 'list_ingress_gateway_credentials_request', 'kwargs']` to `['self', 'resource_uri', 'endpoint_name', 'list_ingress_gateway_credentials_request', 'expiresin', 'kwargs']` + ## 2.0.0b1 (2025-04-01) ### Features Added diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/README.md b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/README.md index d4fa95905534..5e0040a8d4cc 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/README.md +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Hybridconnectivity Management Client Library. -This package has been tested with Python 3.8+. +This package has been tested with Python 3.9+. 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.8+ is required to use this package. +- Python 3.9+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/_meta.json b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/_meta.json index 4c9201fb5386..f0b7c901cf44 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/_meta.json +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/_meta.json @@ -1,6 +1,6 @@ { - "commit": "3db6867b8e524ea6d1bc7a3bbb989fe50dd2f184", + "commit": "b9a8c9e8eb8998a222f126a005d1ab633f1daad9", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/hybridconnectivity/HybridConnectivity.Management", - "@azure-tools/typespec-python": "0.41.0" + "@azure-tools/typespec-python": "0.44.2" } \ No newline at end of file diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/apiview-properties.json b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/apiview-properties.json index 09df4dd2b8b9..b7da1a34e4af 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/apiview-properties.json +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/apiview-properties.json @@ -13,6 +13,7 @@ "azure.mgmt.hybridconnectivity.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail", "azure.mgmt.hybridconnectivity.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", "azure.mgmt.hybridconnectivity.models.GenerateAwsTemplateRequest": "Microsoft.HybridConnectivity.GenerateAwsTemplateRequest", + "azure.mgmt.hybridconnectivity.models.GenerateAwsTemplateResponse": "Microsoft.HybridConnectivity.GenerateAwsTemplateResponse", "azure.mgmt.hybridconnectivity.models.IngressGatewayResource": "Microsoft.HybridConnectivity.IngressGatewayResource", "azure.mgmt.hybridconnectivity.models.IngressProfileProperties": "Microsoft.HybridConnectivity.IngressProfileProperties", "azure.mgmt.hybridconnectivity.models.InventoryProperties": "Microsoft.HybridConnectivity.InventoryProperties", @@ -56,38 +57,71 @@ "azure.mgmt.hybridconnectivity.models.ResourceProvisioningState": "Azure.ResourceManager.ResourceProvisioningState", "azure.mgmt.hybridconnectivity.models.SolutionConfigurationStatus": "Microsoft.HybridConnectivity.SolutionConfigurationStatus", "azure.mgmt.hybridconnectivity.models.CloudNativeType": "Microsoft.HybridConnectivity.CloudNativeType", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.operations.list": "Azure.ResourceManager.Operations.list", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.endpoints.get": "Microsoft.HybridConnectivity.EndpointResources.get", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.endpoints.create_or_update": "Microsoft.HybridConnectivity.EndpointResources.createOrUpdate", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.endpoints.update": "Microsoft.HybridConnectivity.EndpointResources.update", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.endpoints.delete": "Microsoft.HybridConnectivity.EndpointResources.delete", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.endpoints.list": "Microsoft.HybridConnectivity.EndpointResources.list", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.endpoints.list_credentials": "Microsoft.HybridConnectivity.EndpointResources.listCredentials", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.endpoints.list_ingress_gateway_credentials": "Microsoft.HybridConnectivity.EndpointResources.listIngressGatewayCredentials", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.endpoints.list_managed_proxy_details": "Microsoft.HybridConnectivity.EndpointResources.listManagedProxyDetails", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.service_configurations.get": "Microsoft.HybridConnectivity.ServiceConfigurationResources.get", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.service_configurations.create_orupdate": "Microsoft.HybridConnectivity.ServiceConfigurationResources.createOrupdate", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.service_configurations.update": "Microsoft.HybridConnectivity.ServiceConfigurationResources.update", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.service_configurations.delete": "Microsoft.HybridConnectivity.ServiceConfigurationResources.delete", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.service_configurations.list_by_endpoint_resource": "Microsoft.HybridConnectivity.ServiceConfigurationResources.listByEndpointResource", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.generate_aws_template.post": "Microsoft.HybridConnectivity.GenerateAwsTemplate.post", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.public_cloud_connectors.get": "Microsoft.HybridConnectivity.PublicCloudConnectors.get", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.public_cloud_connectors.begin_create_or_update": "Microsoft.HybridConnectivity.PublicCloudConnectors.createOrUpdate", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.public_cloud_connectors.update": "Microsoft.HybridConnectivity.PublicCloudConnectors.update", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.public_cloud_connectors.delete": "Microsoft.HybridConnectivity.PublicCloudConnectors.delete", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.public_cloud_connectors.list_by_resource_group": "Microsoft.HybridConnectivity.PublicCloudConnectors.listByResourceGroup", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.public_cloud_connectors.list_by_subscription": "Microsoft.HybridConnectivity.PublicCloudConnectors.listBySubscription", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.public_cloud_connectors.begin_test_permissions": "Microsoft.HybridConnectivity.PublicCloudConnectors.testPermissions", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.solution_configurations.get": "Microsoft.HybridConnectivity.SolutionConfigurations.get", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.solution_configurations.create_or_update": "Microsoft.HybridConnectivity.SolutionConfigurations.createOrUpdate", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.solution_configurations.update": "Microsoft.HybridConnectivity.SolutionConfigurations.update", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.solution_configurations.delete": "Microsoft.HybridConnectivity.SolutionConfigurations.delete", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.solution_configurations.list": "Microsoft.HybridConnectivity.SolutionConfigurations.list", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.solution_configurations.begin_sync_now": "Microsoft.HybridConnectivity.SolutionConfigurations.syncNow", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.inventory.get": "Microsoft.HybridConnectivity.Inventory.get", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.inventory.list_by_solution_configuration": "Microsoft.HybridConnectivity.Inventory.listBySolutionConfiguration", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.solution_types.get": "Microsoft.HybridConnectivity.SolutionTypes.get", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.solution_types.list_by_resource_group": "Microsoft.HybridConnectivity.SolutionTypes.listByResourceGroup", - "azure.mgmt.hybridconnectivity.HybridConnectivityMgmtClient.solution_types.list_by_subscription": "Microsoft.HybridConnectivity.SolutionTypes.listBySubscription" + "azure.mgmt.hybridconnectivity.operations.Operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.hybridconnectivity.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.hybridconnectivity.operations.EndpointsOperations.get": "Microsoft.HybridConnectivity.EndpointResources.get", + "azure.mgmt.hybridconnectivity.aio.operations.EndpointsOperations.get": "Microsoft.HybridConnectivity.EndpointResources.get", + "azure.mgmt.hybridconnectivity.operations.EndpointsOperations.create_or_update": "Microsoft.HybridConnectivity.EndpointResources.createOrUpdate", + "azure.mgmt.hybridconnectivity.aio.operations.EndpointsOperations.create_or_update": "Microsoft.HybridConnectivity.EndpointResources.createOrUpdate", + "azure.mgmt.hybridconnectivity.operations.EndpointsOperations.update": "Microsoft.HybridConnectivity.EndpointResources.update", + "azure.mgmt.hybridconnectivity.aio.operations.EndpointsOperations.update": "Microsoft.HybridConnectivity.EndpointResources.update", + "azure.mgmt.hybridconnectivity.operations.EndpointsOperations.delete": "Microsoft.HybridConnectivity.EndpointResources.delete", + "azure.mgmt.hybridconnectivity.aio.operations.EndpointsOperations.delete": "Microsoft.HybridConnectivity.EndpointResources.delete", + "azure.mgmt.hybridconnectivity.operations.EndpointsOperations.list": "Microsoft.HybridConnectivity.EndpointResources.list", + "azure.mgmt.hybridconnectivity.aio.operations.EndpointsOperations.list": "Microsoft.HybridConnectivity.EndpointResources.list", + "azure.mgmt.hybridconnectivity.operations.EndpointsOperations.list_credentials": "Microsoft.HybridConnectivity.EndpointResources.listCredentials", + "azure.mgmt.hybridconnectivity.aio.operations.EndpointsOperations.list_credentials": "Microsoft.HybridConnectivity.EndpointResources.listCredentials", + "azure.mgmt.hybridconnectivity.operations.EndpointsOperations.list_ingress_gateway_credentials": "Microsoft.HybridConnectivity.EndpointResources.listIngressGatewayCredentials", + "azure.mgmt.hybridconnectivity.aio.operations.EndpointsOperations.list_ingress_gateway_credentials": "Microsoft.HybridConnectivity.EndpointResources.listIngressGatewayCredentials", + "azure.mgmt.hybridconnectivity.operations.EndpointsOperations.list_managed_proxy_details": "Microsoft.HybridConnectivity.EndpointResources.listManagedProxyDetails", + "azure.mgmt.hybridconnectivity.aio.operations.EndpointsOperations.list_managed_proxy_details": "Microsoft.HybridConnectivity.EndpointResources.listManagedProxyDetails", + "azure.mgmt.hybridconnectivity.operations.ServiceConfigurationsOperations.get": "Microsoft.HybridConnectivity.ServiceConfigurationResources.get", + "azure.mgmt.hybridconnectivity.aio.operations.ServiceConfigurationsOperations.get": "Microsoft.HybridConnectivity.ServiceConfigurationResources.get", + "azure.mgmt.hybridconnectivity.operations.ServiceConfigurationsOperations.create_orupdate": "Microsoft.HybridConnectivity.ServiceConfigurationResources.createOrupdate", + "azure.mgmt.hybridconnectivity.aio.operations.ServiceConfigurationsOperations.create_orupdate": "Microsoft.HybridConnectivity.ServiceConfigurationResources.createOrupdate", + "azure.mgmt.hybridconnectivity.operations.ServiceConfigurationsOperations.update": "Microsoft.HybridConnectivity.ServiceConfigurationResources.update", + "azure.mgmt.hybridconnectivity.aio.operations.ServiceConfigurationsOperations.update": "Microsoft.HybridConnectivity.ServiceConfigurationResources.update", + "azure.mgmt.hybridconnectivity.operations.ServiceConfigurationsOperations.delete": "Microsoft.HybridConnectivity.ServiceConfigurationResources.delete", + "azure.mgmt.hybridconnectivity.aio.operations.ServiceConfigurationsOperations.delete": "Microsoft.HybridConnectivity.ServiceConfigurationResources.delete", + "azure.mgmt.hybridconnectivity.operations.ServiceConfigurationsOperations.list_by_endpoint_resource": "Microsoft.HybridConnectivity.ServiceConfigurationResources.listByEndpointResource", + "azure.mgmt.hybridconnectivity.aio.operations.ServiceConfigurationsOperations.list_by_endpoint_resource": "Microsoft.HybridConnectivity.ServiceConfigurationResources.listByEndpointResource", + "azure.mgmt.hybridconnectivity.operations.GenerateAwsTemplateOperations.post": "Microsoft.HybridConnectivity.GenerateAwsTemplate.post", + "azure.mgmt.hybridconnectivity.aio.operations.GenerateAwsTemplateOperations.post": "Microsoft.HybridConnectivity.GenerateAwsTemplate.post", + "azure.mgmt.hybridconnectivity.operations.PublicCloudConnectorsOperations.get": "Microsoft.HybridConnectivity.PublicCloudConnectors.get", + "azure.mgmt.hybridconnectivity.aio.operations.PublicCloudConnectorsOperations.get": "Microsoft.HybridConnectivity.PublicCloudConnectors.get", + "azure.mgmt.hybridconnectivity.operations.PublicCloudConnectorsOperations.begin_create_or_update": "Microsoft.HybridConnectivity.PublicCloudConnectors.createOrUpdate", + "azure.mgmt.hybridconnectivity.aio.operations.PublicCloudConnectorsOperations.begin_create_or_update": "Microsoft.HybridConnectivity.PublicCloudConnectors.createOrUpdate", + "azure.mgmt.hybridconnectivity.operations.PublicCloudConnectorsOperations.update": "Microsoft.HybridConnectivity.PublicCloudConnectors.update", + "azure.mgmt.hybridconnectivity.aio.operations.PublicCloudConnectorsOperations.update": "Microsoft.HybridConnectivity.PublicCloudConnectors.update", + "azure.mgmt.hybridconnectivity.operations.PublicCloudConnectorsOperations.delete": "Microsoft.HybridConnectivity.PublicCloudConnectors.delete", + "azure.mgmt.hybridconnectivity.aio.operations.PublicCloudConnectorsOperations.delete": "Microsoft.HybridConnectivity.PublicCloudConnectors.delete", + "azure.mgmt.hybridconnectivity.operations.PublicCloudConnectorsOperations.list_by_resource_group": "Microsoft.HybridConnectivity.PublicCloudConnectors.listByResourceGroup", + "azure.mgmt.hybridconnectivity.aio.operations.PublicCloudConnectorsOperations.list_by_resource_group": "Microsoft.HybridConnectivity.PublicCloudConnectors.listByResourceGroup", + "azure.mgmt.hybridconnectivity.operations.PublicCloudConnectorsOperations.list_by_subscription": "Microsoft.HybridConnectivity.PublicCloudConnectors.listBySubscription", + "azure.mgmt.hybridconnectivity.aio.operations.PublicCloudConnectorsOperations.list_by_subscription": "Microsoft.HybridConnectivity.PublicCloudConnectors.listBySubscription", + "azure.mgmt.hybridconnectivity.operations.PublicCloudConnectorsOperations.begin_test_permissions": "Microsoft.HybridConnectivity.PublicCloudConnectors.testPermissions", + "azure.mgmt.hybridconnectivity.aio.operations.PublicCloudConnectorsOperations.begin_test_permissions": "Microsoft.HybridConnectivity.PublicCloudConnectors.testPermissions", + "azure.mgmt.hybridconnectivity.operations.SolutionConfigurationsOperations.get": "Microsoft.HybridConnectivity.SolutionConfigurations.get", + "azure.mgmt.hybridconnectivity.aio.operations.SolutionConfigurationsOperations.get": "Microsoft.HybridConnectivity.SolutionConfigurations.get", + "azure.mgmt.hybridconnectivity.operations.SolutionConfigurationsOperations.create_or_update": "Microsoft.HybridConnectivity.SolutionConfigurations.createOrUpdate", + "azure.mgmt.hybridconnectivity.aio.operations.SolutionConfigurationsOperations.create_or_update": "Microsoft.HybridConnectivity.SolutionConfigurations.createOrUpdate", + "azure.mgmt.hybridconnectivity.operations.SolutionConfigurationsOperations.update": "Microsoft.HybridConnectivity.SolutionConfigurations.update", + "azure.mgmt.hybridconnectivity.aio.operations.SolutionConfigurationsOperations.update": "Microsoft.HybridConnectivity.SolutionConfigurations.update", + "azure.mgmt.hybridconnectivity.operations.SolutionConfigurationsOperations.delete": "Microsoft.HybridConnectivity.SolutionConfigurations.delete", + "azure.mgmt.hybridconnectivity.aio.operations.SolutionConfigurationsOperations.delete": "Microsoft.HybridConnectivity.SolutionConfigurations.delete", + "azure.mgmt.hybridconnectivity.operations.SolutionConfigurationsOperations.list": "Microsoft.HybridConnectivity.SolutionConfigurations.list", + "azure.mgmt.hybridconnectivity.aio.operations.SolutionConfigurationsOperations.list": "Microsoft.HybridConnectivity.SolutionConfigurations.list", + "azure.mgmt.hybridconnectivity.operations.SolutionConfigurationsOperations.begin_sync_now": "Microsoft.HybridConnectivity.SolutionConfigurations.syncNow", + "azure.mgmt.hybridconnectivity.aio.operations.SolutionConfigurationsOperations.begin_sync_now": "Microsoft.HybridConnectivity.SolutionConfigurations.syncNow", + "azure.mgmt.hybridconnectivity.operations.InventoryOperations.get": "Microsoft.HybridConnectivity.Inventory.get", + "azure.mgmt.hybridconnectivity.aio.operations.InventoryOperations.get": "Microsoft.HybridConnectivity.Inventory.get", + "azure.mgmt.hybridconnectivity.operations.InventoryOperations.list_by_solution_configuration": "Microsoft.HybridConnectivity.Inventory.listBySolutionConfiguration", + "azure.mgmt.hybridconnectivity.aio.operations.InventoryOperations.list_by_solution_configuration": "Microsoft.HybridConnectivity.Inventory.listBySolutionConfiguration", + "azure.mgmt.hybridconnectivity.operations.SolutionTypesOperations.get": "Microsoft.HybridConnectivity.SolutionTypes.get", + "azure.mgmt.hybridconnectivity.aio.operations.SolutionTypesOperations.get": "Microsoft.HybridConnectivity.SolutionTypes.get", + "azure.mgmt.hybridconnectivity.operations.SolutionTypesOperations.list_by_resource_group": "Microsoft.HybridConnectivity.SolutionTypes.listByResourceGroup", + "azure.mgmt.hybridconnectivity.aio.operations.SolutionTypesOperations.list_by_resource_group": "Microsoft.HybridConnectivity.SolutionTypes.listByResourceGroup", + "azure.mgmt.hybridconnectivity.operations.SolutionTypesOperations.list_by_subscription": "Microsoft.HybridConnectivity.SolutionTypes.listBySubscription", + "azure.mgmt.hybridconnectivity.aio.operations.SolutionTypesOperations.list_by_subscription": "Microsoft.HybridConnectivity.SolutionTypes.listBySubscription" } } \ No newline at end of file diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_client.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_client.py index 2819ae046085..0a551ddd045b 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_client.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_client.py @@ -7,16 +7,18 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +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 +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from ._configuration import HybridConnectivityMgmtClientConfiguration -from ._serialization import Deserializer, Serializer +from ._utils.serialization import Deserializer, Serializer from .operations import ( EndpointsOperations, GenerateAwsTemplateOperations, @@ -59,7 +61,7 @@ class HybridConnectivityMgmtClient: # pylint: disable=too-many-instance-attribu :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service host. Default value is "https://management.azure.com". + :param base_url: Service host. Default value is None. :type base_url: str :keyword api_version: The API version to use for this operation. Default value is "2024-12-01". Note that overriding this default value may result in unsupported behavior. @@ -69,16 +71,22 @@ class HybridConnectivityMgmtClient: # pylint: disable=too-many-instance-attribu """ def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: _endpoint = "{endpoint}" + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = HybridConnectivityMgmtClientConfiguration( - credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -97,7 +105,7 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs) self._serialize = Serializer() self._deserialize = Deserializer() diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_patch.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_patch.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_utils/__init__.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_utils/__init__.py new file mode 100644 index 000000000000..8026245c2abc --- /dev/null +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_utils/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_model_base.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_utils/model_base.py similarity index 98% rename from sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_model_base.py rename to sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_utils/model_base.py index 3072ee252ed9..49d5c7259389 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_model_base.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_utils/model_base.py @@ -2,8 +2,9 @@ # 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. +# 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. # -------------------------------------------------------------------------- # pylint: disable=protected-access, broad-except @@ -21,6 +22,7 @@ from datetime import datetime, date, time, timedelta, timezone 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 @@ -28,11 +30,6 @@ from azure.core.pipeline import PipelineResponse from azure.core.serialization import _Null -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping - _LOGGER = logging.getLogger(__name__) __all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] @@ -347,7 +344,7 @@ def _get_model(module_name: str, model_name: str): _UNSET = object() -class _MyMutableMapping(MutableMapping[str, typing.Any]): # pylint: disable=unsubscriptable-object +class _MyMutableMapping(MutableMapping[str, typing.Any]): def __init__(self, data: typing.Dict[str, typing.Any]) -> None: self._data = data @@ -407,13 +404,13 @@ def get(self, key: str, default: typing.Any = None) -> typing.Any: return default @typing.overload - def pop(self, key: str) -> typing.Any: ... + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ @typing.overload - def pop(self, key: str, default: _T) -> _T: ... + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs @typing.overload - def pop(self, key: str, default: typing.Any) -> typing.Any: ... + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: """ @@ -443,7 +440,7 @@ def clear(self) -> None: """ self._data.clear() - def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ """ Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs. @@ -454,7 +451,7 @@ def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: def setdefault(self, key: str, default: None = None) -> None: ... @typing.overload - def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: """ @@ -644,7 +641,7 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") - return super().__new__(cls) # pylint: disable=no-value-for-parameter + return super().__new__(cls) def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: for base in cls.__bases__: @@ -680,7 +677,7 @@ def _deserialize(cls, data, exist_discriminators): discriminator_value = data.find(xml_name).text # pyright: ignore else: discriminator_value = data.get(discriminator._rest_name) - mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_serialization.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_utils/serialization.py similarity index 98% rename from sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_serialization.py rename to sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_utils/serialization.py index 7a0232de5ddc..eb86ea23c965 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_serialization.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_utils/serialization.py @@ -1,28 +1,10 @@ # pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# 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. # -------------------------------------------------------------------------- # pyright: reportUnnecessaryTypeIgnoreComment=false diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_version.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_version.py index 0e00a6283246..8f2350dd3b0c 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_version.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.0b1" +VERSION = "2.0.0" diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/_client.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/_client.py index 3a54c6ae3ec5..4d56b12614f0 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/_client.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/_client.py @@ -7,15 +7,17 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +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 +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints -from .._serialization import Deserializer, Serializer +from .._utils.serialization import Deserializer, Serializer from ._configuration import HybridConnectivityMgmtClientConfiguration from .operations import ( EndpointsOperations, @@ -59,7 +61,7 @@ class HybridConnectivityMgmtClient: # pylint: disable=too-many-instance-attribu :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service host. Default value is "https://management.azure.com". + :param base_url: Service host. Default value is None. :type base_url: str :keyword api_version: The API version to use for this operation. Default value is "2024-12-01". Note that overriding this default value may result in unsupported behavior. @@ -69,16 +71,22 @@ class HybridConnectivityMgmtClient: # pylint: disable=too-many-instance-attribu """ def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: _endpoint = "{endpoint}" + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = HybridConnectivityMgmtClientConfiguration( - credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -97,7 +105,9 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, _endpoint), policies=_policies, **kwargs + ) self._serialize = Serializer() self._deserialize = Deserializer() diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/_patch.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/_patch.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/operations/_operations.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/operations/_operations.py index c2241ec6b3fe..5e6beafeeb41 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/operations/_operations.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/operations/_operations.py @@ -6,9 +6,9 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase import json -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -34,8 +34,8 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize -from ..._serialization import Deserializer, Serializer +from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( build_endpoints_create_or_update_request, build_endpoints_delete_request, @@ -73,13 +73,9 @@ ) from .._configuration import HybridConnectivityMgmtClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +JSON = MutableMapping[str, Any] class Operations: @@ -1929,7 +1925,7 @@ async def post( *, content_type: str = "application/json", **kwargs: Any - ) -> Any: + ) -> _models.GenerateAwsTemplateResponse: """Retrieve AWS Cloud Formation template. :param generate_aws_template_request: ConnectorId and SolutionTypes and their properties to @@ -1939,15 +1935,16 @@ async def post( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: any - :rtype: any + :return: GenerateAwsTemplateResponse. The GenerateAwsTemplateResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.hybridconnectivity.models.GenerateAwsTemplateResponse :raises ~azure.core.exceptions.HttpResponseError: """ @overload async def post( self, generate_aws_template_request: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> Any: + ) -> _models.GenerateAwsTemplateResponse: """Retrieve AWS Cloud Formation template. :param generate_aws_template_request: ConnectorId and SolutionTypes and their properties to @@ -1956,15 +1953,16 @@ async def post( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: any - :rtype: any + :return: GenerateAwsTemplateResponse. The GenerateAwsTemplateResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.hybridconnectivity.models.GenerateAwsTemplateResponse :raises ~azure.core.exceptions.HttpResponseError: """ @overload async def post( self, generate_aws_template_request: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> Any: + ) -> _models.GenerateAwsTemplateResponse: """Retrieve AWS Cloud Formation template. :param generate_aws_template_request: ConnectorId and SolutionTypes and their properties to @@ -1973,15 +1971,16 @@ async def post( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: any - :rtype: any + :return: GenerateAwsTemplateResponse. The GenerateAwsTemplateResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.hybridconnectivity.models.GenerateAwsTemplateResponse :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async async def post( self, generate_aws_template_request: Union[_models.GenerateAwsTemplateRequest, JSON, IO[bytes]], **kwargs: Any - ) -> Any: + ) -> _models.GenerateAwsTemplateResponse: """Retrieve AWS Cloud Formation template. :param generate_aws_template_request: ConnectorId and SolutionTypes and their properties to @@ -1989,8 +1988,9 @@ async def post( IO[bytes] Required. :type generate_aws_template_request: ~azure.mgmt.hybridconnectivity.models.GenerateAwsTemplateRequest or JSON or IO[bytes] - :return: any - :rtype: any + :return: GenerateAwsTemplateResponse. The GenerateAwsTemplateResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.hybridconnectivity.models.GenerateAwsTemplateResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -2005,7 +2005,7 @@ async def post( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Any] = kwargs.pop("cls", None) + cls: ClsType[_models.GenerateAwsTemplateResponse] = kwargs.pop("cls", None) content_type = content_type or "application/json" _content = None @@ -2047,7 +2047,7 @@ async def post( if _stream: deserialized = response.iter_bytes() else: - deserialized = _deserialize(Any, response.json()) + deserialized = _deserialize(_models.GenerateAwsTemplateResponse, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/operations/_patch.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/operations/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/operations/_patch.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/operations/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/models/__init__.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/models/__init__.py index f46ac515281b..26cc96b77237 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/models/__init__.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/models/__init__.py @@ -25,6 +25,7 @@ ErrorResponse, ExtensionResource, GenerateAwsTemplateRequest, + GenerateAwsTemplateResponse, IngressGatewayResource, IngressProfileProperties, InventoryProperties, @@ -89,6 +90,7 @@ "ErrorResponse", "ExtensionResource", "GenerateAwsTemplateRequest", + "GenerateAwsTemplateResponse", "IngressGatewayResource", "IngressProfileProperties", "InventoryProperties", diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/models/_models.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/models/_models.py index fd45b020813b..400ac42dc95b 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/models/_models.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/models/_models.py @@ -11,14 +11,13 @@ import datetime from typing import Any, Dict, List, Mapping, Optional, TYPE_CHECKING, Union, overload -from .. import _model_base -from .._model_base import rest_field +from .._utils.model_base import Model as _Model, rest_field if TYPE_CHECKING: from .. import models as _models -class AADProfileProperties(_model_base.Model): +class AADProfileProperties(_Model): """The AAD Profile. :ivar server_id: The arc ingress gateway server app id. Required. @@ -51,7 +50,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class AwsCloudProfile(_model_base.Model): +class AwsCloudProfile(_Model): """cloud profile for AWS. :ivar account_id: Account id for the AWS account. Required. @@ -96,7 +95,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class AwsCloudProfileUpdate(_model_base.Model): +class AwsCloudProfileUpdate(_Model): """cloud profile for AWS. :ivar excluded_accounts: List of AWS accounts which need to be excluded. @@ -126,7 +125,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class EndpointAccessResource(_model_base.Model): +class EndpointAccessResource(_Model): """The endpoint access for the target resource. :ivar relay: Azure relay hybrid connection access properties. @@ -183,7 +182,7 @@ def __setattr__(self, key: str, value: Any) -> None: super().__setattr__(key, value) -class EndpointProperties(_model_base.Model): +class EndpointProperties(_Model): """Endpoint details. :ivar type: The type of endpoint. Required. Known values are: "default" and "custom". @@ -222,8 +221,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Resource(_model_base.Model): - """Common fields that are returned in the response for all Azure Resource Manager resources. +class Resource(_Model): + """Resource. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. @@ -308,7 +307,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ErrorAdditionalInfo(_model_base.Model): +class ErrorAdditionalInfo(_Model): """The resource management error additional info. :ivar type: The additional info type. @@ -323,7 +322,7 @@ class ErrorAdditionalInfo(_model_base.Model): """The additional info.""" -class ErrorDetail(_model_base.Model): +class ErrorDetail(_Model): """The error detail. :ivar code: The error code. @@ -352,9 +351,8 @@ class ErrorDetail(_model_base.Model): """The error additional info.""" -class ErrorResponse(_model_base.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed - operations. +class ErrorResponse(_Model): + """Error response. :ivar error: The error object. :vartype error: ~azure.mgmt.hybridconnectivity.models.ErrorDetail @@ -381,7 +379,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class GenerateAwsTemplateRequest(_model_base.Model): +class GenerateAwsTemplateRequest(_Model): """ConnectorId and SolutionTypes and their properties to Generate AWS CFT Template. :ivar connector_id: The name of public cloud connector. Required. @@ -416,7 +414,11 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class IngressGatewayResource(_model_base.Model): +class GenerateAwsTemplateResponse(_Model): + """The HybridConnectivity post operation response.""" + + +class IngressGatewayResource(_Model): """The ingress gateway access credentials. :ivar relay: Azure relay hybrid connection access properties. @@ -480,7 +482,7 @@ def __setattr__(self, key: str, value: Any) -> None: super().__setattr__(key, value) -class IngressProfileProperties(_model_base.Model): +class IngressProfileProperties(_Model): """Ingress gateway profile. :ivar hostname: The ingress hostname. Required. @@ -535,7 +537,7 @@ def __setattr__(self, key: str, value: Any) -> None: super().__setattr__(key, value) -class InventoryProperties(_model_base.Model): +class InventoryProperties(_Model): """Definition of inventory. :ivar cloud_native_type: Gets or sets the cloud native resource type. "ec2" @@ -604,8 +606,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class ProxyResource(Resource): - """The resource model definition for a Azure Resource Manager proxy resource. It will not have - tags and a location. + """Proxy Resource. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. @@ -663,7 +664,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ListCredentialsRequest(_model_base.Model): +class ListCredentialsRequest(_Model): """The details of the service for which credentials needs to be returned. :ivar service_name: The name of the service. If not provided, the request will by pass the @@ -695,7 +696,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ListIngressGatewayCredentialsRequest(_model_base.Model): +class ListIngressGatewayCredentialsRequest(_Model): """Represent ListIngressGatewayCredentials Request object. :ivar service_name: The name of the service. If not provided, the request will by pass the @@ -727,7 +728,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ManagedProxyRequest(_model_base.Model): +class ManagedProxyRequest(_Model): """Represent ManageProxy Request object. :ivar service: The name of the service. Required. @@ -769,7 +770,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ManagedProxyResource(_model_base.Model): +class ManagedProxyResource(_Model): """Managed Proxy. :ivar proxy: The short lived proxy name. Required. @@ -802,8 +803,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Operation(_model_base.Model): - """Details of a REST API operation, returned from the Resource Provider Operations API. +class Operation(_Model): + """REST API Operation. :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". @@ -859,7 +860,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class OperationDisplay(_model_base.Model): +class OperationDisplay(_Model): """Localized display information for and operation. :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft @@ -890,7 +891,7 @@ class OperationDisplay(_model_base.Model): views.""" -class OperationStatusResult(_model_base.Model): +class OperationStatusResult(_Model): """The current status of an async operation. :ivar id: Fully qualified ID for the async operation. @@ -967,8 +968,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which - has 'tags' and a 'location'. + """Tracked Resource. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. @@ -1058,7 +1058,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class PublicCloudConnectorProperties(_model_base.Model): +class PublicCloudConnectorProperties(_Model): """Properties of public cloud connectors. :ivar aws_cloud_profile: Cloud profile for AWS. Required. @@ -1105,7 +1105,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class PublicCloudConnectorPropertiesUpdate(_model_base.Model): +class PublicCloudConnectorPropertiesUpdate(_Model): """Properties of public cloud connectors. :ivar aws_cloud_profile: Cloud profile for AWS. @@ -1219,7 +1219,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class RelayNamespaceAccessProperties(_model_base.Model): +class RelayNamespaceAccessProperties(_Model): """Azure relay hybrid connection access properties. :ivar namespace_name: The namespace name. Required. @@ -1277,7 +1277,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ServiceConfigurationProperties(_model_base.Model): +class ServiceConfigurationProperties(_Model): """Service configuration details. :ivar service_name: Name of the service. Required. Known values are: "SSH" and "WAC". @@ -1327,7 +1327,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ServiceConfigurationPropertiesPatch(_model_base.Model): +class ServiceConfigurationPropertiesPatch(_Model): """Service configuration details. :ivar port: The port on which service is enabled. @@ -1416,7 +1416,7 @@ def __setattr__(self, key: str, value: Any) -> None: super().__setattr__(key, value) -class ServiceConfigurationResourcePatch(_model_base.Model): +class ServiceConfigurationResourcePatch(_Model): """The service details under service configuration for the target endpoint resource. :ivar properties: The service configuration properties. @@ -1507,7 +1507,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class SolutionConfigurationProperties(_model_base.Model): +class SolutionConfigurationProperties(_Model): """Solution configuration resource. :ivar provisioning_state: The resource provisioning state. Known values are: "Succeeded", @@ -1564,7 +1564,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class SolutionConfigurationPropertiesUpdate(_model_base.Model): +class SolutionConfigurationPropertiesUpdate(_Model): """Solution configuration resource. :ivar solution_type: The type of the solution. @@ -1643,11 +1643,11 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class SolutionSettings(_model_base.Model): +class SolutionSettings(_Model): """Solution settings.""" -class SolutionTypeProperties(_model_base.Model): +class SolutionTypeProperties(_Model): """Definition of Solution type resource. :ivar solution_type: The name of the solution type. @@ -1739,7 +1739,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class SolutionTypeSettings(_model_base.Model): +class SolutionTypeSettings(_Model): """The properties of Solution Type. :ivar solution_type: The type of the solution. Required. @@ -1774,7 +1774,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class SolutionTypeSettingsProperties(_model_base.Model): +class SolutionTypeSettingsProperties(_Model): """Represent Solution settings properties description array. :ivar name: The name of the solution setting property. Required. @@ -1829,7 +1829,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class SystemData(_model_base.Model): +class SystemData(_Model): """Metadata pertaining to creation and last modification of the resource. :ivar created_by: The identity that created the resource. diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/models/_patch.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/models/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/models/_patch.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/models/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/operations/_operations.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/operations/_operations.py index 2958e40b289b..d2de42352bca 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/operations/_operations.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/operations/_operations.py @@ -6,9 +6,9 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase import json -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -34,16 +34,12 @@ from .. import models as _models from .._configuration import HybridConnectivityMgmtClientConfiguration -from .._model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize -from .._serialization import Deserializer, Serializer +from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +JSON = MutableMapping[str, Any] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -990,7 +986,7 @@ class Operations: :attr:`operations` attribute. """ - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") self._config: HybridConnectivityMgmtClientConfiguration = ( @@ -1093,7 +1089,7 @@ class EndpointsOperations: :attr:`endpoints` attribute. """ - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") self._config: HybridConnectivityMgmtClientConfiguration = ( @@ -2199,7 +2195,7 @@ class ServiceConfigurationsOperations: :attr:`service_configurations` attribute. """ - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") self._config: HybridConnectivityMgmtClientConfiguration = ( @@ -2811,7 +2807,7 @@ class GenerateAwsTemplateOperations: :attr:`generate_aws_template` attribute. """ - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") self._config: HybridConnectivityMgmtClientConfiguration = ( @@ -2827,7 +2823,7 @@ def post( *, content_type: str = "application/json", **kwargs: Any - ) -> Any: + ) -> _models.GenerateAwsTemplateResponse: """Retrieve AWS Cloud Formation template. :param generate_aws_template_request: ConnectorId and SolutionTypes and their properties to @@ -2837,15 +2833,16 @@ def post( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: any - :rtype: any + :return: GenerateAwsTemplateResponse. The GenerateAwsTemplateResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.hybridconnectivity.models.GenerateAwsTemplateResponse :raises ~azure.core.exceptions.HttpResponseError: """ @overload def post( self, generate_aws_template_request: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> Any: + ) -> _models.GenerateAwsTemplateResponse: """Retrieve AWS Cloud Formation template. :param generate_aws_template_request: ConnectorId and SolutionTypes and their properties to @@ -2854,15 +2851,16 @@ def post( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: any - :rtype: any + :return: GenerateAwsTemplateResponse. The GenerateAwsTemplateResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.hybridconnectivity.models.GenerateAwsTemplateResponse :raises ~azure.core.exceptions.HttpResponseError: """ @overload def post( self, generate_aws_template_request: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> Any: + ) -> _models.GenerateAwsTemplateResponse: """Retrieve AWS Cloud Formation template. :param generate_aws_template_request: ConnectorId and SolutionTypes and their properties to @@ -2871,15 +2869,16 @@ def post( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: any - :rtype: any + :return: GenerateAwsTemplateResponse. The GenerateAwsTemplateResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.hybridconnectivity.models.GenerateAwsTemplateResponse :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def post( self, generate_aws_template_request: Union[_models.GenerateAwsTemplateRequest, JSON, IO[bytes]], **kwargs: Any - ) -> Any: + ) -> _models.GenerateAwsTemplateResponse: """Retrieve AWS Cloud Formation template. :param generate_aws_template_request: ConnectorId and SolutionTypes and their properties to @@ -2887,8 +2886,9 @@ def post( IO[bytes] Required. :type generate_aws_template_request: ~azure.mgmt.hybridconnectivity.models.GenerateAwsTemplateRequest or JSON or IO[bytes] - :return: any - :rtype: any + :return: GenerateAwsTemplateResponse. The GenerateAwsTemplateResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.hybridconnectivity.models.GenerateAwsTemplateResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -2903,7 +2903,7 @@ def post( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Any] = kwargs.pop("cls", None) + cls: ClsType[_models.GenerateAwsTemplateResponse] = kwargs.pop("cls", None) content_type = content_type or "application/json" _content = None @@ -2945,7 +2945,7 @@ def post( if _stream: deserialized = response.iter_bytes() else: - deserialized = _deserialize(Any, response.json()) + deserialized = _deserialize(_models.GenerateAwsTemplateResponse, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -2963,7 +2963,7 @@ class PublicCloudConnectorsOperations: :attr:`public_cloud_connectors` attribute. """ - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") self._config: HybridConnectivityMgmtClientConfiguration = ( @@ -3811,7 +3811,7 @@ class SolutionConfigurationsOperations: :attr:`solution_configurations` attribute. """ - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") self._config: HybridConnectivityMgmtClientConfiguration = ( @@ -4495,7 +4495,7 @@ class InventoryOperations: :attr:`inventory` attribute. """ - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") self._config: HybridConnectivityMgmtClientConfiguration = ( @@ -4677,7 +4677,7 @@ class SolutionTypesOperations: :attr:`solution_types` attribute. """ - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") self._config: HybridConnectivityMgmtClientConfiguration = ( diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/operations/_patch.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/operations/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/operations/_patch.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/operations/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/setup.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/setup.py index 2903ec83b38d..426fb2cf21a0 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/setup.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/setup.py @@ -49,11 +49,10 @@ url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -77,7 +76,7 @@ "isodate>=0.6.1", "typing-extensions>=4.6.0", "azure-common>=1.1", - "azure-mgmt-core>=1.3.2", + "azure-mgmt-core>=1.5.0", ], - python_requires=">=3.8", + python_requires=">=3.9", ) diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/tsp-location.yaml b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/tsp-location.yaml index 86e8c4272404..dc4575aaefe2 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/tsp-location.yaml +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/hybridconnectivity/HybridConnectivity.Management -commit: 3db6867b8e524ea6d1bc7a3bbb989fe50dd2f184 +commit: b9a8c9e8eb8998a222f126a005d1ab633f1daad9 repo: Azure/azure-rest-api-specs additionalDirectories: