diff --git a/sdk/eventhub/azure-mgmt-eventhub/README.md b/sdk/eventhub/azure-mgmt-eventhub/README.md index 24486fa49041..87505bffcee9 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/README.md +++ b/sdk/eventhub/azure-mgmt-eventhub/README.md @@ -7,7 +7,7 @@ For a more complete view of Azure libraries, see the [azure sdk python release]( # Usage -For code examples, see [EventHub Management](https://docs.microsoft.com/python/api/overview/azure/event-hub?view=azure-python-preview) +For code examples, see [EventHub Management](https://docs.microsoft.com/python/api/overview/azure/event-hub) on docs.microsoft.com. diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/_event_hub_management_client.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/_event_hub_management_client.py index 17380b1b3d8c..da565cb2d2f2 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/_event_hub_management_client.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/_event_hub_management_client.py @@ -205,6 +205,32 @@ def operations(self): raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def private_endpoint_connections(self): + """Instance depends on the API version: + + * 2018-01-01-preview: :class:`PrivateEndpointConnectionsOperations` + """ + api_version = self._get_api_version('private_endpoint_connections') + if api_version == '2018-01-01-preview': + from .v2018_01_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def private_link_resources(self): + """Instance depends on the API version: + + * 2018-01-01-preview: :class:`PrivateLinkResourcesOperations` + """ + api_version = self._get_api_version('private_link_resources') + if api_version == '2018-01-01-preview': + from .v2018_01_01_preview.operations import PrivateLinkResourcesOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def regions(self): """Instance depends on the API version: diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_consumer_groups_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_consumer_groups_operations.py index 01e3b125308f..da3f3f991c9d 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_consumer_groups_operations.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_consumer_groups_operations.py @@ -75,7 +75,7 @@ def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -146,7 +146,7 @@ def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -206,7 +206,7 @@ def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -282,7 +282,7 @@ def prepare_request(next_link=None): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_event_hubs_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_event_hubs_operations.py index b29c5a82e64e..8db790d59009 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_event_hubs_operations.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_event_hubs_operations.py @@ -67,7 +67,7 @@ def prepare_request(next_link=None): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -149,7 +149,7 @@ def create_or_update_authorization_rule( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -220,7 +220,7 @@ def get_authorization_rule( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -286,7 +286,7 @@ def delete_authorization_rule( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -346,7 +346,7 @@ def list_keys( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -421,7 +421,7 @@ def regenerate_keys( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -578,7 +578,7 @@ def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -645,7 +645,7 @@ def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -702,7 +702,7 @@ def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/_event_hub_management_client.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/_event_hub_management_client.py index f7f98a57a279..71f81d87eed5 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/_event_hub_management_client.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/_event_hub_management_client.py @@ -15,6 +15,8 @@ from ._configuration import EventHubManagementClientConfiguration from .operations import ClustersOperations from .operations import NamespacesOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations from .operations import ConfigurationOperations from .operations import DisasterRecoveryConfigsOperations from .operations import EventHubsOperations @@ -34,6 +36,10 @@ class EventHubManagementClient(SDKClient): :vartype clusters: azure.mgmt.eventhub.v2018_01_01_preview.operations.ClustersOperations :ivar namespaces: Namespaces operations :vartype namespaces: azure.mgmt.eventhub.v2018_01_01_preview.operations.NamespacesOperations + :ivar private_endpoint_connections: PrivateEndpointConnections operations + :vartype private_endpoint_connections: azure.mgmt.eventhub.v2018_01_01_preview.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResources operations + :vartype private_link_resources: azure.mgmt.eventhub.v2018_01_01_preview.operations.PrivateLinkResourcesOperations :ivar configuration: Configuration operations :vartype configuration: azure.mgmt.eventhub.v2018_01_01_preview.operations.ConfigurationOperations :ivar disaster_recovery_configs: DisasterRecoveryConfigs operations @@ -71,6 +77,10 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.namespaces = NamespacesOperations( self._client, self.config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) self.configuration = ConfigurationOperations( self._client, self.config, self._serialize, self._deserialize) self.disaster_recovery_configs = DisasterRecoveryConfigsOperations( diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/__init__.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/__init__.py index e243dcd6dce6..1ed88d847a99 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/__init__.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/__init__.py @@ -21,6 +21,7 @@ from ._models_py3 import Cluster from ._models_py3 import ClusterQuotaConfigurationProperties from ._models_py3 import ClusterSku + from ._models_py3 import ConnectionState from ._models_py3 import ConsumerGroup from ._models_py3 import Destination from ._models_py3 import EHNamespace @@ -39,6 +40,10 @@ from ._models_py3 import NWRuleSetVirtualNetworkRules from ._models_py3 import Operation from ._models_py3 import OperationDisplay + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourcesListResult from ._models_py3 import RegenerateAccessKeyParameters from ._models_py3 import Resource from ._models_py3 import Sku @@ -57,6 +62,7 @@ from ._models import Cluster from ._models import ClusterQuotaConfigurationProperties from ._models import ClusterSku + from ._models import ConnectionState from ._models import ConsumerGroup from ._models import Destination from ._models import EHNamespace @@ -75,6 +81,10 @@ from ._models import NWRuleSetVirtualNetworkRules from ._models import Operation from ._models import OperationDisplay + from ._models import PrivateEndpoint + from ._models import PrivateEndpointConnection + from ._models import PrivateLinkResource + from ._models import PrivateLinkResourcesListResult from ._models import RegenerateAccessKeyParameters from ._models import Resource from ._models import Sku @@ -90,6 +100,7 @@ from ._paged_models import IpFilterRulePaged from ._paged_models import MessagingRegionsPaged from ._paged_models import OperationPaged +from ._paged_models import PrivateEndpointConnectionPaged from ._paged_models import VirtualNetworkRulePaged from ._event_hub_management_client_enums import ( IPAction, @@ -97,6 +108,8 @@ SkuTier, IdentityType, KeySource, + PrivateLinkConnectionStatus, + EndPointProvisioningState, NetworkRuleIPAction, DefaultAction, AccessRights, @@ -120,6 +133,7 @@ 'Cluster', 'ClusterQuotaConfigurationProperties', 'ClusterSku', + 'ConnectionState', 'ConsumerGroup', 'Destination', 'EHNamespace', @@ -138,6 +152,10 @@ 'NWRuleSetVirtualNetworkRules', 'Operation', 'OperationDisplay', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateLinkResource', + 'PrivateLinkResourcesListResult', 'RegenerateAccessKeyParameters', 'Resource', 'Sku', @@ -149,6 +167,7 @@ 'EHNamespacePaged', 'VirtualNetworkRulePaged', 'AuthorizationRulePaged', + 'PrivateEndpointConnectionPaged', 'ArmDisasterRecoveryPaged', 'EventhubPaged', 'ConsumerGroupPaged', @@ -159,6 +178,8 @@ 'SkuTier', 'IdentityType', 'KeySource', + 'PrivateLinkConnectionStatus', + 'EndPointProvisioningState', 'NetworkRuleIPAction', 'DefaultAction', 'AccessRights', diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_event_hub_management_client_enums.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_event_hub_management_client_enums.py index 58f147028288..e6aef7c69a58 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_event_hub_management_client_enums.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_event_hub_management_client_enums.py @@ -40,6 +40,24 @@ class KeySource(str, Enum): microsoft_key_vault = "Microsoft.KeyVault" +class PrivateLinkConnectionStatus(str, Enum): + + pending = "Pending" + approved = "Approved" + rejected = "Rejected" + disconnected = "Disconnected" + + +class EndPointProvisioningState(str, Enum): + + creating = "Creating" + updating = "Updating" + deleting = "Deleting" + succeeded = "Succeeded" + canceled = "Canceled" + failed = "Failed" + + class NetworkRuleIPAction(str, Enum): allow = "Allow" diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models.py index e9e511d87af7..ec2f0be4432c 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models.py @@ -508,6 +508,28 @@ def __init__(self, **kwargs): self.capacity = kwargs.get('capacity', None) +class ConnectionState(Model): + """ConnectionState information. + + :param status: Status of the connection. Possible values include: + 'Pending', 'Approved', 'Rejected', 'Disconnected' + :type status: str or + ~azure.mgmt.eventhub.v2018_01_01_preview.models.PrivateLinkConnectionStatus + :param description: Description of the connection state. + :type description: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + + class ConsumerGroup(Resource): """Single item in List or Get Consumer group operation. @@ -1024,6 +1046,9 @@ class NetworkRuleSet(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :param trusted_service_access_enabled: Value that indicates whether + Trusted Service Access is Enabled or not. + :type trusted_service_access_enabled: bool :param default_action: Default Action for Network Rule Set. Possible values include: 'Allow', 'Deny' :type default_action: str or @@ -1046,6 +1071,7 @@ class NetworkRuleSet(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'trusted_service_access_enabled': {'key': 'properties.trustedServiceAccessEnabled', 'type': 'bool'}, 'default_action': {'key': 'properties.defaultAction', 'type': 'str'}, 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[NWRuleSetVirtualNetworkRules]'}, 'ip_rules': {'key': 'properties.ipRules', 'type': '[NWRuleSetIpRules]'}, @@ -1053,6 +1079,7 @@ class NetworkRuleSet(Resource): def __init__(self, **kwargs): super(NetworkRuleSet, self).__init__(**kwargs) + self.trusted_service_access_enabled = kwargs.get('trusted_service_access_enabled', None) self.default_action = kwargs.get('default_action', None) self.virtual_network_rules = kwargs.get('virtual_network_rules', None) self.ip_rules = kwargs.get('ip_rules', None) @@ -1162,6 +1189,129 @@ def __init__(self, **kwargs): self.operation = None +class PrivateEndpoint(Model): + """PrivateEndpoint information. + + :param id: The ARM identifier for Private Endpoint. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class PrivateEndpointConnection(Resource): + """Properties of the PrivateEndpointConnection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param private_endpoint: The Private Endpoint resource for this + Connection. + :type private_endpoint: + ~azure.mgmt.eventhub.v2018_01_01_preview.models.PrivateEndpoint + :param private_link_service_connection_state: Details about the state of + the connection. + :type private_link_service_connection_state: + ~azure.mgmt.eventhub.v2018_01_01_preview.models.ConnectionState + :param provisioning_state: Provisioning state of the Private Endpoint + Connection. Possible values include: 'Creating', 'Updating', 'Deleting', + 'Succeeded', 'Canceled', 'Failed' + :type provisioning_state: str or + ~azure.mgmt.eventhub.v2018_01_01_preview.models.EndPointProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'ConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + + +class PrivateLinkResource(Model): + """Information of the private link resource. + + :param group_id: The private link resource group id. + :type group_id: str + :param required_members: The private link resource required member names. + :type required_members: list[str] + :param required_zone_names: The private link resource Private link DNS + zone name. + :type required_zone_names: list[str] + :param id: Fully qualified identifier of the resource. + :type id: str + :param name: Name of the resource + :type name: str + :param type: Type of the resource + :type type: str + """ + + _attribute_map = { + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = kwargs.get('group_id', None) + self.required_members = kwargs.get('required_members', None) + self.required_zone_names = kwargs.get('required_zone_names', None) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + + +class PrivateLinkResourcesListResult(Model): + """Result of the List private link resources operation. + + :param value: A collection of private link resources + :type value: + list[~azure.mgmt.eventhub.v2018_01_01_preview.models.PrivateLinkResource] + :param next_link: A link for the next page of private link resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResourcesListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + class RegenerateAccessKeyParameters(Model): """Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models_py3.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models_py3.py index abdfe6cf97a9..7219961d07b4 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models_py3.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models_py3.py @@ -508,6 +508,28 @@ def __init__(self, *, capacity: int=None, **kwargs) -> None: self.capacity = capacity +class ConnectionState(Model): + """ConnectionState information. + + :param status: Status of the connection. Possible values include: + 'Pending', 'Approved', 'Rejected', 'Disconnected' + :type status: str or + ~azure.mgmt.eventhub.v2018_01_01_preview.models.PrivateLinkConnectionStatus + :param description: Description of the connection state. + :type description: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, status=None, description: str=None, **kwargs) -> None: + super(ConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + + class ConsumerGroup(Resource): """Single item in List or Get Consumer group operation. @@ -1024,6 +1046,9 @@ class NetworkRuleSet(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :param trusted_service_access_enabled: Value that indicates whether + Trusted Service Access is Enabled or not. + :type trusted_service_access_enabled: bool :param default_action: Default Action for Network Rule Set. Possible values include: 'Allow', 'Deny' :type default_action: str or @@ -1046,13 +1071,15 @@ class NetworkRuleSet(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'trusted_service_access_enabled': {'key': 'properties.trustedServiceAccessEnabled', 'type': 'bool'}, 'default_action': {'key': 'properties.defaultAction', 'type': 'str'}, 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[NWRuleSetVirtualNetworkRules]'}, 'ip_rules': {'key': 'properties.ipRules', 'type': '[NWRuleSetIpRules]'}, } - def __init__(self, *, default_action=None, virtual_network_rules=None, ip_rules=None, **kwargs) -> None: + def __init__(self, *, trusted_service_access_enabled: bool=None, default_action=None, virtual_network_rules=None, ip_rules=None, **kwargs) -> None: super(NetworkRuleSet, self).__init__(**kwargs) + self.trusted_service_access_enabled = trusted_service_access_enabled self.default_action = default_action self.virtual_network_rules = virtual_network_rules self.ip_rules = ip_rules @@ -1162,6 +1189,129 @@ def __init__(self, **kwargs) -> None: self.operation = None +class PrivateEndpoint(Model): + """PrivateEndpoint information. + + :param id: The ARM identifier for Private Endpoint. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = id + + +class PrivateEndpointConnection(Resource): + """Properties of the PrivateEndpointConnection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param private_endpoint: The Private Endpoint resource for this + Connection. + :type private_endpoint: + ~azure.mgmt.eventhub.v2018_01_01_preview.models.PrivateEndpoint + :param private_link_service_connection_state: Details about the state of + the connection. + :type private_link_service_connection_state: + ~azure.mgmt.eventhub.v2018_01_01_preview.models.ConnectionState + :param provisioning_state: Provisioning state of the Private Endpoint + Connection. Possible values include: 'Creating', 'Updating', 'Deleting', + 'Succeeded', 'Canceled', 'Failed' + :type provisioning_state: str or + ~azure.mgmt.eventhub.v2018_01_01_preview.models.EndPointProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'ConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, provisioning_state=None, **kwargs) -> None: + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = provisioning_state + + +class PrivateLinkResource(Model): + """Information of the private link resource. + + :param group_id: The private link resource group id. + :type group_id: str + :param required_members: The private link resource required member names. + :type required_members: list[str] + :param required_zone_names: The private link resource Private link DNS + zone name. + :type required_zone_names: list[str] + :param id: Fully qualified identifier of the resource. + :type id: str + :param name: Name of the resource + :type name: str + :param type: Type of the resource + :type type: str + """ + + _attribute_map = { + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, group_id: str=None, required_members=None, required_zone_names=None, id: str=None, name: str=None, type: str=None, **kwargs) -> None: + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = group_id + self.required_members = required_members + self.required_zone_names = required_zone_names + self.id = id + self.name = name + self.type = type + + +class PrivateLinkResourcesListResult(Model): + """Result of the List private link resources operation. + + :param value: A collection of private link resources + :type value: + list[~azure.mgmt.eventhub.v2018_01_01_preview.models.PrivateLinkResource] + :param next_link: A link for the next page of private link resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(PrivateLinkResourcesListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + class RegenerateAccessKeyParameters(Model): """Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_paged_models.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_paged_models.py index b62ea2d96e4a..33fd6490a33b 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_paged_models.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_paged_models.py @@ -77,6 +77,19 @@ class AuthorizationRulePaged(Paged): def __init__(self, *args, **kwargs): super(AuthorizationRulePaged, self).__init__(*args, **kwargs) +class PrivateEndpointConnectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`PrivateEndpointConnection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PrivateEndpointConnection]'} + } + + def __init__(self, *args, **kwargs): + + super(PrivateEndpointConnectionPaged, self).__init__(*args, **kwargs) class ArmDisasterRecoveryPaged(Paged): """ A paging container for iterating over a list of :class:`ArmDisasterRecovery ` object diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/__init__.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/__init__.py index fcf9c2abbb04..d1e7ba7aff86 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/__init__.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/__init__.py @@ -11,6 +11,8 @@ from ._clusters_operations import ClustersOperations from ._namespaces_operations import NamespacesOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations from ._configuration_operations import ConfigurationOperations from ._disaster_recovery_configs_operations import DisasterRecoveryConfigsOperations from ._event_hubs_operations import EventHubsOperations @@ -21,6 +23,8 @@ __all__ = [ 'ClustersOperations', 'NamespacesOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', 'ConfigurationOperations', 'DisasterRecoveryConfigsOperations', 'EventHubsOperations', diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/_consumer_groups_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/_consumer_groups_operations.py index 25a8d6fb7cf3..7f815a3f2ec8 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/_consumer_groups_operations.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/_consumer_groups_operations.py @@ -75,7 +75,7 @@ def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -146,7 +146,7 @@ def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -206,7 +206,7 @@ def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -282,7 +282,7 @@ def prepare_request(next_link=None): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/_event_hubs_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/_event_hubs_operations.py index fc554266f09e..a5f6a3dffdc4 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/_event_hubs_operations.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/_event_hubs_operations.py @@ -67,7 +67,7 @@ def prepare_request(next_link=None): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -150,7 +150,7 @@ def create_or_update_authorization_rule( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -222,7 +222,7 @@ def get_authorization_rule( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -288,7 +288,7 @@ def delete_authorization_rule( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -348,7 +348,7 @@ def list_keys( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -424,7 +424,7 @@ def regenerate_keys( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -582,7 +582,7 @@ def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -649,7 +649,7 @@ def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -706,7 +706,7 @@ def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/_private_endpoint_connections_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..33afd981be61 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,340 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client API Version. Constant value: "2018-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-01-01-preview" + + self.config = config + + def list( + self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): + """Gets the available PrivateEndpointConnections within a namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PrivateEndpointConnection + :rtype: + ~azure.mgmt.eventhub.v2018_01_01_preview.models.PrivateEndpointConnectionPaged[~azure.mgmt.eventhub.v2018_01_01_preview.models.PrivateEndpointConnection] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PrivateEndpointConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections'} + + def create_or_update( + self, resource_group_name, namespace_name, private_endpoint_connection_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates PrivateEndpointConnections of service namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param private_endpoint_connection_name: The PrivateEndpointConnection + name + :type private_endpoint_connection_name: str + :param parameters: Parameters supplied to update Status of + PrivateEndPoint Connection to namespace resource. + :type parameters: + ~azure.mgmt.eventhub.v2018_01_01_preview.models.PrivateEndpointConnection + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnection or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.eventhub.v2018_01_01_preview.models.PrivateEndpointConnection + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + if response.status_code == 201: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _delete_initial( + self, resource_group_name, namespace_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, namespace_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing namespace. This operation also removes all + associated resources under the namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param private_endpoint_connection_name: The PrivateEndpointConnection + name + :type private_endpoint_connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + namespace_name=namespace_name, + private_endpoint_connection_name=private_endpoint_connection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def get( + self, resource_group_name, namespace_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + """Gets a description for the specified Private Endpoint Connection name. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param private_endpoint_connection_name: The PrivateEndpointConnection + name + :type private_endpoint_connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnection or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.eventhub.v2018_01_01_preview.models.PrivateEndpointConnection + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/_private_link_resources_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..d60f05617b10 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/_private_link_resources_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client API Version. Constant value: "2018-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-01-01-preview" + + self.config = config + + def get( + self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): + """Gets lists of resources that supports Privatelinks. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkResourcesListResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.eventhub.v2018_01_01_preview.models.PrivateLinkResourcesListResult + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkResourcesListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateLinkResources'}