From c07a9f3f1bef8752b956e1404c7062aeba7a63b3 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 9 Nov 2020 02:12:47 +0000 Subject: [PATCH] Generated from 1949140635efebf7dd93d103a90479e4b32b35a1 --- .../apimanagement/_api_management_client.py | 17 +- .../mgmt/apimanagement/models/__init__.py | 46 +- .../models/_api_management_client_enums.py | 15 + .../mgmt/apimanagement/models/_models.py | 501 ++++++++++++++-- .../mgmt/apimanagement/models/_models_py3.py | 535 +++++++++++++++--- .../apimanagement/models/_paged_models.py | 39 ++ .../mgmt/apimanagement/operations/__init__.py | 6 + .../operations/_api_diagnostic_operations.py | 31 +- .../operations/_api_export_operations.py | 4 +- .../_api_issue_attachment_operations.py | 12 +- .../_api_issue_comment_operations.py | 12 +- .../operations/_api_issue_operations.py | 35 +- .../operations/_api_management_operations.py | 4 +- .../_api_management_service_operations.py | 4 +- ..._api_management_service_skus_operations.py | 4 +- .../operations/_api_operation_operations.py | 39 +- .../_api_operation_policy_operations.py | 4 +- .../operations/_api_operations.py | 70 ++- .../operations/_api_policy_operations.py | 4 +- .../operations/_api_product_operations.py | 10 +- .../operations/_api_release_operations.py | 31 +- .../operations/_api_revision_operations.py | 10 +- .../operations/_api_schema_operations.py | 10 +- .../_api_tag_description_operations.py | 12 +- .../operations/_api_version_set_operations.py | 29 +- .../_authorization_server_operations.py | 46 +- .../operations/_backend_operations.py | 37 +- .../operations/_cache_operations.py | 25 +- .../operations/_certificate_operations.py | 28 +- .../operations/_content_item_operations.py | 389 +++++++++++++ .../operations/_content_type_operations.py | 316 +++++++++++ .../_delegation_settings_operations.py | 4 +- .../_deleted_services_operations.py | 225 ++++++++ .../operations/_diagnostic_operations.py | 31 +- .../operations/_email_template_operations.py | 43 +- .../operations/_gateway_api_operations.py | 14 +- ...teway_hostname_configuration_operations.py | 32 +- .../operations/_gateway_operations.py | 38 +- .../operations/_group_operations.py | 35 +- .../operations/_group_user_operations.py | 21 +- .../_identity_provider_operations.py | 30 +- .../operations/_issue_operations.py | 22 +- .../operations/_logger_operations.py | 43 +- .../operations/_named_value_operations.py | 41 +- .../operations/_network_status_operations.py | 4 +- .../operations/_notification_operations.py | 4 +- ...notification_recipient_email_operations.py | 4 +- ..._notification_recipient_user_operations.py | 4 +- .../_open_id_connect_provider_operations.py | 41 +- .../operations/_operation_operations.py | 24 +- .../_policy_description_operations.py | 4 +- .../operations/_policy_operations.py | 4 +- .../operations/_product_api_operations.py | 20 +- .../operations/_product_group_operations.py | 14 +- .../operations/_product_operations.py | 53 +- .../operations/_product_policy_operations.py | 4 +- .../_product_subscriptions_operations.py | 28 +- .../_quota_by_counter_keys_operations.py | 24 +- .../_quota_by_period_keys_operations.py | 24 +- .../operations/_region_operations.py | 4 +- .../operations/_reports_operations.py | 4 +- .../_sign_in_settings_operations.py | 4 +- .../_sign_up_settings_operations.py | 4 +- .../operations/_subscription_operations.py | 72 ++- .../operations/_tag_operations.py | 57 +- .../operations/_tag_resource_operations.py | 35 +- .../_tenant_access_git_operations.py | 4 +- .../operations/_tenant_access_operations.py | 25 +- .../_tenant_configuration_operations.py | 4 +- .../_user_confirmation_password_operations.py | 12 +- .../operations/_user_group_operations.py | 16 +- .../operations/_user_identities_operations.py | 4 +- .../operations/_user_operations.py | 59 +- .../_user_subscription_operations.py | 29 +- .../azure-mgmt-apimanagement/setup.py | 4 +- 75 files changed, 2851 insertions(+), 646 deletions(-) create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py index b7ddabddd99a..64d24a31d227 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py @@ -33,6 +33,9 @@ from .operations import BackendOperations from .operations import CacheOperations from .operations import CertificateOperations +from .operations import ContentTypeOperations +from .operations import ContentItemOperations +from .operations import DeletedServicesOperations from .operations import ApiManagementOperations from .operations import ApiManagementServiceSkusOperations from .operations import ApiManagementServiceOperations @@ -126,6 +129,12 @@ class ApiManagementClient(SDKClient): :vartype cache: azure.mgmt.apimanagement.operations.CacheOperations :ivar certificate: Certificate operations :vartype certificate: azure.mgmt.apimanagement.operations.CertificateOperations + :ivar content_type: ContentType operations + :vartype content_type: azure.mgmt.apimanagement.operations.ContentTypeOperations + :ivar content_item: ContentItem operations + :vartype content_item: azure.mgmt.apimanagement.operations.ContentItemOperations + :ivar deleted_services: DeletedServices operations + :vartype deleted_services: azure.mgmt.apimanagement.operations.DeletedServicesOperations :ivar api_management_operations: ApiManagementOperations operations :vartype api_management_operations: azure.mgmt.apimanagement.operations.ApiManagementOperations :ivar api_management_service_skus: ApiManagementServiceSkus operations @@ -232,7 +241,7 @@ def __init__( super(ApiManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-12-01' + self.api_version = '2020-06-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -276,6 +285,12 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.certificate = CertificateOperations( self._client, self.config, self._serialize, self._deserialize) + self.content_type = ContentTypeOperations( + self._client, self.config, self._serialize, self._deserialize) + self.content_item = ContentItemOperations( + self._client, self.config, self._serialize, self._deserialize) + self.deleted_services = DeletedServicesOperations( + self._client, self.config, self._serialize, self._deserialize) self.api_management_operations = ApiManagementOperations( self._client, self.config, self._serialize, self._deserialize) self.api_management_service_skus = ApiManagementServiceSkusOperations( diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py index 63f339e9d0f0..dc9934b88beb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py @@ -45,6 +45,7 @@ from ._models_py3 import AuthenticationSettingsContract from ._models_py3 import AuthorizationServerContract from ._models_py3 import AuthorizationServerContractBaseProperties + from ._models_py3 import AuthorizationServerSecretsContract from ._models_py3 import AuthorizationServerUpdateContract from ._models_py3 import BackendAuthorizationHeaderCredentials from ._models_py3 import BackendBaseParameters @@ -65,6 +66,11 @@ from ._models_py3 import CertificateInformation from ._models_py3 import ClientSecretContract from ._models_py3 import ConnectivityStatusContract + from ._models_py3 import ContentItemContract + from ._models_py3 import ContentTypeContract + from ._models_py3 import DataMasking + from ._models_py3 import DataMaskingEntity + from ._models_py3 import DeletedServiceContract from ._models_py3 import DeployConfigurationParameters from ._models_py3 import DiagnosticContract from ._models_py3 import EmailTemplateContract @@ -95,11 +101,15 @@ from ._models_py3 import IssueContract from ._models_py3 import IssueContractBaseProperties from ._models_py3 import IssueUpdateContract + from ._models_py3 import KeyVaultContractCreateProperties + from ._models_py3 import KeyVaultContractProperties + from ._models_py3 import KeyVaultLastAccessStatusContractProperties from ._models_py3 import LoggerContract from ._models_py3 import LoggerUpdateContract from ._models_py3 import NamedValueContract from ._models_py3 import NamedValueCreateContract from ._models_py3 import NamedValueEntityBaseParameters + from ._models_py3 import NamedValueSecretContract from ._models_py3 import NamedValueUpdateParameters from ._models_py3 import NetworkStatusContract from ._models_py3 import NetworkStatusContractByLocation @@ -130,11 +140,11 @@ from ._models_py3 import ProductEntityBaseParameters from ._models_py3 import ProductTagResourceContractProperties from ._models_py3 import ProductUpdateParameters - from ._models_py3 import PropertyValueContract from ._models_py3 import QuotaCounterCollection from ._models_py3 import QuotaCounterContract from ._models_py3 import QuotaCounterValueContract from ._models_py3 import QuotaCounterValueContractProperties + from ._models_py3 import QuotaCounterValueUpdateContract from ._models_py3 import RecipientEmailCollection from ._models_py3 import RecipientEmailContract from ._models_py3 import RecipientsContractProperties @@ -216,6 +226,7 @@ from ._models import AuthenticationSettingsContract from ._models import AuthorizationServerContract from ._models import AuthorizationServerContractBaseProperties + from ._models import AuthorizationServerSecretsContract from ._models import AuthorizationServerUpdateContract from ._models import BackendAuthorizationHeaderCredentials from ._models import BackendBaseParameters @@ -236,6 +247,11 @@ from ._models import CertificateInformation from ._models import ClientSecretContract from ._models import ConnectivityStatusContract + from ._models import ContentItemContract + from ._models import ContentTypeContract + from ._models import DataMasking + from ._models import DataMaskingEntity + from ._models import DeletedServiceContract from ._models import DeployConfigurationParameters from ._models import DiagnosticContract from ._models import EmailTemplateContract @@ -266,11 +282,15 @@ from ._models import IssueContract from ._models import IssueContractBaseProperties from ._models import IssueUpdateContract + from ._models import KeyVaultContractCreateProperties + from ._models import KeyVaultContractProperties + from ._models import KeyVaultLastAccessStatusContractProperties from ._models import LoggerContract from ._models import LoggerUpdateContract from ._models import NamedValueContract from ._models import NamedValueCreateContract from ._models import NamedValueEntityBaseParameters + from ._models import NamedValueSecretContract from ._models import NamedValueUpdateParameters from ._models import NetworkStatusContract from ._models import NetworkStatusContractByLocation @@ -301,11 +321,11 @@ from ._models import ProductEntityBaseParameters from ._models import ProductTagResourceContractProperties from ._models import ProductUpdateParameters - from ._models import PropertyValueContract from ._models import QuotaCounterCollection from ._models import QuotaCounterContract from ._models import QuotaCounterValueContract from ._models import QuotaCounterValueContractProperties + from ._models import QuotaCounterValueUpdateContract from ._models import RecipientEmailCollection from ._models import RecipientEmailContract from ._models import RecipientsContractProperties @@ -360,6 +380,9 @@ from ._paged_models import BackendContractPaged from ._paged_models import CacheContractPaged from ._paged_models import CertificateContractPaged +from ._paged_models import ContentItemContractPaged +from ._paged_models import ContentTypeContractPaged +from ._paged_models import DeletedServiceContractPaged from ._paged_models import DiagnosticContractPaged from ._paged_models import EmailTemplateContractPaged from ._paged_models import GatewayContractPaged @@ -396,10 +419,12 @@ SoapApiType, ApiType, State, + DataMaskingMode, SamplingType, AlwaysLog, HttpCorrelationProtocol, Verbosity, + OperationNameFormat, PolicyContentFormat, VersioningScheme, GrantType, @@ -467,6 +492,7 @@ 'AuthenticationSettingsContract', 'AuthorizationServerContract', 'AuthorizationServerContractBaseProperties', + 'AuthorizationServerSecretsContract', 'AuthorizationServerUpdateContract', 'BackendAuthorizationHeaderCredentials', 'BackendBaseParameters', @@ -487,6 +513,11 @@ 'CertificateInformation', 'ClientSecretContract', 'ConnectivityStatusContract', + 'ContentItemContract', + 'ContentTypeContract', + 'DataMasking', + 'DataMaskingEntity', + 'DeletedServiceContract', 'DeployConfigurationParameters', 'DiagnosticContract', 'EmailTemplateContract', @@ -517,11 +548,15 @@ 'IssueContract', 'IssueContractBaseProperties', 'IssueUpdateContract', + 'KeyVaultContractCreateProperties', + 'KeyVaultContractProperties', + 'KeyVaultLastAccessStatusContractProperties', 'LoggerContract', 'LoggerUpdateContract', 'NamedValueContract', 'NamedValueCreateContract', 'NamedValueEntityBaseParameters', + 'NamedValueSecretContract', 'NamedValueUpdateParameters', 'NetworkStatusContract', 'NetworkStatusContractByLocation', @@ -552,11 +587,11 @@ 'ProductEntityBaseParameters', 'ProductTagResourceContractProperties', 'ProductUpdateParameters', - 'PropertyValueContract', 'QuotaCounterCollection', 'QuotaCounterContract', 'QuotaCounterValueContract', 'QuotaCounterValueContractProperties', + 'QuotaCounterValueUpdateContract', 'RecipientEmailCollection', 'RecipientEmailContract', 'RecipientsContractProperties', @@ -620,6 +655,9 @@ 'BackendContractPaged', 'CacheContractPaged', 'CertificateContractPaged', + 'ContentTypeContractPaged', + 'ContentItemContractPaged', + 'DeletedServiceContractPaged', 'OperationPaged', 'ResourceSkuResultPaged', 'ApiManagementServiceResourcePaged', @@ -646,10 +684,12 @@ 'SoapApiType', 'ApiType', 'State', + 'DataMaskingMode', 'SamplingType', 'AlwaysLog', 'HttpCorrelationProtocol', 'Verbosity', + 'OperationNameFormat', 'PolicyContentFormat', 'VersioningScheme', 'GrantType', diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py index 6c2944f5bc97..aeb80936148c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py @@ -73,6 +73,12 @@ class State(str, Enum): closed = "closed" #: The issue was closed. +class DataMaskingMode(str, Enum): + + mask = "Mask" #: Mask the value of an entity. + hide = "Hide" #: Hide the presence of an entity. + + class SamplingType(str, Enum): fixed = "fixed" #: Fixed-rate sampling. @@ -97,6 +103,12 @@ class Verbosity(str, Enum): error = "error" #: Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance. +class OperationNameFormat(str, Enum): + + name = "Name" #: API_NAME;rev=API_REVISION - OPERATION_NAME + url = "Url" #: HTTP_VERB URL + + class PolicyContentFormat(str, Enum): xml = "xml" #: The contents are inline and Content type is an XML document. @@ -157,6 +169,7 @@ class SkuType(str, Enum): premium = "Premium" #: Premium SKU of Api Management. basic = "Basic" #: Basic SKU of Api Management. consumption = "Consumption" #: Consumption SKU of Api Management. + isolated = "Isolated" #: Isolated SKU of Api Management. class ResourceSkuCapacityScaleType(str, Enum): @@ -210,6 +223,7 @@ class KeyType(str, Enum): class AppType(str, Enum): + portal = "portal" #: User create request was sent by legacy developer portal. developer_portal = "developerPortal" #: User create request was sent by new developer portal. @@ -248,6 +262,7 @@ class LoggerType(str, Enum): azure_event_hub = "azureEventHub" #: Azure Event Hub as log destination. application_insights = "applicationInsights" #: Azure Application Insights as log destination. + azure_monitor = "azureMonitor" #: Azure Monitor class ConnectivityStatusType(str, Enum): diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py index 3e016257f412..c68145887d54 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py @@ -74,14 +74,17 @@ class AdditionalLocation(Model): :param sku: Required. SKU properties of the API Management service. :type sku: ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties + :param zones: A list of availability zones denoting where the resource + needs to come from. + :type zones: list[str] :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for - Basic, Standard and Premium SKU. + Basic, Standard, Premium and Isolated SKU. :vartype public_ip_addresses: list[str] :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, - Standard and Premium SKU. + Standard, Premium and Isolated SKU. :vartype private_ip_addresses: list[str] :param virtual_network_configuration: Virtual network configuration for the location. @@ -107,6 +110,7 @@ class AdditionalLocation(Model): _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, + 'zones': {'key': 'zones', 'type': '[str]'}, 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, @@ -118,6 +122,7 @@ def __init__(self, **kwargs): super(AdditionalLocation, self).__init__(**kwargs) self.location = kwargs.get('location', None) self.sku = kwargs.get('sku', None) + self.zones = kwargs.get('zones', None) self.public_ip_addresses = None self.private_ip_addresses = None self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None) @@ -773,12 +778,12 @@ class ApiManagementServiceBaseProperties(Model): list[~azure.mgmt.apimanagement.models.HostnameConfiguration] :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, - Standard and Premium SKU. + Standard, Premium and Isolated SKU. :vartype public_ip_addresses: list[str] :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an - Internal Virtual Network. Available only for Basic, Standard and Premium - SKU. + Internal Virtual Network. Available only for Basic, Standard, Premium and + Isolated SKU. :vartype private_ip_addresses: list[str] :param virtual_network_configuration: Virtual network configuration of the API Management service. @@ -851,6 +856,10 @@ class ApiManagementServiceBaseProperties(Model): the API Management service. :type api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint + :param restore: Undelete Api Management Service if it was previously + soft-deleted. If this flag is specified and set to True all other + properties will be ignored. Default value: False . + :type restore: bool """ _validation = { @@ -890,6 +899,7 @@ class ApiManagementServiceBaseProperties(Model): 'disable_gateway': {'key': 'disableGateway', 'type': 'bool'}, 'virtual_network_type': {'key': 'virtualNetworkType', 'type': 'str'}, 'api_version_constraint': {'key': 'apiVersionConstraint', 'type': 'ApiVersionConstraint'}, + 'restore': {'key': 'restore', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -915,6 +925,7 @@ def __init__(self, **kwargs): self.disable_gateway = kwargs.get('disable_gateway', False) self.virtual_network_type = kwargs.get('virtual_network_type', "None") self.api_version_constraint = kwargs.get('api_version_constraint', None) + self.restore = kwargs.get('restore', False) class ApiManagementServiceCheckNameAvailabilityParameters(Model): @@ -1138,12 +1149,12 @@ class ApiManagementServiceResource(ApimResource): list[~azure.mgmt.apimanagement.models.HostnameConfiguration] :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, - Standard and Premium SKU. + Standard, Premium and Isolated SKU. :vartype public_ip_addresses: list[str] :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an - Internal Virtual Network. Available only for Basic, Standard and Premium - SKU. + Internal Virtual Network. Available only for Basic, Standard, Premium and + Isolated SKU. :vartype private_ip_addresses: list[str] :param virtual_network_configuration: Virtual network configuration of the API Management service. @@ -1216,6 +1227,10 @@ class ApiManagementServiceResource(ApimResource): the API Management service. :type api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint + :param restore: Undelete Api Management Service if it was previously + soft-deleted. If this flag is specified and set to True all other + properties will be ignored. Default value: False . + :type restore: bool :param publisher_email: Required. Publisher email. :type publisher_email: str :param publisher_name: Required. Publisher name. @@ -1230,6 +1245,9 @@ class ApiManagementServiceResource(ApimResource): :type location: str :ivar etag: ETag of the resource. :vartype etag: str + :param zones: A list of availability zones denoting where the resource + needs to come from. + :type zones: list[str] """ _validation = { @@ -1281,12 +1299,14 @@ class ApiManagementServiceResource(ApimResource): 'disable_gateway': {'key': 'properties.disableGateway', 'type': 'bool'}, 'virtual_network_type': {'key': 'properties.virtualNetworkType', 'type': 'str'}, 'api_version_constraint': {'key': 'properties.apiVersionConstraint', 'type': 'ApiVersionConstraint'}, + 'restore': {'key': 'properties.restore', 'type': 'bool'}, 'publisher_email': {'key': 'properties.publisherEmail', 'type': 'str'}, 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, 'identity': {'key': 'identity', 'type': 'ApiManagementServiceIdentity'}, 'location': {'key': 'location', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, } def __init__(self, **kwargs): @@ -1312,12 +1332,14 @@ def __init__(self, **kwargs): self.disable_gateway = kwargs.get('disable_gateway', False) self.virtual_network_type = kwargs.get('virtual_network_type', "None") self.api_version_constraint = kwargs.get('api_version_constraint', None) + self.restore = kwargs.get('restore', False) self.publisher_email = kwargs.get('publisher_email', None) self.publisher_name = kwargs.get('publisher_name', None) self.sku = kwargs.get('sku', None) self.identity = kwargs.get('identity', None) self.location = kwargs.get('location', None) self.etag = None + self.zones = kwargs.get('zones', None) class ApiManagementServiceSkuProperties(Model): @@ -1326,7 +1348,7 @@ class ApiManagementServiceSkuProperties(Model): All required parameters must be populated in order to send to Azure. :param name: Required. Name of the Sku. Possible values include: - 'Developer', 'Standard', 'Premium', 'Basic', 'Consumption' + 'Developer', 'Standard', 'Premium', 'Basic', 'Consumption', 'Isolated' :type name: str or ~azure.mgmt.apimanagement.models.SkuType :param capacity: Required. Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as 0. @@ -1401,12 +1423,12 @@ class ApiManagementServiceUpdateParameters(ApimResource): list[~azure.mgmt.apimanagement.models.HostnameConfiguration] :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, - Standard and Premium SKU. + Standard, Premium and Isolated SKU. :vartype public_ip_addresses: list[str] :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an - Internal Virtual Network. Available only for Basic, Standard and Premium - SKU. + Internal Virtual Network. Available only for Basic, Standard, Premium and + Isolated SKU. :vartype private_ip_addresses: list[str] :param virtual_network_configuration: Virtual network configuration of the API Management service. @@ -1479,6 +1501,10 @@ class ApiManagementServiceUpdateParameters(ApimResource): the API Management service. :type api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint + :param restore: Undelete Api Management Service if it was previously + soft-deleted. If this flag is specified and set to True all other + properties will be ignored. Default value: False . + :type restore: bool :param publisher_email: Publisher email. :type publisher_email: str :param publisher_name: Publisher name. @@ -1540,6 +1566,7 @@ class ApiManagementServiceUpdateParameters(ApimResource): 'disable_gateway': {'key': 'properties.disableGateway', 'type': 'bool'}, 'virtual_network_type': {'key': 'properties.virtualNetworkType', 'type': 'str'}, 'api_version_constraint': {'key': 'properties.apiVersionConstraint', 'type': 'ApiVersionConstraint'}, + 'restore': {'key': 'properties.restore', 'type': 'bool'}, 'publisher_email': {'key': 'properties.publisherEmail', 'type': 'str'}, 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, @@ -1570,6 +1597,7 @@ def __init__(self, **kwargs): self.disable_gateway = kwargs.get('disable_gateway', False) self.virtual_network_type = kwargs.get('virtual_network_type', "None") self.api_version_constraint = kwargs.get('api_version_constraint', None) + self.restore = kwargs.get('restore', False) self.publisher_email = kwargs.get('publisher_email', None) self.publisher_name = kwargs.get('publisher_name', None) self.sku = kwargs.get('sku', None) @@ -2383,6 +2411,34 @@ def __init__(self, **kwargs): self.resource_owner_password = kwargs.get('resource_owner_password', None) +class AuthorizationServerSecretsContract(Model): + """OAuth Server Secrets Contract. + + :param client_secret: oAuth Authorization Server Secrets. + :type client_secret: str + :param resource_owner_username: Can be optionally specified when resource + owner password grant type is supported by this authorization server. + Default resource owner username. + :type resource_owner_username: str + :param resource_owner_password: Can be optionally specified when resource + owner password grant type is supported by this authorization server. + Default resource owner password. + :type resource_owner_password: str + """ + + _attribute_map = { + 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + 'resource_owner_username': {'key': 'resourceOwnerUsername', 'type': 'str'}, + 'resource_owner_password': {'key': 'resourceOwnerPassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AuthorizationServerSecretsContract, self).__init__(**kwargs) + self.client_secret = kwargs.get('client_secret', None) + self.resource_owner_username = kwargs.get('resource_owner_username', None) + self.resource_owner_password = kwargs.get('resource_owner_password', None) + + class AuthorizationServerUpdateContract(Resource): """External OAuth authorization server settings. @@ -2942,6 +2998,9 @@ class CacheContract(Resource): :type description: str :param connection_string: Required. Runtime connection string to cache :type connection_string: str + :param use_from_location: Required. Location identifier to use cache from + (should be either 'default' or valid Azure region identifier) + :type use_from_location: str :param resource_id: Original uri of entity in external system cache points to :type resource_id: str @@ -2953,6 +3012,7 @@ class CacheContract(Resource): 'type': {'readonly': True}, 'description': {'max_length': 2000}, 'connection_string': {'required': True, 'max_length': 300}, + 'use_from_location': {'required': True, 'max_length': 256}, 'resource_id': {'max_length': 2000}, } @@ -2962,6 +3022,7 @@ class CacheContract(Resource): 'type': {'key': 'type', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'use_from_location': {'key': 'properties.useFromLocation', 'type': 'str'}, 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, } @@ -2969,6 +3030,7 @@ def __init__(self, **kwargs): super(CacheContract, self).__init__(**kwargs) self.description = kwargs.get('description', None) self.connection_string = kwargs.get('connection_string', None) + self.use_from_location = kwargs.get('use_from_location', None) self.resource_id = kwargs.get('resource_id', None) @@ -2979,6 +3041,9 @@ class CacheUpdateParameters(Model): :type description: str :param connection_string: Runtime connection string to cache :type connection_string: str + :param use_from_location: Location identifier to use cache from (should be + either 'default' or valid Azure region identifier) + :type use_from_location: str :param resource_id: Original uri of entity in external system cache points to :type resource_id: str @@ -2987,12 +3052,14 @@ class CacheUpdateParameters(Model): _validation = { 'description': {'max_length': 2000}, 'connection_string': {'max_length': 300}, + 'use_from_location': {'max_length': 256}, 'resource_id': {'max_length': 2000}, } _attribute_map = { 'description': {'key': 'properties.description', 'type': 'str'}, 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'use_from_location': {'key': 'properties.useFromLocation', 'type': 'str'}, 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, } @@ -3000,6 +3067,7 @@ def __init__(self, **kwargs): super(CacheUpdateParameters, self).__init__(**kwargs) self.description = kwargs.get('description', None) self.connection_string = kwargs.get('connection_string', None) + self.use_from_location = kwargs.get('use_from_location', None) self.resource_id = kwargs.get('resource_id', None) @@ -3063,6 +3131,9 @@ class CertificateContract(Resource): date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. :type expiration_date: datetime + :param key_vault: KeyVault location details of the certificate. + :type key_vault: + ~azure.mgmt.apimanagement.models.KeyVaultContractProperties """ _validation = { @@ -3081,6 +3152,7 @@ class CertificateContract(Resource): 'subject': {'key': 'properties.subject', 'type': 'str'}, 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'key_vault': {'key': 'properties.keyVault', 'type': 'KeyVaultContractProperties'}, } def __init__(self, **kwargs): @@ -3088,34 +3160,33 @@ def __init__(self, **kwargs): self.subject = kwargs.get('subject', None) self.thumbprint = kwargs.get('thumbprint', None) self.expiration_date = kwargs.get('expiration_date', None) + self.key_vault = kwargs.get('key_vault', None) class CertificateCreateOrUpdateParameters(Model): """Certificate create or update details. - All required parameters must be populated in order to send to Azure. - - :param data: Required. Base 64 encoded certificate using the - application/x-pkcs12 representation. + :param data: Base 64 encoded certificate using the application/x-pkcs12 + representation. :type data: str - :param password: Required. Password for the Certificate + :param password: Password for the Certificate :type password: str + :param key_vault: KeyVault location details of the certificate. + :type key_vault: + ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties """ - _validation = { - 'data': {'required': True}, - 'password': {'required': True}, - } - _attribute_map = { 'data': {'key': 'properties.data', 'type': 'str'}, 'password': {'key': 'properties.password', 'type': 'str'}, + 'key_vault': {'key': 'properties.keyVault', 'type': 'KeyVaultContractCreateProperties'}, } def __init__(self, **kwargs): super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) self.data = kwargs.get('data', None) self.password = kwargs.get('password', None) + self.key_vault = kwargs.get('key_vault', None) class CertificateInformation(Model): @@ -3204,6 +3275,10 @@ class ConnectivityStatusContract(Model): The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. :type last_status_change: datetime + :param resource_type: Required. Resource Type. + :type resource_type: str + :param is_optional: Required. Whether this is optional. + :type is_optional: bool """ _validation = { @@ -3211,6 +3286,8 @@ class ConnectivityStatusContract(Model): 'status': {'required': True}, 'last_updated': {'required': True}, 'last_status_change': {'required': True}, + 'resource_type': {'required': True}, + 'is_optional': {'required': True}, } _attribute_map = { @@ -3219,6 +3296,8 @@ class ConnectivityStatusContract(Model): 'error': {'key': 'error', 'type': 'str'}, 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, 'last_status_change': {'key': 'lastStatusChange', 'type': 'iso-8601'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'is_optional': {'key': 'isOptional', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -3228,6 +3307,186 @@ def __init__(self, **kwargs): self.error = kwargs.get('error', None) self.last_updated = kwargs.get('last_updated', None) self.last_status_change = kwargs.get('last_status_change', None) + self.resource_type = kwargs.get('resource_type', None) + self.is_optional = kwargs.get('is_optional', None) + + +class ContentItemContract(Resource): + """Content type contract details. + + 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 for API Management resource. + :vartype type: str + :param properties: Properties of the content item. + :type properties: dict[str, object] + """ + + _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'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(ContentItemContract, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ContentTypeContract(Resource): + """Content type contract details. + + 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 for API Management resource. + :vartype type: str + :param content_type_contract_id: Content type identifier + :type content_type_contract_id: str + :param content_type_contract_name: Content type name. Must be 1 to 250 + characters long. + :type content_type_contract_name: str + :param description: Content type description. + :type description: str + :param schema: Content type schema. + :type schema: object + :param version: Content type version. + :type version: str + """ + + _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'}, + 'content_type_contract_id': {'key': 'properties.id', 'type': 'str'}, + 'content_type_contract_name': {'key': 'properties.name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'schema': {'key': 'properties.schema', 'type': 'object'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContentTypeContract, self).__init__(**kwargs) + self.content_type_contract_id = kwargs.get('content_type_contract_id', None) + self.content_type_contract_name = kwargs.get('content_type_contract_name', None) + self.description = kwargs.get('description', None) + self.schema = kwargs.get('schema', None) + self.version = kwargs.get('version', None) + + +class DataMasking(Model): + """DataMasking. + + :param query_params: Masking settings for Url query parameters + :type query_params: + list[~azure.mgmt.apimanagement.models.DataMaskingEntity] + :param headers: Masking settings for headers + :type headers: list[~azure.mgmt.apimanagement.models.DataMaskingEntity] + """ + + _attribute_map = { + 'query_params': {'key': 'queryParams', 'type': '[DataMaskingEntity]'}, + 'headers': {'key': 'headers', 'type': '[DataMaskingEntity]'}, + } + + def __init__(self, **kwargs): + super(DataMasking, self).__init__(**kwargs) + self.query_params = kwargs.get('query_params', None) + self.headers = kwargs.get('headers', None) + + +class DataMaskingEntity(Model): + """DataMaskingEntity. + + :param value: The name of an entity to mask (e.g. a name of a header or a + query parameter). + :type value: str + :param mode: Data masking mode. Possible values include: 'Mask', 'Hide' + :type mode: str or ~azure.mgmt.apimanagement.models.DataMaskingMode + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataMaskingEntity, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.mode = kwargs.get('mode', None) + + +class DeletedServiceContract(Resource): + """Deleted Api Management Service information. + + 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 for API Management resource. + :vartype type: str + :param service_id: Fully-qualified API Management Service Resource ID + :type service_id: str + :param scheduled_purge_date: UTC Date and Time when the service will be + automatically purged. The date conforms to the following format: + yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + :type scheduled_purge_date: datetime + :param deletion_date: UTC Timestamp when the service was soft-deleted. The + date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified + by the ISO 8601 standard. + :type deletion_date: datetime + :ivar location: Api Management Service Master Location. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_id': {'key': 'properties.serviceId', 'type': 'str'}, + 'scheduled_purge_date': {'key': 'properties.scheduledPurgeDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedServiceContract, self).__init__(**kwargs) + self.service_id = kwargs.get('service_id', None) + self.scheduled_purge_date = kwargs.get('scheduled_purge_date', None) + self.deletion_date = kwargs.get('deletion_date', None) + self.location = None class DeployConfigurationParameters(Model): @@ -3296,6 +3555,11 @@ class DiagnosticContract(Resource): :param verbosity: The verbosity level applied to traces emitted by trace policies. Possible values include: 'verbose', 'information', 'error' :type verbosity: str or ~azure.mgmt.apimanagement.models.Verbosity + :param operation_name_format: The format of the Operation Name for + Application Insights telemetries. Default is Name. Possible values + include: 'Name', 'Url' + :type operation_name_format: str or + ~azure.mgmt.apimanagement.models.OperationNameFormat """ _validation = { @@ -3317,6 +3581,7 @@ class DiagnosticContract(Resource): 'log_client_ip': {'key': 'properties.logClientIp', 'type': 'bool'}, 'http_correlation_protocol': {'key': 'properties.httpCorrelationProtocol', 'type': 'str'}, 'verbosity': {'key': 'properties.verbosity', 'type': 'str'}, + 'operation_name_format': {'key': 'properties.operationNameFormat', 'type': 'str'}, } def __init__(self, **kwargs): @@ -3329,6 +3594,7 @@ def __init__(self, **kwargs): self.log_client_ip = kwargs.get('log_client_ip', None) self.http_correlation_protocol = kwargs.get('http_correlation_protocol', None) self.verbosity = kwargs.get('verbosity', None) + self.operation_name_format = kwargs.get('operation_name_format', None) class EmailTemplateContract(Resource): @@ -3610,6 +3876,12 @@ class GatewayHostnameConfigurationContract(Resource): :param negotiate_client_certificate: Determines whether gateway requests client certificate :type negotiate_client_certificate: bool + :param tls10_enabled: Specifies if TLS 1.0 is supported + :type tls10_enabled: bool + :param tls11_enabled: Specifies if TLS 1.1 is supported + :type tls11_enabled: bool + :param http2_enabled: Specifies if HTTP/2.0 is supported + :type http2_enabled: bool """ _validation = { @@ -3625,6 +3897,9 @@ class GatewayHostnameConfigurationContract(Resource): 'hostname': {'key': 'properties.hostname', 'type': 'str'}, 'certificate_id': {'key': 'properties.certificateId', 'type': 'str'}, 'negotiate_client_certificate': {'key': 'properties.negotiateClientCertificate', 'type': 'bool'}, + 'tls10_enabled': {'key': 'properties.tls10Enabled', 'type': 'bool'}, + 'tls11_enabled': {'key': 'properties.tls11Enabled', 'type': 'bool'}, + 'http2_enabled': {'key': 'properties.http2Enabled', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -3632,6 +3907,9 @@ def __init__(self, **kwargs): self.hostname = kwargs.get('hostname', None) self.certificate_id = kwargs.get('certificate_id', None) self.negotiate_client_certificate = kwargs.get('negotiate_client_certificate', None) + self.tls10_enabled = kwargs.get('tls10_enabled', None) + self.tls11_enabled = kwargs.get('tls11_enabled', None) + self.http2_enabled = kwargs.get('http2_enabled', None) class GatewayKeyRegenerationRequestContract(Model): @@ -3940,6 +4218,10 @@ class HostnameConfiguration(Model): be configured with MSI. The secret should be of type *application/x-pkcs12* :type key_vault_id: str + :param identity_client_id: System or User Assigned Managed identity + clientId as generated by Azure AD, which has GET access to the keyVault + containing the SSL certificate. + :type identity_client_id: str :param encoded_certificate: Base64 Encoded certificate. :type encoded_certificate: str :param certificate_password: Certificate Password. @@ -3968,6 +4250,7 @@ class HostnameConfiguration(Model): 'type': {'key': 'type', 'type': 'str'}, 'host_name': {'key': 'hostName', 'type': 'str'}, 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + 'identity_client_id': {'key': 'identityClientId', 'type': 'str'}, 'encoded_certificate': {'key': 'encodedCertificate', 'type': 'str'}, 'certificate_password': {'key': 'certificatePassword', 'type': 'str'}, 'default_ssl_binding': {'key': 'defaultSslBinding', 'type': 'bool'}, @@ -3980,6 +4263,7 @@ def __init__(self, **kwargs): self.type = kwargs.get('type', None) self.host_name = kwargs.get('host_name', None) self.key_vault_id = kwargs.get('key_vault_id', None) + self.identity_client_id = kwargs.get('identity_client_id', None) self.encoded_certificate = kwargs.get('encoded_certificate', None) self.certificate_password = kwargs.get('certificate_password', None) self.default_ssl_binding = kwargs.get('default_ssl_binding', False) @@ -3994,17 +4278,21 @@ class HttpMessageDiagnostic(Model): :type headers: list[str] :param body: Body logging settings. :type body: ~azure.mgmt.apimanagement.models.BodyDiagnosticSettings + :param data_masking: Data masking settings. + :type data_masking: ~azure.mgmt.apimanagement.models.DataMasking """ _attribute_map = { 'headers': {'key': 'headers', 'type': '[str]'}, 'body': {'key': 'body', 'type': 'BodyDiagnosticSettings'}, + 'data_masking': {'key': 'dataMasking', 'type': 'DataMasking'}, } def __init__(self, **kwargs): super(HttpMessageDiagnostic, self).__init__(**kwargs) self.headers = kwargs.get('headers', None) self.body = kwargs.get('body', None) + self.data_masking = kwargs.get('data_masking', None) class IdentityProviderBaseParameters(Model): @@ -4554,6 +4842,79 @@ def __init__(self, **kwargs): self.user_id = kwargs.get('user_id', None) +class KeyVaultContractCreateProperties(Model): + """Create keyVault contract details. + + :param secret_identifier: Key vault secret identifier for fetching secret. + :type secret_identifier: str + :param identity_client_id: SystemAssignedIdentity or UserAssignedIdentity + Client Id which will be used to access key vault secret. + :type identity_client_id: str + """ + + _attribute_map = { + 'secret_identifier': {'key': 'secretIdentifier', 'type': 'str'}, + 'identity_client_id': {'key': 'identityClientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultContractCreateProperties, self).__init__(**kwargs) + self.secret_identifier = kwargs.get('secret_identifier', None) + self.identity_client_id = kwargs.get('identity_client_id', None) + + +class KeyVaultContractProperties(KeyVaultContractCreateProperties): + """KeyVault contract details. + + :param secret_identifier: Key vault secret identifier for fetching secret. + :type secret_identifier: str + :param identity_client_id: SystemAssignedIdentity or UserAssignedIdentity + Client Id which will be used to access key vault secret. + :type identity_client_id: str + :param last_status: Last time sync and refresh status of secret from key + vault. + :type last_status: + ~azure.mgmt.apimanagement.models.KeyVaultLastAccessStatusContractProperties + """ + + _attribute_map = { + 'secret_identifier': {'key': 'secretIdentifier', 'type': 'str'}, + 'identity_client_id': {'key': 'identityClientId', 'type': 'str'}, + 'last_status': {'key': 'lastStatus', 'type': 'KeyVaultLastAccessStatusContractProperties'}, + } + + def __init__(self, **kwargs): + super(KeyVaultContractProperties, self).__init__(**kwargs) + self.last_status = kwargs.get('last_status', None) + + +class KeyVaultLastAccessStatusContractProperties(Model): + """Issue contract Update Properties. + + :param code: Last status code for sync and refresh of secret from key + vault. + :type code: str + :param message: Details of the error else empty. + :type message: str + :param time_stamp_utc: Last time secret was accessed. The date conforms to + the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + standard. + :type time_stamp_utc: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time_stamp_utc': {'key': 'timeStampUtc', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(KeyVaultLastAccessStatusContractProperties, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.time_stamp_utc = kwargs.get('time_stamp_utc', None) + + class LoggerContract(Resource): """Logger details. @@ -4569,12 +4930,12 @@ class LoggerContract(Resource): :ivar type: Resource type for API Management resource. :vartype type: str :param logger_type: Required. Logger type. Possible values include: - 'azureEventHub', 'applicationInsights' + 'azureEventHub', 'applicationInsights', 'azureMonitor' :type logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType :param description: Logger description. :type description: str - :param credentials: Required. The name and SendRule connection string of - the event hub for azureEventHub logger. + :param credentials: The name and SendRule connection string of the event + hub for azureEventHub logger. Instrumentation key for applicationInsights logger. :type credentials: dict[str, str] :param is_buffered: Whether records are buffered in the logger before @@ -4591,7 +4952,6 @@ class LoggerContract(Resource): 'type': {'readonly': True}, 'logger_type': {'required': True}, 'description': {'max_length': 256}, - 'credentials': {'required': True}, } _attribute_map = { @@ -4618,7 +4978,7 @@ class LoggerUpdateContract(Model): """Logger update contract. :param logger_type: Logger type. Possible values include: 'azureEventHub', - 'applicationInsights' + 'applicationInsights', 'azureMonitor' :type logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType :param description: Logger description. :type description: str @@ -4672,6 +5032,9 @@ class NamedValueContract(Resource): filled on 'GET' operations! Use '/listSecrets' POST request to get the value. :type value: str + :param key_vault: KeyVault location details of the namedValue. + :type key_vault: + ~azure.mgmt.apimanagement.models.KeyVaultContractProperties """ _validation = { @@ -4680,7 +5043,7 @@ class NamedValueContract(Resource): 'type': {'readonly': True}, 'tags': {'max_items': 32}, 'display_name': {'required': True, 'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, - 'value': {'max_length': 4096, 'min_length': 1}, + 'value': {'max_length': 4096}, } _attribute_map = { @@ -4691,6 +5054,7 @@ class NamedValueContract(Resource): 'secret': {'key': 'properties.secret', 'type': 'bool'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'value': {'key': 'properties.value', 'type': 'str'}, + 'key_vault': {'key': 'properties.keyVault', 'type': 'KeyVaultContractProperties'}, } def __init__(self, **kwargs): @@ -4699,6 +5063,7 @@ def __init__(self, **kwargs): self.secret = kwargs.get('secret', None) self.display_name = kwargs.get('display_name', None) self.value = kwargs.get('value', None) + self.key_vault = kwargs.get('key_vault', None) class NamedValueCreateContract(Resource): @@ -4724,11 +5089,14 @@ class NamedValueCreateContract(Resource): :param display_name: Required. Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. :type display_name: str - :param value: Required. Value of the NamedValue. Can contain policy - expressions. It may not be empty or consist only of whitespace. This - property will not be filled on 'GET' operations! Use '/listSecrets' POST - request to get the value. + :param value: Value of the NamedValue. Can contain policy expressions. It + may not be empty or consist only of whitespace. This property will not be + filled on 'GET' operations! Use '/listSecrets' POST request to get the + value. :type value: str + :param key_vault: KeyVault location details of the namedValue. + :type key_vault: + ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties """ _validation = { @@ -4737,7 +5105,7 @@ class NamedValueCreateContract(Resource): 'type': {'readonly': True}, 'tags': {'max_items': 32}, 'display_name': {'required': True, 'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, - 'value': {'required': True, 'max_length': 4096, 'min_length': 1}, + 'value': {'max_length': 4096}, } _attribute_map = { @@ -4748,6 +5116,7 @@ class NamedValueCreateContract(Resource): 'secret': {'key': 'properties.secret', 'type': 'bool'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'value': {'key': 'properties.value', 'type': 'str'}, + 'key_vault': {'key': 'properties.keyVault', 'type': 'KeyVaultContractCreateProperties'}, } def __init__(self, **kwargs): @@ -4756,6 +5125,7 @@ def __init__(self, **kwargs): self.secret = kwargs.get('secret', None) self.display_name = kwargs.get('display_name', None) self.value = kwargs.get('value', None) + self.key_vault = kwargs.get('key_vault', None) class NamedValueEntityBaseParameters(Model): @@ -4784,6 +5154,22 @@ def __init__(self, **kwargs): self.secret = kwargs.get('secret', None) +class NamedValueSecretContract(Model): + """Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + + :param value: This is secret value of the NamedValue entity. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NamedValueSecretContract, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + class NamedValueUpdateParameters(Model): """NamedValue update Parameters. @@ -4799,6 +5185,9 @@ class NamedValueUpdateParameters(Model): :param value: Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. :type value: str + :param key_vault: KeyVault location details of the namedValue. + :type key_vault: + ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties """ _validation = { @@ -4812,6 +5201,7 @@ class NamedValueUpdateParameters(Model): 'secret': {'key': 'properties.secret', 'type': 'bool'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'value': {'key': 'properties.value', 'type': 'str'}, + 'key_vault': {'key': 'properties.keyVault', 'type': 'KeyVaultContractCreateProperties'}, } def __init__(self, **kwargs): @@ -4820,6 +5210,7 @@ def __init__(self, **kwargs): self.secret = kwargs.get('secret', None) self.display_name = kwargs.get('display_name', None) self.value = kwargs.get('value', None) + self.key_vault = kwargs.get('key_vault', None) class NetworkStatusContract(Model): @@ -6014,22 +6405,6 @@ def __init__(self, **kwargs): self.display_name = kwargs.get('display_name', None) -class PropertyValueContract(Model): - """Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. - - :param value: This is secret value of the NamedValue entity. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PropertyValueContract, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - class QuotaCounterCollection(Model): """Paged Quota Counter list representation. @@ -6142,6 +6517,26 @@ def __init__(self, **kwargs): self.kb_transferred = kwargs.get('kb_transferred', None) +class QuotaCounterValueUpdateContract(Model): + """Quota counter value details. + + :param calls_count: Number of times Counter was called. + :type calls_count: int + :param kb_transferred: Data Transferred in KiloBytes. + :type kb_transferred: float + """ + + _attribute_map = { + 'calls_count': {'key': 'properties.callsCount', 'type': 'int'}, + 'kb_transferred': {'key': 'properties.kbTransferred', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(QuotaCounterValueUpdateContract, self).__init__(**kwargs) + self.calls_count = kwargs.get('calls_count', None) + self.kb_transferred = kwargs.get('kb_transferred', None) + + class RecipientEmailCollection(Model): """Paged Recipient User list representation. @@ -6680,7 +7075,7 @@ class ResourceSku(Model): """Describes an available API Management SKU. :param name: Name of the Sku. Possible values include: 'Developer', - 'Standard', 'Premium', 'Basic', 'Consumption' + 'Standard', 'Premium', 'Basic', 'Consumption', 'Isolated' :type name: str or ~azure.mgmt.apimanagement.models.SkuType """ @@ -6976,7 +7371,7 @@ class SubscriptionContract(Resource): value. :type secondary_key: str :param state_comment: Optional subscription comment added by an - administrator. + administrator when the state is changed to the 'rejected'. :type state_comment: str :param allow_tracing: Determines whether tracing is enabled :type allow_tracing: bool @@ -7183,7 +7578,7 @@ class SubscriptionUpdateParameters(Model): 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled' :type state: str or ~azure.mgmt.apimanagement.models.SubscriptionState :param state_comment: Comments describing subscription state change by the - administrator. + administrator when the state is changed to the 'rejected'. :type state_comment: str :param allow_tracing: Determines whether tracing can be enabled :type allow_tracing: bool @@ -7620,7 +8015,7 @@ class UserCreateParameters(Model): password is generated. :type password: str :param app_type: Determines the type of application which send the create - user request. Default is old publisher portal. Possible values include: + user request. Default is legacy portal. Possible values include: 'portal', 'developerPortal' :type app_type: str or ~azure.mgmt.apimanagement.models.AppType :param confirmation: Determines the type of confirmation e-mail that will diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py index 1e014d4da659..1413a5918722 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py @@ -74,14 +74,17 @@ class AdditionalLocation(Model): :param sku: Required. SKU properties of the API Management service. :type sku: ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties + :param zones: A list of availability zones denoting where the resource + needs to come from. + :type zones: list[str] :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for - Basic, Standard and Premium SKU. + Basic, Standard, Premium and Isolated SKU. :vartype public_ip_addresses: list[str] :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, - Standard and Premium SKU. + Standard, Premium and Isolated SKU. :vartype private_ip_addresses: list[str] :param virtual_network_configuration: Virtual network configuration for the location. @@ -107,6 +110,7 @@ class AdditionalLocation(Model): _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, + 'zones': {'key': 'zones', 'type': '[str]'}, 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, @@ -114,10 +118,11 @@ class AdditionalLocation(Model): 'disable_gateway': {'key': 'disableGateway', 'type': 'bool'}, } - def __init__(self, *, location: str, sku, virtual_network_configuration=None, disable_gateway: bool=False, **kwargs) -> None: + def __init__(self, *, location: str, sku, zones=None, virtual_network_configuration=None, disable_gateway: bool=False, **kwargs) -> None: super(AdditionalLocation, self).__init__(**kwargs) self.location = location self.sku = sku + self.zones = zones self.public_ip_addresses = None self.private_ip_addresses = None self.virtual_network_configuration = virtual_network_configuration @@ -773,12 +778,12 @@ class ApiManagementServiceBaseProperties(Model): list[~azure.mgmt.apimanagement.models.HostnameConfiguration] :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, - Standard and Premium SKU. + Standard, Premium and Isolated SKU. :vartype public_ip_addresses: list[str] :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an - Internal Virtual Network. Available only for Basic, Standard and Premium - SKU. + Internal Virtual Network. Available only for Basic, Standard, Premium and + Isolated SKU. :vartype private_ip_addresses: list[str] :param virtual_network_configuration: Virtual network configuration of the API Management service. @@ -851,6 +856,10 @@ class ApiManagementServiceBaseProperties(Model): the API Management service. :type api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint + :param restore: Undelete Api Management Service if it was previously + soft-deleted. If this flag is specified and set to True all other + properties will be ignored. Default value: False . + :type restore: bool """ _validation = { @@ -890,9 +899,10 @@ class ApiManagementServiceBaseProperties(Model): 'disable_gateway': {'key': 'disableGateway', 'type': 'bool'}, 'virtual_network_type': {'key': 'virtualNetworkType', 'type': 'str'}, 'api_version_constraint': {'key': 'apiVersionConstraint', 'type': 'ApiVersionConstraint'}, + 'restore': {'key': 'restore', 'type': 'bool'}, } - def __init__(self, *, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, enable_client_certificate: bool=False, disable_gateway: bool=False, virtual_network_type="None", api_version_constraint=None, **kwargs) -> None: + def __init__(self, *, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, enable_client_certificate: bool=False, disable_gateway: bool=False, virtual_network_type="None", api_version_constraint=None, restore: bool=False, **kwargs) -> None: super(ApiManagementServiceBaseProperties, self).__init__(**kwargs) self.notification_sender_email = notification_sender_email self.provisioning_state = None @@ -915,6 +925,7 @@ def __init__(self, *, notification_sender_email: str=None, hostname_configuratio self.disable_gateway = disable_gateway self.virtual_network_type = virtual_network_type self.api_version_constraint = api_version_constraint + self.restore = restore class ApiManagementServiceCheckNameAvailabilityParameters(Model): @@ -1138,12 +1149,12 @@ class ApiManagementServiceResource(ApimResource): list[~azure.mgmt.apimanagement.models.HostnameConfiguration] :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, - Standard and Premium SKU. + Standard, Premium and Isolated SKU. :vartype public_ip_addresses: list[str] :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an - Internal Virtual Network. Available only for Basic, Standard and Premium - SKU. + Internal Virtual Network. Available only for Basic, Standard, Premium and + Isolated SKU. :vartype private_ip_addresses: list[str] :param virtual_network_configuration: Virtual network configuration of the API Management service. @@ -1216,6 +1227,10 @@ class ApiManagementServiceResource(ApimResource): the API Management service. :type api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint + :param restore: Undelete Api Management Service if it was previously + soft-deleted. If this flag is specified and set to True all other + properties will be ignored. Default value: False . + :type restore: bool :param publisher_email: Required. Publisher email. :type publisher_email: str :param publisher_name: Required. Publisher name. @@ -1230,6 +1245,9 @@ class ApiManagementServiceResource(ApimResource): :type location: str :ivar etag: ETag of the resource. :vartype etag: str + :param zones: A list of availability zones denoting where the resource + needs to come from. + :type zones: list[str] """ _validation = { @@ -1281,15 +1299,17 @@ class ApiManagementServiceResource(ApimResource): 'disable_gateway': {'key': 'properties.disableGateway', 'type': 'bool'}, 'virtual_network_type': {'key': 'properties.virtualNetworkType', 'type': 'str'}, 'api_version_constraint': {'key': 'properties.apiVersionConstraint', 'type': 'ApiVersionConstraint'}, + 'restore': {'key': 'properties.restore', 'type': 'bool'}, 'publisher_email': {'key': 'properties.publisherEmail', 'type': 'str'}, 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, 'identity': {'key': 'identity', 'type': 'ApiManagementServiceIdentity'}, 'location': {'key': 'location', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, } - def __init__(self, *, publisher_email: str, publisher_name: str, sku, location: str, tags=None, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, enable_client_certificate: bool=False, disable_gateway: bool=False, virtual_network_type="None", api_version_constraint=None, identity=None, **kwargs) -> None: + def __init__(self, *, publisher_email: str, publisher_name: str, sku, location: str, tags=None, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, enable_client_certificate: bool=False, disable_gateway: bool=False, virtual_network_type="None", api_version_constraint=None, restore: bool=False, identity=None, zones=None, **kwargs) -> None: super(ApiManagementServiceResource, self).__init__(tags=tags, **kwargs) self.notification_sender_email = notification_sender_email self.provisioning_state = None @@ -1312,12 +1332,14 @@ def __init__(self, *, publisher_email: str, publisher_name: str, sku, location: self.disable_gateway = disable_gateway self.virtual_network_type = virtual_network_type self.api_version_constraint = api_version_constraint + self.restore = restore self.publisher_email = publisher_email self.publisher_name = publisher_name self.sku = sku self.identity = identity self.location = location self.etag = None + self.zones = zones class ApiManagementServiceSkuProperties(Model): @@ -1326,7 +1348,7 @@ class ApiManagementServiceSkuProperties(Model): All required parameters must be populated in order to send to Azure. :param name: Required. Name of the Sku. Possible values include: - 'Developer', 'Standard', 'Premium', 'Basic', 'Consumption' + 'Developer', 'Standard', 'Premium', 'Basic', 'Consumption', 'Isolated' :type name: str or ~azure.mgmt.apimanagement.models.SkuType :param capacity: Required. Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as 0. @@ -1401,12 +1423,12 @@ class ApiManagementServiceUpdateParameters(ApimResource): list[~azure.mgmt.apimanagement.models.HostnameConfiguration] :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, - Standard and Premium SKU. + Standard, Premium and Isolated SKU. :vartype public_ip_addresses: list[str] :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an - Internal Virtual Network. Available only for Basic, Standard and Premium - SKU. + Internal Virtual Network. Available only for Basic, Standard, Premium and + Isolated SKU. :vartype private_ip_addresses: list[str] :param virtual_network_configuration: Virtual network configuration of the API Management service. @@ -1479,6 +1501,10 @@ class ApiManagementServiceUpdateParameters(ApimResource): the API Management service. :type api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint + :param restore: Undelete Api Management Service if it was previously + soft-deleted. If this flag is specified and set to True all other + properties will be ignored. Default value: False . + :type restore: bool :param publisher_email: Publisher email. :type publisher_email: str :param publisher_name: Publisher name. @@ -1540,6 +1566,7 @@ class ApiManagementServiceUpdateParameters(ApimResource): 'disable_gateway': {'key': 'properties.disableGateway', 'type': 'bool'}, 'virtual_network_type': {'key': 'properties.virtualNetworkType', 'type': 'str'}, 'api_version_constraint': {'key': 'properties.apiVersionConstraint', 'type': 'ApiVersionConstraint'}, + 'restore': {'key': 'properties.restore', 'type': 'bool'}, 'publisher_email': {'key': 'properties.publisherEmail', 'type': 'str'}, 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, @@ -1547,7 +1574,7 @@ class ApiManagementServiceUpdateParameters(ApimResource): 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, *, tags=None, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, enable_client_certificate: bool=False, disable_gateway: bool=False, virtual_network_type="None", api_version_constraint=None, publisher_email: str=None, publisher_name: str=None, sku=None, identity=None, **kwargs) -> None: + def __init__(self, *, tags=None, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, enable_client_certificate: bool=False, disable_gateway: bool=False, virtual_network_type="None", api_version_constraint=None, restore: bool=False, publisher_email: str=None, publisher_name: str=None, sku=None, identity=None, **kwargs) -> None: super(ApiManagementServiceUpdateParameters, self).__init__(tags=tags, **kwargs) self.notification_sender_email = notification_sender_email self.provisioning_state = None @@ -1570,6 +1597,7 @@ def __init__(self, *, tags=None, notification_sender_email: str=None, hostname_c self.disable_gateway = disable_gateway self.virtual_network_type = virtual_network_type self.api_version_constraint = api_version_constraint + self.restore = restore self.publisher_email = publisher_email self.publisher_name = publisher_name self.sku = sku @@ -2383,6 +2411,34 @@ def __init__(self, *, description: str=None, authorization_methods=None, client_ self.resource_owner_password = resource_owner_password +class AuthorizationServerSecretsContract(Model): + """OAuth Server Secrets Contract. + + :param client_secret: oAuth Authorization Server Secrets. + :type client_secret: str + :param resource_owner_username: Can be optionally specified when resource + owner password grant type is supported by this authorization server. + Default resource owner username. + :type resource_owner_username: str + :param resource_owner_password: Can be optionally specified when resource + owner password grant type is supported by this authorization server. + Default resource owner password. + :type resource_owner_password: str + """ + + _attribute_map = { + 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + 'resource_owner_username': {'key': 'resourceOwnerUsername', 'type': 'str'}, + 'resource_owner_password': {'key': 'resourceOwnerPassword', 'type': 'str'}, + } + + def __init__(self, *, client_secret: str=None, resource_owner_username: str=None, resource_owner_password: str=None, **kwargs) -> None: + super(AuthorizationServerSecretsContract, self).__init__(**kwargs) + self.client_secret = client_secret + self.resource_owner_username = resource_owner_username + self.resource_owner_password = resource_owner_password + + class AuthorizationServerUpdateContract(Resource): """External OAuth authorization server settings. @@ -2942,6 +2998,9 @@ class CacheContract(Resource): :type description: str :param connection_string: Required. Runtime connection string to cache :type connection_string: str + :param use_from_location: Required. Location identifier to use cache from + (should be either 'default' or valid Azure region identifier) + :type use_from_location: str :param resource_id: Original uri of entity in external system cache points to :type resource_id: str @@ -2953,6 +3012,7 @@ class CacheContract(Resource): 'type': {'readonly': True}, 'description': {'max_length': 2000}, 'connection_string': {'required': True, 'max_length': 300}, + 'use_from_location': {'required': True, 'max_length': 256}, 'resource_id': {'max_length': 2000}, } @@ -2962,13 +3022,15 @@ class CacheContract(Resource): 'type': {'key': 'type', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'use_from_location': {'key': 'properties.useFromLocation', 'type': 'str'}, 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, } - def __init__(self, *, connection_string: str, description: str=None, resource_id: str=None, **kwargs) -> None: + def __init__(self, *, connection_string: str, use_from_location: str, description: str=None, resource_id: str=None, **kwargs) -> None: super(CacheContract, self).__init__(**kwargs) self.description = description self.connection_string = connection_string + self.use_from_location = use_from_location self.resource_id = resource_id @@ -2979,6 +3041,9 @@ class CacheUpdateParameters(Model): :type description: str :param connection_string: Runtime connection string to cache :type connection_string: str + :param use_from_location: Location identifier to use cache from (should be + either 'default' or valid Azure region identifier) + :type use_from_location: str :param resource_id: Original uri of entity in external system cache points to :type resource_id: str @@ -2987,19 +3052,22 @@ class CacheUpdateParameters(Model): _validation = { 'description': {'max_length': 2000}, 'connection_string': {'max_length': 300}, + 'use_from_location': {'max_length': 256}, 'resource_id': {'max_length': 2000}, } _attribute_map = { 'description': {'key': 'properties.description', 'type': 'str'}, 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'use_from_location': {'key': 'properties.useFromLocation', 'type': 'str'}, 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, } - def __init__(self, *, description: str=None, connection_string: str=None, resource_id: str=None, **kwargs) -> None: + def __init__(self, *, description: str=None, connection_string: str=None, use_from_location: str=None, resource_id: str=None, **kwargs) -> None: super(CacheUpdateParameters, self).__init__(**kwargs) self.description = description self.connection_string = connection_string + self.use_from_location = use_from_location self.resource_id = resource_id @@ -3063,6 +3131,9 @@ class CertificateContract(Resource): date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. :type expiration_date: datetime + :param key_vault: KeyVault location details of the certificate. + :type key_vault: + ~azure.mgmt.apimanagement.models.KeyVaultContractProperties """ _validation = { @@ -3081,41 +3152,41 @@ class CertificateContract(Resource): 'subject': {'key': 'properties.subject', 'type': 'str'}, 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'key_vault': {'key': 'properties.keyVault', 'type': 'KeyVaultContractProperties'}, } - def __init__(self, *, subject: str, thumbprint: str, expiration_date, **kwargs) -> None: + def __init__(self, *, subject: str, thumbprint: str, expiration_date, key_vault=None, **kwargs) -> None: super(CertificateContract, self).__init__(**kwargs) self.subject = subject self.thumbprint = thumbprint self.expiration_date = expiration_date + self.key_vault = key_vault class CertificateCreateOrUpdateParameters(Model): """Certificate create or update details. - All required parameters must be populated in order to send to Azure. - - :param data: Required. Base 64 encoded certificate using the - application/x-pkcs12 representation. + :param data: Base 64 encoded certificate using the application/x-pkcs12 + representation. :type data: str - :param password: Required. Password for the Certificate + :param password: Password for the Certificate :type password: str + :param key_vault: KeyVault location details of the certificate. + :type key_vault: + ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties """ - _validation = { - 'data': {'required': True}, - 'password': {'required': True}, - } - _attribute_map = { 'data': {'key': 'properties.data', 'type': 'str'}, 'password': {'key': 'properties.password', 'type': 'str'}, + 'key_vault': {'key': 'properties.keyVault', 'type': 'KeyVaultContractCreateProperties'}, } - def __init__(self, *, data: str, password: str, **kwargs) -> None: + def __init__(self, *, data: str=None, password: str=None, key_vault=None, **kwargs) -> None: super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) self.data = data self.password = password + self.key_vault = key_vault class CertificateInformation(Model): @@ -3204,6 +3275,10 @@ class ConnectivityStatusContract(Model): The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. :type last_status_change: datetime + :param resource_type: Required. Resource Type. + :type resource_type: str + :param is_optional: Required. Whether this is optional. + :type is_optional: bool """ _validation = { @@ -3211,6 +3286,8 @@ class ConnectivityStatusContract(Model): 'status': {'required': True}, 'last_updated': {'required': True}, 'last_status_change': {'required': True}, + 'resource_type': {'required': True}, + 'is_optional': {'required': True}, } _attribute_map = { @@ -3219,15 +3296,197 @@ class ConnectivityStatusContract(Model): 'error': {'key': 'error', 'type': 'str'}, 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, 'last_status_change': {'key': 'lastStatusChange', 'type': 'iso-8601'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'is_optional': {'key': 'isOptional', 'type': 'bool'}, } - def __init__(self, *, name: str, status, last_updated, last_status_change, error: str=None, **kwargs) -> None: + def __init__(self, *, name: str, status, last_updated, last_status_change, resource_type: str, is_optional: bool, error: str=None, **kwargs) -> None: super(ConnectivityStatusContract, self).__init__(**kwargs) self.name = name self.status = status self.error = error self.last_updated = last_updated self.last_status_change = last_status_change + self.resource_type = resource_type + self.is_optional = is_optional + + +class ContentItemContract(Resource): + """Content type contract details. + + 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 for API Management resource. + :vartype type: str + :param properties: Properties of the content item. + :type properties: dict[str, object] + """ + + _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'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(ContentItemContract, self).__init__(**kwargs) + self.properties = properties + + +class ContentTypeContract(Resource): + """Content type contract details. + + 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 for API Management resource. + :vartype type: str + :param content_type_contract_id: Content type identifier + :type content_type_contract_id: str + :param content_type_contract_name: Content type name. Must be 1 to 250 + characters long. + :type content_type_contract_name: str + :param description: Content type description. + :type description: str + :param schema: Content type schema. + :type schema: object + :param version: Content type version. + :type version: str + """ + + _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'}, + 'content_type_contract_id': {'key': 'properties.id', 'type': 'str'}, + 'content_type_contract_name': {'key': 'properties.name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'schema': {'key': 'properties.schema', 'type': 'object'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__(self, *, content_type_contract_id: str=None, content_type_contract_name: str=None, description: str=None, schema=None, version: str=None, **kwargs) -> None: + super(ContentTypeContract, self).__init__(**kwargs) + self.content_type_contract_id = content_type_contract_id + self.content_type_contract_name = content_type_contract_name + self.description = description + self.schema = schema + self.version = version + + +class DataMasking(Model): + """DataMasking. + + :param query_params: Masking settings for Url query parameters + :type query_params: + list[~azure.mgmt.apimanagement.models.DataMaskingEntity] + :param headers: Masking settings for headers + :type headers: list[~azure.mgmt.apimanagement.models.DataMaskingEntity] + """ + + _attribute_map = { + 'query_params': {'key': 'queryParams', 'type': '[DataMaskingEntity]'}, + 'headers': {'key': 'headers', 'type': '[DataMaskingEntity]'}, + } + + def __init__(self, *, query_params=None, headers=None, **kwargs) -> None: + super(DataMasking, self).__init__(**kwargs) + self.query_params = query_params + self.headers = headers + + +class DataMaskingEntity(Model): + """DataMaskingEntity. + + :param value: The name of an entity to mask (e.g. a name of a header or a + query parameter). + :type value: str + :param mode: Data masking mode. Possible values include: 'Mask', 'Hide' + :type mode: str or ~azure.mgmt.apimanagement.models.DataMaskingMode + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, mode=None, **kwargs) -> None: + super(DataMaskingEntity, self).__init__(**kwargs) + self.value = value + self.mode = mode + + +class DeletedServiceContract(Resource): + """Deleted Api Management Service information. + + 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 for API Management resource. + :vartype type: str + :param service_id: Fully-qualified API Management Service Resource ID + :type service_id: str + :param scheduled_purge_date: UTC Date and Time when the service will be + automatically purged. The date conforms to the following format: + yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + :type scheduled_purge_date: datetime + :param deletion_date: UTC Timestamp when the service was soft-deleted. The + date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified + by the ISO 8601 standard. + :type deletion_date: datetime + :ivar location: Api Management Service Master Location. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_id': {'key': 'properties.serviceId', 'type': 'str'}, + 'scheduled_purge_date': {'key': 'properties.scheduledPurgeDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, service_id: str=None, scheduled_purge_date=None, deletion_date=None, **kwargs) -> None: + super(DeletedServiceContract, self).__init__(**kwargs) + self.service_id = service_id + self.scheduled_purge_date = scheduled_purge_date + self.deletion_date = deletion_date + self.location = None class DeployConfigurationParameters(Model): @@ -3296,6 +3555,11 @@ class DiagnosticContract(Resource): :param verbosity: The verbosity level applied to traces emitted by trace policies. Possible values include: 'verbose', 'information', 'error' :type verbosity: str or ~azure.mgmt.apimanagement.models.Verbosity + :param operation_name_format: The format of the Operation Name for + Application Insights telemetries. Default is Name. Possible values + include: 'Name', 'Url' + :type operation_name_format: str or + ~azure.mgmt.apimanagement.models.OperationNameFormat """ _validation = { @@ -3317,9 +3581,10 @@ class DiagnosticContract(Resource): 'log_client_ip': {'key': 'properties.logClientIp', 'type': 'bool'}, 'http_correlation_protocol': {'key': 'properties.httpCorrelationProtocol', 'type': 'str'}, 'verbosity': {'key': 'properties.verbosity', 'type': 'str'}, + 'operation_name_format': {'key': 'properties.operationNameFormat', 'type': 'str'}, } - def __init__(self, *, logger_id: str, always_log=None, sampling=None, frontend=None, backend=None, log_client_ip: bool=None, http_correlation_protocol=None, verbosity=None, **kwargs) -> None: + def __init__(self, *, logger_id: str, always_log=None, sampling=None, frontend=None, backend=None, log_client_ip: bool=None, http_correlation_protocol=None, verbosity=None, operation_name_format=None, **kwargs) -> None: super(DiagnosticContract, self).__init__(**kwargs) self.always_log = always_log self.logger_id = logger_id @@ -3329,6 +3594,7 @@ def __init__(self, *, logger_id: str, always_log=None, sampling=None, frontend=N self.log_client_ip = log_client_ip self.http_correlation_protocol = http_correlation_protocol self.verbosity = verbosity + self.operation_name_format = operation_name_format class EmailTemplateContract(Resource): @@ -3610,6 +3876,12 @@ class GatewayHostnameConfigurationContract(Resource): :param negotiate_client_certificate: Determines whether gateway requests client certificate :type negotiate_client_certificate: bool + :param tls10_enabled: Specifies if TLS 1.0 is supported + :type tls10_enabled: bool + :param tls11_enabled: Specifies if TLS 1.1 is supported + :type tls11_enabled: bool + :param http2_enabled: Specifies if HTTP/2.0 is supported + :type http2_enabled: bool """ _validation = { @@ -3625,13 +3897,19 @@ class GatewayHostnameConfigurationContract(Resource): 'hostname': {'key': 'properties.hostname', 'type': 'str'}, 'certificate_id': {'key': 'properties.certificateId', 'type': 'str'}, 'negotiate_client_certificate': {'key': 'properties.negotiateClientCertificate', 'type': 'bool'}, + 'tls10_enabled': {'key': 'properties.tls10Enabled', 'type': 'bool'}, + 'tls11_enabled': {'key': 'properties.tls11Enabled', 'type': 'bool'}, + 'http2_enabled': {'key': 'properties.http2Enabled', 'type': 'bool'}, } - def __init__(self, *, hostname: str=None, certificate_id: str=None, negotiate_client_certificate: bool=None, **kwargs) -> None: + def __init__(self, *, hostname: str=None, certificate_id: str=None, negotiate_client_certificate: bool=None, tls10_enabled: bool=None, tls11_enabled: bool=None, http2_enabled: bool=None, **kwargs) -> None: super(GatewayHostnameConfigurationContract, self).__init__(**kwargs) self.hostname = hostname self.certificate_id = certificate_id self.negotiate_client_certificate = negotiate_client_certificate + self.tls10_enabled = tls10_enabled + self.tls11_enabled = tls11_enabled + self.http2_enabled = http2_enabled class GatewayKeyRegenerationRequestContract(Model): @@ -3940,6 +4218,10 @@ class HostnameConfiguration(Model): be configured with MSI. The secret should be of type *application/x-pkcs12* :type key_vault_id: str + :param identity_client_id: System or User Assigned Managed identity + clientId as generated by Azure AD, which has GET access to the keyVault + containing the SSL certificate. + :type identity_client_id: str :param encoded_certificate: Base64 Encoded certificate. :type encoded_certificate: str :param certificate_password: Certificate Password. @@ -3968,6 +4250,7 @@ class HostnameConfiguration(Model): 'type': {'key': 'type', 'type': 'str'}, 'host_name': {'key': 'hostName', 'type': 'str'}, 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + 'identity_client_id': {'key': 'identityClientId', 'type': 'str'}, 'encoded_certificate': {'key': 'encodedCertificate', 'type': 'str'}, 'certificate_password': {'key': 'certificatePassword', 'type': 'str'}, 'default_ssl_binding': {'key': 'defaultSslBinding', 'type': 'bool'}, @@ -3975,11 +4258,12 @@ class HostnameConfiguration(Model): 'certificate': {'key': 'certificate', 'type': 'CertificateInformation'}, } - def __init__(self, *, type, host_name: str, key_vault_id: str=None, encoded_certificate: str=None, certificate_password: str=None, default_ssl_binding: bool=False, negotiate_client_certificate: bool=False, certificate=None, **kwargs) -> None: + def __init__(self, *, type, host_name: str, key_vault_id: str=None, identity_client_id: str=None, encoded_certificate: str=None, certificate_password: str=None, default_ssl_binding: bool=False, negotiate_client_certificate: bool=False, certificate=None, **kwargs) -> None: super(HostnameConfiguration, self).__init__(**kwargs) self.type = type self.host_name = host_name self.key_vault_id = key_vault_id + self.identity_client_id = identity_client_id self.encoded_certificate = encoded_certificate self.certificate_password = certificate_password self.default_ssl_binding = default_ssl_binding @@ -3994,17 +4278,21 @@ class HttpMessageDiagnostic(Model): :type headers: list[str] :param body: Body logging settings. :type body: ~azure.mgmt.apimanagement.models.BodyDiagnosticSettings + :param data_masking: Data masking settings. + :type data_masking: ~azure.mgmt.apimanagement.models.DataMasking """ _attribute_map = { 'headers': {'key': 'headers', 'type': '[str]'}, 'body': {'key': 'body', 'type': 'BodyDiagnosticSettings'}, + 'data_masking': {'key': 'dataMasking', 'type': 'DataMasking'}, } - def __init__(self, *, headers=None, body=None, **kwargs) -> None: + def __init__(self, *, headers=None, body=None, data_masking=None, **kwargs) -> None: super(HttpMessageDiagnostic, self).__init__(**kwargs) self.headers = headers self.body = body + self.data_masking = data_masking class IdentityProviderBaseParameters(Model): @@ -4554,6 +4842,79 @@ def __init__(self, *, created_date=None, state=None, api_id: str=None, title: st self.user_id = user_id +class KeyVaultContractCreateProperties(Model): + """Create keyVault contract details. + + :param secret_identifier: Key vault secret identifier for fetching secret. + :type secret_identifier: str + :param identity_client_id: SystemAssignedIdentity or UserAssignedIdentity + Client Id which will be used to access key vault secret. + :type identity_client_id: str + """ + + _attribute_map = { + 'secret_identifier': {'key': 'secretIdentifier', 'type': 'str'}, + 'identity_client_id': {'key': 'identityClientId', 'type': 'str'}, + } + + def __init__(self, *, secret_identifier: str=None, identity_client_id: str=None, **kwargs) -> None: + super(KeyVaultContractCreateProperties, self).__init__(**kwargs) + self.secret_identifier = secret_identifier + self.identity_client_id = identity_client_id + + +class KeyVaultContractProperties(KeyVaultContractCreateProperties): + """KeyVault contract details. + + :param secret_identifier: Key vault secret identifier for fetching secret. + :type secret_identifier: str + :param identity_client_id: SystemAssignedIdentity or UserAssignedIdentity + Client Id which will be used to access key vault secret. + :type identity_client_id: str + :param last_status: Last time sync and refresh status of secret from key + vault. + :type last_status: + ~azure.mgmt.apimanagement.models.KeyVaultLastAccessStatusContractProperties + """ + + _attribute_map = { + 'secret_identifier': {'key': 'secretIdentifier', 'type': 'str'}, + 'identity_client_id': {'key': 'identityClientId', 'type': 'str'}, + 'last_status': {'key': 'lastStatus', 'type': 'KeyVaultLastAccessStatusContractProperties'}, + } + + def __init__(self, *, secret_identifier: str=None, identity_client_id: str=None, last_status=None, **kwargs) -> None: + super(KeyVaultContractProperties, self).__init__(secret_identifier=secret_identifier, identity_client_id=identity_client_id, **kwargs) + self.last_status = last_status + + +class KeyVaultLastAccessStatusContractProperties(Model): + """Issue contract Update Properties. + + :param code: Last status code for sync and refresh of secret from key + vault. + :type code: str + :param message: Details of the error else empty. + :type message: str + :param time_stamp_utc: Last time secret was accessed. The date conforms to + the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + standard. + :type time_stamp_utc: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time_stamp_utc': {'key': 'timeStampUtc', 'type': 'iso-8601'}, + } + + def __init__(self, *, code: str=None, message: str=None, time_stamp_utc=None, **kwargs) -> None: + super(KeyVaultLastAccessStatusContractProperties, self).__init__(**kwargs) + self.code = code + self.message = message + self.time_stamp_utc = time_stamp_utc + + class LoggerContract(Resource): """Logger details. @@ -4569,12 +4930,12 @@ class LoggerContract(Resource): :ivar type: Resource type for API Management resource. :vartype type: str :param logger_type: Required. Logger type. Possible values include: - 'azureEventHub', 'applicationInsights' + 'azureEventHub', 'applicationInsights', 'azureMonitor' :type logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType :param description: Logger description. :type description: str - :param credentials: Required. The name and SendRule connection string of - the event hub for azureEventHub logger. + :param credentials: The name and SendRule connection string of the event + hub for azureEventHub logger. Instrumentation key for applicationInsights logger. :type credentials: dict[str, str] :param is_buffered: Whether records are buffered in the logger before @@ -4591,7 +4952,6 @@ class LoggerContract(Resource): 'type': {'readonly': True}, 'logger_type': {'required': True}, 'description': {'max_length': 256}, - 'credentials': {'required': True}, } _attribute_map = { @@ -4605,7 +4965,7 @@ class LoggerContract(Resource): 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, } - def __init__(self, *, logger_type, credentials, description: str=None, is_buffered: bool=None, resource_id: str=None, **kwargs) -> None: + def __init__(self, *, logger_type, description: str=None, credentials=None, is_buffered: bool=None, resource_id: str=None, **kwargs) -> None: super(LoggerContract, self).__init__(**kwargs) self.logger_type = logger_type self.description = description @@ -4618,7 +4978,7 @@ class LoggerUpdateContract(Model): """Logger update contract. :param logger_type: Logger type. Possible values include: 'azureEventHub', - 'applicationInsights' + 'applicationInsights', 'azureMonitor' :type logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType :param description: Logger description. :type description: str @@ -4672,6 +5032,9 @@ class NamedValueContract(Resource): filled on 'GET' operations! Use '/listSecrets' POST request to get the value. :type value: str + :param key_vault: KeyVault location details of the namedValue. + :type key_vault: + ~azure.mgmt.apimanagement.models.KeyVaultContractProperties """ _validation = { @@ -4680,7 +5043,7 @@ class NamedValueContract(Resource): 'type': {'readonly': True}, 'tags': {'max_items': 32}, 'display_name': {'required': True, 'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, - 'value': {'max_length': 4096, 'min_length': 1}, + 'value': {'max_length': 4096}, } _attribute_map = { @@ -4691,14 +5054,16 @@ class NamedValueContract(Resource): 'secret': {'key': 'properties.secret', 'type': 'bool'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'value': {'key': 'properties.value', 'type': 'str'}, + 'key_vault': {'key': 'properties.keyVault', 'type': 'KeyVaultContractProperties'}, } - def __init__(self, *, display_name: str, tags=None, secret: bool=None, value: str=None, **kwargs) -> None: + def __init__(self, *, display_name: str, tags=None, secret: bool=None, value: str=None, key_vault=None, **kwargs) -> None: super(NamedValueContract, self).__init__(**kwargs) self.tags = tags self.secret = secret self.display_name = display_name self.value = value + self.key_vault = key_vault class NamedValueCreateContract(Resource): @@ -4724,11 +5089,14 @@ class NamedValueCreateContract(Resource): :param display_name: Required. Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. :type display_name: str - :param value: Required. Value of the NamedValue. Can contain policy - expressions. It may not be empty or consist only of whitespace. This - property will not be filled on 'GET' operations! Use '/listSecrets' POST - request to get the value. + :param value: Value of the NamedValue. Can contain policy expressions. It + may not be empty or consist only of whitespace. This property will not be + filled on 'GET' operations! Use '/listSecrets' POST request to get the + value. :type value: str + :param key_vault: KeyVault location details of the namedValue. + :type key_vault: + ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties """ _validation = { @@ -4737,7 +5105,7 @@ class NamedValueCreateContract(Resource): 'type': {'readonly': True}, 'tags': {'max_items': 32}, 'display_name': {'required': True, 'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, - 'value': {'required': True, 'max_length': 4096, 'min_length': 1}, + 'value': {'max_length': 4096}, } _attribute_map = { @@ -4748,14 +5116,16 @@ class NamedValueCreateContract(Resource): 'secret': {'key': 'properties.secret', 'type': 'bool'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'value': {'key': 'properties.value', 'type': 'str'}, + 'key_vault': {'key': 'properties.keyVault', 'type': 'KeyVaultContractCreateProperties'}, } - def __init__(self, *, display_name: str, value: str, tags=None, secret: bool=None, **kwargs) -> None: + def __init__(self, *, display_name: str, tags=None, secret: bool=None, value: str=None, key_vault=None, **kwargs) -> None: super(NamedValueCreateContract, self).__init__(**kwargs) self.tags = tags self.secret = secret self.display_name = display_name self.value = value + self.key_vault = key_vault class NamedValueEntityBaseParameters(Model): @@ -4784,6 +5154,22 @@ def __init__(self, *, tags=None, secret: bool=None, **kwargs) -> None: self.secret = secret +class NamedValueSecretContract(Model): + """Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + + :param value: This is secret value of the NamedValue entity. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, **kwargs) -> None: + super(NamedValueSecretContract, self).__init__(**kwargs) + self.value = value + + class NamedValueUpdateParameters(Model): """NamedValue update Parameters. @@ -4799,6 +5185,9 @@ class NamedValueUpdateParameters(Model): :param value: Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. :type value: str + :param key_vault: KeyVault location details of the namedValue. + :type key_vault: + ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties """ _validation = { @@ -4812,14 +5201,16 @@ class NamedValueUpdateParameters(Model): 'secret': {'key': 'properties.secret', 'type': 'bool'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'value': {'key': 'properties.value', 'type': 'str'}, + 'key_vault': {'key': 'properties.keyVault', 'type': 'KeyVaultContractCreateProperties'}, } - def __init__(self, *, tags=None, secret: bool=None, display_name: str=None, value: str=None, **kwargs) -> None: + def __init__(self, *, tags=None, secret: bool=None, display_name: str=None, value: str=None, key_vault=None, **kwargs) -> None: super(NamedValueUpdateParameters, self).__init__(**kwargs) self.tags = tags self.secret = secret self.display_name = display_name self.value = value + self.key_vault = key_vault class NetworkStatusContract(Model): @@ -6014,22 +6405,6 @@ def __init__(self, *, description: str=None, terms: str=None, subscription_requi self.display_name = display_name -class PropertyValueContract(Model): - """Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. - - :param value: This is secret value of the NamedValue entity. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, **kwargs) -> None: - super(PropertyValueContract, self).__init__(**kwargs) - self.value = value - - class QuotaCounterCollection(Model): """Paged Quota Counter list representation. @@ -6142,6 +6517,26 @@ def __init__(self, *, calls_count: int=None, kb_transferred: float=None, **kwarg self.kb_transferred = kb_transferred +class QuotaCounterValueUpdateContract(Model): + """Quota counter value details. + + :param calls_count: Number of times Counter was called. + :type calls_count: int + :param kb_transferred: Data Transferred in KiloBytes. + :type kb_transferred: float + """ + + _attribute_map = { + 'calls_count': {'key': 'properties.callsCount', 'type': 'int'}, + 'kb_transferred': {'key': 'properties.kbTransferred', 'type': 'float'}, + } + + def __init__(self, *, calls_count: int=None, kb_transferred: float=None, **kwargs) -> None: + super(QuotaCounterValueUpdateContract, self).__init__(**kwargs) + self.calls_count = calls_count + self.kb_transferred = kb_transferred + + class RecipientEmailCollection(Model): """Paged Recipient User list representation. @@ -6680,7 +7075,7 @@ class ResourceSku(Model): """Describes an available API Management SKU. :param name: Name of the Sku. Possible values include: 'Developer', - 'Standard', 'Premium', 'Basic', 'Consumption' + 'Standard', 'Premium', 'Basic', 'Consumption', 'Isolated' :type name: str or ~azure.mgmt.apimanagement.models.SkuType """ @@ -6976,7 +7371,7 @@ class SubscriptionContract(Resource): value. :type secondary_key: str :param state_comment: Optional subscription comment added by an - administrator. + administrator when the state is changed to the 'rejected'. :type state_comment: str :param allow_tracing: Determines whether tracing is enabled :type allow_tracing: bool @@ -7183,7 +7578,7 @@ class SubscriptionUpdateParameters(Model): 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled' :type state: str or ~azure.mgmt.apimanagement.models.SubscriptionState :param state_comment: Comments describing subscription state change by the - administrator. + administrator when the state is changed to the 'rejected'. :type state_comment: str :param allow_tracing: Determines whether tracing can be enabled :type allow_tracing: bool @@ -7620,7 +8015,7 @@ class UserCreateParameters(Model): password is generated. :type password: str :param app_type: Determines the type of application which send the create - user request. Default is old publisher portal. Possible values include: + user request. Default is legacy portal. Possible values include: 'portal', 'developerPortal' :type app_type: str or ~azure.mgmt.apimanagement.models.AppType :param confirmation: Determines the type of confirmation e-mail that will diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_paged_models.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_paged_models.py index bc1ee244cc6c..992e4b91f1ed 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_paged_models.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_paged_models.py @@ -246,6 +246,45 @@ class CertificateContractPaged(Paged): def __init__(self, *args, **kwargs): super(CertificateContractPaged, self).__init__(*args, **kwargs) +class ContentTypeContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`ContentTypeContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ContentTypeContract]'} + } + + def __init__(self, *args, **kwargs): + + super(ContentTypeContractPaged, self).__init__(*args, **kwargs) +class ContentItemContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`ContentItemContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ContentItemContract]'} + } + + def __init__(self, *args, **kwargs): + + super(ContentItemContractPaged, self).__init__(*args, **kwargs) +class DeletedServiceContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`DeletedServiceContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DeletedServiceContract]'} + } + + def __init__(self, *args, **kwargs): + + super(DeletedServiceContractPaged, self).__init__(*args, **kwargs) class OperationPaged(Paged): """ A paging container for iterating over a list of :class:`Operation ` object diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py index 2dae331a8203..b1b26a1b2e52 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py @@ -29,6 +29,9 @@ from ._backend_operations import BackendOperations from ._cache_operations import CacheOperations from ._certificate_operations import CertificateOperations +from ._content_type_operations import ContentTypeOperations +from ._content_item_operations import ContentItemOperations +from ._deleted_services_operations import DeletedServicesOperations from ._api_management_operations import ApiManagementOperations from ._api_management_service_skus_operations import ApiManagementServiceSkusOperations from ._api_management_service_operations import ApiManagementServiceOperations @@ -95,6 +98,9 @@ 'BackendOperations', 'CacheOperations', 'CertificateOperations', + 'ContentTypeOperations', + 'ContentItemOperations', + 'DeletedServicesOperations', 'ApiManagementOperations', 'ApiManagementServiceSkusOperations', 'ApiManagementServiceOperations', diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py index 57f5d5b49878..56009b563134 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py @@ -24,7 +24,7 @@ class ApiDiagnosticOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -49,11 +49,11 @@ def list_by_service( :param api_id: API identifier. Must be unique in the current API Management service instance. :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
+ startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int @@ -382,8 +382,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: DiagnosticContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -404,6 +405,7 @@ def update( # 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()) @@ -420,12 +422,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}'} def delete( diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py index ab05e246f647..0a26c8d81be9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py @@ -25,7 +25,7 @@ class ApiExportOperations(object): :param serializer: An object model serializer. :param deserializer: An object model deserializer. :ivar export: Query parameter required to export the API details. Constant value: "true". - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._serialize = serializer self._deserialize = deserializer self.export = "true" - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py index 91257c1171a5..a7682a547043 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py @@ -24,7 +24,7 @@ class ApiIssueAttachmentOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -52,12 +52,12 @@ def list_by_service( :param issue_id: Issue identifier. Must be unique in the current API Management service instance. :type issue_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
+ startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt + | substringof, contains, startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py index 513853155a04..5c219ed7e167 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py @@ -24,7 +24,7 @@ class ApiIssueCommentOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -52,12 +52,12 @@ def list_by_service( :param issue_id: Issue identifier. Must be unique in the current API Management service instance. :type issue_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
+ startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt + | substringof, contains, startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py index 36d063df0a8e..ca591fd789dd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py @@ -24,7 +24,7 @@ class ApiIssueOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -49,13 +49,13 @@ def list_by_service( :param api_id: API identifier. Must be unique in the current API Management service instance. :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
| state | filter - | eq | |
+ startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt + | substringof, contains, startswith, endswith |
| state | filter | + eq | |
:type filter: str :param expand_comments_attachments: Expand the comment attachments. :type expand_comments_attachments: bool @@ -390,8 +390,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: IssueContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.IssueContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -412,6 +413,7 @@ def update( # 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()) @@ -428,12 +430,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IssueContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'} def delete( diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations.py index e221fb1e1faa..5abf43a47b21 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations.py @@ -25,7 +25,7 @@ class ApiManagementOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py index 7daa7858229f..c95adc4831d5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py @@ -27,7 +27,7 @@ class ApiManagementServiceOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py index bfe3b31eb23d..c17bdb6b62af 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py @@ -24,7 +24,7 @@ class ApiManagementServiceSkusOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py index 547d6e392dcb..aa39d0c3803a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py @@ -24,7 +24,7 @@ class ApiOperationOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -50,17 +50,17 @@ def list_by_api( API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| method | + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| description | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| urlTemplate | + endswith |
| description | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
+ endswith |
:type filter: str :param top: Number of records to return. :type top: int @@ -397,8 +397,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: OperationContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.OperationContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -419,6 +420,7 @@ def update( # 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()) @@ -435,12 +437,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}'} def delete( diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py index 522445c42c20..d963f314d070 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py @@ -24,7 +24,7 @@ class ApiOperationPolicyOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". :ivar policy_id: The identifier of the Policy. Constant value: "policy". """ @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.policy_id = "policy" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py index 17e65e2bf741..0604bc8bfee3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py @@ -26,7 +26,7 @@ class ApiOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -48,17 +48,17 @@ def list_by_service( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| path | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
+ startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, + lt | substringof, contains, startswith, endswith |
| path | filter + | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| isCurrent | filter | eq, ne | |
:type filter: str :param top: Number of records to return. :type top: int @@ -423,8 +423,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: ApiContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ApiContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -444,6 +445,7 @@ def update( # 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()) @@ -460,12 +462,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApiContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}'} def delete( @@ -542,22 +555,19 @@ def list_by_tags( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: | Field | Supported operators | Supported - functions | - |-------------|------------------------|-----------------------------------| - |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith| - |displayName | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith| - |apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith| - |path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith| - |description | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith| - |serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith| - |isCurrent | eq | | + :param filter: | Field | Usage | Supported + operators | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| + apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| description | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| isCurrent | filter + | eq | |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py index 195c7415eb56..4ec78259b60e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py @@ -24,7 +24,7 @@ class ApiPolicyOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". :ivar policy_id: The identifier of the Policy. Constant value: "policy". """ @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.policy_id = "policy" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py index 14b7f8245e8a..23ab4bf7a61c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py @@ -24,7 +24,7 @@ class ApiProductOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -49,11 +49,11 @@ def list_by_apis( :param api_id: API identifier. Must be unique in the current API Management service instance. :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
+ startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py index 4ad883413357..91a5a086796a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py @@ -24,7 +24,7 @@ class ApiReleaseOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -52,11 +52,11 @@ def list_by_service( :param api_id: API identifier. Must be unique in the current API Management service instance. :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
+ startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int @@ -389,8 +389,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: ApiReleaseContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -413,6 +414,7 @@ def update( # 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()) @@ -429,12 +431,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApiReleaseContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}'} def delete( diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py index c69ddf7d3e3e..bba597ed959d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py @@ -24,7 +24,7 @@ class ApiRevisionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -49,11 +49,11 @@ def list_by_service( :param api_id: API identifier. Must be unique in the current API Management service instance. :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
+ startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py index d681f90359af..cbb34c0d328d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py @@ -26,7 +26,7 @@ class ApiSchemaOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -52,11 +52,11 @@ def list_by_api( API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
+ startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py index ee1c4ece98cd..1550b0e57862 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py @@ -24,7 +24,7 @@ class ApiTagDescriptionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -52,12 +52,12 @@ def list_by_service( API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
+ startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py index 58db85d6f681..8d73bcf47409 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py @@ -24,7 +24,7 @@ class ApiVersionSetOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -47,8 +47,8 @@ def list_by_service( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
:type filter: str :param top: Number of records to return. @@ -362,8 +362,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: ApiVersionSetContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -383,6 +384,7 @@ def update( # 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()) @@ -399,12 +401,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApiVersionSetContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}'} def delete( diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py index 9ec7b59cd053..5bd970dec931 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py @@ -24,7 +24,7 @@ class AuthorizationServerOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -47,12 +47,12 @@ def list_by_service( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
+ startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int @@ -364,8 +364,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: AuthorizationServerContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -385,6 +386,7 @@ def update( # 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()) @@ -401,12 +403,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AuthorizationServerContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}'} def delete( @@ -484,8 +497,10 @@ def list_secrets( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: ClientSecretContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.ClientSecretContract or + :return: AuthorizationServerSecretsContract or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.apimanagement.models.AuthorizationServerSecretsContract or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` @@ -521,12 +536,17 @@ def list_secrets( if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ClientSecretContract', response) + deserialized = self._deserialize('AuthorizationServerSecretsContract', response) + header_dict = { + 'ETag': 'str', + } if raw: client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py index e871231af783..db09c1f1e0d1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py @@ -24,7 +24,7 @@ class BackendOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -46,14 +46,14 @@ def list_by_service( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
| url | filter | - ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -
+ startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| url | filter | ge, + le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
:type filter: str :param top: Number of records to return. :type top: int @@ -365,8 +365,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: BackendContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.BackendContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -386,6 +387,7 @@ def update( # 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()) @@ -402,12 +404,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackendContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}'} def delete( diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py index 3f0926176117..eb0b859478cc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py @@ -24,7 +24,7 @@ class CacheOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -356,8 +356,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: CacheContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.CacheContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -377,6 +378,7 @@ def update( # 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()) @@ -393,12 +395,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CacheContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}'} def delete( diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py index ab5870bb7998..1076ad9d10b9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py @@ -24,7 +24,7 @@ class CertificateOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -47,15 +47,15 @@ def list_by_service( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| subject | filter | ge, le, eq, ne, gt, - lt | substringof, contains, startswith, endswith |
| thumbprint | + startswith, endswith |
| subject | filter | ge, le, eq, ne, gt, lt + | substringof, contains, startswith, endswith |
| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| expirationDate | filter | ge, le, eq, ne, gt, lt | - |
+ endswith |
| expirationDate | filter | ge, le, eq, ne, gt, lt | + |
:type filter: str :param top: Number of records to return. :type top: int @@ -260,7 +260,7 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}'} def create_or_update( - self, resource_group_name, service_name, certificate_id, data, password, if_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, certificate_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): """Creates or updates the certificate being used for authentication with the backend. @@ -271,11 +271,9 @@ def create_or_update( :param certificate_id: Identifier of the certificate entity. Must be unique in the current API Management service instance. :type certificate_id: str - :param data: Base 64 encoded certificate using the - application/x-pkcs12 representation. - :type data: str - :param password: Password for the Certificate - :type password: str + :param parameters: Create or Update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters :param if_match: ETag of the Entity. Not required when creating an entity, but required when updating an entity. :type if_match: str @@ -290,8 +288,6 @@ def create_or_update( :raises: :class:`ErrorResponseException` """ - parameters = models.CertificateCreateOrUpdateParameters(data=data, password=password) - # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py new file mode 100644 index 000000000000..5ef5fe98056d --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py @@ -0,0 +1,389 @@ +# 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 ContentItemOperations(object): + """ContentItemOperations 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: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01-preview" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, content_type_id, custom_headers=None, raw=False, **operation_config): + """Returns list of content items. + + :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 content_type_id: Content type identifier. + :type content_type_id: 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 ContentItemContract + :rtype: + ~azure.mgmt.apimanagement.models.ContentItemContractPaged[~azure.mgmt.apimanagement.models.ContentItemContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'contentTypeId': self._serialize.url("content_type_id", content_type_id, 'str', max_length=80, 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) + + # 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.ContentItemContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems'} + + def get_entity_tag( + self, resource_group_name, service_name, content_type_id, content_item_id, custom_headers=None, raw=False, **operation_config): + """Returns content item metadata. + + :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 content_type_id: Content type identifier. + :type content_type_id: str + :param content_item_id: Content item identifier. + :type content_item_id: 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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'contentTypeId': self._serialize.url("content_type_id", content_type_id, 'str', max_length=80, min_length=1), + 'contentItemId': self._serialize.url("content_item_id", content_item_id, 'str', max_length=80, 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) + + # 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.head(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) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}'} + + def get( + self, resource_group_name, service_name, content_type_id, content_item_id, custom_headers=None, raw=False, **operation_config): + """Returns content item details. + + :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 content_type_id: Content type identifier. + :type content_type_id: str + :param content_item_id: Content item identifier. + :type content_item_id: 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: ContentItemContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract 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'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'contentTypeId': self._serialize.url("content_type_id", content_type_id, 'str', max_length=80, min_length=1), + 'contentItemId': self._serialize.url("content_item_id", content_item_id, 'str', max_length=80, 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) + + # 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) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContentItemContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}'} + + def create_or_update( + self, resource_group_name, service_name, content_type_id, content_item_id, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates new content item. + + :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 content_type_id: Content type identifier. + :type content_type_id: str + :param content_item_id: Content item identifier. + :type content_item_id: str + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: 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: ContentItemContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'contentTypeId': self._serialize.url("content_type_id", content_type_id, 'str', max_length=80, min_length=1), + 'contentItemId': self._serialize.url("content_item_id", content_item_id, 'str', max_length=80, 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) + + # 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 if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + 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.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContentItemContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('ContentItemContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}'} + + def delete( + self, resource_group_name, service_name, content_type_id, content_item_id, if_match, custom_headers=None, raw=False, **operation_config): + """Removes specified content item. + + :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 content_type_id: Content type identifier. + :type content_type_id: str + :param content_item_id: Content item identifier. + :type content_item_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: 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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'contentTypeId': self._serialize.url("content_type_id", content_type_id, 'str', max_length=80, min_length=1), + 'contentItemId': self._serialize.url("content_item_id", content_item_id, 'str', max_length=80, 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) + + # 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) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + 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, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py new file mode 100644 index 000000000000..cd83644eed25 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py @@ -0,0 +1,316 @@ +# 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 ContentTypeOperations(object): + """ContentTypeOperations 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: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01-preview" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Returns list of content types. + + :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 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 ContentTypeContract + :rtype: + ~azure.mgmt.apimanagement.models.ContentTypeContractPaged[~azure.mgmt.apimanagement.models.ContentTypeContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + '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.ContentTypeContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes'} + + def get( + self, resource_group_name, service_name, content_type_id, custom_headers=None, raw=False, **operation_config): + """Gets API Management content type details. + + :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 content_type_id: Content type identifier. + :type content_type_id: 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: ContentTypeContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract 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'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'contentTypeId': self._serialize.url("content_type_id", content_type_id, 'str', max_length=80, 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) + + # 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) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContentTypeContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}'} + + def create_or_update( + self, resource_group_name, service_name, content_type_id, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Content Type. + + :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 content_type_id: Content type identifier. + :type content_type_id: str + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: 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: ContentTypeContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'contentTypeId': self._serialize.url("content_type_id", content_type_id, 'str', max_length=80, 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) + + # 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 if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + 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.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContentTypeContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('ContentTypeContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}'} + + def delete( + self, resource_group_name, service_name, content_type_id, if_match, custom_headers=None, raw=False, **operation_config): + """Removes specified content type. + + :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 content_type_id: Content type identifier. + :type content_type_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: 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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'contentTypeId': self._serialize.url("content_type_id", content_type_id, 'str', max_length=80, 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) + + # 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) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + 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, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py index 41ae87b61261..066f06df59e7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py @@ -24,7 +24,7 @@ class DelegationSettingsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py new file mode 100644 index 000000000000..edab9851c8a7 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py @@ -0,0 +1,225 @@ +# 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 DeletedServicesOperations(object): + """DeletedServicesOperations 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: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01-preview" + + self.config = config + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all soft-deleted services available for undelete for the given + subscription. + + :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 DeletedServiceContract + :rtype: + ~azure.mgmt.apimanagement.models.DeletedServiceContractPaged[~azure.mgmt.apimanagement.models.DeletedServiceContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + '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.DeletedServiceContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/deletedservices'} + + def get_by_name( + self, service_name, location, custom_headers=None, raw=False, **operation_config): + """Get soft-deleted Api Management Service by name. + + :param service_name: The name of the API Management service. + :type service_name: str + :param location: The location of the deleted API Management service. + :type location: 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: DeletedServiceContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.DeletedServiceContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_name.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, '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('DeletedServiceContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}'} + + def purge( + self, service_name, location, custom_headers=None, raw=False, **operation_config): + """Purges Api Management Service (deletes it with no option to undelete). + + :param service_name: The name of the API Management service. + :type service_name: str + :param location: The location of the deleted API Management service. + :type location: 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: DeletedServiceContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.DeletedServiceContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.purge.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, '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.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) + + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('DeletedServiceContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + purge.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py index e9d29894949a..4745bf0c33fd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py @@ -24,7 +24,7 @@ class DiagnosticOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -46,11 +46,11 @@ def list_by_service( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
+ startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int @@ -361,8 +361,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: DiagnosticContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -382,6 +383,7 @@ def update( # 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()) @@ -398,12 +400,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}'} def delete( diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py index aee6bc1b4943..3de4ad9bfe70 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py @@ -24,7 +24,7 @@ class EmailTemplateOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,23 +34,23 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config def list_by_service( self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of properties defined within a service instance. + """Gets all email templates. :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 filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
+ startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int @@ -366,8 +366,8 @@ def create_or_update( create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}'} def update( - self, resource_group_name, service_name, template_name, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Updates the specific Email Template. + self, resource_group_name, service_name, template_name, if_match, parameters, custom_headers=None, raw=False, **operation_config): + """Updates API Management email template. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -387,20 +387,21 @@ def update( 'requestDeveloperNotificationMessage' :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :param parameters: Update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters :param if_match: ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. :type if_match: str + :param parameters: Update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters :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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: EmailTemplateContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -420,6 +421,7 @@ def update( # 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()) @@ -436,12 +438,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EmailTemplateContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}'} def delete( diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py index a26b4fe76387..c6fe11f309a8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py @@ -24,7 +24,7 @@ class GatewayApiOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,12 +34,12 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config def list_by_service( - self, resource_group_name, service_name, gateway_id, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, gateway_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): """Lists a collection of the APIs associated with a gateway. :param resource_group_name: The name of the resource group. @@ -49,6 +49,12 @@ def list_by_service( :param gateway_id: Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed' :type gateway_id: str + :param filter: | Field | Usage | Supported + operators | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
+ :type filter: str :param top: Number of records to return. :type top: int :param skip: Number of records to skip. @@ -78,6 +84,8 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) if skip is not None: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py index 8f7ac6aecb3f..b34f76ca2247 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py @@ -24,7 +24,7 @@ class GatewayHostnameConfigurationOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,12 +34,12 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config def list_by_service( - self, resource_group_name, service_name, gateway_id, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, gateway_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): """Lists the collection of hostname configurations for the specified gateway. @@ -50,6 +50,13 @@ def list_by_service( :param gateway_id: Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed' :type gateway_id: str + :param filter: | Field | Usage | Supported + operators | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| hostname | filter | ge, le, eq, ne, gt, + lt | substringof, contains, startswith, endswith |
+ :type filter: str :param top: Number of records to return. :type top: int :param skip: Number of records to skip. @@ -80,6 +87,8 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) if skip is not None: @@ -189,8 +198,7 @@ def get_entity_tag( def get( self, resource_group_name, service_name, gateway_id, hc_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the Gateway hostname configuration specified by its - identifier. + """Get details of a hostname configuration. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -264,7 +272,7 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}'} def create_or_update( - self, resource_group_name, service_name, gateway_id, hc_id, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, gateway_id, hc_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): """Creates of updates hostname configuration for a Gateway. :param resource_group_name: The name of the resource group. @@ -280,6 +288,9 @@ def create_or_update( :param parameters: :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -316,6 +327,8 @@ def create_or_update( header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') @@ -351,7 +364,7 @@ def create_or_update( create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}'} def delete( - self, resource_group_name, service_name, gateway_id, hc_id, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, gateway_id, hc_id, if_match, custom_headers=None, raw=False, **operation_config): """Deletes the specified hostname configuration from the specified Gateway. @@ -365,6 +378,10 @@ def delete( :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. :type hc_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -396,6 +413,7 @@ def delete( header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py index 40f29ec66b83..4505604aad5a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py @@ -24,7 +24,7 @@ class GatewayOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,18 +34,27 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config def list_by_service( - self, resource_group_name, service_name, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): """Lists a collection of gateways registered with service instance. :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 filter: | Field | Usage | Supported + operators | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| region | filter | ge, le, eq, ne, gt, lt + | substringof, contains, startswith, endswith |
| description | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
+ :type filter: str :param top: Number of records to return. :type top: int :param skip: Number of records to skip. @@ -74,6 +83,8 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) if skip is not None: @@ -361,8 +372,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: GatewayContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -384,6 +396,7 @@ def update( # 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()) @@ -400,12 +413,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GatewayContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}'} def delete( diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py index e8c8e9496ed4..41d89ad32acb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py @@ -24,7 +24,7 @@ class GroupOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -46,14 +46,14 @@ def list_by_service( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| aadObjectId | filter | eq | |
+ startswith, endswith |
| externalId | filter | eq | |
:type filter: str :param top: Number of records to return. :type top: int @@ -366,8 +366,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: GroupContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.GroupContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -387,6 +388,7 @@ def update( # 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()) @@ -403,12 +405,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GroupContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}'} def delete( diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py index abfb01cb5772..879053f7ad78 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py @@ -24,7 +24,7 @@ class GroupUserOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -49,18 +49,17 @@ def list( :param group_id: Group identifier. Must be unique in the current API Management service instance. :type group_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, - lt | substringof, contains, startswith, endswith |
| lastName | + startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, + lt | substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| email | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| registrationDate - | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, - le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -
+ endswith |
| email | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| registrationDate | + filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, le, + eq, ne, gt, lt | substringof, contains, startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py index 458ed98212a1..03be4a6a55a7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py @@ -24,7 +24,7 @@ class IdentityProviderOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -357,8 +357,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: IdentityProviderContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -378,6 +379,7 @@ def update( # 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()) @@ -394,12 +396,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IdentityProviderContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}'} def delete( @@ -520,12 +533,17 @@ def list_secrets( if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} deserialized = None if response.status_code == 200: deserialized = self._deserialize('ClientSecretContract', response) + header_dict = { + 'ETag': 'str', + } if raw: client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py index 505fff747273..2a6ecd07a493 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py @@ -24,7 +24,7 @@ class IssueOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -46,17 +46,17 @@ def list_by_service( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| apiId | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
| title | filter - | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| authorName | filter | ge, le, - eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - state | filter | eq | |
+ startswith, endswith |
| apiId | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| title | filter | + ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
| authorName | filter | ge, le, + eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + state | filter | eq | |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py index 92dea27d29d3..adbbd500f0c2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py @@ -24,7 +24,7 @@ class LoggerOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -46,14 +46,14 @@ def list_by_service( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| description | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| - loggerType | filter | eq | |
| resourceId | filter | ge, le, - eq, ne, gt, lt | substringof, contains, startswith, endswith |
+ startswith, endswith |
| description | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| + loggerType | filter | eq | |
| resourceId | filter | ge, le, + eq, ne, gt, lt | substringof, contains, startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int @@ -365,8 +365,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: LoggerContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -386,6 +387,7 @@ def update( # 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()) @@ -402,16 +404,27 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('LoggerContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}'} def delete( - self, resource_group_name, service_name, logger_id, if_match, force=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, logger_id, if_match, custom_headers=None, raw=False, **operation_config): """Deletes the specified logger. :param resource_group_name: The name of the resource group. @@ -425,8 +438,6 @@ def delete( entity state from the header response of the GET request or it should be * for unconditional update. :type if_match: str - :param force: Force deletion even if diagnostic is attached. - :type force: bool :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -449,8 +460,6 @@ def delete( # Construct parameters query_parameters = {} - if force is not None: - query_parameters['force'] = self._serialize.query("force", force, 'bool') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py index 7cc52f6fb5aa..43022239eaee 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py @@ -26,7 +26,7 @@ class NamedValueOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -36,24 +36,24 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config def list_by_service( self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of NamedValues defined within a service instance. + """Lists a collection of named values defined within a service instance. :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 filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith, any, all |
| displayName | filter | ge, le, - eq, ne, gt, lt | substringof, contains, startswith, endswith |
+ startswith, endswith, any, all |
| displayName | filter | ge, le, + eq, ne, gt, lt | substringof, contains, startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int @@ -130,8 +130,8 @@ def internal_paging(next_link=None): def get_entity_tag( self, resource_group_name, service_name, named_value_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the NamedValue specified by its - identifier. + """Gets the entity state (Etag) version of the named value specified by + its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -189,7 +189,7 @@ def get_entity_tag( def get( self, resource_group_name, service_name, named_value_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the NamedValue specified by its identifier. + """Gets the details of the named value specified by its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -318,7 +318,7 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, service_name, named_value_id, parameters, if_match=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a NamedValue. + """Creates or updates named value. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -415,7 +415,7 @@ def _update_initial( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 202]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -436,7 +436,7 @@ def _update_initial( def update( self, resource_group_name, service_name, named_value_id, parameters, if_match, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates the specific NamedValue. + """Updates the specific named value. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -500,7 +500,7 @@ def get_long_running_output(response): def delete( self, resource_group_name, service_name, named_value_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes specific NamedValue from the API Management service instance. + """Deletes specific named value from the API Management service instance. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -560,7 +560,7 @@ def delete( def list_value( self, resource_group_name, service_name, named_value_id, custom_headers=None, raw=False, **operation_config): - """Gets the secret value of the NamedValue. + """Gets the secret of the named value specified by its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -573,8 +573,8 @@ def list_value( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: PropertyValueContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PropertyValueContract or + :return: NamedValueSecretContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.NamedValueSecretContract or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` @@ -610,12 +610,17 @@ def list_value( if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PropertyValueContract', response) + deserialized = self._deserialize('NamedValueSecretContract', response) + header_dict = { + 'ETag': 'str', + } if raw: client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py index 1d1470f7a5ce..c95886a724f0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py @@ -24,7 +24,7 @@ class NetworkStatusOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py index 7642c25b90f7..deaed93e43e8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py @@ -24,7 +24,7 @@ class NotificationOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py index 0010945f33a9..979234742c92 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py @@ -24,7 +24,7 @@ class NotificationRecipientEmailOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py index 584a10409e5f..6d118ba108ac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py @@ -24,7 +24,7 @@ class NotificationRecipientUserOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py index 8f2b7565010d..930229b39217 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py @@ -24,7 +24,7 @@ class OpenIdConnectProviderOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -46,12 +46,12 @@ def list_by_service( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
+ startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int @@ -187,7 +187,7 @@ def get_entity_tag( def get( self, resource_group_name, service_name, opid, custom_headers=None, raw=False, **operation_config): - """Gets specific OpenID Connect Provider. + """Gets specific OpenID Connect Provider without secrets. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -362,8 +362,10 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: OpenidConnectProviderContract or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -383,6 +385,7 @@ def update( # 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()) @@ -399,12 +402,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OpenidConnectProviderContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}'} def delete( @@ -520,12 +534,17 @@ def list_secrets( if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} deserialized = None if response.status_code == 200: deserialized = self._deserialize('ClientSecretContract', response) + header_dict = { + 'ETag': 'str', + } if raw: client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py index 20c50ea27494..e63707dcd265 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py @@ -25,7 +25,7 @@ class OperationOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -51,18 +51,18 @@ def list_by_tags( API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| apiName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| description | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| method | filter | - ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
+ startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| apiName | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| description | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| method | filter | + ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py index 9dd71e8a269c..0daf0305d917 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py @@ -24,7 +24,7 @@ class PolicyDescriptionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py index 3a64140c6a9f..b3a4e6b2ae0b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py @@ -24,7 +24,7 @@ class PolicyOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". :ivar policy_id: The identifier of the Policy. Constant value: "policy". """ @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.policy_id = "policy" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py index 2e8b6c46c519..126ff1473d28 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py @@ -24,7 +24,7 @@ class ProductApiOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -49,17 +49,17 @@ def list_by_product( :param product_id: Product identifier. Must be unique in the current API Management service instance. :type product_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| path | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
+ startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, + lt | substringof, contains, startswith, endswith |
| path | filter + | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py index da974b742fac..811d1109cac5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py @@ -24,7 +24,7 @@ class ProductGroupOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -50,12 +50,12 @@ def list_by_product( :param product_id: Product identifier. Must be unique in the current API Management service instance. :type product_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | |
| displayName | - filter | eq, ne | |
| description | filter | eq, ne | | -
+ name | filter | ge, le, eq, ne, gt, lt | |
| displayName | + filter | eq, ne | |
| description | filter | eq, ne | + |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py index 4f46d390296f..bee1c897e145 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py @@ -24,7 +24,7 @@ class ProductOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -46,16 +46,16 @@ def list_by_service( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
| state | filter - | eq | |
| groups | expand | | |
+ startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| state | filter | + eq | |
| groups | expand | | |
:type filter: str :param top: Number of records to return. :type top: int @@ -376,8 +376,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: ProductContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ProductContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -397,6 +398,7 @@ def update( # 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()) @@ -413,12 +415,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProductContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}'} def delete( @@ -495,16 +508,16 @@ def list_by_tags( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
| state | filter - | eq | substringof, contains, startswith, endswith |
+ startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| state | filter | + eq | substringof, contains, startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py index c1092714069e..3fc674b452dd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py @@ -24,7 +24,7 @@ class ProductPolicyOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". :ivar policy_id: The identifier of the Policy. Constant value: "policy". """ @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.policy_id = "policy" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py index 9a6079a07e70..773be125bd7c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py @@ -24,7 +24,7 @@ class ProductSubscriptionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -49,21 +49,21 @@ def list( :param product_id: Product identifier. Must be unique in the current API Management service instance. :type product_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| ownerId | filter | ge, le, eq, - ne, gt, lt | substringof, contains, startswith, endswith |
| - scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
| productId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| state | filter | eq | |
| user | expand | - | |
+ contains, startswith, endswith |
| ownerId | filter | ge, le, eq, + ne, gt, lt | substringof, contains, startswith, endswith |
| scope + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| userId | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| productId | filter + | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| state | filter | eq | |
| user | expand | | + |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py index 0d4220b0cfd6..afd9321629de 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py @@ -24,7 +24,7 @@ class QuotaByCounterKeysOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -134,12 +134,13 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: QuotaCounterCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ - parameters = models.QuotaCounterValueContractProperties(calls_count=calls_count, kb_transferred=kb_transferred) + parameters = models.QuotaCounterValueUpdateContract(calls_count=calls_count, kb_transferred=kb_transferred) # Construct URL url = self.update.metadata['url'] @@ -157,6 +158,7 @@ def update( # 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()) @@ -166,16 +168,22 @@ def update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'QuotaCounterValueContractProperties') + body_content = self._serialize.body(parameters, 'QuotaCounterValueUpdateContract') # Construct and send request request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('QuotaCounterCollection', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py index db29c87e0c04..756f409f628c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py @@ -24,7 +24,7 @@ class QuotaByPeriodKeysOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -137,12 +137,13 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: QuotaCounterContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ - parameters = models.QuotaCounterValueContractProperties(calls_count=calls_count, kb_transferred=kb_transferred) + parameters = models.QuotaCounterValueUpdateContract(calls_count=calls_count, kb_transferred=kb_transferred) # Construct URL url = self.update.metadata['url'] @@ -161,6 +162,7 @@ def update( # 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()) @@ -170,16 +172,22 @@ def update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'QuotaCounterValueContractProperties') + body_content = self._serialize.body(parameters, 'QuotaCounterValueUpdateContract') # Construct and send request request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('QuotaCounterContract', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py index e2c5b8b6b2ef..11b7a38ca519 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py @@ -24,7 +24,7 @@ class RegionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py index ce71756ffbd8..ab14acec6614 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py @@ -25,7 +25,7 @@ class ReportsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py index 515301379741..97487efe01d0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py @@ -24,7 +24,7 @@ class SignInSettingsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py index 01e8bd6c0d9d..6fa68484ed07 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py @@ -24,7 +24,7 @@ class SignUpSettingsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py index c6dbaa892536..4a7d0697d9a8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py @@ -24,7 +24,7 @@ class SubscriptionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -46,21 +46,21 @@ def list( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| ownerId | filter | ge, le, eq, - ne, gt, lt | substringof, contains, startswith, endswith |
| - scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
| productId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| state | filter | eq | |
| user | expand | - | |
+ contains, startswith, endswith |
| ownerId | filter | ge, le, eq, + ne, gt, lt | substringof, contains, startswith, endswith |
| scope + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| userId | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| productId | filter + | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| state | filter | eq | |
| user | expand | | + |
:type filter: str :param top: Number of records to return. :type top: int @@ -265,7 +265,7 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}'} def create_or_update( - self, resource_group_name, service_name, sid, parameters, notify=None, if_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, sid, parameters, notify=None, if_match=None, app_type="portal", custom_headers=None, raw=False, **operation_config): """Creates or updates the subscription of specified user to the specified product. @@ -287,6 +287,10 @@ def create_or_update( :param if_match: ETag of the Entity. Not required when creating an entity, but required when updating an entity. :type if_match: str + :param app_type: Determines the type of application which send the + create user request. Default is legacy publisher portal. Possible + values include: 'portal', 'developerPortal' + :type app_type: str or ~azure.mgmt.apimanagement.models.AppType :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -313,6 +317,8 @@ def create_or_update( if notify is not None: query_parameters['notify'] = self._serialize.query("notify", notify, 'bool') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if app_type is not None: + query_parameters['appType'] = self._serialize.query("app_type", app_type, 'str') # Construct headers header_parameters = {} @@ -359,7 +365,7 @@ def create_or_update( create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}'} def update( - self, resource_group_name, service_name, sid, parameters, if_match, notify=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, sid, parameters, if_match, notify=None, app_type="portal", custom_headers=None, raw=False, **operation_config): """Updates the details of a subscription specified by its identifier. :param resource_group_name: The name of the resource group. @@ -381,13 +387,18 @@ def update( subscription - If true, send email notification of change of state of subscription :type notify: bool + :param app_type: Determines the type of application which send the + create user request. Default is legacy publisher portal. Possible + values include: 'portal', 'developerPortal' + :type app_type: str or ~azure.mgmt.apimanagement.models.AppType :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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: SubscriptionContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -406,9 +417,12 @@ def update( if notify is not None: query_parameters['notify'] = self._serialize.query("notify", notify, 'bool') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if app_type is not None: + query_parameters['appType'] = self._serialize.query("app_type", app_type, '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()) @@ -425,12 +439,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SubscriptionContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}'} def delete( @@ -610,7 +635,7 @@ def regenerate_secondary_key( def list_secrets( self, resource_group_name, service_name, sid, custom_headers=None, raw=False, **operation_config): - """Gets the subscription keys. + """Gets the specified Subscription keys. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -661,12 +686,17 @@ def list_secrets( if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} deserialized = None if response.status_code == 200: deserialized = self._deserialize('SubscriptionKeysContract', response) + header_dict = { + 'ETag': 'str', + } if raw: client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py index fcae3c76c755..d3973783cf6b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py @@ -24,7 +24,7 @@ class TagOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -53,12 +53,12 @@ def list_by_operation( :param operation_id: Operation identifier within an API. Must be unique in the current API Management service instance. :type operation_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
+ startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int @@ -433,12 +433,12 @@ def list_by_api( API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
+ startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int @@ -803,12 +803,12 @@ def list_by_product( :param product_id: Product identifier. Must be unique in the current API Management service instance. :type product_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
+ startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int @@ -1158,12 +1158,12 @@ def list_by_service( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
+ startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int @@ -1479,8 +1479,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: TagContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.TagContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -1502,6 +1503,7 @@ def update( # 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()) @@ -1518,12 +1520,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TagContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} def delete( diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py index 968cfec99052..843a6cd81c07 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py @@ -24,7 +24,7 @@ class TagResourceOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -46,27 +46,26 @@ def list_by_service( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| displayName | + startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| apiRevision | + endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| path | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| description | + endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
| description | filter | ge, le, + eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt + | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| method | filter | - ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| terms | filter | ge, le, eq, - ne, gt, lt | substringof, contains, startswith, endswith |
| - state | filter | eq | |
| isCurrent | filter | eq | | -
+ endswith |
| terms | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| state | filter | + eq | |
| isCurrent | filter | eq | |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py index 56879020577a..eb24526c380d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py @@ -24,7 +24,7 @@ class TenantAccessGitOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". :ivar access_name: The identifier of the Access configuration. Constant value: "access". """ @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.access_name = "access" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py index ac6665edb7de..45ad5f714c86 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py @@ -24,7 +24,7 @@ class TenantAccessOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". :ivar access_name: The identifier of the Access configuration. Constant value: "access". """ @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.access_name = "access" self.config = config @@ -181,8 +181,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: AccessInformationContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -204,6 +205,7 @@ def update( # 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()) @@ -220,12 +222,23 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AccessInformationContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}'} def regenerate_primary_key( diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py index e08d0f7c5e8f..b7c300711cc1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py @@ -27,7 +27,7 @@ class TenantConfigurationOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". :ivar configuration_name: The identifier of the Git Configuration Operation. Constant value: "configuration". """ @@ -38,7 +38,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.configuration_name = "configuration" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py index 193c9b412fe3..0febb692cf99 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py @@ -24,7 +24,7 @@ class UserConfirmationPasswordOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,12 +34,12 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config def send( - self, resource_group_name, service_name, user_id, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, user_id, app_type="portal", custom_headers=None, raw=False, **operation_config): """Sends confirmation. :param resource_group_name: The name of the resource group. @@ -49,6 +49,10 @@ def send( :param user_id: User identifier. Must be unique in the current API Management service instance. :type user_id: str + :param app_type: Determines the type of application which send the + create user request. Default is legacy publisher portal. Possible + values include: 'portal', 'developerPortal' + :type app_type: str or ~azure.mgmt.apimanagement.models.AppType :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -72,6 +76,8 @@ def send( # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if app_type is not None: + query_parameters['appType'] = self._serialize.query("app_type", app_type, 'str') # Construct headers header_parameters = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py index 947c714ca66f..73ec36101358 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py @@ -24,7 +24,7 @@ class UserGroupOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -49,14 +49,14 @@ def list( :param user_id: User identifier. Must be unique in the current API Management service instance. :type user_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| + :param filter: | Field | Usage | Supported + operators | Supported functions + |
|-------------|------------------------|-----------------------------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
+ startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py index ac5de590d1b6..83273821e05d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py @@ -24,7 +24,7 @@ class UserIdentitiesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py index 2fd37c3c6203..9076b903fb34 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py @@ -24,7 +24,7 @@ class UserOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -47,19 +47,19 @@ def list_by_service( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions + :param filter: | Field | Usage | Supported + operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, - lt | substringof, contains, startswith, endswith |
| lastName | + startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, + lt | substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| email | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| state | filter | - eq | |
| registrationDate | filter | ge, le, eq, ne, gt, lt | - |
| note | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| groups | expand | | | -
+ endswith |
| email | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| state | filter | + eq | |
| registrationDate | filter | ge, le, eq, ne, gt, lt | + |
| note | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
| groups | expand | | + |
:type filter: str :param top: Number of records to return. :type top: int @@ -268,7 +268,7 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}'} def create_or_update( - self, resource_group_name, service_name, user_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, user_id, parameters, notify=None, if_match=None, custom_headers=None, raw=False, **operation_config): """Creates or Updates a user. :param resource_group_name: The name of the resource group. @@ -281,6 +281,8 @@ def create_or_update( :param parameters: Create or update parameters. :type parameters: ~azure.mgmt.apimanagement.models.UserCreateParameters + :param notify: Send an Email notification to the User. + :type notify: bool :param if_match: ETag of the Entity. Not required when creating an entity, but required when updating an entity. :type if_match: str @@ -307,6 +309,8 @@ def create_or_update( # Construct parameters query_parameters = {} + if notify is not None: + query_parameters['notify'] = self._serialize.query("notify", notify, 'bool') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -376,8 +380,9 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: UserContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.UserContract or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -397,6 +402,7 @@ def update( # 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()) @@ -413,16 +419,27 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('UserContract', response) + header_dict = { + 'ETag': 'str', + } + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response + + return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}'} def delete( - self, resource_group_name, service_name, user_id, if_match, delete_subscriptions=None, notify=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, user_id, if_match, delete_subscriptions=None, notify=None, app_type="portal", custom_headers=None, raw=False, **operation_config): """Deletes specific user. :param resource_group_name: The name of the resource group. @@ -441,6 +458,10 @@ def delete( :type delete_subscriptions: bool :param notify: Send an Account Closed Email notification to the User. :type notify: bool + :param app_type: Determines the type of application which send the + create user request. Default is legacy publisher portal. Possible + values include: 'portal', 'developerPortal' + :type app_type: str or ~azure.mgmt.apimanagement.models.AppType :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -468,6 +489,8 @@ def delete( if notify is not None: query_parameters['notify'] = self._serialize.query("notify", notify, 'bool') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if app_type is not None: + query_parameters['appType'] = self._serialize.query("app_type", app_type, 'str') # Construct headers header_parameters = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py index cbf13b40c7e8..e7abf6d38f42 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py @@ -24,7 +24,7 @@ class UserSubscriptionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-01" + self.api_version = "2020-06-01-preview" self.config = config @@ -49,20 +49,19 @@ def list( :param user_id: User identifier. Must be unique in the current API Management service instance. :type user_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| - stateComment | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| ownerId | filter | ge, le, eq, - ne, gt, lt | substringof, contains, startswith, endswith |
| - scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
| productId | + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|------------------------|-----------------------------------|
|name + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
|displayName | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
+ endswith |
|ownerId | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
|scope | filter | + ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
|userId | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
|productId | filter | ge, le, eq, + ne, gt, lt | substringof, contains, startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/setup.py b/sdk/apimanagement/azure-mgmt-apimanagement/setup.py index 071df946dd93..a6a7586a2742 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/setup.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)