From a01350861b436efff87e1c08a256463110a726e8 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Tue, 1 Sep 2020 23:50:35 +0000 Subject: [PATCH] Generated from efbb3474b05581a50358234b638a3e4a9b5e5367 add azuremonitor to update contract --- .../apimanagement/_api_management_client.py | 12 +- .../mgmt/apimanagement/models/__init__.py | 24 +- .../models/_api_management_client_enums.py | 8 + .../mgmt/apimanagement/models/_models.py | 212 ++++++++-- .../mgmt/apimanagement/models/_models_py3.py | 224 ++++++++-- .../apimanagement/models/_paged_models.py | 26 ++ .../mgmt/apimanagement/operations/__init__.py | 4 + .../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 | 22 +- .../_content_type_content_item_operations.py | 389 ++++++++++++++++++ .../operations/_content_type_operations.py | 316 ++++++++++++++ .../_delegation_settings_operations.py | 4 +- .../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 +- 74 files changed, 2041 insertions(+), 576 deletions(-) create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_content_item_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_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..832e1dc7237b 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,8 @@ from .operations import BackendOperations from .operations import CacheOperations from .operations import CertificateOperations +from .operations import ContentTypeOperations +from .operations import ContentTypeContentItemOperations from .operations import ApiManagementOperations from .operations import ApiManagementServiceSkusOperations from .operations import ApiManagementServiceOperations @@ -126,6 +128,10 @@ 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_type_content_item: ContentTypeContentItem operations + :vartype content_type_content_item: azure.mgmt.apimanagement.operations.ContentTypeContentItemOperations :ivar api_management_operations: ApiManagementOperations operations :vartype api_management_operations: azure.mgmt.apimanagement.operations.ApiManagementOperations :ivar api_management_service_skus: ApiManagementServiceSkus operations @@ -232,7 +238,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 +282,10 @@ 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_type_content_item = ContentTypeContentItemOperations( + 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..9a6dc6a59dd1 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,8 @@ 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 DeployConfigurationParameters from ._models_py3 import DiagnosticContract from ._models_py3 import EmailTemplateContract @@ -100,6 +103,7 @@ 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 +134,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 +220,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 +241,8 @@ from ._models import CertificateInformation from ._models import ClientSecretContract from ._models import ConnectivityStatusContract + from ._models import ContentItemContract + from ._models import ContentTypeContract from ._models import DeployConfigurationParameters from ._models import DiagnosticContract from ._models import EmailTemplateContract @@ -271,6 +278,7 @@ 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 +309,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 +368,8 @@ 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 DiagnosticContractPaged from ._paged_models import EmailTemplateContractPaged from ._paged_models import GatewayContractPaged @@ -400,6 +410,7 @@ AlwaysLog, HttpCorrelationProtocol, Verbosity, + OperationNameFormat, PolicyContentFormat, VersioningScheme, GrantType, @@ -467,6 +478,7 @@ 'AuthenticationSettingsContract', 'AuthorizationServerContract', 'AuthorizationServerContractBaseProperties', + 'AuthorizationServerSecretsContract', 'AuthorizationServerUpdateContract', 'BackendAuthorizationHeaderCredentials', 'BackendBaseParameters', @@ -487,6 +499,8 @@ 'CertificateInformation', 'ClientSecretContract', 'ConnectivityStatusContract', + 'ContentItemContract', + 'ContentTypeContract', 'DeployConfigurationParameters', 'DiagnosticContract', 'EmailTemplateContract', @@ -522,6 +536,7 @@ 'NamedValueContract', 'NamedValueCreateContract', 'NamedValueEntityBaseParameters', + 'NamedValueSecretContract', 'NamedValueUpdateParameters', 'NetworkStatusContract', 'NetworkStatusContractByLocation', @@ -552,11 +567,11 @@ 'ProductEntityBaseParameters', 'ProductTagResourceContractProperties', 'ProductUpdateParameters', - 'PropertyValueContract', 'QuotaCounterCollection', 'QuotaCounterContract', 'QuotaCounterValueContract', 'QuotaCounterValueContractProperties', + 'QuotaCounterValueUpdateContract', 'RecipientEmailCollection', 'RecipientEmailContract', 'RecipientsContractProperties', @@ -620,6 +635,8 @@ 'BackendContractPaged', 'CacheContractPaged', 'CertificateContractPaged', + 'ContentTypeContractPaged', + 'ContentItemContractPaged', 'OperationPaged', 'ResourceSkuResultPaged', 'ApiManagementServiceResourcePaged', @@ -650,6 +667,7 @@ '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..f3452d596a24 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 @@ -97,6 +97,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. @@ -210,6 +216,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 +255,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..294fde440ff3 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,6 +74,9 @@ 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. @@ -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) @@ -1230,6 +1235,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 = { @@ -1287,6 +1295,7 @@ class ApiManagementServiceResource(ApimResource): 'identity': {'key': 'identity', 'type': 'ApiManagementServiceIdentity'}, 'location': {'key': 'location', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, } def __init__(self, **kwargs): @@ -1318,6 +1327,7 @@ def __init__(self, **kwargs): self.identity = kwargs.get('identity', None) self.location = kwargs.get('location', None) self.etag = None + self.zones = kwargs.get('zones', None) class ApiManagementServiceSkuProperties(Model): @@ -2383,6 +2393,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. @@ -3098,13 +3136,12 @@ class CertificateCreateOrUpdateParameters(Model): :param data: Required. 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 """ _validation = { 'data': {'required': True}, - 'password': {'required': True}, } _attribute_map = { @@ -3230,6 +3267,91 @@ def __init__(self, **kwargs): self.last_status_change = kwargs.get('last_status_change', 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 DeployConfigurationParameters(Model): """Deploy Tenant Configuration Contract. @@ -3296,6 +3418,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 +3444,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 +3457,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 +3739,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 +3760,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 +3770,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): @@ -4569,12 +4710,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 +4732,6 @@ class LoggerContract(Resource): 'type': {'readonly': True}, 'logger_type': {'required': True}, 'description': {'max_length': 256}, - 'credentials': {'required': True}, } _attribute_map = { @@ -4618,7 +4758,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 @@ -4784,6 +4924,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. @@ -6014,22 +6170,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 +6282,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. @@ -6976,7 +7136,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 +7343,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 +7780,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..6aa6376f2fd4 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,6 +74,9 @@ 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. @@ -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 @@ -1230,6 +1235,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 = { @@ -1287,9 +1295,10 @@ class ApiManagementServiceResource(ApimResource): '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, identity=None, zones=None, **kwargs) -> None: super(ApiManagementServiceResource, self).__init__(tags=tags, **kwargs) self.notification_sender_email = notification_sender_email self.provisioning_state = None @@ -1318,6 +1327,7 @@ def __init__(self, *, publisher_email: str, publisher_name: str, sku, location: self.identity = identity self.location = location self.etag = None + self.zones = zones class ApiManagementServiceSkuProperties(Model): @@ -2383,6 +2393,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. @@ -3098,13 +3136,12 @@ class CertificateCreateOrUpdateParameters(Model): :param data: Required. 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 """ _validation = { 'data': {'required': True}, - 'password': {'required': True}, } _attribute_map = { @@ -3112,7 +3149,7 @@ class CertificateCreateOrUpdateParameters(Model): 'password': {'key': 'properties.password', 'type': 'str'}, } - def __init__(self, *, data: str, password: str, **kwargs) -> None: + def __init__(self, *, data: str, password: str=None, **kwargs) -> None: super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) self.data = data self.password = password @@ -3230,6 +3267,91 @@ def __init__(self, *, name: str, status, last_updated, last_status_change, error self.last_status_change = last_status_change +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 DeployConfigurationParameters(Model): """Deploy Tenant Configuration Contract. @@ -3296,6 +3418,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 +3444,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 +3457,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 +3739,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 +3760,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): @@ -4569,12 +4710,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 +4732,6 @@ class LoggerContract(Resource): 'type': {'readonly': True}, 'logger_type': {'required': True}, 'description': {'max_length': 256}, - 'credentials': {'required': True}, } _attribute_map = { @@ -4605,7 +4745,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 +4758,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 @@ -4784,6 +4924,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. @@ -6014,22 +6170,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 +6282,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. @@ -6976,7 +7136,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 +7343,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 +7780,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..9ec1456390f9 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,32 @@ 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 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..62feaf09aadd 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,8 @@ from ._backend_operations import BackendOperations from ._cache_operations import CacheOperations from ._certificate_operations import CertificateOperations +from ._content_type_operations import ContentTypeOperations +from ._content_type_content_item_operations import ContentTypeContentItemOperations from ._api_management_operations import ApiManagementOperations from ._api_management_service_skus_operations import ApiManagementServiceSkusOperations from ._api_management_service_operations import ApiManagementServiceOperations @@ -95,6 +97,8 @@ 'BackendOperations', 'CacheOperations', 'CertificateOperations', + 'ContentTypeOperations', + 'ContentTypeContentItemOperations', '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..5692edfbe9e8 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, data, if_match=None, password=None, custom_headers=None, raw=False, **operation_config): """Creates or updates the certificate being used for authentication with the backend. @@ -274,11 +274,11 @@ def create_or_update( :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 if_match: ETag of the Entity. Not required when creating an entity, but required when updating an entity. :type if_match: str + :param password: Password for the Certificate + :type password: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_content_item_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_content_item_operations.py new file mode 100644 index 000000000000..3d67ab0717d4 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_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 ContentTypeContentItemOperations(object): + """ContentTypeContentItemOperations 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/_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)