Skip to content

Commit

Permalink
[AutoPR apimanagement/resource-manager] [Hub Generated] Review reques…
Browse files Browse the repository at this point in the history
…t for Microsoft.ApiManagement to add version stable/2019-01-01 (#4933)

* Generated from 18cb1ce1a5c7d084750fa6769b2a0e687d5fb1a4

Policy Format

* Generated from 59ae1de9eccce7e80bf5b56faa5445a382a1dc93

upper case XML

* Generated from 5964a9567e075efc8279833610ebd33a0b8e0944

upper case XML
  • Loading branch information
AutorestCI authored Apr 24, 2019
1 parent 7ca60c2 commit 56bf6a7
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@
AsyncOperationStatus,
KeyType,
NotificationName,
PolicyExportFormat,
TemplateName,
PolicyScopeContract,
ExportFormat,
Expand Down Expand Up @@ -612,6 +613,7 @@
'AsyncOperationStatus',
'KeyType',
'NotificationName',
'PolicyExportFormat',
'TemplateName',
'PolicyScopeContract',
'ExportFormat',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 56bf6a7

Please sign in to comment.