diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py index dd12fa2c82bd..2b41304e2340 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py @@ -386,6 +386,7 @@ AsyncOperationStatus, KeyType, NotificationName, + PolicyExportFormat, TemplateName, PolicyScopeContract, ExportFormat, @@ -612,6 +613,7 @@ 'AsyncOperationStatus', 'KeyType', 'NotificationName', + 'PolicyExportFormat', 'TemplateName', 'PolicyScopeContract', 'ExportFormat', diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_client_enums.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_client_enums.py index 9c50acb41627..aea5b7040e51 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_client_enums.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_client_enums.py @@ -253,6 +253,14 @@ class NotificationName(str, Enum): quota_limit_approaching_publisher_notification_message = "QuotaLimitApproachingPublisherNotificationMessage" #: The following email recipients and users will receive email notifications when subscription usage gets close to usage quota. +class PolicyExportFormat(str, Enum): + + xml = "xml" #: The contents are inline and Content type is an XML document. + xml_link = "xml-link" #: The policy XML document is exported to a storage blob with SAS key valid for 5 minutes. + rawxml = "rawxml" #: The contents are inline and Content type is a non XML encoded policy document. + rawxml_link = "rawxml-link" #: The policy document is not XML encoded is exported to a storage blob with SAS Key valid for 5 minutes. + + class TemplateName(str, Enum): application_approved_notification_message = "applicationApprovedNotificationMessage" diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_policy_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_policy_operations.py index 0f53e5664778..3332c75d95db 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_policy_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_policy_operations.py @@ -109,7 +109,7 @@ def list_by_operation( list_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies'} def get_entity_tag( - self, resource_group_name, service_name, api_id, operation_id, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, api_id, operation_id, format="xml", custom_headers=None, raw=False, **operation_config): """Gets the entity state (Etag) version of the API operation policy specified by its identifier. @@ -124,6 +124,10 @@ def get_entity_tag( :param operation_id: Operation identifier within an API. Must be unique in the current API Management service instance. :type operation_id: str + :param format: Policy Export Format. Possible values include: 'xml', + 'xml-link', 'rawxml', 'rawxml-link' + :type format: str or + ~azure.mgmt.apimanagement.models.PolicyExportFormat :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -148,6 +152,8 @@ def get_entity_tag( # Construct parameters query_parameters = {} + if format is not None: + query_parameters['format'] = self._serialize.query("format", format, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_policy_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_policy_operations.py index f4bf695bcd4c..cb5d3e6af0f9 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_policy_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_policy_operations.py @@ -167,7 +167,7 @@ def get_entity_tag( get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}'} def get( - self, resource_group_name, service_name, api_id, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, api_id, format="xml", custom_headers=None, raw=False, **operation_config): """Get the policy configuration at the API level. :param resource_group_name: The name of the resource group. @@ -178,6 +178,10 @@ def get( API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. :type api_id: str + :param format: Policy Export Format. Possible values include: 'xml', + 'xml-link', 'rawxml', 'rawxml-link' + :type format: str or + ~azure.mgmt.apimanagement.models.PolicyExportFormat :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -202,6 +206,8 @@ def get( # Construct parameters query_parameters = {} + if format is not None: + query_parameters['format'] = self._serialize.query("format", format, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_operations.py index a937acaa2932..966bb58594e8 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_operations.py @@ -157,13 +157,17 @@ def get_entity_tag( get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}'} def get( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, format="xml", custom_headers=None, raw=False, **operation_config): """Get the Global policy definition of the Api Management service. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str + :param format: Policy Export Format. Possible values include: 'xml', + 'xml-link', 'rawxml', 'rawxml-link' + :type format: str or + ~azure.mgmt.apimanagement.models.PolicyExportFormat :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -187,6 +191,8 @@ def get( # Construct parameters query_parameters = {} + if format is not None: + query_parameters['format'] = self._serialize.query("format", format, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_policy_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_policy_operations.py index 6f2e91f169dd..0ca354df7e91 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_policy_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_policy_operations.py @@ -164,7 +164,7 @@ def get_entity_tag( get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}'} def get( - self, resource_group_name, service_name, product_id, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, product_id, format="xml", custom_headers=None, raw=False, **operation_config): """Get the policy configuration at the Product level. :param resource_group_name: The name of the resource group. @@ -174,6 +174,10 @@ def get( :param product_id: Product identifier. Must be unique in the current API Management service instance. :type product_id: str + :param format: Policy Export Format. Possible values include: 'xml', + 'xml-link', 'rawxml', 'rawxml-link' + :type format: str or + ~azure.mgmt.apimanagement.models.PolicyExportFormat :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -198,6 +202,8 @@ def get( # Construct parameters query_parameters = {} + if format is not None: + query_parameters['format'] = self._serialize.query("format", format, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers