Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR network/resource-manager] Add Network Profile swagger and examples #3269

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions azure-mgmt-network/azure/mgmt/network/network_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,19 @@ def application_security_groups(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 available_delegations(self):
"""Instance depends on the API version:

* 2018-08-01: :class:`AvailableDelegationsOperations<azure.mgmt.network.v2018_08_01.operations.AvailableDelegationsOperations>`
"""
api_version = self._get_api_version('available_delegations')
if api_version == '2018-08-01':
from .v2018_08_01.operations import AvailableDelegationsOperations 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 available_endpoint_services(self):
"""Instance depends on the API version:
Expand Down Expand Up @@ -368,6 +381,19 @@ def available_endpoint_services(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 available_resource_group_delegations(self):
"""Instance depends on the API version:

* 2018-08-01: :class:`AvailableResourceGroupDelegationsOperations<azure.mgmt.network.v2018_08_01.operations.AvailableResourceGroupDelegationsOperations>`
"""
api_version = self._get_api_version('available_resource_group_delegations')
if api_version == '2018-08-01':
from .v2018_08_01.operations import AvailableResourceGroupDelegationsOperations 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 azure_firewall_fqdn_tags(self):
"""Instance depends on the API version:
Expand Down Expand Up @@ -1432,6 +1458,19 @@ def network_interfaces(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 network_profiles(self):
"""Instance depends on the API version:

* 2018-08-01: :class:`NetworkProfilesOperations<azure.mgmt.network.v2018_08_01.operations.NetworkProfilesOperations>`
"""
api_version = self._get_api_version('network_profiles')
if api_version == '2018-08-01':
from .v2018_08_01.operations import NetworkProfilesOperations 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 network_security_groups(self):
"""Instance depends on the API version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from .public_ip_address_py3 import PublicIPAddress
from .ip_configuration_py3 import IPConfiguration
from .resource_navigation_link_py3 import ResourceNavigationLink
from .delegation_py3 import Delegation
from .subnet_py3 import Subnet
from .frontend_ip_configuration_py3 import FrontendIPConfiguration
from .virtual_network_tap_py3 import VirtualNetworkTap
Expand Down Expand Up @@ -72,6 +73,7 @@
from .application_gateway_ssl_predefined_policy_py3 import ApplicationGatewaySslPredefinedPolicy
from .resource_py3 import Resource
from .tags_object_py3 import TagsObject
from .available_delegation_py3 import AvailableDelegation
from .azure_firewall_ip_configuration_py3 import AzureFirewallIPConfiguration
from .azure_firewall_rc_action_py3 import AzureFirewallRCAction
from .azure_firewall_application_rule_protocol_py3 import AzureFirewallApplicationRuleProtocol
Expand Down Expand Up @@ -112,6 +114,8 @@
from .express_route_circuit_reference_py3 import ExpressRouteCircuitReference
from .express_route_cross_connection_peering_py3 import ExpressRouteCrossConnectionPeering
from .express_route_cross_connection_py3 import ExpressRouteCrossConnection
from .virtual_hub_id_py3 import VirtualHubId
from .express_route_circuit_peering_id_py3 import ExpressRouteCircuitPeeringId
from .express_route_gateway_properties_auto_scale_configuration_bounds_py3 import ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds
from .express_route_gateway_properties_auto_scale_configuration_py3 import ExpressRouteGatewayPropertiesAutoScaleConfiguration
from .express_route_connection_py3 import ExpressRouteConnection
Expand All @@ -133,6 +137,12 @@
from .effective_network_security_group_list_result_py3 import EffectiveNetworkSecurityGroupListResult
from .effective_route_py3 import EffectiveRoute
from .effective_route_list_result_py3 import EffectiveRouteListResult
from .ip_configuration_profile_py3 import IPConfigurationProfile
from .container_network_interface_configuration_py3 import ContainerNetworkInterfaceConfiguration
from .container_py3 import Container
from .container_network_interface_ip_configuration_py3 import ContainerNetworkInterfaceIpConfiguration
from .container_network_interface_py3 import ContainerNetworkInterface
from .network_profile_py3 import NetworkProfile
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .network_watcher_py3 import NetworkWatcher
from .topology_parameters_py3 import TopologyParameters
Expand Down Expand Up @@ -275,6 +285,7 @@
from .public_ip_address import PublicIPAddress
from .ip_configuration import IPConfiguration
from .resource_navigation_link import ResourceNavigationLink
from .delegation import Delegation
from .subnet import Subnet
from .frontend_ip_configuration import FrontendIPConfiguration
from .virtual_network_tap import VirtualNetworkTap
Expand Down Expand Up @@ -317,6 +328,7 @@
from .application_gateway_ssl_predefined_policy import ApplicationGatewaySslPredefinedPolicy
from .resource import Resource
from .tags_object import TagsObject
from .available_delegation import AvailableDelegation
from .azure_firewall_ip_configuration import AzureFirewallIPConfiguration
from .azure_firewall_rc_action import AzureFirewallRCAction
from .azure_firewall_application_rule_protocol import AzureFirewallApplicationRuleProtocol
Expand Down Expand Up @@ -357,6 +369,8 @@
from .express_route_circuit_reference import ExpressRouteCircuitReference
from .express_route_cross_connection_peering import ExpressRouteCrossConnectionPeering
from .express_route_cross_connection import ExpressRouteCrossConnection
from .virtual_hub_id import VirtualHubId
from .express_route_circuit_peering_id import ExpressRouteCircuitPeeringId
from .express_route_gateway_properties_auto_scale_configuration_bounds import ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds
from .express_route_gateway_properties_auto_scale_configuration import ExpressRouteGatewayPropertiesAutoScaleConfiguration
from .express_route_connection import ExpressRouteConnection
Expand All @@ -378,6 +392,12 @@
from .effective_network_security_group_list_result import EffectiveNetworkSecurityGroupListResult
from .effective_route import EffectiveRoute
from .effective_route_list_result import EffectiveRouteListResult
from .ip_configuration_profile import IPConfigurationProfile
from .container_network_interface_configuration import ContainerNetworkInterfaceConfiguration
from .container import Container
from .container_network_interface_ip_configuration import ContainerNetworkInterfaceIpConfiguration
from .container_network_interface import ContainerNetworkInterface
from .network_profile import NetworkProfile
from .error_response import ErrorResponse, ErrorResponseException
from .network_watcher import NetworkWatcher
from .topology_parameters import TopologyParameters
Expand Down Expand Up @@ -502,6 +522,7 @@
from .application_gateway_paged import ApplicationGatewayPaged
from .application_gateway_ssl_predefined_policy_paged import ApplicationGatewaySslPredefinedPolicyPaged
from .application_security_group_paged import ApplicationSecurityGroupPaged
from .available_delegation_paged import AvailableDelegationPaged
from .azure_firewall_paged import AzureFirewallPaged
from .azure_firewall_fqdn_tag_paged import AzureFirewallFqdnTagPaged
from .ddos_protection_plan_paged import DdosProtectionPlanPaged
Expand All @@ -522,6 +543,7 @@
from .probe_paged import ProbePaged
from .network_interface_ip_configuration_paged import NetworkInterfaceIPConfigurationPaged
from .network_interface_tap_configuration_paged import NetworkInterfaceTapConfigurationPaged
from .network_profile_paged import NetworkProfilePaged
from .network_security_group_paged import NetworkSecurityGroupPaged
from .security_rule_paged import SecurityRulePaged
from .network_watcher_paged import NetworkWatcherPaged
Expand Down Expand Up @@ -657,6 +679,7 @@
'PublicIPAddress',
'IPConfiguration',
'ResourceNavigationLink',
'Delegation',
'Subnet',
'FrontendIPConfiguration',
'VirtualNetworkTap',
Expand Down Expand Up @@ -699,6 +722,7 @@
'ApplicationGatewaySslPredefinedPolicy',
'Resource',
'TagsObject',
'AvailableDelegation',
'AzureFirewallIPConfiguration',
'AzureFirewallRCAction',
'AzureFirewallApplicationRuleProtocol',
Expand Down Expand Up @@ -739,6 +763,8 @@
'ExpressRouteCircuitReference',
'ExpressRouteCrossConnectionPeering',
'ExpressRouteCrossConnection',
'VirtualHubId',
'ExpressRouteCircuitPeeringId',
'ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds',
'ExpressRouteGatewayPropertiesAutoScaleConfiguration',
'ExpressRouteConnection',
Expand All @@ -760,6 +786,12 @@
'EffectiveNetworkSecurityGroupListResult',
'EffectiveRoute',
'EffectiveRouteListResult',
'IPConfigurationProfile',
'ContainerNetworkInterfaceConfiguration',
'Container',
'ContainerNetworkInterfaceIpConfiguration',
'ContainerNetworkInterface',
'NetworkProfile',
'ErrorResponse', 'ErrorResponseException',
'NetworkWatcher',
'TopologyParameters',
Expand Down Expand Up @@ -884,6 +916,7 @@
'ApplicationGatewayPaged',
'ApplicationGatewaySslPredefinedPolicyPaged',
'ApplicationSecurityGroupPaged',
'AvailableDelegationPaged',
'AzureFirewallPaged',
'AzureFirewallFqdnTagPaged',
'DdosProtectionPlanPaged',
Expand All @@ -904,6 +937,7 @@
'ProbePaged',
'NetworkInterfaceIPConfigurationPaged',
'NetworkInterfaceTapConfigurationPaged',
'NetworkProfilePaged',
'NetworkSecurityGroupPaged',
'SecurityRulePaged',
'NetworkWatcherPaged',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AvailableDelegation(Model):
"""The serviceName of an AvailableDelegation indicates a possible delegation
for a subnet.

:param name: The name of the AvailableDelegation resource.
:type name: str
:param id: A unique identifier of the AvailableDelegation resource.
:type id: str
:param type: Resource type.
:type type: str
:param service_name: The name of the service and resource
:type service_name: str
:param actions: Describes the actions permitted to the service upon
delegation
:type actions: list[str]
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'service_name': {'key': 'serviceName', 'type': 'str'},
'actions': {'key': 'actions', 'type': '[str]'},
}

def __init__(self, **kwargs):
super(AvailableDelegation, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.id = kwargs.get('id', None)
self.type = kwargs.get('type', None)
self.service_name = kwargs.get('service_name', None)
self.actions = kwargs.get('actions', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.
# --------------------------------------------------------------------------

from msrest.paging import Paged


class AvailableDelegationPaged(Paged):
"""
A paging container for iterating over a list of :class:`AvailableDelegation <azure.mgmt.network.v2018_08_01.models.AvailableDelegation>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[AvailableDelegation]'}
}

def __init__(self, *args, **kwargs):

super(AvailableDelegationPaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AvailableDelegation(Model):
"""The serviceName of an AvailableDelegation indicates a possible delegation
for a subnet.

:param name: The name of the AvailableDelegation resource.
:type name: str
:param id: A unique identifier of the AvailableDelegation resource.
:type id: str
:param type: Resource type.
:type type: str
:param service_name: The name of the service and resource
:type service_name: str
:param actions: Describes the actions permitted to the service upon
delegation
:type actions: list[str]
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'service_name': {'key': 'serviceName', 'type': 'str'},
'actions': {'key': 'actions', 'type': '[str]'},
}

def __init__(self, *, name: str=None, id: str=None, type: str=None, service_name: str=None, actions=None, **kwargs) -> None:
super(AvailableDelegation, self).__init__(**kwargs)
self.name = name
self.id = id
self.type = type
self.service_name = service_name
self.actions = actions
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class AzureFirewallApplicationRule(Model):
:param protocols: Array of ApplicationRuleProtocols.
:type protocols:
list[~azure.mgmt.network.v2018_08_01.models.AzureFirewallApplicationRuleProtocol]
:param target_urls: List of URLs for this rule.
:type target_urls: list[str]
:param target_fqdns: List of FQDNs for this rule.
:type target_fqdns: list[str]
:param fqdn_tags: List of FQDN Tags for this rule.
:type fqdn_tags: list[str]
"""
Expand All @@ -35,7 +35,7 @@ class AzureFirewallApplicationRule(Model):
'description': {'key': 'description', 'type': 'str'},
'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'},
'protocols': {'key': 'protocols', 'type': '[AzureFirewallApplicationRuleProtocol]'},
'target_urls': {'key': 'targetUrls', 'type': '[str]'},
'target_fqdns': {'key': 'targetFqdns', 'type': '[str]'},
'fqdn_tags': {'key': 'fqdnTags', 'type': '[str]'},
}

Expand All @@ -45,5 +45,5 @@ def __init__(self, **kwargs):
self.description = kwargs.get('description', None)
self.source_addresses = kwargs.get('source_addresses', None)
self.protocols = kwargs.get('protocols', None)
self.target_urls = kwargs.get('target_urls', None)
self.target_fqdns = kwargs.get('target_fqdns', None)
self.fqdn_tags = kwargs.get('fqdn_tags', None)
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class AzureFirewallApplicationRule(Model):
:param protocols: Array of ApplicationRuleProtocols.
:type protocols:
list[~azure.mgmt.network.v2018_08_01.models.AzureFirewallApplicationRuleProtocol]
:param target_urls: List of URLs for this rule.
:type target_urls: list[str]
:param target_fqdns: List of FQDNs for this rule.
:type target_fqdns: list[str]
:param fqdn_tags: List of FQDN Tags for this rule.
:type fqdn_tags: list[str]
"""
Expand All @@ -35,15 +35,15 @@ class AzureFirewallApplicationRule(Model):
'description': {'key': 'description', 'type': 'str'},
'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'},
'protocols': {'key': 'protocols', 'type': '[AzureFirewallApplicationRuleProtocol]'},
'target_urls': {'key': 'targetUrls', 'type': '[str]'},
'target_fqdns': {'key': 'targetFqdns', 'type': '[str]'},
'fqdn_tags': {'key': 'fqdnTags', 'type': '[str]'},
}

def __init__(self, *, name: str=None, description: str=None, source_addresses=None, protocols=None, target_urls=None, fqdn_tags=None, **kwargs) -> None:
def __init__(self, *, name: str=None, description: str=None, source_addresses=None, protocols=None, target_fqdns=None, fqdn_tags=None, **kwargs) -> None:
super(AzureFirewallApplicationRule, self).__init__(**kwargs)
self.name = name
self.description = description
self.source_addresses = source_addresses
self.protocols = protocols
self.target_urls = target_urls
self.target_fqdns = target_fqdns
self.fqdn_tags = fqdn_tags
Loading