diff --git a/azure-mgmt-apimanagement/MANIFEST.in b/azure-mgmt-apimanagement/MANIFEST.in index 6ceb27f7a96e..e4884efef41b 100644 --- a/azure-mgmt-apimanagement/MANIFEST.in +++ b/azure-mgmt-apimanagement/MANIFEST.in @@ -1,3 +1,4 @@ +recursive-include tests *.py *.yaml include *.rst include azure/__init__.py include azure/mgmt/__init__.py diff --git a/azure-mgmt-apimanagement/README.rst b/azure-mgmt-apimanagement/README.rst index 22510ddfb346..ec8eea3c8439 100644 --- a/azure-mgmt-apimanagement/README.rst +++ b/azure-mgmt-apimanagement/README.rst @@ -28,3 +28,6 @@ Provide Feedback If you encounter any bugs or have suggestions, please file an issue in the `Issues `__ section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-apimanagement%2FREADME.png diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/api_management_client.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/api_management_client.py index fc167012a6c8..123b9684fa27 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/api_management_client.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/api_management_client.py @@ -13,40 +13,43 @@ from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION -from .operations.policy_operations import PolicyOperations -from .operations.policy_snippets_operations import PolicySnippetsOperations -from .operations.regions_operations import RegionsOperations from .operations.api_operations import ApiOperations -from .operations.api_revisions_operations import ApiRevisionsOperations +from .operations.api_revision_operations import ApiRevisionOperations from .operations.api_release_operations import ApiReleaseOperations from .operations.api_operation_operations import ApiOperationOperations from .operations.api_operation_policy_operations import ApiOperationPolicyOperations +from .operations.tag_operations import TagOperations from .operations.api_product_operations import ApiProductOperations from .operations.api_policy_operations import ApiPolicyOperations from .operations.api_schema_operations import ApiSchemaOperations from .operations.api_diagnostic_operations import ApiDiagnosticOperations -from .operations.api_diagnostic_logger_operations import ApiDiagnosticLoggerOperations from .operations.api_issue_operations import ApiIssueOperations from .operations.api_issue_comment_operations import ApiIssueCommentOperations from .operations.api_issue_attachment_operations import ApiIssueAttachmentOperations +from .operations.api_tag_description_operations import ApiTagDescriptionOperations +from .operations.operation_operations import OperationOperations +from .operations.api_version_set_operations import ApiVersionSetOperations from .operations.authorization_server_operations import AuthorizationServerOperations from .operations.backend_operations import BackendOperations +from .operations.cache_operations import CacheOperations from .operations.certificate_operations import CertificateOperations from .operations.api_management_operations import ApiManagementOperations from .operations.api_management_service_skus_operations import ApiManagementServiceSkusOperations from .operations.api_management_service_operations import ApiManagementServiceOperations from .operations.diagnostic_operations import DiagnosticOperations -from .operations.diagnostic_logger_operations import DiagnosticLoggerOperations from .operations.email_template_operations import EmailTemplateOperations from .operations.group_operations import GroupOperations from .operations.group_user_operations import GroupUserOperations from .operations.identity_provider_operations import IdentityProviderOperations +from .operations.issue_operations import IssueOperations from .operations.logger_operations import LoggerOperations +from .operations.network_status_operations import NetworkStatusOperations from .operations.notification_operations import NotificationOperations from .operations.notification_recipient_user_operations import NotificationRecipientUserOperations from .operations.notification_recipient_email_operations import NotificationRecipientEmailOperations -from .operations.network_status_operations import NetworkStatusOperations from .operations.open_id_connect_provider_operations import OpenIdConnectProviderOperations +from .operations.policy_operations import PolicyOperations +from .operations.policy_snippet_operations import PolicySnippetOperations from .operations.sign_in_settings_operations import SignInSettingsOperations from .operations.sign_up_settings_operations import SignUpSettingsOperations from .operations.delegation_settings_operations import DelegationSettingsOperations @@ -58,12 +61,10 @@ from .operations.property_operations import PropertyOperations from .operations.quota_by_counter_keys_operations import QuotaByCounterKeysOperations from .operations.quota_by_period_keys_operations import QuotaByPeriodKeysOperations +from .operations.region_operations import RegionOperations from .operations.reports_operations import ReportsOperations from .operations.subscription_operations import SubscriptionOperations from .operations.tag_resource_operations import TagResourceOperations -from .operations.tag_operations import TagOperations -from .operations.tag_description_operations import TagDescriptionOperations -from .operations.operation_operations import OperationOperations from .operations.tenant_access_operations import TenantAccessOperations from .operations.tenant_access_git_operations import TenantAccessGitOperations from .operations.tenant_configuration_operations import TenantConfigurationOperations @@ -71,7 +72,7 @@ from .operations.user_group_operations import UserGroupOperations from .operations.user_subscription_operations import UserSubscriptionOperations from .operations.user_identities_operations import UserIdentitiesOperations -from .operations.api_version_set_operations import ApiVersionSetOperations +from .operations.user_confirmation_password_operations import UserConfirmationPasswordOperations from .operations.api_export_operations import ApiExportOperations from . import models @@ -116,22 +117,18 @@ class ApiManagementClient(SDKClient): :ivar config: Configuration for client. :vartype config: ApiManagementClientConfiguration - :ivar policy: Policy operations - :vartype policy: azure.mgmt.apimanagement.operations.PolicyOperations - :ivar policy_snippets: PolicySnippets operations - :vartype policy_snippets: azure.mgmt.apimanagement.operations.PolicySnippetsOperations - :ivar regions: Regions operations - :vartype regions: azure.mgmt.apimanagement.operations.RegionsOperations :ivar api: Api operations :vartype api: azure.mgmt.apimanagement.operations.ApiOperations - :ivar api_revisions: ApiRevisions operations - :vartype api_revisions: azure.mgmt.apimanagement.operations.ApiRevisionsOperations + :ivar api_revision: ApiRevision operations + :vartype api_revision: azure.mgmt.apimanagement.operations.ApiRevisionOperations :ivar api_release: ApiRelease operations :vartype api_release: azure.mgmt.apimanagement.operations.ApiReleaseOperations :ivar api_operation: ApiOperation operations :vartype api_operation: azure.mgmt.apimanagement.operations.ApiOperationOperations :ivar api_operation_policy: ApiOperationPolicy operations :vartype api_operation_policy: azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations + :ivar tag: Tag operations + :vartype tag: azure.mgmt.apimanagement.operations.TagOperations :ivar api_product: ApiProduct operations :vartype api_product: azure.mgmt.apimanagement.operations.ApiProductOperations :ivar api_policy: ApiPolicy operations @@ -140,18 +137,24 @@ class ApiManagementClient(SDKClient): :vartype api_schema: azure.mgmt.apimanagement.operations.ApiSchemaOperations :ivar api_diagnostic: ApiDiagnostic operations :vartype api_diagnostic: azure.mgmt.apimanagement.operations.ApiDiagnosticOperations - :ivar api_diagnostic_logger: ApiDiagnosticLogger operations - :vartype api_diagnostic_logger: azure.mgmt.apimanagement.operations.ApiDiagnosticLoggerOperations :ivar api_issue: ApiIssue operations :vartype api_issue: azure.mgmt.apimanagement.operations.ApiIssueOperations :ivar api_issue_comment: ApiIssueComment operations :vartype api_issue_comment: azure.mgmt.apimanagement.operations.ApiIssueCommentOperations :ivar api_issue_attachment: ApiIssueAttachment operations :vartype api_issue_attachment: azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations + :ivar api_tag_description: ApiTagDescription operations + :vartype api_tag_description: azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations + :ivar operation: Operation operations + :vartype operation: azure.mgmt.apimanagement.operations.OperationOperations + :ivar api_version_set: ApiVersionSet operations + :vartype api_version_set: azure.mgmt.apimanagement.operations.ApiVersionSetOperations :ivar authorization_server: AuthorizationServer operations :vartype authorization_server: azure.mgmt.apimanagement.operations.AuthorizationServerOperations :ivar backend: Backend operations :vartype backend: azure.mgmt.apimanagement.operations.BackendOperations + :ivar cache: Cache operations + :vartype cache: azure.mgmt.apimanagement.operations.CacheOperations :ivar certificate: Certificate operations :vartype certificate: azure.mgmt.apimanagement.operations.CertificateOperations :ivar api_management_operations: ApiManagementOperations operations @@ -162,8 +165,6 @@ class ApiManagementClient(SDKClient): :vartype api_management_service: azure.mgmt.apimanagement.operations.ApiManagementServiceOperations :ivar diagnostic: Diagnostic operations :vartype diagnostic: azure.mgmt.apimanagement.operations.DiagnosticOperations - :ivar diagnostic_logger: DiagnosticLogger operations - :vartype diagnostic_logger: azure.mgmt.apimanagement.operations.DiagnosticLoggerOperations :ivar email_template: EmailTemplate operations :vartype email_template: azure.mgmt.apimanagement.operations.EmailTemplateOperations :ivar group: Group operations @@ -172,18 +173,24 @@ class ApiManagementClient(SDKClient): :vartype group_user: azure.mgmt.apimanagement.operations.GroupUserOperations :ivar identity_provider: IdentityProvider operations :vartype identity_provider: azure.mgmt.apimanagement.operations.IdentityProviderOperations + :ivar issue: Issue operations + :vartype issue: azure.mgmt.apimanagement.operations.IssueOperations :ivar logger: Logger operations :vartype logger: azure.mgmt.apimanagement.operations.LoggerOperations + :ivar network_status: NetworkStatus operations + :vartype network_status: azure.mgmt.apimanagement.operations.NetworkStatusOperations :ivar notification: Notification operations :vartype notification: azure.mgmt.apimanagement.operations.NotificationOperations :ivar notification_recipient_user: NotificationRecipientUser operations :vartype notification_recipient_user: azure.mgmt.apimanagement.operations.NotificationRecipientUserOperations :ivar notification_recipient_email: NotificationRecipientEmail operations :vartype notification_recipient_email: azure.mgmt.apimanagement.operations.NotificationRecipientEmailOperations - :ivar network_status: NetworkStatus operations - :vartype network_status: azure.mgmt.apimanagement.operations.NetworkStatusOperations :ivar open_id_connect_provider: OpenIdConnectProvider operations :vartype open_id_connect_provider: azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations + :ivar policy: Policy operations + :vartype policy: azure.mgmt.apimanagement.operations.PolicyOperations + :ivar policy_snippet: PolicySnippet operations + :vartype policy_snippet: azure.mgmt.apimanagement.operations.PolicySnippetOperations :ivar sign_in_settings: SignInSettings operations :vartype sign_in_settings: azure.mgmt.apimanagement.operations.SignInSettingsOperations :ivar sign_up_settings: SignUpSettings operations @@ -206,18 +213,14 @@ class ApiManagementClient(SDKClient): :vartype quota_by_counter_keys: azure.mgmt.apimanagement.operations.QuotaByCounterKeysOperations :ivar quota_by_period_keys: QuotaByPeriodKeys operations :vartype quota_by_period_keys: azure.mgmt.apimanagement.operations.QuotaByPeriodKeysOperations + :ivar region: Region operations + :vartype region: azure.mgmt.apimanagement.operations.RegionOperations :ivar reports: Reports operations :vartype reports: azure.mgmt.apimanagement.operations.ReportsOperations :ivar subscription: Subscription operations :vartype subscription: azure.mgmt.apimanagement.operations.SubscriptionOperations :ivar tag_resource: TagResource operations :vartype tag_resource: azure.mgmt.apimanagement.operations.TagResourceOperations - :ivar tag: Tag operations - :vartype tag: azure.mgmt.apimanagement.operations.TagOperations - :ivar tag_description: TagDescription operations - :vartype tag_description: azure.mgmt.apimanagement.operations.TagDescriptionOperations - :ivar operation: Operation operations - :vartype operation: azure.mgmt.apimanagement.operations.OperationOperations :ivar tenant_access: TenantAccess operations :vartype tenant_access: azure.mgmt.apimanagement.operations.TenantAccessOperations :ivar tenant_access_git: TenantAccessGit operations @@ -232,8 +235,8 @@ class ApiManagementClient(SDKClient): :vartype user_subscription: azure.mgmt.apimanagement.operations.UserSubscriptionOperations :ivar user_identities: UserIdentities operations :vartype user_identities: azure.mgmt.apimanagement.operations.UserIdentitiesOperations - :ivar api_version_set: ApiVersionSet operations - :vartype api_version_set: azure.mgmt.apimanagement.operations.ApiVersionSetOperations + :ivar user_confirmation_password: UserConfirmationPassword operations + :vartype user_confirmation_password: azure.mgmt.apimanagement.operations.UserConfirmationPasswordOperations :ivar api_export: ApiExport operations :vartype api_export: azure.mgmt.apimanagement.operations.ApiExportOperations @@ -254,19 +257,13 @@ 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 = '2018-01-01' + self.api_version = '2019-01-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.policy = PolicyOperations( - self._client, self.config, self._serialize, self._deserialize) - self.policy_snippets = PolicySnippetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.regions = RegionsOperations( - self._client, self.config, self._serialize, self._deserialize) self.api = ApiOperations( self._client, self.config, self._serialize, self._deserialize) - self.api_revisions = ApiRevisionsOperations( + self.api_revision = ApiRevisionOperations( self._client, self.config, self._serialize, self._deserialize) self.api_release = ApiReleaseOperations( self._client, self.config, self._serialize, self._deserialize) @@ -274,6 +271,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.api_operation_policy = ApiOperationPolicyOperations( self._client, self.config, self._serialize, self._deserialize) + self.tag = TagOperations( + self._client, self.config, self._serialize, self._deserialize) self.api_product = ApiProductOperations( self._client, self.config, self._serialize, self._deserialize) self.api_policy = ApiPolicyOperations( @@ -282,18 +281,24 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.api_diagnostic = ApiDiagnosticOperations( self._client, self.config, self._serialize, self._deserialize) - self.api_diagnostic_logger = ApiDiagnosticLoggerOperations( - self._client, self.config, self._serialize, self._deserialize) self.api_issue = ApiIssueOperations( self._client, self.config, self._serialize, self._deserialize) self.api_issue_comment = ApiIssueCommentOperations( self._client, self.config, self._serialize, self._deserialize) self.api_issue_attachment = ApiIssueAttachmentOperations( self._client, self.config, self._serialize, self._deserialize) + self.api_tag_description = ApiTagDescriptionOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operation = OperationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_version_set = ApiVersionSetOperations( + self._client, self.config, self._serialize, self._deserialize) self.authorization_server = AuthorizationServerOperations( self._client, self.config, self._serialize, self._deserialize) self.backend = BackendOperations( self._client, self.config, self._serialize, self._deserialize) + self.cache = CacheOperations( + self._client, self.config, self._serialize, self._deserialize) self.certificate = CertificateOperations( self._client, self.config, self._serialize, self._deserialize) self.api_management_operations = ApiManagementOperations( @@ -304,8 +309,6 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.diagnostic = DiagnosticOperations( self._client, self.config, self._serialize, self._deserialize) - self.diagnostic_logger = DiagnosticLoggerOperations( - self._client, self.config, self._serialize, self._deserialize) self.email_template = EmailTemplateOperations( self._client, self.config, self._serialize, self._deserialize) self.group = GroupOperations( @@ -314,18 +317,24 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.identity_provider = IdentityProviderOperations( self._client, self.config, self._serialize, self._deserialize) + self.issue = IssueOperations( + self._client, self.config, self._serialize, self._deserialize) self.logger = LoggerOperations( self._client, self.config, self._serialize, self._deserialize) + self.network_status = NetworkStatusOperations( + self._client, self.config, self._serialize, self._deserialize) self.notification = NotificationOperations( self._client, self.config, self._serialize, self._deserialize) self.notification_recipient_user = NotificationRecipientUserOperations( self._client, self.config, self._serialize, self._deserialize) self.notification_recipient_email = NotificationRecipientEmailOperations( self._client, self.config, self._serialize, self._deserialize) - self.network_status = NetworkStatusOperations( - self._client, self.config, self._serialize, self._deserialize) self.open_id_connect_provider = OpenIdConnectProviderOperations( self._client, self.config, self._serialize, self._deserialize) + self.policy = PolicyOperations( + self._client, self.config, self._serialize, self._deserialize) + self.policy_snippet = PolicySnippetOperations( + self._client, self.config, self._serialize, self._deserialize) self.sign_in_settings = SignInSettingsOperations( self._client, self.config, self._serialize, self._deserialize) self.sign_up_settings = SignUpSettingsOperations( @@ -348,18 +357,14 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.quota_by_period_keys = QuotaByPeriodKeysOperations( self._client, self.config, self._serialize, self._deserialize) + self.region = RegionOperations( + self._client, self.config, self._serialize, self._deserialize) self.reports = ReportsOperations( self._client, self.config, self._serialize, self._deserialize) self.subscription = SubscriptionOperations( self._client, self.config, self._serialize, self._deserialize) self.tag_resource = TagResourceOperations( self._client, self.config, self._serialize, self._deserialize) - self.tag = TagOperations( - self._client, self.config, self._serialize, self._deserialize) - self.tag_description = TagDescriptionOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operation = OperationOperations( - self._client, self.config, self._serialize, self._deserialize) self.tenant_access = TenantAccessOperations( self._client, self.config, self._serialize, self._deserialize) self.tenant_access_git = TenantAccessGitOperations( @@ -374,7 +379,7 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.user_identities = UserIdentitiesOperations( self._client, self.config, self._serialize, self._deserialize) - self.api_version_set = ApiVersionSetOperations( + self.user_confirmation_password = UserConfirmationPasswordOperations( self._client, self.config, self._serialize, self._deserialize) self.api_export = ApiExportOperations( self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py index 2d91bf9fcc90..1b7512b2e21f 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py @@ -13,64 +13,72 @@ from .error_field_contract_py3 import ErrorFieldContract from .error_response_body_py3 import ErrorResponseBody from .error_response_py3 import ErrorResponse, ErrorResponseException - from .policy_contract_py3 import PolicyContract - from .policy_collection_py3 import PolicyCollection - from .policy_snippet_contract_py3 import PolicySnippetContract - from .policy_snippets_collection_py3 import PolicySnippetsCollection from .region_contract_py3 import RegionContract from .resource_py3 import Resource from .api_export_result_py3 import ApiExportResult - from .api_version_set_contract_details_py3 import ApiVersionSetContractDetails - from .api_contract_properties_py3 import ApiContractProperties - from .api_contract_py3 import ApiContract - from .api_create_or_update_properties_wsdl_selector_py3 import ApiCreateOrUpdatePropertiesWsdlSelector - from .api_create_or_update_parameter_py3 import ApiCreateOrUpdateParameter - from .api_update_contract_py3 import ApiUpdateContract - from .oauth2_authentication_settings_contract_py3 import OAuth2AuthenticationSettingsContract + from .product_entity_base_parameters_py3 import ProductEntityBaseParameters + from .product_tag_resource_contract_properties_py3 import ProductTagResourceContractProperties + from .operation_tag_resource_contract_properties_py3 import OperationTagResourceContractProperties + from .subscription_key_parameter_names_contract_py3 import SubscriptionKeyParameterNamesContract from .open_id_authentication_settings_contract_py3 import OpenIdAuthenticationSettingsContract + from .oauth2_authentication_settings_contract_py3 import OAuth2AuthenticationSettingsContract from .authentication_settings_contract_py3 import AuthenticationSettingsContract - from .subscription_key_parameter_names_contract_py3 import SubscriptionKeyParameterNamesContract + from .api_version_set_contract_details_py3 import ApiVersionSetContractDetails + from .api_create_or_update_properties_wsdl_selector_py3 import ApiCreateOrUpdatePropertiesWsdlSelector + from .api_contract_properties_py3 import ApiContractProperties from .api_entity_base_contract_py3 import ApiEntityBaseContract - from .api_revision_contract_py3 import ApiRevisionContract - from .api_revision_info_contract_py3 import ApiRevisionInfoContract - from .api_release_contract_py3 import ApiReleaseContract - from .operation_contract_py3 import OperationContract + from .api_tag_resource_contract_properties_py3 import ApiTagResourceContractProperties + from .tag_tag_resource_contract_properties_py3 import TagTagResourceContractProperties + from .tag_resource_contract_py3 import TagResourceContract + from .tag_contract_py3 import TagContract + from .tag_description_contract_py3 import TagDescriptionContract + from .tag_description_create_parameters_py3 import TagDescriptionCreateParameters + from .issue_attachment_contract_py3 import IssueAttachmentContract + from .issue_comment_contract_py3 import IssueCommentContract + from .issue_contract_base_properties_py3 import IssueContractBaseProperties + from .issue_update_contract_py3 import IssueUpdateContract + from .issue_contract_py3 import IssueContract + from .body_diagnostic_settings_py3 import BodyDiagnosticSettings + from .http_message_diagnostic_py3 import HttpMessageDiagnostic + from .pipeline_diagnostic_settings_py3 import PipelineDiagnosticSettings + from .sampling_settings_py3 import SamplingSettings + from .diagnostic_contract_py3 import DiagnosticContract + from .schema_contract_py3 import SchemaContract + from .policy_contract_py3 import PolicyContract + from .policy_collection_py3 import PolicyCollection + from .product_contract_py3 import ProductContract from .parameter_contract_py3 import ParameterContract from .representation_contract_py3 import RepresentationContract - from .request_contract_py3 import RequestContract from .response_contract_py3 import ResponseContract + from .request_contract_py3 import RequestContract from .operation_entity_base_contract_py3 import OperationEntityBaseContract from .operation_update_contract_py3 import OperationUpdateContract - from .schema_contract_py3 import SchemaContract - from .issue_contract_py3 import IssueContract - from .issue_update_contract_py3 import IssueUpdateContract - from .issue_contract_base_properties_py3 import IssueContractBaseProperties - from .issue_comment_contract_py3 import IssueCommentContract - from .issue_attachment_contract_py3 import IssueAttachmentContract - from .logger_contract_py3 import LoggerContract - from .diagnostic_contract_py3 import DiagnosticContract - from .product_entity_base_parameters_py3 import ProductEntityBaseParameters - from .product_tag_resource_contract_properties_py3 import ProductTagResourceContractProperties - from .operation_tag_resource_contract_properties_py3 import OperationTagResourceContractProperties - from .api_tag_resource_contract_properties_py3 import ApiTagResourceContractProperties - from .tag_tag_resource_contract_properties_py3 import TagTagResourceContractProperties - from .tag_resource_contract_py3 import TagResourceContract - from .product_contract_py3 import ProductContract - from .authorization_server_contract_py3 import AuthorizationServerContract - from .authorization_server_update_contract_py3 import AuthorizationServerUpdateContract + from .operation_contract_py3 import OperationContract + from .api_release_contract_py3 import ApiReleaseContract + from .api_revision_contract_py3 import ApiRevisionContract + from .api_update_contract_py3 import ApiUpdateContract + from .api_contract_py3 import ApiContract + from .api_create_or_update_parameter_py3 import ApiCreateOrUpdateParameter + from .api_version_set_entity_base_py3 import ApiVersionSetEntityBase + from .api_version_set_update_parameters_py3 import ApiVersionSetUpdateParameters + from .api_version_set_contract_py3 import ApiVersionSetContract from .token_body_parameter_contract_py3 import TokenBodyParameterContract from .authorization_server_contract_base_properties_py3 import AuthorizationServerContractBaseProperties + from .authorization_server_update_contract_py3 import AuthorizationServerUpdateContract + from .authorization_server_contract_py3 import AuthorizationServerContract + from .backend_reconnect_contract_py3 import BackendReconnectContract + from .backend_tls_properties_py3 import BackendTlsProperties + from .backend_proxy_contract_py3 import BackendProxyContract from .backend_authorization_header_credentials_py3 import BackendAuthorizationHeaderCredentials + from .backend_credentials_contract_py3 import BackendCredentialsContract from .x509_certificate_name_py3 import X509CertificateName from .backend_service_fabric_cluster_properties_py3 import BackendServiceFabricClusterProperties from .backend_properties_py3 import BackendProperties - from .backend_credentials_contract_py3 import BackendCredentialsContract - from .backend_proxy_contract_py3 import BackendProxyContract - from .backend_tls_properties_py3 import BackendTlsProperties from .backend_base_parameters_py3 import BackendBaseParameters - from .backend_contract_py3 import BackendContract from .backend_update_parameters_py3 import BackendUpdateParameters - from .backend_reconnect_contract_py3 import BackendReconnectContract + from .backend_contract_py3 import BackendContract + from .cache_update_parameters_py3 import CacheUpdateParameters + from .cache_contract_py3 import CacheContract from .certificate_contract_py3 import CertificateContract from .certificate_create_or_update_parameters_py3 import CertificateCreateOrUpdateParameters from .resource_sku_py3 import ResourceSku @@ -92,137 +100,139 @@ from .api_management_service_check_name_availability_parameters_py3 import ApiManagementServiceCheckNameAvailabilityParameters from .api_management_service_name_availability_result_py3 import ApiManagementServiceNameAvailabilityResult from .api_management_service_apply_network_configuration_parameters_py3 import ApiManagementServiceApplyNetworkConfigurationParameters - from .api_management_service_upload_certificate_parameters_py3 import ApiManagementServiceUploadCertificateParameters - from .hostname_configuration_old_py3 import HostnameConfigurationOld - from .api_management_service_update_hostname_parameters_py3 import ApiManagementServiceUpdateHostnameParameters from .operation_display_py3 import OperationDisplay from .operation_py3 import Operation from .email_template_parameters_contract_properties_py3 import EmailTemplateParametersContractProperties - from .email_template_contract_py3 import EmailTemplateContract from .email_template_update_parameters_py3 import EmailTemplateUpdateParameters - from .group_contract_properties_py3 import GroupContractProperties - from .group_contract_py3 import GroupContract - from .group_create_parameters_py3 import GroupCreateParameters - from .group_update_parameters_py3 import GroupUpdateParameters + from .email_template_contract_py3 import EmailTemplateContract from .user_identity_contract_py3 import UserIdentityContract from .user_entity_base_parameters_py3 import UserEntityBaseParameters + from .group_contract_properties_py3 import GroupContractProperties from .user_contract_py3 import UserContract - from .identity_provider_contract_py3 import IdentityProviderContract - from .identity_provider_update_parameters_py3 import IdentityProviderUpdateParameters + from .group_update_parameters_py3 import GroupUpdateParameters + from .group_contract_py3 import GroupContract + from .group_create_parameters_py3 import GroupCreateParameters from .identity_provider_base_parameters_py3 import IdentityProviderBaseParameters + from .identity_provider_update_parameters_py3 import IdentityProviderUpdateParameters + from .identity_provider_contract_py3 import IdentityProviderContract from .logger_update_contract_py3 import LoggerUpdateContract - from .recipients_contract_properties_py3 import RecipientsContractProperties - from .notification_contract_py3 import NotificationContract - from .recipient_user_contract_py3 import RecipientUserContract - from .recipient_user_collection_py3 import RecipientUserCollection - from .recipient_email_contract_py3 import RecipientEmailContract - from .recipient_email_collection_py3 import RecipientEmailCollection + from .logger_contract_py3 import LoggerContract from .connectivity_status_contract_py3 import ConnectivityStatusContract from .network_status_contract_py3 import NetworkStatusContract from .network_status_contract_by_location_py3 import NetworkStatusContractByLocation - from .openid_connect_provider_contract_py3 import OpenidConnectProviderContract + from .recipient_email_contract_py3 import RecipientEmailContract + from .recipient_email_collection_py3 import RecipientEmailCollection + from .recipient_user_contract_py3 import RecipientUserContract + from .recipient_user_collection_py3 import RecipientUserCollection + from .recipients_contract_properties_py3 import RecipientsContractProperties + from .notification_contract_py3 import NotificationContract from .openid_connect_provider_update_contract_py3 import OpenidConnectProviderUpdateContract - from .portal_signin_settings_py3 import PortalSigninSettings - from .terms_of_service_properties_py3 import TermsOfServiceProperties - from .portal_signup_settings_py3 import PortalSignupSettings - from .subscriptions_delegation_settings_properties_py3 import SubscriptionsDelegationSettingsProperties + from .openid_connect_provider_contract_py3 import OpenidConnectProviderContract + from .policy_snippet_contract_py3 import PolicySnippetContract + from .policy_snippets_collection_py3 import PolicySnippetsCollection from .registration_delegation_settings_properties_py3 import RegistrationDelegationSettingsProperties + from .subscriptions_delegation_settings_properties_py3 import SubscriptionsDelegationSettingsProperties from .portal_delegation_settings_py3 import PortalDelegationSettings - from .product_update_parameters_py3 import ProductUpdateParameters + from .terms_of_service_properties_py3 import TermsOfServiceProperties + from .portal_signup_settings_py3 import PortalSignupSettings + from .portal_signin_settings_py3 import PortalSigninSettings from .subscription_contract_py3 import SubscriptionContract - from .property_contract_py3 import PropertyContract - from .property_update_parameters_py3 import PropertyUpdateParameters + from .product_update_parameters_py3 import ProductUpdateParameters from .property_entity_base_parameters_py3 import PropertyEntityBaseParameters + from .property_update_parameters_py3 import PropertyUpdateParameters + from .property_contract_py3 import PropertyContract from .quota_counter_value_contract_properties_py3 import QuotaCounterValueContractProperties from .quota_counter_contract_py3 import QuotaCounterContract from .quota_counter_collection_py3 import QuotaCounterCollection - from .quota_counter_value_contract_py3 import QuotaCounterValueContract - from .report_record_contract_py3 import ReportRecordContract from .request_report_record_contract_py3 import RequestReportRecordContract - from .subscription_create_parameters_py3 import SubscriptionCreateParameters + from .report_record_contract_py3 import ReportRecordContract from .subscription_update_parameters_py3 import SubscriptionUpdateParameters - from .tag_contract_py3 import TagContract + from .subscription_create_parameters_py3 import SubscriptionCreateParameters from .tag_create_update_parameters_py3 import TagCreateUpdateParameters - from .tag_description_contract_py3 import TagDescriptionContract - from .tag_description_create_parameters_py3 import TagDescriptionCreateParameters - from .access_information_contract_py3 import AccessInformationContract - from .access_information_update_parameters_py3 import AccessInformationUpdateParameters - from .deploy_configuration_parameters_py3 import DeployConfigurationParameters + from .tenant_configuration_sync_state_contract_py3 import TenantConfigurationSyncStateContract from .operation_result_log_item_contract_py3 import OperationResultLogItemContract from .operation_result_contract_py3 import OperationResultContract + from .deploy_configuration_parameters_py3 import DeployConfigurationParameters from .save_configuration_parameter_py3 import SaveConfigurationParameter - from .tenant_configuration_sync_state_contract_py3 import TenantConfigurationSyncStateContract - from .generate_sso_url_result_py3 import GenerateSsoUrlResult - from .user_create_parameters_py3 import UserCreateParameters - from .user_token_parameters_py3 import UserTokenParameters + from .access_information_contract_py3 import AccessInformationContract + from .access_information_update_parameters_py3 import AccessInformationUpdateParameters from .user_token_result_py3 import UserTokenResult + from .user_token_parameters_py3 import UserTokenParameters + from .generate_sso_url_result_py3 import GenerateSsoUrlResult from .user_update_parameters_py3 import UserUpdateParameters - from .current_user_identity_py3 import CurrentUserIdentity - from .api_version_set_contract_py3 import ApiVersionSetContract - from .api_version_set_entity_base_py3 import ApiVersionSetEntityBase - from .api_version_set_update_parameters_py3 import ApiVersionSetUpdateParameters + from .user_create_parameters_py3 import UserCreateParameters + from .api_revision_info_contract_py3 import ApiRevisionInfoContract + from .quota_counter_value_contract_py3 import QuotaCounterValueContract except (SyntaxError, ImportError): from .error_field_contract import ErrorFieldContract from .error_response_body import ErrorResponseBody from .error_response import ErrorResponse, ErrorResponseException - from .policy_contract import PolicyContract - from .policy_collection import PolicyCollection - from .policy_snippet_contract import PolicySnippetContract - from .policy_snippets_collection import PolicySnippetsCollection from .region_contract import RegionContract from .resource import Resource from .api_export_result import ApiExportResult - from .api_version_set_contract_details import ApiVersionSetContractDetails - from .api_contract_properties import ApiContractProperties - from .api_contract import ApiContract - from .api_create_or_update_properties_wsdl_selector import ApiCreateOrUpdatePropertiesWsdlSelector - from .api_create_or_update_parameter import ApiCreateOrUpdateParameter - from .api_update_contract import ApiUpdateContract - from .oauth2_authentication_settings_contract import OAuth2AuthenticationSettingsContract + from .product_entity_base_parameters import ProductEntityBaseParameters + from .product_tag_resource_contract_properties import ProductTagResourceContractProperties + from .operation_tag_resource_contract_properties import OperationTagResourceContractProperties + from .subscription_key_parameter_names_contract import SubscriptionKeyParameterNamesContract from .open_id_authentication_settings_contract import OpenIdAuthenticationSettingsContract + from .oauth2_authentication_settings_contract import OAuth2AuthenticationSettingsContract from .authentication_settings_contract import AuthenticationSettingsContract - from .subscription_key_parameter_names_contract import SubscriptionKeyParameterNamesContract + from .api_version_set_contract_details import ApiVersionSetContractDetails + from .api_create_or_update_properties_wsdl_selector import ApiCreateOrUpdatePropertiesWsdlSelector + from .api_contract_properties import ApiContractProperties from .api_entity_base_contract import ApiEntityBaseContract - from .api_revision_contract import ApiRevisionContract - from .api_revision_info_contract import ApiRevisionInfoContract - from .api_release_contract import ApiReleaseContract - from .operation_contract import OperationContract + from .api_tag_resource_contract_properties import ApiTagResourceContractProperties + from .tag_tag_resource_contract_properties import TagTagResourceContractProperties + from .tag_resource_contract import TagResourceContract + from .tag_contract import TagContract + from .tag_description_contract import TagDescriptionContract + from .tag_description_create_parameters import TagDescriptionCreateParameters + from .issue_attachment_contract import IssueAttachmentContract + from .issue_comment_contract import IssueCommentContract + from .issue_contract_base_properties import IssueContractBaseProperties + from .issue_update_contract import IssueUpdateContract + from .issue_contract import IssueContract + from .body_diagnostic_settings import BodyDiagnosticSettings + from .http_message_diagnostic import HttpMessageDiagnostic + from .pipeline_diagnostic_settings import PipelineDiagnosticSettings + from .sampling_settings import SamplingSettings + from .diagnostic_contract import DiagnosticContract + from .schema_contract import SchemaContract + from .policy_contract import PolicyContract + from .policy_collection import PolicyCollection + from .product_contract import ProductContract from .parameter_contract import ParameterContract from .representation_contract import RepresentationContract - from .request_contract import RequestContract from .response_contract import ResponseContract + from .request_contract import RequestContract from .operation_entity_base_contract import OperationEntityBaseContract from .operation_update_contract import OperationUpdateContract - from .schema_contract import SchemaContract - from .issue_contract import IssueContract - from .issue_update_contract import IssueUpdateContract - from .issue_contract_base_properties import IssueContractBaseProperties - from .issue_comment_contract import IssueCommentContract - from .issue_attachment_contract import IssueAttachmentContract - from .logger_contract import LoggerContract - from .diagnostic_contract import DiagnosticContract - from .product_entity_base_parameters import ProductEntityBaseParameters - from .product_tag_resource_contract_properties import ProductTagResourceContractProperties - from .operation_tag_resource_contract_properties import OperationTagResourceContractProperties - from .api_tag_resource_contract_properties import ApiTagResourceContractProperties - from .tag_tag_resource_contract_properties import TagTagResourceContractProperties - from .tag_resource_contract import TagResourceContract - from .product_contract import ProductContract - from .authorization_server_contract import AuthorizationServerContract - from .authorization_server_update_contract import AuthorizationServerUpdateContract + from .operation_contract import OperationContract + from .api_release_contract import ApiReleaseContract + from .api_revision_contract import ApiRevisionContract + from .api_update_contract import ApiUpdateContract + from .api_contract import ApiContract + from .api_create_or_update_parameter import ApiCreateOrUpdateParameter + from .api_version_set_entity_base import ApiVersionSetEntityBase + from .api_version_set_update_parameters import ApiVersionSetUpdateParameters + from .api_version_set_contract import ApiVersionSetContract from .token_body_parameter_contract import TokenBodyParameterContract from .authorization_server_contract_base_properties import AuthorizationServerContractBaseProperties + from .authorization_server_update_contract import AuthorizationServerUpdateContract + from .authorization_server_contract import AuthorizationServerContract + from .backend_reconnect_contract import BackendReconnectContract + from .backend_tls_properties import BackendTlsProperties + from .backend_proxy_contract import BackendProxyContract from .backend_authorization_header_credentials import BackendAuthorizationHeaderCredentials + from .backend_credentials_contract import BackendCredentialsContract from .x509_certificate_name import X509CertificateName from .backend_service_fabric_cluster_properties import BackendServiceFabricClusterProperties from .backend_properties import BackendProperties - from .backend_credentials_contract import BackendCredentialsContract - from .backend_proxy_contract import BackendProxyContract - from .backend_tls_properties import BackendTlsProperties from .backend_base_parameters import BackendBaseParameters - from .backend_contract import BackendContract from .backend_update_parameters import BackendUpdateParameters - from .backend_reconnect_contract import BackendReconnectContract + from .backend_contract import BackendContract + from .cache_update_parameters import CacheUpdateParameters + from .cache_contract import CacheContract from .certificate_contract import CertificateContract from .certificate_create_or_update_parameters import CertificateCreateOrUpdateParameters from .resource_sku import ResourceSku @@ -244,90 +254,86 @@ from .api_management_service_check_name_availability_parameters import ApiManagementServiceCheckNameAvailabilityParameters from .api_management_service_name_availability_result import ApiManagementServiceNameAvailabilityResult from .api_management_service_apply_network_configuration_parameters import ApiManagementServiceApplyNetworkConfigurationParameters - from .api_management_service_upload_certificate_parameters import ApiManagementServiceUploadCertificateParameters - from .hostname_configuration_old import HostnameConfigurationOld - from .api_management_service_update_hostname_parameters import ApiManagementServiceUpdateHostnameParameters from .operation_display import OperationDisplay from .operation import Operation from .email_template_parameters_contract_properties import EmailTemplateParametersContractProperties - from .email_template_contract import EmailTemplateContract from .email_template_update_parameters import EmailTemplateUpdateParameters - from .group_contract_properties import GroupContractProperties - from .group_contract import GroupContract - from .group_create_parameters import GroupCreateParameters - from .group_update_parameters import GroupUpdateParameters + from .email_template_contract import EmailTemplateContract from .user_identity_contract import UserIdentityContract from .user_entity_base_parameters import UserEntityBaseParameters + from .group_contract_properties import GroupContractProperties from .user_contract import UserContract - from .identity_provider_contract import IdentityProviderContract - from .identity_provider_update_parameters import IdentityProviderUpdateParameters + from .group_update_parameters import GroupUpdateParameters + from .group_contract import GroupContract + from .group_create_parameters import GroupCreateParameters from .identity_provider_base_parameters import IdentityProviderBaseParameters + from .identity_provider_update_parameters import IdentityProviderUpdateParameters + from .identity_provider_contract import IdentityProviderContract from .logger_update_contract import LoggerUpdateContract - from .recipients_contract_properties import RecipientsContractProperties - from .notification_contract import NotificationContract - from .recipient_user_contract import RecipientUserContract - from .recipient_user_collection import RecipientUserCollection - from .recipient_email_contract import RecipientEmailContract - from .recipient_email_collection import RecipientEmailCollection + from .logger_contract import LoggerContract from .connectivity_status_contract import ConnectivityStatusContract from .network_status_contract import NetworkStatusContract from .network_status_contract_by_location import NetworkStatusContractByLocation - from .openid_connect_provider_contract import OpenidConnectProviderContract + from .recipient_email_contract import RecipientEmailContract + from .recipient_email_collection import RecipientEmailCollection + from .recipient_user_contract import RecipientUserContract + from .recipient_user_collection import RecipientUserCollection + from .recipients_contract_properties import RecipientsContractProperties + from .notification_contract import NotificationContract from .openid_connect_provider_update_contract import OpenidConnectProviderUpdateContract - from .portal_signin_settings import PortalSigninSettings - from .terms_of_service_properties import TermsOfServiceProperties - from .portal_signup_settings import PortalSignupSettings - from .subscriptions_delegation_settings_properties import SubscriptionsDelegationSettingsProperties + from .openid_connect_provider_contract import OpenidConnectProviderContract + from .policy_snippet_contract import PolicySnippetContract + from .policy_snippets_collection import PolicySnippetsCollection from .registration_delegation_settings_properties import RegistrationDelegationSettingsProperties + from .subscriptions_delegation_settings_properties import SubscriptionsDelegationSettingsProperties from .portal_delegation_settings import PortalDelegationSettings - from .product_update_parameters import ProductUpdateParameters + from .terms_of_service_properties import TermsOfServiceProperties + from .portal_signup_settings import PortalSignupSettings + from .portal_signin_settings import PortalSigninSettings from .subscription_contract import SubscriptionContract - from .property_contract import PropertyContract - from .property_update_parameters import PropertyUpdateParameters + from .product_update_parameters import ProductUpdateParameters from .property_entity_base_parameters import PropertyEntityBaseParameters + from .property_update_parameters import PropertyUpdateParameters + from .property_contract import PropertyContract from .quota_counter_value_contract_properties import QuotaCounterValueContractProperties from .quota_counter_contract import QuotaCounterContract from .quota_counter_collection import QuotaCounterCollection - from .quota_counter_value_contract import QuotaCounterValueContract - from .report_record_contract import ReportRecordContract from .request_report_record_contract import RequestReportRecordContract - from .subscription_create_parameters import SubscriptionCreateParameters + from .report_record_contract import ReportRecordContract from .subscription_update_parameters import SubscriptionUpdateParameters - from .tag_contract import TagContract + from .subscription_create_parameters import SubscriptionCreateParameters from .tag_create_update_parameters import TagCreateUpdateParameters - from .tag_description_contract import TagDescriptionContract - from .tag_description_create_parameters import TagDescriptionCreateParameters - from .access_information_contract import AccessInformationContract - from .access_information_update_parameters import AccessInformationUpdateParameters - from .deploy_configuration_parameters import DeployConfigurationParameters + from .tenant_configuration_sync_state_contract import TenantConfigurationSyncStateContract from .operation_result_log_item_contract import OperationResultLogItemContract from .operation_result_contract import OperationResultContract + from .deploy_configuration_parameters import DeployConfigurationParameters from .save_configuration_parameter import SaveConfigurationParameter - from .tenant_configuration_sync_state_contract import TenantConfigurationSyncStateContract - from .generate_sso_url_result import GenerateSsoUrlResult - from .user_create_parameters import UserCreateParameters - from .user_token_parameters import UserTokenParameters + from .access_information_contract import AccessInformationContract + from .access_information_update_parameters import AccessInformationUpdateParameters from .user_token_result import UserTokenResult + from .user_token_parameters import UserTokenParameters + from .generate_sso_url_result import GenerateSsoUrlResult from .user_update_parameters import UserUpdateParameters - from .current_user_identity import CurrentUserIdentity - from .api_version_set_contract import ApiVersionSetContract - from .api_version_set_entity_base import ApiVersionSetEntityBase - from .api_version_set_update_parameters import ApiVersionSetUpdateParameters -from .region_contract_paged import RegionContractPaged + from .user_create_parameters import UserCreateParameters + from .api_revision_info_contract import ApiRevisionInfoContract + from .quota_counter_value_contract import QuotaCounterValueContract from .api_contract_paged import ApiContractPaged from .tag_resource_contract_paged import TagResourceContractPaged from .api_revision_contract_paged import ApiRevisionContractPaged from .api_release_contract_paged import ApiReleaseContractPaged from .operation_contract_paged import OperationContractPaged +from .tag_contract_paged import TagContractPaged from .product_contract_paged import ProductContractPaged from .schema_contract_paged import SchemaContractPaged from .diagnostic_contract_paged import DiagnosticContractPaged -from .logger_contract_paged import LoggerContractPaged from .issue_contract_paged import IssueContractPaged from .issue_comment_contract_paged import IssueCommentContractPaged from .issue_attachment_contract_paged import IssueAttachmentContractPaged +from .tag_description_contract_paged import TagDescriptionContractPaged +from .api_version_set_contract_paged import ApiVersionSetContractPaged from .authorization_server_contract_paged import AuthorizationServerContractPaged from .backend_contract_paged import BackendContractPaged +from .cache_contract_paged import CacheContractPaged from .certificate_contract_paged import CertificateContractPaged from .operation_paged import OperationPaged from .resource_sku_result_paged import ResourceSkuResultPaged @@ -336,26 +342,27 @@ from .group_contract_paged import GroupContractPaged from .user_contract_paged import UserContractPaged from .identity_provider_contract_paged import IdentityProviderContractPaged +from .logger_contract_paged import LoggerContractPaged from .notification_contract_paged import NotificationContractPaged from .openid_connect_provider_contract_paged import OpenidConnectProviderContractPaged from .subscription_contract_paged import SubscriptionContractPaged from .property_contract_paged import PropertyContractPaged +from .region_contract_paged import RegionContractPaged from .report_record_contract_paged import ReportRecordContractPaged from .request_report_record_contract_paged import RequestReportRecordContractPaged -from .tag_contract_paged import TagContractPaged -from .tag_description_contract_paged import TagDescriptionContractPaged from .user_identity_contract_paged import UserIdentityContractPaged -from .api_version_set_contract_paged import ApiVersionSetContractPaged from .api_management_client_enums import ( - PolicyContentFormat, + ProductState, + BearerTokenSendingMethods, Protocol, ContentFormat, SoapApiType, - BearerTokenSendingMethods, ApiType, State, - LoggerType, - ProductState, + SamplingType, + AlwaysLog, + PolicyContentFormat, + VersioningScheme, GrantType, AuthorizationMethod, ClientAuthenticationMethod, @@ -366,17 +373,17 @@ HostnameType, VirtualNetworkType, NameAvailabilityReason, - GroupType, Confirmation, UserState, + GroupType, IdentityProviderType, + LoggerType, ConnectivityStatusType, SubscriptionState, AsyncOperationStatus, KeyType, - VersioningScheme, - TemplateName, NotificationName, + TemplateName, PolicyScopeContract, ExportFormat, ) @@ -385,64 +392,72 @@ 'ErrorFieldContract', 'ErrorResponseBody', 'ErrorResponse', 'ErrorResponseException', - 'PolicyContract', - 'PolicyCollection', - 'PolicySnippetContract', - 'PolicySnippetsCollection', 'RegionContract', 'Resource', 'ApiExportResult', - 'ApiVersionSetContractDetails', - 'ApiContractProperties', - 'ApiContract', - 'ApiCreateOrUpdatePropertiesWsdlSelector', - 'ApiCreateOrUpdateParameter', - 'ApiUpdateContract', - 'OAuth2AuthenticationSettingsContract', + 'ProductEntityBaseParameters', + 'ProductTagResourceContractProperties', + 'OperationTagResourceContractProperties', + 'SubscriptionKeyParameterNamesContract', 'OpenIdAuthenticationSettingsContract', + 'OAuth2AuthenticationSettingsContract', 'AuthenticationSettingsContract', - 'SubscriptionKeyParameterNamesContract', + 'ApiVersionSetContractDetails', + 'ApiCreateOrUpdatePropertiesWsdlSelector', + 'ApiContractProperties', 'ApiEntityBaseContract', - 'ApiRevisionContract', - 'ApiRevisionInfoContract', - 'ApiReleaseContract', - 'OperationContract', + 'ApiTagResourceContractProperties', + 'TagTagResourceContractProperties', + 'TagResourceContract', + 'TagContract', + 'TagDescriptionContract', + 'TagDescriptionCreateParameters', + 'IssueAttachmentContract', + 'IssueCommentContract', + 'IssueContractBaseProperties', + 'IssueUpdateContract', + 'IssueContract', + 'BodyDiagnosticSettings', + 'HttpMessageDiagnostic', + 'PipelineDiagnosticSettings', + 'SamplingSettings', + 'DiagnosticContract', + 'SchemaContract', + 'PolicyContract', + 'PolicyCollection', + 'ProductContract', 'ParameterContract', 'RepresentationContract', - 'RequestContract', 'ResponseContract', + 'RequestContract', 'OperationEntityBaseContract', 'OperationUpdateContract', - 'SchemaContract', - 'IssueContract', - 'IssueUpdateContract', - 'IssueContractBaseProperties', - 'IssueCommentContract', - 'IssueAttachmentContract', - 'LoggerContract', - 'DiagnosticContract', - 'ProductEntityBaseParameters', - 'ProductTagResourceContractProperties', - 'OperationTagResourceContractProperties', - 'ApiTagResourceContractProperties', - 'TagTagResourceContractProperties', - 'TagResourceContract', - 'ProductContract', - 'AuthorizationServerContract', - 'AuthorizationServerUpdateContract', + 'OperationContract', + 'ApiReleaseContract', + 'ApiRevisionContract', + 'ApiUpdateContract', + 'ApiContract', + 'ApiCreateOrUpdateParameter', + 'ApiVersionSetEntityBase', + 'ApiVersionSetUpdateParameters', + 'ApiVersionSetContract', 'TokenBodyParameterContract', 'AuthorizationServerContractBaseProperties', + 'AuthorizationServerUpdateContract', + 'AuthorizationServerContract', + 'BackendReconnectContract', + 'BackendTlsProperties', + 'BackendProxyContract', 'BackendAuthorizationHeaderCredentials', + 'BackendCredentialsContract', 'X509CertificateName', 'BackendServiceFabricClusterProperties', 'BackendProperties', - 'BackendCredentialsContract', - 'BackendProxyContract', - 'BackendTlsProperties', 'BackendBaseParameters', - 'BackendContract', 'BackendUpdateParameters', - 'BackendReconnectContract', + 'BackendContract', + 'CacheUpdateParameters', + 'CacheContract', 'CertificateContract', 'CertificateCreateOrUpdateParameters', 'ResourceSku', @@ -464,90 +479,86 @@ 'ApiManagementServiceCheckNameAvailabilityParameters', 'ApiManagementServiceNameAvailabilityResult', 'ApiManagementServiceApplyNetworkConfigurationParameters', - 'ApiManagementServiceUploadCertificateParameters', - 'HostnameConfigurationOld', - 'ApiManagementServiceUpdateHostnameParameters', 'OperationDisplay', 'Operation', 'EmailTemplateParametersContractProperties', - 'EmailTemplateContract', 'EmailTemplateUpdateParameters', - 'GroupContractProperties', - 'GroupContract', - 'GroupCreateParameters', - 'GroupUpdateParameters', + 'EmailTemplateContract', 'UserIdentityContract', 'UserEntityBaseParameters', + 'GroupContractProperties', 'UserContract', - 'IdentityProviderContract', - 'IdentityProviderUpdateParameters', + 'GroupUpdateParameters', + 'GroupContract', + 'GroupCreateParameters', 'IdentityProviderBaseParameters', + 'IdentityProviderUpdateParameters', + 'IdentityProviderContract', 'LoggerUpdateContract', - 'RecipientsContractProperties', - 'NotificationContract', - 'RecipientUserContract', - 'RecipientUserCollection', - 'RecipientEmailContract', - 'RecipientEmailCollection', + 'LoggerContract', 'ConnectivityStatusContract', 'NetworkStatusContract', 'NetworkStatusContractByLocation', - 'OpenidConnectProviderContract', + 'RecipientEmailContract', + 'RecipientEmailCollection', + 'RecipientUserContract', + 'RecipientUserCollection', + 'RecipientsContractProperties', + 'NotificationContract', 'OpenidConnectProviderUpdateContract', - 'PortalSigninSettings', - 'TermsOfServiceProperties', - 'PortalSignupSettings', - 'SubscriptionsDelegationSettingsProperties', + 'OpenidConnectProviderContract', + 'PolicySnippetContract', + 'PolicySnippetsCollection', 'RegistrationDelegationSettingsProperties', + 'SubscriptionsDelegationSettingsProperties', 'PortalDelegationSettings', - 'ProductUpdateParameters', + 'TermsOfServiceProperties', + 'PortalSignupSettings', + 'PortalSigninSettings', 'SubscriptionContract', - 'PropertyContract', - 'PropertyUpdateParameters', + 'ProductUpdateParameters', 'PropertyEntityBaseParameters', + 'PropertyUpdateParameters', + 'PropertyContract', 'QuotaCounterValueContractProperties', 'QuotaCounterContract', 'QuotaCounterCollection', - 'QuotaCounterValueContract', - 'ReportRecordContract', 'RequestReportRecordContract', - 'SubscriptionCreateParameters', + 'ReportRecordContract', 'SubscriptionUpdateParameters', - 'TagContract', + 'SubscriptionCreateParameters', 'TagCreateUpdateParameters', - 'TagDescriptionContract', - 'TagDescriptionCreateParameters', - 'AccessInformationContract', - 'AccessInformationUpdateParameters', - 'DeployConfigurationParameters', + 'TenantConfigurationSyncStateContract', 'OperationResultLogItemContract', 'OperationResultContract', + 'DeployConfigurationParameters', 'SaveConfigurationParameter', - 'TenantConfigurationSyncStateContract', - 'GenerateSsoUrlResult', - 'UserCreateParameters', - 'UserTokenParameters', + 'AccessInformationContract', + 'AccessInformationUpdateParameters', 'UserTokenResult', + 'UserTokenParameters', + 'GenerateSsoUrlResult', 'UserUpdateParameters', - 'CurrentUserIdentity', - 'ApiVersionSetContract', - 'ApiVersionSetEntityBase', - 'ApiVersionSetUpdateParameters', - 'RegionContractPaged', + 'UserCreateParameters', + 'ApiRevisionInfoContract', + 'QuotaCounterValueContract', 'ApiContractPaged', 'TagResourceContractPaged', 'ApiRevisionContractPaged', 'ApiReleaseContractPaged', 'OperationContractPaged', + 'TagContractPaged', 'ProductContractPaged', 'SchemaContractPaged', 'DiagnosticContractPaged', - 'LoggerContractPaged', 'IssueContractPaged', 'IssueCommentContractPaged', 'IssueAttachmentContractPaged', + 'TagDescriptionContractPaged', + 'ApiVersionSetContractPaged', 'AuthorizationServerContractPaged', 'BackendContractPaged', + 'CacheContractPaged', 'CertificateContractPaged', 'OperationPaged', 'ResourceSkuResultPaged', @@ -556,25 +567,26 @@ 'GroupContractPaged', 'UserContractPaged', 'IdentityProviderContractPaged', + 'LoggerContractPaged', 'NotificationContractPaged', 'OpenidConnectProviderContractPaged', 'SubscriptionContractPaged', 'PropertyContractPaged', + 'RegionContractPaged', 'ReportRecordContractPaged', 'RequestReportRecordContractPaged', - 'TagContractPaged', - 'TagDescriptionContractPaged', 'UserIdentityContractPaged', - 'ApiVersionSetContractPaged', - 'PolicyContentFormat', + 'ProductState', + 'BearerTokenSendingMethods', 'Protocol', 'ContentFormat', 'SoapApiType', - 'BearerTokenSendingMethods', 'ApiType', 'State', - 'LoggerType', - 'ProductState', + 'SamplingType', + 'AlwaysLog', + 'PolicyContentFormat', + 'VersioningScheme', 'GrantType', 'AuthorizationMethod', 'ClientAuthenticationMethod', @@ -585,17 +597,17 @@ 'HostnameType', 'VirtualNetworkType', 'NameAvailabilityReason', - 'GroupType', 'Confirmation', 'UserState', + 'GroupType', 'IdentityProviderType', + 'LoggerType', 'ConnectivityStatusType', 'SubscriptionState', 'AsyncOperationStatus', 'KeyType', - 'VersioningScheme', - 'TemplateName', 'NotificationName', + 'TemplateName', 'PolicyScopeContract', 'ExportFormat', ] diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_contract.py index a778b6ac2a7b..702ae821078a 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_contract.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_contract.py @@ -21,7 +21,7 @@ class AccessInformationContract(Model): :type primary_key: str :param secondary_key: Secondary access key. :type secondary_key: str - :param enabled: Tenant access information of the API Management service. + :param enabled: Determines whether direct access is enabled. :type enabled: bool """ diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_contract_py3.py index b1420594eb3b..6d184b50f02f 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_contract_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_contract_py3.py @@ -21,7 +21,7 @@ class AccessInformationContract(Model): :type primary_key: str :param secondary_key: Secondary access key. :type secondary_key: str - :param enabled: Tenant access information of the API Management service. + :param enabled: Determines whether direct access is enabled. :type enabled: bool """ diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_update_parameters.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_update_parameters.py index 975cdec8a836..9e687a43fd01 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_update_parameters.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_update_parameters.py @@ -15,7 +15,7 @@ class AccessInformationUpdateParameters(Model): """Tenant access information update parameters of the API Management service. - :param enabled: Tenant access information of the API Management service. + :param enabled: Determines whether direct access is enabled. :type enabled: bool """ diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_update_parameters_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_update_parameters_py3.py index 1219fc588e6b..bcfb60c31933 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_update_parameters_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_update_parameters_py3.py @@ -15,7 +15,7 @@ class AccessInformationUpdateParameters(Model): """Tenant access information update parameters of the API Management service. - :param enabled: Tenant access information of the API Management service. + :param enabled: Determines whether direct access is enabled. :type enabled: bool """ diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract.py index 5ce72fa7ac72..8323712967c1 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract.py @@ -13,7 +13,7 @@ class ApiContract(Resource): - """API details. + """Api details. Variables are only populated by the server, and will be ignored when sending a request. @@ -45,8 +45,8 @@ class ApiContract(Resource): :param api_version: Indicates the Version identifier of the API if the API is versioned :type api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool :param api_revision_description: Description of the Api Revision. @@ -56,10 +56,15 @@ class ApiContract(Resource): :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str - :param display_name: API name. + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + :param source_api_id: API identifier of the source API. + :type source_api_id: str + :param display_name: API name. Must be 1 to 300 characters long. :type display_name: str :param service_url: Absolute URL of the backend service implementing this - API. + API. Cannot be more than 2000 characters long. :type service_url: str :param path: Required. Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is @@ -69,7 +74,7 @@ class ApiContract(Resource): :param protocols: Describes on which protocols the operations in this API can be invoked. :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :param api_version_set: + :param api_version_set: Version set details :type api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails """ @@ -80,7 +85,6 @@ class ApiContract(Resource): 'type': {'readonly': True}, 'api_revision': {'max_length': 100, 'min_length': 1}, 'api_version': {'max_length': 100}, - 'is_current': {'readonly': True}, 'is_online': {'readonly': True}, 'api_revision_description': {'max_length': 256}, 'api_version_description': {'max_length': 256}, @@ -104,6 +108,8 @@ class ApiContract(Resource): 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'source_api_id': {'key': 'properties.sourceApiId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, 'path': {'key': 'properties.path', 'type': 'str'}, @@ -119,11 +125,13 @@ def __init__(self, **kwargs): self.api_type = kwargs.get('api_type', None) self.api_revision = kwargs.get('api_revision', None) self.api_version = kwargs.get('api_version', None) - self.is_current = None + self.is_current = kwargs.get('is_current', None) self.is_online = None self.api_revision_description = kwargs.get('api_revision_description', None) self.api_version_description = kwargs.get('api_version_description', None) self.api_version_set_id = kwargs.get('api_version_set_id', None) + self.subscription_required = kwargs.get('subscription_required', None) + self.source_api_id = kwargs.get('source_api_id', None) self.display_name = kwargs.get('display_name', None) self.service_url = kwargs.get('service_url', None) self.path = kwargs.get('path', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_properties.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_properties.py index b2fd77768a9d..eb5407d260bc 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_properties.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_properties.py @@ -39,8 +39,8 @@ class ApiContractProperties(ApiEntityBaseContract): :param api_version: Indicates the Version identifier of the API if the API is versioned :type api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool :param api_revision_description: Description of the Api Revision. @@ -50,10 +50,15 @@ class ApiContractProperties(ApiEntityBaseContract): :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str - :param display_name: API name. + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + :param source_api_id: API identifier of the source API. + :type source_api_id: str + :param display_name: API name. Must be 1 to 300 characters long. :type display_name: str :param service_url: Absolute URL of the backend service implementing this - API. + API. Cannot be more than 2000 characters long. :type service_url: str :param path: Required. Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is @@ -63,7 +68,7 @@ class ApiContractProperties(ApiEntityBaseContract): :param protocols: Describes on which protocols the operations in this API can be invoked. :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :param api_version_set: + :param api_version_set: Version set details :type api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails """ @@ -71,7 +76,6 @@ class ApiContractProperties(ApiEntityBaseContract): _validation = { 'api_revision': {'max_length': 100, 'min_length': 1}, 'api_version': {'max_length': 100}, - 'is_current': {'readonly': True}, 'is_online': {'readonly': True}, 'api_revision_description': {'max_length': 256}, 'api_version_description': {'max_length': 256}, @@ -92,6 +96,8 @@ class ApiContractProperties(ApiEntityBaseContract): 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'source_api_id': {'key': 'sourceApiId', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'service_url': {'key': 'serviceUrl', 'type': 'str'}, 'path': {'key': 'path', 'type': 'str'}, @@ -101,6 +107,7 @@ class ApiContractProperties(ApiEntityBaseContract): def __init__(self, **kwargs): super(ApiContractProperties, self).__init__(**kwargs) + self.source_api_id = kwargs.get('source_api_id', None) self.display_name = kwargs.get('display_name', None) self.service_url = kwargs.get('service_url', None) self.path = kwargs.get('path', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_properties_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_properties_py3.py index 874763702fa9..5349453ac542 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_properties_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_properties_py3.py @@ -39,8 +39,8 @@ class ApiContractProperties(ApiEntityBaseContract): :param api_version: Indicates the Version identifier of the API if the API is versioned :type api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool :param api_revision_description: Description of the Api Revision. @@ -50,10 +50,15 @@ class ApiContractProperties(ApiEntityBaseContract): :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str - :param display_name: API name. + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + :param source_api_id: API identifier of the source API. + :type source_api_id: str + :param display_name: API name. Must be 1 to 300 characters long. :type display_name: str :param service_url: Absolute URL of the backend service implementing this - API. + API. Cannot be more than 2000 characters long. :type service_url: str :param path: Required. Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is @@ -63,7 +68,7 @@ class ApiContractProperties(ApiEntityBaseContract): :param protocols: Describes on which protocols the operations in this API can be invoked. :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :param api_version_set: + :param api_version_set: Version set details :type api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails """ @@ -71,7 +76,6 @@ class ApiContractProperties(ApiEntityBaseContract): _validation = { 'api_revision': {'max_length': 100, 'min_length': 1}, 'api_version': {'max_length': 100}, - 'is_current': {'readonly': True}, 'is_online': {'readonly': True}, 'api_revision_description': {'max_length': 256}, 'api_version_description': {'max_length': 256}, @@ -92,6 +96,8 @@ class ApiContractProperties(ApiEntityBaseContract): 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'source_api_id': {'key': 'sourceApiId', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'service_url': {'key': 'serviceUrl', 'type': 'str'}, 'path': {'key': 'path', 'type': 'str'}, @@ -99,8 +105,9 @@ class ApiContractProperties(ApiEntityBaseContract): 'api_version_set': {'key': 'apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, } - def __init__(self, *, path: str, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, display_name: str=None, service_url: str=None, protocols=None, api_version_set=None, **kwargs) -> None: - super(ApiContractProperties, self).__init__(description=description, authentication_settings=authentication_settings, subscription_key_parameter_names=subscription_key_parameter_names, api_type=api_type, api_revision=api_revision, api_version=api_version, api_revision_description=api_revision_description, api_version_description=api_version_description, api_version_set_id=api_version_set_id, **kwargs) + def __init__(self, *, path: str, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, source_api_id: str=None, display_name: str=None, service_url: str=None, protocols=None, api_version_set=None, **kwargs) -> None: + super(ApiContractProperties, self).__init__(description=description, authentication_settings=authentication_settings, subscription_key_parameter_names=subscription_key_parameter_names, api_type=api_type, api_revision=api_revision, api_version=api_version, is_current=is_current, api_revision_description=api_revision_description, api_version_description=api_version_description, api_version_set_id=api_version_set_id, subscription_required=subscription_required, **kwargs) + self.source_api_id = source_api_id self.display_name = display_name self.service_url = service_url self.path = path diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_py3.py index 352cea429bca..561df1ff8548 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_py3.py @@ -13,7 +13,7 @@ class ApiContract(Resource): - """API details. + """Api details. Variables are only populated by the server, and will be ignored when sending a request. @@ -45,8 +45,8 @@ class ApiContract(Resource): :param api_version: Indicates the Version identifier of the API if the API is versioned :type api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool :param api_revision_description: Description of the Api Revision. @@ -56,10 +56,15 @@ class ApiContract(Resource): :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str - :param display_name: API name. + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + :param source_api_id: API identifier of the source API. + :type source_api_id: str + :param display_name: API name. Must be 1 to 300 characters long. :type display_name: str :param service_url: Absolute URL of the backend service implementing this - API. + API. Cannot be more than 2000 characters long. :type service_url: str :param path: Required. Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is @@ -69,7 +74,7 @@ class ApiContract(Resource): :param protocols: Describes on which protocols the operations in this API can be invoked. :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :param api_version_set: + :param api_version_set: Version set details :type api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails """ @@ -80,7 +85,6 @@ class ApiContract(Resource): 'type': {'readonly': True}, 'api_revision': {'max_length': 100, 'min_length': 1}, 'api_version': {'max_length': 100}, - 'is_current': {'readonly': True}, 'is_online': {'readonly': True}, 'api_revision_description': {'max_length': 256}, 'api_version_description': {'max_length': 256}, @@ -104,6 +108,8 @@ class ApiContract(Resource): 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'source_api_id': {'key': 'properties.sourceApiId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, 'path': {'key': 'properties.path', 'type': 'str'}, @@ -111,7 +117,7 @@ class ApiContract(Resource): 'api_version_set': {'key': 'properties.apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, } - def __init__(self, *, path: str, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, display_name: str=None, service_url: str=None, protocols=None, api_version_set=None, **kwargs) -> None: + def __init__(self, *, path: str, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, source_api_id: str=None, display_name: str=None, service_url: str=None, protocols=None, api_version_set=None, **kwargs) -> None: super(ApiContract, self).__init__(**kwargs) self.description = description self.authentication_settings = authentication_settings @@ -119,11 +125,13 @@ def __init__(self, *, path: str, description: str=None, authentication_settings= self.api_type = api_type self.api_revision = api_revision self.api_version = api_version - self.is_current = None + self.is_current = is_current self.is_online = None self.api_revision_description = api_revision_description self.api_version_description = api_version_description self.api_version_set_id = api_version_set_id + self.subscription_required = subscription_required + self.source_api_id = source_api_id self.display_name = display_name self.service_url = service_url self.path = path diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_parameter.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_parameter.py index 938ff3f01cc6..bd9f1969a5ab 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_parameter.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_parameter.py @@ -39,8 +39,8 @@ class ApiCreateOrUpdateParameter(Model): :param api_version: Indicates the Version identifier of the API if the API is versioned :type api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool :param api_revision_description: Description of the Api Revision. @@ -50,10 +50,15 @@ class ApiCreateOrUpdateParameter(Model): :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str - :param display_name: API name. + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + :param source_api_id: API identifier of the source API. + :type source_api_id: str + :param display_name: API name. Must be 1 to 300 characters long. :type display_name: str :param service_url: Absolute URL of the backend service implementing this - API. + API. Cannot be more than 2000 characters long. :type service_url: str :param path: Required. Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is @@ -63,16 +68,16 @@ class ApiCreateOrUpdateParameter(Model): :param protocols: Describes on which protocols the operations in this API can be invoked. :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :param api_version_set: + :param api_version_set: Version set details :type api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - :param content_value: Content value when Importing an API. - :type content_value: str - :param content_format: Format of the Content in which the API is getting - imported. Possible values include: 'wadl-xml', 'wadl-link-json', - 'swagger-json', 'swagger-link-json', 'wsdl', 'wsdl-link' - :type content_format: str or - ~azure.mgmt.apimanagement.models.ContentFormat + :param value: Content value when Importing an API. + :type value: str + :param format: Format of the Content in which the API is getting imported. + Possible values include: 'wadl-xml', 'wadl-link-json', 'swagger-json', + 'swagger-link-json', 'wsdl', 'wsdl-link', 'openapi', 'openapi+json', + 'openapi-link' + :type format: str or ~azure.mgmt.apimanagement.models.ContentFormat :param wsdl_selector: Criteria to limit import of WSDL to a subset of the document. :type wsdl_selector: @@ -87,7 +92,6 @@ class ApiCreateOrUpdateParameter(Model): _validation = { 'api_revision': {'max_length': 100, 'min_length': 1}, 'api_version': {'max_length': 100}, - 'is_current': {'readonly': True}, 'is_online': {'readonly': True}, 'api_revision_description': {'max_length': 256}, 'api_version_description': {'max_length': 256}, @@ -108,13 +112,15 @@ class ApiCreateOrUpdateParameter(Model): 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'source_api_id': {'key': 'properties.sourceApiId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, 'path': {'key': 'properties.path', 'type': 'str'}, 'protocols': {'key': 'properties.protocols', 'type': '[Protocol]'}, 'api_version_set': {'key': 'properties.apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, - 'content_value': {'key': 'properties.contentValue', 'type': 'str'}, - 'content_format': {'key': 'properties.contentFormat', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'str'}, 'wsdl_selector': {'key': 'properties.wsdlSelector', 'type': 'ApiCreateOrUpdatePropertiesWsdlSelector'}, 'soap_api_type': {'key': 'properties.apiType', 'type': 'str'}, } @@ -127,17 +133,19 @@ def __init__(self, **kwargs): self.api_type = kwargs.get('api_type', None) self.api_revision = kwargs.get('api_revision', None) self.api_version = kwargs.get('api_version', None) - self.is_current = None + self.is_current = kwargs.get('is_current', None) self.is_online = None self.api_revision_description = kwargs.get('api_revision_description', None) self.api_version_description = kwargs.get('api_version_description', None) self.api_version_set_id = kwargs.get('api_version_set_id', None) + self.subscription_required = kwargs.get('subscription_required', None) + self.source_api_id = kwargs.get('source_api_id', None) self.display_name = kwargs.get('display_name', None) self.service_url = kwargs.get('service_url', None) self.path = kwargs.get('path', None) self.protocols = kwargs.get('protocols', None) self.api_version_set = kwargs.get('api_version_set', None) - self.content_value = kwargs.get('content_value', None) - self.content_format = kwargs.get('content_format', None) + self.value = kwargs.get('value', None) + self.format = kwargs.get('format', None) self.wsdl_selector = kwargs.get('wsdl_selector', None) self.soap_api_type = kwargs.get('soap_api_type', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_parameter_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_parameter_py3.py index 623f52a9556e..a9a326b69906 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_parameter_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_parameter_py3.py @@ -39,8 +39,8 @@ class ApiCreateOrUpdateParameter(Model): :param api_version: Indicates the Version identifier of the API if the API is versioned :type api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool :param api_revision_description: Description of the Api Revision. @@ -50,10 +50,15 @@ class ApiCreateOrUpdateParameter(Model): :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str - :param display_name: API name. + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + :param source_api_id: API identifier of the source API. + :type source_api_id: str + :param display_name: API name. Must be 1 to 300 characters long. :type display_name: str :param service_url: Absolute URL of the backend service implementing this - API. + API. Cannot be more than 2000 characters long. :type service_url: str :param path: Required. Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is @@ -63,16 +68,16 @@ class ApiCreateOrUpdateParameter(Model): :param protocols: Describes on which protocols the operations in this API can be invoked. :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :param api_version_set: + :param api_version_set: Version set details :type api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - :param content_value: Content value when Importing an API. - :type content_value: str - :param content_format: Format of the Content in which the API is getting - imported. Possible values include: 'wadl-xml', 'wadl-link-json', - 'swagger-json', 'swagger-link-json', 'wsdl', 'wsdl-link' - :type content_format: str or - ~azure.mgmt.apimanagement.models.ContentFormat + :param value: Content value when Importing an API. + :type value: str + :param format: Format of the Content in which the API is getting imported. + Possible values include: 'wadl-xml', 'wadl-link-json', 'swagger-json', + 'swagger-link-json', 'wsdl', 'wsdl-link', 'openapi', 'openapi+json', + 'openapi-link' + :type format: str or ~azure.mgmt.apimanagement.models.ContentFormat :param wsdl_selector: Criteria to limit import of WSDL to a subset of the document. :type wsdl_selector: @@ -87,7 +92,6 @@ class ApiCreateOrUpdateParameter(Model): _validation = { 'api_revision': {'max_length': 100, 'min_length': 1}, 'api_version': {'max_length': 100}, - 'is_current': {'readonly': True}, 'is_online': {'readonly': True}, 'api_revision_description': {'max_length': 256}, 'api_version_description': {'max_length': 256}, @@ -108,18 +112,20 @@ class ApiCreateOrUpdateParameter(Model): 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'source_api_id': {'key': 'properties.sourceApiId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, 'path': {'key': 'properties.path', 'type': 'str'}, 'protocols': {'key': 'properties.protocols', 'type': '[Protocol]'}, 'api_version_set': {'key': 'properties.apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, - 'content_value': {'key': 'properties.contentValue', 'type': 'str'}, - 'content_format': {'key': 'properties.contentFormat', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'str'}, 'wsdl_selector': {'key': 'properties.wsdlSelector', 'type': 'ApiCreateOrUpdatePropertiesWsdlSelector'}, 'soap_api_type': {'key': 'properties.apiType', 'type': 'str'}, } - def __init__(self, *, path: str, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, display_name: str=None, service_url: str=None, protocols=None, api_version_set=None, content_value: str=None, content_format=None, wsdl_selector=None, soap_api_type=None, **kwargs) -> None: + def __init__(self, *, path: str, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, source_api_id: str=None, display_name: str=None, service_url: str=None, protocols=None, api_version_set=None, value: str=None, format=None, wsdl_selector=None, soap_api_type=None, **kwargs) -> None: super(ApiCreateOrUpdateParameter, self).__init__(**kwargs) self.description = description self.authentication_settings = authentication_settings @@ -127,17 +133,19 @@ def __init__(self, *, path: str, description: str=None, authentication_settings= self.api_type = api_type self.api_revision = api_revision self.api_version = api_version - self.is_current = None + self.is_current = is_current self.is_online = None self.api_revision_description = api_revision_description self.api_version_description = api_version_description self.api_version_set_id = api_version_set_id + self.subscription_required = subscription_required + self.source_api_id = source_api_id self.display_name = display_name self.service_url = service_url self.path = path self.protocols = protocols self.api_version_set = api_version_set - self.content_value = content_value - self.content_format = content_format + self.value = value + self.format = format self.wsdl_selector = wsdl_selector self.soap_api_type = soap_api_type diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_entity_base_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_entity_base_contract.py index c775bf12e8c7..502a877256df 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_entity_base_contract.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_entity_base_contract.py @@ -37,8 +37,8 @@ class ApiEntityBaseContract(Model): :param api_version: Indicates the Version identifier of the API if the API is versioned :type api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool :param api_revision_description: Description of the Api Revision. @@ -48,12 +48,14 @@ class ApiEntityBaseContract(Model): :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool """ _validation = { 'api_revision': {'max_length': 100, 'min_length': 1}, 'api_version': {'max_length': 100}, - 'is_current': {'readonly': True}, 'is_online': {'readonly': True}, 'api_revision_description': {'max_length': 256}, 'api_version_description': {'max_length': 256}, @@ -71,6 +73,7 @@ class ApiEntityBaseContract(Model): 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -81,8 +84,9 @@ def __init__(self, **kwargs): self.api_type = kwargs.get('api_type', None) self.api_revision = kwargs.get('api_revision', None) self.api_version = kwargs.get('api_version', None) - self.is_current = None + self.is_current = kwargs.get('is_current', None) self.is_online = None self.api_revision_description = kwargs.get('api_revision_description', None) self.api_version_description = kwargs.get('api_version_description', None) self.api_version_set_id = kwargs.get('api_version_set_id', None) + self.subscription_required = kwargs.get('subscription_required', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_entity_base_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_entity_base_contract_py3.py index bcb03cef5b6c..d64875b6de90 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_entity_base_contract_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_entity_base_contract_py3.py @@ -37,8 +37,8 @@ class ApiEntityBaseContract(Model): :param api_version: Indicates the Version identifier of the API if the API is versioned :type api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool :param api_revision_description: Description of the Api Revision. @@ -48,12 +48,14 @@ class ApiEntityBaseContract(Model): :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool """ _validation = { 'api_revision': {'max_length': 100, 'min_length': 1}, 'api_version': {'max_length': 100}, - 'is_current': {'readonly': True}, 'is_online': {'readonly': True}, 'api_revision_description': {'max_length': 256}, 'api_version_description': {'max_length': 256}, @@ -71,9 +73,10 @@ class ApiEntityBaseContract(Model): 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, } - def __init__(self, *, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, **kwargs) -> None: + def __init__(self, *, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, **kwargs) -> None: super(ApiEntityBaseContract, self).__init__(**kwargs) self.description = description self.authentication_settings = authentication_settings @@ -81,8 +84,9 @@ def __init__(self, *, description: str=None, authentication_settings=None, subsc self.api_type = api_type self.api_revision = api_revision self.api_version = api_version - self.is_current = None + self.is_current = is_current self.is_online = None self.api_revision_description = api_revision_description self.api_version_description = api_version_description self.api_version_set_id = api_version_set_id + self.subscription_required = subscription_required diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_client_enums.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_client_enums.py index 06153c61779f..56d8c8c182da 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_client_enums.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_client_enums.py @@ -12,12 +12,16 @@ from enum import Enum -class PolicyContentFormat(str, Enum): +class ProductState(str, Enum): - xml = "xml" #: The contents are inline and Content type is an XML document. - xml_link = "xml-link" #: The policy XML document is hosted on a http endpoint accessible from the API Management service. - rawxml = "rawxml" #: The contents are inline and Content type is a non XML encoded policy document. - rawxml_link = "rawxml-link" #: The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service. + not_published = "notPublished" + published = "published" + + +class BearerTokenSendingMethods(str, Enum): + + authorization_header = "authorizationHeader" #: Access token will be transmitted in the Authorization header using Bearer schema + query = "query" #: Access token will be transmitted as query parameters. class Protocol(str, Enum): @@ -34,6 +38,9 @@ class ContentFormat(str, Enum): swagger_link_json = "swagger-link-json" #: The Open Api 2.0 document is hosted on a publicly accessible internet address. wsdl = "wsdl" #: The contents are inline and the document is a WSDL/Soap document. wsdl_link = "wsdl-link" #: The WSDL document is hosted on a publicly accessible internet address. + openapi = "openapi" #: The contents are inline and Content Type is a OpenApi 3.0 Document in YAML format. + openapijson = "openapi+json" #: The contents are inline and Content Type is a OpenApi 3.0 Document in JSON format. + openapi_link = "openapi-link" #: The Open Api 3.0 document is hosted on a publicly accessible internet address. class SoapApiType(str, Enum): @@ -42,12 +49,6 @@ class SoapApiType(str, Enum): soap_pass_through = "soap" #: Imports the Soap API having a SOAP front end. -class BearerTokenSendingMethods(str, Enum): - - authorization_header = "authorizationHeader" #: Access token will be transmitted in the Authorization header using Bearer schema - query = "query" #: Access token will be transmitted as query parameters. - - class ApiType(str, Enum): http = "http" @@ -63,16 +64,29 @@ class State(str, Enum): closed = "closed" #: The issue was closed. -class LoggerType(str, Enum): +class SamplingType(str, Enum): - azure_event_hub = "azureEventHub" #: Azure Event Hub as log destination. - application_insights = "applicationInsights" #: Azure Application Insights as log destination. + fixed = "fixed" #: Fixed-rate sampling. -class ProductState(str, Enum): +class AlwaysLog(str, Enum): - not_published = "notPublished" - published = "published" + all_errors = "allErrors" #: Always log all erroneous request regardless of sampling settings. + + +class PolicyContentFormat(str, Enum): + + xml = "xml" #: The contents are inline and Content type is an XML document. + xml_link = "xml-link" #: The policy XML document is hosted on a http endpoint accessible from the API Management service. + rawxml = "rawxml" #: The contents are inline and Content type is a non XML encoded policy document. + rawxml_link = "rawxml-link" #: The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service. + + +class VersioningScheme(str, Enum): + + segment = "Segment" #: The API Version is passed in a path segment. + query = "Query" #: The API Version is passed in a query parameter. + header = "Header" #: The API Version is passed in a HTTP header. class GrantType(str, Enum): @@ -119,13 +133,14 @@ class SkuType(str, Enum): standard = "Standard" #: Standard SKU of Api Management. premium = "Premium" #: Premium SKU of Api Management. basic = "Basic" #: Basic SKU of Api Management. + consumption = "Consumption" #: Consumption SKU of Api Management. class ResourceSkuCapacityScaleType(str, Enum): - automatic = "automatic" - manual = "manual" - none = "none" + automatic = "automatic" #: Supported scale type automatic. + manual = "manual" #: Supported scale type manual. + none = "none" #: Scaling not supported. class HostnameType(str, Enum): @@ -134,6 +149,7 @@ class HostnameType(str, Enum): portal = "Portal" management = "Management" scm = "Scm" + developer_portal = "DeveloperPortal" class VirtualNetworkType(str, Enum): @@ -150,13 +166,6 @@ class NameAvailabilityReason(str, Enum): already_exists = "AlreadyExists" -class GroupType(str, Enum): - - custom = "custom" - system = "system" - external = "external" - - class Confirmation(str, Enum): signup = "signup" #: Send an e-mail to the user confirming they have successfully signed up. @@ -171,6 +180,13 @@ class UserState(str, Enum): deleted = "deleted" #: User account is closed. All identities and related entities are removed. +class GroupType(str, Enum): + + custom = "custom" + system = "system" + external = "external" + + class IdentityProviderType(str, Enum): facebook = "facebook" #: Facebook as Identity provider. @@ -181,6 +197,12 @@ class IdentityProviderType(str, Enum): aad_b2_c = "aadB2C" #: Azure Active Directory B2C as Identity provider. +class LoggerType(str, Enum): + + azure_event_hub = "azureEventHub" #: Azure Event Hub as log destination. + application_insights = "applicationInsights" #: Azure Application Insights as log destination. + + class ConnectivityStatusType(str, Enum): initializing = "initializing" @@ -212,11 +234,15 @@ class KeyType(str, Enum): secondary = "secondary" -class VersioningScheme(str, Enum): +class NotificationName(str, Enum): - segment = "Segment" #: The API Version is passed in a path segment. - query = "Query" #: The API Version is passed in a query parameter. - header = "Header" #: The API Version is passed in a HTTP header. + request_publisher_notification_message = "RequestPublisherNotificationMessage" #: The following email recipients and users will receive email notifications about subscription requests for API products requiring approval. + purchase_publisher_notification_message = "PurchasePublisherNotificationMessage" #: The following email recipients and users will receive email notifications about new API product subscriptions. + new_application_notification_message = "NewApplicationNotificationMessage" #: The following email recipients and users will receive email notifications when new applications are submitted to the application gallery. + bcc = "BCC" #: The following recipients will receive blind carbon copies of all emails sent to developers. + new_issue_publisher_notification_message = "NewIssuePublisherNotificationMessage" #: The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal. + account_closed_publisher = "AccountClosedPublisher" #: The following email recipients and users will receive email notifications when developer closes his account. + quota_limit_approaching_publisher_notification_message = "QuotaLimitApproachingPublisherNotificationMessage" #: The following email recipients and users will receive email notifications when subscription usage gets close to usage quota. class TemplateName(str, Enum): @@ -237,17 +263,6 @@ class TemplateName(str, Enum): request_developer_notification_message = "requestDeveloperNotificationMessage" -class NotificationName(str, Enum): - - request_publisher_notification_message = "RequestPublisherNotificationMessage" #: The following email recipients and users will receive email notifications about subscription requests for API products requiring approval. - purchase_publisher_notification_message = "PurchasePublisherNotificationMessage" #: The following email recipients and users will receive email notifications about new API product subscriptions. - new_application_notification_message = "NewApplicationNotificationMessage" #: The following email recipients and users will receive email notifications when new applications are submitted to the application gallery. - bcc = "BCC" #: The following recipients will receive blind carbon copies of all emails sent to developers. - new_issue_publisher_notification_message = "NewIssuePublisherNotificationMessage" #: The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal. - account_closed_publisher = "AccountClosedPublisher" #: The following email recipients and users will receive email notifications when developer closes his account. - quota_limit_approaching_publisher_notification_message = "QuotaLimitApproachingPublisherNotificationMessage" #: The following email recipients and users will receive email notifications when subscription usage gets close to usage quota. - - class PolicyScopeContract(str, Enum): tenant = "Tenant" @@ -262,3 +277,4 @@ class ExportFormat(str, Enum): swagger = "swagger-link" #: Export the Api Definition in OpenApi Specification 2.0 format to the Storage Blob. wsdl = "wsdl-link" #: Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` wadl = "wadl-link" #: Export the Api Definition in WADL Schema to Storage Blob. + open_api3 = "openapi-link" #: Export the Api Definition in OpenApi Specification 3.0 to Storage Blob. diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_base_properties.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_base_properties.py index a9c8f1191ced..bcb92d273c50 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_base_properties.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_base_properties.py @@ -82,6 +82,11 @@ class ApiManagementServiceBaseProperties(Model): is 10. :type certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] + :param enable_client_certificate: Property only meant to be used for + Consumption SKU Service. This enforces a client certificate to be + presented on each request to the gateway and enabled ability to + authenticate the certificate in the policy. Default value: False . + :type enable_client_certificate: bool :param virtual_network_type: The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the @@ -125,6 +130,7 @@ class ApiManagementServiceBaseProperties(Model): 'additional_locations': {'key': 'additionalLocations', 'type': '[AdditionalLocation]'}, 'custom_properties': {'key': 'customProperties', 'type': '{str}'}, 'certificates': {'key': 'certificates', 'type': '[CertificateConfiguration]'}, + 'enable_client_certificate': {'key': 'enableClientCertificate', 'type': 'bool'}, 'virtual_network_type': {'key': 'virtualNetworkType', 'type': 'str'}, } @@ -146,4 +152,5 @@ def __init__(self, **kwargs): self.additional_locations = kwargs.get('additional_locations', None) self.custom_properties = kwargs.get('custom_properties', None) self.certificates = kwargs.get('certificates', None) + self.enable_client_certificate = kwargs.get('enable_client_certificate', False) self.virtual_network_type = kwargs.get('virtual_network_type', "None") diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_base_properties_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_base_properties_py3.py index 08e3ba89b68d..77f5a910183f 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_base_properties_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_base_properties_py3.py @@ -82,6 +82,11 @@ class ApiManagementServiceBaseProperties(Model): is 10. :type certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] + :param enable_client_certificate: Property only meant to be used for + Consumption SKU Service. This enforces a client certificate to be + presented on each request to the gateway and enabled ability to + authenticate the certificate in the policy. Default value: False . + :type enable_client_certificate: bool :param virtual_network_type: The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the @@ -125,10 +130,11 @@ class ApiManagementServiceBaseProperties(Model): 'additional_locations': {'key': 'additionalLocations', 'type': '[AdditionalLocation]'}, 'custom_properties': {'key': 'customProperties', 'type': '{str}'}, 'certificates': {'key': 'certificates', 'type': '[CertificateConfiguration]'}, + 'enable_client_certificate': {'key': 'enableClientCertificate', 'type': 'bool'}, 'virtual_network_type': {'key': 'virtualNetworkType', 'type': 'str'}, } - def __init__(self, *, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, virtual_network_type="None", **kwargs) -> None: + def __init__(self, *, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, enable_client_certificate: bool=False, virtual_network_type="None", **kwargs) -> None: super(ApiManagementServiceBaseProperties, self).__init__(**kwargs) self.notification_sender_email = notification_sender_email self.provisioning_state = None @@ -146,4 +152,5 @@ def __init__(self, *, notification_sender_email: str=None, hostname_configuratio self.additional_locations = additional_locations self.custom_properties = custom_properties self.certificates = certificates + self.enable_client_certificate = enable_client_certificate self.virtual_network_type = virtual_network_type diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_resource.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_resource.py index d1cec7074799..e3d6ad0a7e21 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_resource.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_resource.py @@ -93,6 +93,11 @@ class ApiManagementServiceResource(ApimResource): is 10. :type certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] + :param enable_client_certificate: Property only meant to be used for + Consumption SKU Service. This enforces a client certificate to be + presented on each request to the gateway and enabled ability to + authenticate the certificate in the policy. Default value: False . + :type enable_client_certificate: bool :param virtual_network_type: The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the @@ -162,6 +167,7 @@ class ApiManagementServiceResource(ApimResource): 'additional_locations': {'key': 'properties.additionalLocations', 'type': '[AdditionalLocation]'}, 'custom_properties': {'key': 'properties.customProperties', 'type': '{str}'}, 'certificates': {'key': 'properties.certificates', 'type': '[CertificateConfiguration]'}, + 'enable_client_certificate': {'key': 'properties.enableClientCertificate', 'type': 'bool'}, 'virtual_network_type': {'key': 'properties.virtualNetworkType', 'type': 'str'}, 'publisher_email': {'key': 'properties.publisherEmail', 'type': 'str'}, 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, @@ -189,6 +195,7 @@ def __init__(self, **kwargs): self.additional_locations = kwargs.get('additional_locations', None) self.custom_properties = kwargs.get('custom_properties', None) self.certificates = kwargs.get('certificates', None) + self.enable_client_certificate = kwargs.get('enable_client_certificate', False) self.virtual_network_type = kwargs.get('virtual_network_type', "None") self.publisher_email = kwargs.get('publisher_email', None) self.publisher_name = kwargs.get('publisher_name', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_resource_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_resource_py3.py index f5d1bf5f54b5..3250ab246d16 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_resource_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_resource_py3.py @@ -93,6 +93,11 @@ class ApiManagementServiceResource(ApimResource): is 10. :type certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] + :param enable_client_certificate: Property only meant to be used for + Consumption SKU Service. This enforces a client certificate to be + presented on each request to the gateway and enabled ability to + authenticate the certificate in the policy. Default value: False . + :type enable_client_certificate: bool :param virtual_network_type: The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the @@ -162,6 +167,7 @@ class ApiManagementServiceResource(ApimResource): 'additional_locations': {'key': 'properties.additionalLocations', 'type': '[AdditionalLocation]'}, 'custom_properties': {'key': 'properties.customProperties', 'type': '{str}'}, 'certificates': {'key': 'properties.certificates', 'type': '[CertificateConfiguration]'}, + 'enable_client_certificate': {'key': 'properties.enableClientCertificate', 'type': 'bool'}, 'virtual_network_type': {'key': 'properties.virtualNetworkType', 'type': 'str'}, 'publisher_email': {'key': 'properties.publisherEmail', 'type': 'str'}, 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, @@ -171,7 +177,7 @@ class ApiManagementServiceResource(ApimResource): 'etag': {'key': 'etag', '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, virtual_network_type="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, virtual_network_type="None", identity=None, **kwargs) -> None: super(ApiManagementServiceResource, self).__init__(tags=tags, **kwargs) self.notification_sender_email = notification_sender_email self.provisioning_state = None @@ -189,6 +195,7 @@ def __init__(self, *, publisher_email: str, publisher_name: str, sku, location: self.additional_locations = additional_locations self.custom_properties = custom_properties self.certificates = certificates + self.enable_client_certificate = enable_client_certificate self.virtual_network_type = virtual_network_type self.publisher_email = publisher_email self.publisher_name = publisher_name diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_sku_properties.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_sku_properties.py index da7bbcf4e442..744062bb29db 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_sku_properties.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_sku_properties.py @@ -18,7 +18,7 @@ class ApiManagementServiceSkuProperties(Model): All required parameters must be populated in order to send to Azure. :param name: Required. Name of the Sku. Possible values include: - 'Developer', 'Standard', 'Premium', 'Basic' + 'Developer', 'Standard', 'Premium', 'Basic', 'Consumption' :type name: str or ~azure.mgmt.apimanagement.models.SkuType :param capacity: Capacity of the SKU (number of deployed units of the SKU). The default value is 1. Default value: 1 . diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_sku_properties_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_sku_properties_py3.py index d97692da043b..e0fd7698ba2f 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_sku_properties_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_sku_properties_py3.py @@ -18,7 +18,7 @@ class ApiManagementServiceSkuProperties(Model): All required parameters must be populated in order to send to Azure. :param name: Required. Name of the Sku. Possible values include: - 'Developer', 'Standard', 'Premium', 'Basic' + 'Developer', 'Standard', 'Premium', 'Basic', 'Consumption' :type name: str or ~azure.mgmt.apimanagement.models.SkuType :param capacity: Capacity of the SKU (number of deployed units of the SKU). The default value is 1. Default value: 1 . diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_hostname_parameters.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_hostname_parameters.py deleted file mode 100644 index d5287c1bc66a..000000000000 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_hostname_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceUpdateHostnameParameters(Model): - """Parameters supplied to the UpdateHostname operation. - - :param update: Hostnames to create or update. - :type update: - list[~azure.mgmt.apimanagement.models.HostnameConfigurationOld] - :param delete: Hostnames types to delete. - :type delete: list[str or ~azure.mgmt.apimanagement.models.HostnameType] - """ - - _attribute_map = { - 'update': {'key': 'update', 'type': '[HostnameConfigurationOld]'}, - 'delete': {'key': 'delete', 'type': '[HostnameType]'}, - } - - def __init__(self, **kwargs): - super(ApiManagementServiceUpdateHostnameParameters, self).__init__(**kwargs) - self.update = kwargs.get('update', None) - self.delete = kwargs.get('delete', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_hostname_parameters_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_hostname_parameters_py3.py deleted file mode 100644 index f4e99094ac7c..000000000000 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_hostname_parameters_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceUpdateHostnameParameters(Model): - """Parameters supplied to the UpdateHostname operation. - - :param update: Hostnames to create or update. - :type update: - list[~azure.mgmt.apimanagement.models.HostnameConfigurationOld] - :param delete: Hostnames types to delete. - :type delete: list[str or ~azure.mgmt.apimanagement.models.HostnameType] - """ - - _attribute_map = { - 'update': {'key': 'update', 'type': '[HostnameConfigurationOld]'}, - 'delete': {'key': 'delete', 'type': '[HostnameType]'}, - } - - def __init__(self, *, update=None, delete=None, **kwargs) -> None: - super(ApiManagementServiceUpdateHostnameParameters, self).__init__(**kwargs) - self.update = update - self.delete = delete diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_parameters.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_parameters.py index 3667d53caf8c..e05286708efa 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_parameters.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_parameters.py @@ -91,6 +91,11 @@ class ApiManagementServiceUpdateParameters(ApimResource): is 10. :type certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] + :param enable_client_certificate: Property only meant to be used for + Consumption SKU Service. This enforces a client certificate to be + presented on each request to the gateway and enabled ability to + authenticate the certificate in the policy. Default value: False . + :type enable_client_certificate: bool :param virtual_network_type: The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the @@ -156,6 +161,7 @@ class ApiManagementServiceUpdateParameters(ApimResource): 'additional_locations': {'key': 'properties.additionalLocations', 'type': '[AdditionalLocation]'}, 'custom_properties': {'key': 'properties.customProperties', 'type': '{str}'}, 'certificates': {'key': 'properties.certificates', 'type': '[CertificateConfiguration]'}, + 'enable_client_certificate': {'key': 'properties.enableClientCertificate', 'type': 'bool'}, 'virtual_network_type': {'key': 'properties.virtualNetworkType', 'type': 'str'}, 'publisher_email': {'key': 'properties.publisherEmail', 'type': 'str'}, 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, @@ -182,6 +188,7 @@ def __init__(self, **kwargs): self.additional_locations = kwargs.get('additional_locations', None) self.custom_properties = kwargs.get('custom_properties', None) self.certificates = kwargs.get('certificates', None) + self.enable_client_certificate = kwargs.get('enable_client_certificate', False) self.virtual_network_type = kwargs.get('virtual_network_type', "None") self.publisher_email = kwargs.get('publisher_email', None) self.publisher_name = kwargs.get('publisher_name', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_parameters_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_parameters_py3.py index 317920ffd159..5bd51ffa466c 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_parameters_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_parameters_py3.py @@ -91,6 +91,11 @@ class ApiManagementServiceUpdateParameters(ApimResource): is 10. :type certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] + :param enable_client_certificate: Property only meant to be used for + Consumption SKU Service. This enforces a client certificate to be + presented on each request to the gateway and enabled ability to + authenticate the certificate in the policy. Default value: False . + :type enable_client_certificate: bool :param virtual_network_type: The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the @@ -156,6 +161,7 @@ class ApiManagementServiceUpdateParameters(ApimResource): 'additional_locations': {'key': 'properties.additionalLocations', 'type': '[AdditionalLocation]'}, 'custom_properties': {'key': 'properties.customProperties', 'type': '{str}'}, 'certificates': {'key': 'properties.certificates', 'type': '[CertificateConfiguration]'}, + 'enable_client_certificate': {'key': 'properties.enableClientCertificate', 'type': 'bool'}, 'virtual_network_type': {'key': 'properties.virtualNetworkType', 'type': 'str'}, 'publisher_email': {'key': 'properties.publisherEmail', 'type': 'str'}, 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, @@ -164,7 +170,7 @@ class ApiManagementServiceUpdateParameters(ApimResource): 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, *, tags=None, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, virtual_network_type="None", publisher_email: str=None, publisher_name: str=None, sku=None, identity=None, **kwargs) -> None: + def __init__(self, *, tags=None, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, enable_client_certificate: bool=False, virtual_network_type="None", publisher_email: str=None, publisher_name: str=None, sku=None, identity=None, **kwargs) -> None: super(ApiManagementServiceUpdateParameters, self).__init__(tags=tags, **kwargs) self.notification_sender_email = notification_sender_email self.provisioning_state = None @@ -182,6 +188,7 @@ def __init__(self, *, tags=None, notification_sender_email: str=None, hostname_c self.additional_locations = additional_locations self.custom_properties = custom_properties self.certificates = certificates + self.enable_client_certificate = enable_client_certificate self.virtual_network_type = virtual_network_type self.publisher_email = publisher_email self.publisher_name = publisher_name diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_upload_certificate_parameters.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_upload_certificate_parameters.py deleted file mode 100644 index 52ce4a9c9384..000000000000 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_upload_certificate_parameters.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceUploadCertificateParameters(Model): - """Parameters supplied to the Upload SSL certificate for an API Management - service operation. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Hostname type. Possible values include: 'Proxy', - 'Portal', 'Management', 'Scm' - :type type: str or ~azure.mgmt.apimanagement.models.HostnameType - :param certificate: Required. Base64 Encoded certificate. - :type certificate: str - :param certificate_password: Required. Certificate password. - :type certificate_password: str - """ - - _validation = { - 'type': {'required': True}, - 'certificate': {'required': True}, - 'certificate_password': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'HostnameType'}, - 'certificate': {'key': 'certificate', 'type': 'str'}, - 'certificate_password': {'key': 'certificate_password', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiManagementServiceUploadCertificateParameters, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.certificate = kwargs.get('certificate', None) - self.certificate_password = kwargs.get('certificate_password', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_upload_certificate_parameters_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_upload_certificate_parameters_py3.py deleted file mode 100644 index b264650b0527..000000000000 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_upload_certificate_parameters_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceUploadCertificateParameters(Model): - """Parameters supplied to the Upload SSL certificate for an API Management - service operation. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Hostname type. Possible values include: 'Proxy', - 'Portal', 'Management', 'Scm' - :type type: str or ~azure.mgmt.apimanagement.models.HostnameType - :param certificate: Required. Base64 Encoded certificate. - :type certificate: str - :param certificate_password: Required. Certificate password. - :type certificate_password: str - """ - - _validation = { - 'type': {'required': True}, - 'certificate': {'required': True}, - 'certificate_password': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'HostnameType'}, - 'certificate': {'key': 'certificate', 'type': 'str'}, - 'certificate_password': {'key': 'certificate_password', 'type': 'str'}, - } - - def __init__(self, *, type, certificate: str, certificate_password: str, **kwargs) -> None: - super(ApiManagementServiceUploadCertificateParameters, self).__init__(**kwargs) - self.type = type - self.certificate = certificate - self.certificate_password = certificate_password diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_release_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_release_contract.py index cbee7727371e..4e04b6c68964 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_release_contract.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_release_contract.py @@ -13,7 +13,7 @@ class ApiReleaseContract(Resource): - """Api Release details. + """ApiRelease details. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_release_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_release_contract_py3.py index 445e2e9ea5c7..8792997dfc41 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_release_contract_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_release_contract_py3.py @@ -13,7 +13,7 @@ class ApiReleaseContract(Resource): - """Api Release details. + """ApiRelease details. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_tag_resource_contract_properties.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_tag_resource_contract_properties.py index dc5be41b6eeb..ea0e43b2d27b 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_tag_resource_contract_properties.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_tag_resource_contract_properties.py @@ -37,8 +37,8 @@ class ApiTagResourceContractProperties(ApiEntityBaseContract): :param api_version: Indicates the Version identifier of the API if the API is versioned :type api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool :param api_revision_description: Description of the Api Revision. @@ -48,6 +48,9 @@ class ApiTagResourceContractProperties(ApiEntityBaseContract): :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool :param id: API identifier in the form /apis/{apiId}. :type id: str :param name: API name. @@ -68,7 +71,6 @@ class ApiTagResourceContractProperties(ApiEntityBaseContract): _validation = { 'api_revision': {'max_length': 100, 'min_length': 1}, 'api_version': {'max_length': 100}, - 'is_current': {'readonly': True}, 'is_online': {'readonly': True}, 'api_revision_description': {'max_length': 256}, 'api_version_description': {'max_length': 256}, @@ -89,6 +91,7 @@ class ApiTagResourceContractProperties(ApiEntityBaseContract): 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'service_url': {'key': 'serviceUrl', 'type': 'str'}, diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_tag_resource_contract_properties_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_tag_resource_contract_properties_py3.py index cd608dd4bba7..67cc11942a42 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_tag_resource_contract_properties_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_tag_resource_contract_properties_py3.py @@ -37,8 +37,8 @@ class ApiTagResourceContractProperties(ApiEntityBaseContract): :param api_version: Indicates the Version identifier of the API if the API is versioned :type api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool :param api_revision_description: Description of the Api Revision. @@ -48,6 +48,9 @@ class ApiTagResourceContractProperties(ApiEntityBaseContract): :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool :param id: API identifier in the form /apis/{apiId}. :type id: str :param name: API name. @@ -68,7 +71,6 @@ class ApiTagResourceContractProperties(ApiEntityBaseContract): _validation = { 'api_revision': {'max_length': 100, 'min_length': 1}, 'api_version': {'max_length': 100}, - 'is_current': {'readonly': True}, 'is_online': {'readonly': True}, 'api_revision_description': {'max_length': 256}, 'api_version_description': {'max_length': 256}, @@ -89,6 +91,7 @@ class ApiTagResourceContractProperties(ApiEntityBaseContract): 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'service_url': {'key': 'serviceUrl', 'type': 'str'}, @@ -96,8 +99,8 @@ class ApiTagResourceContractProperties(ApiEntityBaseContract): 'protocols': {'key': 'protocols', 'type': '[Protocol]'}, } - def __init__(self, *, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, id: str=None, name: str=None, service_url: str=None, path: str=None, protocols=None, **kwargs) -> None: - super(ApiTagResourceContractProperties, self).__init__(description=description, authentication_settings=authentication_settings, subscription_key_parameter_names=subscription_key_parameter_names, api_type=api_type, api_revision=api_revision, api_version=api_version, api_revision_description=api_revision_description, api_version_description=api_version_description, api_version_set_id=api_version_set_id, **kwargs) + def __init__(self, *, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, id: str=None, name: str=None, service_url: str=None, path: str=None, protocols=None, **kwargs) -> None: + super(ApiTagResourceContractProperties, self).__init__(description=description, authentication_settings=authentication_settings, subscription_key_parameter_names=subscription_key_parameter_names, api_type=api_type, api_revision=api_revision, api_version=api_version, is_current=is_current, api_revision_description=api_revision_description, api_version_description=api_version_description, api_version_set_id=api_version_set_id, subscription_required=subscription_required, **kwargs) self.id = id self.name = name self.service_url = service_url diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_update_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_update_contract.py index 17c2d7360d8e..16538edb5451 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_update_contract.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_update_contract.py @@ -37,8 +37,8 @@ class ApiUpdateContract(Model): :param api_version: Indicates the Version identifier of the API if the API is versioned :type api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool :param api_revision_description: Description of the Api Revision. @@ -48,6 +48,9 @@ class ApiUpdateContract(Model): :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool :param display_name: API name. :type display_name: str :param service_url: Absolute URL of the backend service implementing this @@ -66,7 +69,6 @@ class ApiUpdateContract(Model): _validation = { 'api_revision': {'max_length': 100, 'min_length': 1}, 'api_version': {'max_length': 100}, - 'is_current': {'readonly': True}, 'is_online': {'readonly': True}, 'api_revision_description': {'max_length': 256}, 'api_version_description': {'max_length': 256}, @@ -87,6 +89,7 @@ class ApiUpdateContract(Model): 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, 'path': {'key': 'properties.path', 'type': 'str'}, @@ -101,11 +104,12 @@ def __init__(self, **kwargs): self.api_type = kwargs.get('api_type', None) self.api_revision = kwargs.get('api_revision', None) self.api_version = kwargs.get('api_version', None) - self.is_current = None + self.is_current = kwargs.get('is_current', None) self.is_online = None self.api_revision_description = kwargs.get('api_revision_description', None) self.api_version_description = kwargs.get('api_version_description', None) self.api_version_set_id = kwargs.get('api_version_set_id', None) + self.subscription_required = kwargs.get('subscription_required', None) self.display_name = kwargs.get('display_name', None) self.service_url = kwargs.get('service_url', None) self.path = kwargs.get('path', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_update_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_update_contract_py3.py index cfc42ba46610..c9c8736900a7 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_update_contract_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_update_contract_py3.py @@ -37,8 +37,8 @@ class ApiUpdateContract(Model): :param api_version: Indicates the Version identifier of the API if the API is versioned :type api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool :param api_revision_description: Description of the Api Revision. @@ -48,6 +48,9 @@ class ApiUpdateContract(Model): :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool :param display_name: API name. :type display_name: str :param service_url: Absolute URL of the backend service implementing this @@ -66,7 +69,6 @@ class ApiUpdateContract(Model): _validation = { 'api_revision': {'max_length': 100, 'min_length': 1}, 'api_version': {'max_length': 100}, - 'is_current': {'readonly': True}, 'is_online': {'readonly': True}, 'api_revision_description': {'max_length': 256}, 'api_version_description': {'max_length': 256}, @@ -87,13 +89,14 @@ class ApiUpdateContract(Model): 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, 'path': {'key': 'properties.path', 'type': 'str'}, 'protocols': {'key': 'properties.protocols', 'type': '[Protocol]'}, } - def __init__(self, *, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, display_name: str=None, service_url: str=None, path: str=None, protocols=None, **kwargs) -> None: + def __init__(self, *, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, display_name: str=None, service_url: str=None, path: str=None, protocols=None, **kwargs) -> None: super(ApiUpdateContract, self).__init__(**kwargs) self.description = description self.authentication_settings = authentication_settings @@ -101,11 +104,12 @@ def __init__(self, *, description: str=None, authentication_settings=None, subsc self.api_type = api_type self.api_revision = api_revision self.api_version = api_version - self.is_current = None + self.is_current = is_current self.is_online = None self.api_revision_description = api_revision_description self.api_version_description = api_version_description self.api_version_set_id = api_version_set_id + self.subscription_required = subscription_required self.display_name = display_name self.service_url = service_url self.path = path diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_details.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_details.py index 4cee808912e1..ca3eb9e811e4 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_details.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_details.py @@ -19,6 +19,8 @@ class ApiVersionSetContractDetails(Model): :param id: Identifier for existing API Version Set. Omit this value to create a new Version Set. :type id: str + :param name: The display Name of the API Version Set. + :type name: str :param description: Description of API Version Set. :type description: str :param versioning_scheme: An value that determines where the API Version @@ -35,6 +37,7 @@ class ApiVersionSetContractDetails(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'versioning_scheme': {'key': 'versioningScheme', 'type': 'str'}, 'version_query_name': {'key': 'versionQueryName', 'type': 'str'}, @@ -44,6 +47,7 @@ class ApiVersionSetContractDetails(Model): def __init__(self, **kwargs): super(ApiVersionSetContractDetails, self).__init__(**kwargs) self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) self.description = kwargs.get('description', None) self.versioning_scheme = kwargs.get('versioning_scheme', None) self.version_query_name = kwargs.get('version_query_name', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_details_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_details_py3.py index d412da8ef191..9a340f5d4be8 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_details_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_details_py3.py @@ -19,6 +19,8 @@ class ApiVersionSetContractDetails(Model): :param id: Identifier for existing API Version Set. Omit this value to create a new Version Set. :type id: str + :param name: The display Name of the API Version Set. + :type name: str :param description: Description of API Version Set. :type description: str :param versioning_scheme: An value that determines where the API Version @@ -35,15 +37,17 @@ class ApiVersionSetContractDetails(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'versioning_scheme': {'key': 'versioningScheme', 'type': 'str'}, 'version_query_name': {'key': 'versionQueryName', 'type': 'str'}, 'version_header_name': {'key': 'versionHeaderName', 'type': 'str'}, } - def __init__(self, *, id: str=None, description: str=None, versioning_scheme=None, version_query_name: str=None, version_header_name: str=None, **kwargs) -> None: + def __init__(self, *, id: str=None, name: str=None, description: str=None, versioning_scheme=None, version_query_name: str=None, version_header_name: str=None, **kwargs) -> None: super(ApiVersionSetContractDetails, self).__init__(**kwargs) self.id = id + self.name = name self.description = description self.versioning_scheme = versioning_scheme self.version_query_name = version_query_name diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/current_user_identity.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/body_diagnostic_settings.py similarity index 61% rename from azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/current_user_identity.py rename to azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/body_diagnostic_settings.py index c2485d5a5484..b0f9021fbada 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/current_user_identity.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/body_diagnostic_settings.py @@ -12,17 +12,21 @@ from msrest.serialization import Model -class CurrentUserIdentity(Model): - """CurrentUserIdentity. +class BodyDiagnosticSettings(Model): + """Body logging settings. - :param id: API Management service user id. - :type id: str + :param bytes: Number of request body bytes to log. + :type bytes: int """ + _validation = { + 'bytes': {'maximum': 8192}, + } + _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'bytes': {'key': 'bytes', 'type': 'int'}, } def __init__(self, **kwargs): - super(CurrentUserIdentity, self).__init__(**kwargs) - self.id = kwargs.get('id', None) + super(BodyDiagnosticSettings, self).__init__(**kwargs) + self.bytes = kwargs.get('bytes', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/current_user_identity_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/body_diagnostic_settings_py3.py similarity index 57% rename from azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/current_user_identity_py3.py rename to azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/body_diagnostic_settings_py3.py index f5b2c3f5187f..4192e4a3dc58 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/current_user_identity_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/body_diagnostic_settings_py3.py @@ -12,17 +12,21 @@ from msrest.serialization import Model -class CurrentUserIdentity(Model): - """CurrentUserIdentity. +class BodyDiagnosticSettings(Model): + """Body logging settings. - :param id: API Management service user id. - :type id: str + :param bytes: Number of request body bytes to log. + :type bytes: int """ + _validation = { + 'bytes': {'maximum': 8192}, + } + _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'bytes': {'key': 'bytes', 'type': 'int'}, } - def __init__(self, *, id: str=None, **kwargs) -> None: - super(CurrentUserIdentity, self).__init__(**kwargs) - self.id = id + def __init__(self, *, bytes: int=None, **kwargs) -> None: + super(BodyDiagnosticSettings, self).__init__(**kwargs) + self.bytes = bytes diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract.py new file mode 100644 index 000000000000..ea1874f4606c --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class CacheContract(Resource): + """Cache details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :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 description: Cache description + :type description: str + :param connection_string: Required. Runtime connection string to cache + :type connection_string: str + :param resource_id: Original uri of entity in external system cache points + to + :type resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'max_length': 2000}, + 'connection_string': {'required': True, 'max_length': 300}, + 'resource_id': {'max_length': 2000}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CacheContract, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.connection_string = kwargs.get('connection_string', None) + self.resource_id = kwargs.get('resource_id', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract_paged.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract_paged.py new file mode 100644 index 000000000000..13b6af191d44 --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class CacheContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`CacheContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CacheContract]'} + } + + def __init__(self, *args, **kwargs): + + super(CacheContractPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract_py3.py new file mode 100644 index 000000000000..646e00c0e511 --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class CacheContract(Resource): + """Cache details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :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 description: Cache description + :type description: str + :param connection_string: Required. Runtime connection string to cache + :type connection_string: str + :param resource_id: Original uri of entity in external system cache points + to + :type resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'max_length': 2000}, + 'connection_string': {'required': True, 'max_length': 300}, + 'resource_id': {'max_length': 2000}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__(self, *, connection_string: str, description: str=None, resource_id: str=None, **kwargs) -> None: + super(CacheContract, self).__init__(**kwargs) + self.description = description + self.connection_string = connection_string + self.resource_id = resource_id diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_update_parameters.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_update_parameters.py new file mode 100644 index 000000000000..541a426dd833 --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_update_parameters.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CacheUpdateParameters(Model): + """Cache update details. + + :param description: Cache description + :type description: str + :param connection_string: Runtime connection string to cache + :type connection_string: str + :param resource_id: Original uri of entity in external system cache points + to + :type resource_id: str + """ + + _validation = { + 'description': {'max_length': 2000}, + 'connection_string': {'max_length': 300}, + 'resource_id': {'max_length': 2000}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CacheUpdateParameters, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.connection_string = kwargs.get('connection_string', None) + self.resource_id = kwargs.get('resource_id', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_update_parameters_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_update_parameters_py3.py new file mode 100644 index 000000000000..88a8f3d42bce --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_update_parameters_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CacheUpdateParameters(Model): + """Cache update details. + + :param description: Cache description + :type description: str + :param connection_string: Runtime connection string to cache + :type connection_string: str + :param resource_id: Original uri of entity in external system cache points + to + :type resource_id: str + """ + + _validation = { + 'description': {'max_length': 2000}, + 'connection_string': {'max_length': 300}, + 'resource_id': {'max_length': 2000}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, connection_string: str=None, resource_id: str=None, **kwargs) -> None: + super(CacheUpdateParameters, self).__init__(**kwargs) + self.description = description + self.connection_string = connection_string + self.resource_id = resource_id diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract.py index 323523836bbc..041dd6002e6a 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract.py @@ -26,25 +26,50 @@ class DiagnosticContract(Resource): :vartype name: str :ivar type: Resource type for API Management resource. :vartype type: str - :param enabled: Required. Indicates whether a diagnostic should receive - data or not. - :type enabled: bool + :param always_log: Specifies for what type of messages sampling settings + should not apply. Possible values include: 'allErrors' + :type always_log: str or ~azure.mgmt.apimanagement.models.AlwaysLog + :param logger_id: Required. Resource Id of a target logger. + :type logger_id: str + :param sampling: Sampling settings for Diagnostic. + :type sampling: ~azure.mgmt.apimanagement.models.SamplingSettings + :param frontend: Diagnostic settings for incoming/outgoing HTTP messages + to the Gateway. + :type frontend: + ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings + :param backend: Diagnostic settings for incoming/outgoing HTTP messages to + the Backend + :type backend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings + :param enable_http_correlation_headers: Whether to process Correlation + Headers coming to Api Management Service. Only applicable to Application + Insights diagnostics. Default is true. + :type enable_http_correlation_headers: bool """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'enabled': {'required': True}, + 'logger_id': {'required': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'always_log': {'key': 'properties.alwaysLog', 'type': 'str'}, + 'logger_id': {'key': 'properties.loggerId', 'type': 'str'}, + 'sampling': {'key': 'properties.sampling', 'type': 'SamplingSettings'}, + 'frontend': {'key': 'properties.frontend', 'type': 'PipelineDiagnosticSettings'}, + 'backend': {'key': 'properties.backend', 'type': 'PipelineDiagnosticSettings'}, + 'enable_http_correlation_headers': {'key': 'properties.enableHttpCorrelationHeaders', 'type': 'bool'}, } def __init__(self, **kwargs): super(DiagnosticContract, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) + self.always_log = kwargs.get('always_log', None) + self.logger_id = kwargs.get('logger_id', None) + self.sampling = kwargs.get('sampling', None) + self.frontend = kwargs.get('frontend', None) + self.backend = kwargs.get('backend', None) + self.enable_http_correlation_headers = kwargs.get('enable_http_correlation_headers', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract_py3.py index 4b1236737bcf..b76b868476c7 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract_py3.py @@ -26,25 +26,50 @@ class DiagnosticContract(Resource): :vartype name: str :ivar type: Resource type for API Management resource. :vartype type: str - :param enabled: Required. Indicates whether a diagnostic should receive - data or not. - :type enabled: bool + :param always_log: Specifies for what type of messages sampling settings + should not apply. Possible values include: 'allErrors' + :type always_log: str or ~azure.mgmt.apimanagement.models.AlwaysLog + :param logger_id: Required. Resource Id of a target logger. + :type logger_id: str + :param sampling: Sampling settings for Diagnostic. + :type sampling: ~azure.mgmt.apimanagement.models.SamplingSettings + :param frontend: Diagnostic settings for incoming/outgoing HTTP messages + to the Gateway. + :type frontend: + ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings + :param backend: Diagnostic settings for incoming/outgoing HTTP messages to + the Backend + :type backend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings + :param enable_http_correlation_headers: Whether to process Correlation + Headers coming to Api Management Service. Only applicable to Application + Insights diagnostics. Default is true. + :type enable_http_correlation_headers: bool """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'enabled': {'required': True}, + 'logger_id': {'required': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'always_log': {'key': 'properties.alwaysLog', 'type': 'str'}, + 'logger_id': {'key': 'properties.loggerId', 'type': 'str'}, + 'sampling': {'key': 'properties.sampling', 'type': 'SamplingSettings'}, + 'frontend': {'key': 'properties.frontend', 'type': 'PipelineDiagnosticSettings'}, + 'backend': {'key': 'properties.backend', 'type': 'PipelineDiagnosticSettings'}, + 'enable_http_correlation_headers': {'key': 'properties.enableHttpCorrelationHeaders', 'type': 'bool'}, } - def __init__(self, *, enabled: bool, **kwargs) -> None: + def __init__(self, *, logger_id: str, always_log=None, sampling=None, frontend=None, backend=None, enable_http_correlation_headers: bool=None, **kwargs) -> None: super(DiagnosticContract, self).__init__(**kwargs) - self.enabled = enabled + self.always_log = always_log + self.logger_id = logger_id + self.sampling = sampling + self.frontend = frontend + self.backend = backend + self.enable_http_correlation_headers = enable_http_correlation_headers diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract.py index 402856cb4021..89aad685c1e5 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract.py @@ -39,7 +39,7 @@ class GroupContract(Resource): ~azure.mgmt.apimanagement.models.GroupType :param external_id: For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active - Directory aad://.onmicrosoft.com/groups/; + Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. :type external_id: str """ diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_properties.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_properties.py index afc509e6305d..a6cda94f8805 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_properties.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_properties.py @@ -32,7 +32,7 @@ class GroupContractProperties(Model): :type type: str or ~azure.mgmt.apimanagement.models.GroupType :param external_id: For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active - Directory aad://.onmicrosoft.com/groups/; + Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. :type external_id: str """ diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_properties_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_properties_py3.py index ea1ff22a7932..ab604b4e419b 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_properties_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_properties_py3.py @@ -32,7 +32,7 @@ class GroupContractProperties(Model): :type type: str or ~azure.mgmt.apimanagement.models.GroupType :param external_id: For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active - Directory aad://.onmicrosoft.com/groups/; + Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. :type external_id: str """ diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_py3.py index 89d02fafe9fa..5b2c78fbc9f4 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_py3.py @@ -39,7 +39,7 @@ class GroupContract(Resource): ~azure.mgmt.apimanagement.models.GroupType :param external_id: For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active - Directory aad://.onmicrosoft.com/groups/; + Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. :type external_id: str """ diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_create_parameters.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_create_parameters.py index 81c6d9664912..eeb0f54e9854 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_create_parameters.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_create_parameters.py @@ -26,8 +26,8 @@ class GroupCreateParameters(Model): :type type: str or ~azure.mgmt.apimanagement.models.GroupType :param external_id: Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for - Azure Active Directory aad://.onmicrosoft.com/groups/; otherwise the value is null. + Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. :type external_id: str """ diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_create_parameters_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_create_parameters_py3.py index b02e7b7137aa..5f6f2d22763d 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_create_parameters_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_create_parameters_py3.py @@ -26,8 +26,8 @@ class GroupCreateParameters(Model): :type type: str or ~azure.mgmt.apimanagement.models.GroupType :param external_id: Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for - Azure Active Directory aad://.onmicrosoft.com/groups/; otherwise the value is null. + Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. :type external_id: str """ diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_update_parameters.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_update_parameters.py index 0eec52761c7c..34cb6c6a3b7d 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_update_parameters.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_update_parameters.py @@ -24,8 +24,8 @@ class GroupUpdateParameters(Model): :type type: str or ~azure.mgmt.apimanagement.models.GroupType :param external_id: Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for - Azure Active Directory aad://.onmicrosoft.com/groups/; otherwise the value is null. + Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. :type external_id: str """ diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_update_parameters_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_update_parameters_py3.py index 697f14db0b9d..16aee8d02966 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_update_parameters_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_update_parameters_py3.py @@ -24,8 +24,8 @@ class GroupUpdateParameters(Model): :type type: str or ~azure.mgmt.apimanagement.models.GroupType :param external_id: Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for - Azure Active Directory aad://.onmicrosoft.com/groups/; otherwise the value is null. + Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. :type external_id: str """ diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration.py index e472eee22950..0c0dcfc232bb 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration.py @@ -18,7 +18,7 @@ class HostnameConfiguration(Model): All required parameters must be populated in order to send to Azure. :param type: Required. Hostname type. Possible values include: 'Proxy', - 'Portal', 'Management', 'Scm' + 'Portal', 'Management', 'Scm', 'DeveloperPortal' :type type: str or ~azure.mgmt.apimanagement.models.HostnameType :param host_name: Required. Hostname to configure on the Api Management service. @@ -54,7 +54,7 @@ class HostnameConfiguration(Model): } _attribute_map = { - 'type': {'key': 'type', 'type': 'HostnameType'}, + 'type': {'key': 'type', 'type': 'str'}, 'host_name': {'key': 'hostName', 'type': 'str'}, 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, 'encoded_certificate': {'key': 'encodedCertificate', 'type': 'str'}, diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration_old.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration_old.py deleted file mode 100644 index 0dc3ab2d270a..000000000000 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration_old.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HostnameConfigurationOld(Model): - """Custom hostname configuration. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Hostname type. Possible values include: 'Proxy', - 'Portal', 'Management', 'Scm' - :type type: str or ~azure.mgmt.apimanagement.models.HostnameType - :param hostname: Required. Hostname to configure. - :type hostname: str - :param certificate: Required. Certificate information. - :type certificate: ~azure.mgmt.apimanagement.models.CertificateInformation - """ - - _validation = { - 'type': {'required': True}, - 'hostname': {'required': True}, - 'certificate': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'HostnameType'}, - 'hostname': {'key': 'hostname', 'type': 'str'}, - 'certificate': {'key': 'certificate', 'type': 'CertificateInformation'}, - } - - def __init__(self, **kwargs): - super(HostnameConfigurationOld, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.hostname = kwargs.get('hostname', None) - self.certificate = kwargs.get('certificate', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration_old_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration_old_py3.py deleted file mode 100644 index 121e9708258f..000000000000 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration_old_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HostnameConfigurationOld(Model): - """Custom hostname configuration. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Hostname type. Possible values include: 'Proxy', - 'Portal', 'Management', 'Scm' - :type type: str or ~azure.mgmt.apimanagement.models.HostnameType - :param hostname: Required. Hostname to configure. - :type hostname: str - :param certificate: Required. Certificate information. - :type certificate: ~azure.mgmt.apimanagement.models.CertificateInformation - """ - - _validation = { - 'type': {'required': True}, - 'hostname': {'required': True}, - 'certificate': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'HostnameType'}, - 'hostname': {'key': 'hostname', 'type': 'str'}, - 'certificate': {'key': 'certificate', 'type': 'CertificateInformation'}, - } - - def __init__(self, *, type, hostname: str, certificate, **kwargs) -> None: - super(HostnameConfigurationOld, self).__init__(**kwargs) - self.type = type - self.hostname = hostname - self.certificate = certificate diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration_py3.py index 05902fd646de..8770649147a2 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration_py3.py @@ -18,7 +18,7 @@ class HostnameConfiguration(Model): All required parameters must be populated in order to send to Azure. :param type: Required. Hostname type. Possible values include: 'Proxy', - 'Portal', 'Management', 'Scm' + 'Portal', 'Management', 'Scm', 'DeveloperPortal' :type type: str or ~azure.mgmt.apimanagement.models.HostnameType :param host_name: Required. Hostname to configure on the Api Management service. @@ -54,7 +54,7 @@ class HostnameConfiguration(Model): } _attribute_map = { - 'type': {'key': 'type', 'type': 'HostnameType'}, + 'type': {'key': 'type', 'type': 'str'}, 'host_name': {'key': 'hostName', 'type': 'str'}, 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, 'encoded_certificate': {'key': 'encodedCertificate', 'type': 'str'}, diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/http_message_diagnostic.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/http_message_diagnostic.py new file mode 100644 index 000000000000..2c2651f31bb8 --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/http_message_diagnostic.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpMessageDiagnostic(Model): + """Http message diagnostic settings. + + :param headers: Array of HTTP Headers to log. + :type headers: list[str] + :param body: Body logging settings. + :type body: ~azure.mgmt.apimanagement.models.BodyDiagnosticSettings + """ + + _attribute_map = { + 'headers': {'key': 'headers', 'type': '[str]'}, + 'body': {'key': 'body', 'type': 'BodyDiagnosticSettings'}, + } + + def __init__(self, **kwargs): + super(HttpMessageDiagnostic, self).__init__(**kwargs) + self.headers = kwargs.get('headers', None) + self.body = kwargs.get('body', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/http_message_diagnostic_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/http_message_diagnostic_py3.py new file mode 100644 index 000000000000..28171eee4cd7 --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/http_message_diagnostic_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpMessageDiagnostic(Model): + """Http message diagnostic settings. + + :param headers: Array of HTTP Headers to log. + :type headers: list[str] + :param body: Body logging settings. + :type body: ~azure.mgmt.apimanagement.models.BodyDiagnosticSettings + """ + + _attribute_map = { + 'headers': {'key': 'headers', 'type': '[str]'}, + 'body': {'key': 'body', 'type': 'BodyDiagnosticSettings'}, + } + + def __init__(self, *, headers=None, body=None, **kwargs) -> None: + super(HttpMessageDiagnostic, self).__init__(**kwargs) + self.headers = headers + self.body = body diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_base_parameters.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_base_parameters.py index dab55bcd8709..0db06fcfcf1e 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_base_parameters.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_base_parameters.py @@ -21,6 +21,9 @@ class IdentityProviderBaseParameters(Model): :param allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory login. :type allowed_tenants: list[str] + :param authority: OpenID Connect discovery endpoint hostname for AAD or + AAD B2C. + :type authority: str :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. :type signup_policy_name: str @@ -46,6 +49,7 @@ class IdentityProviderBaseParameters(Model): _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'allowed_tenants': {'key': 'allowedTenants', 'type': '[str]'}, + 'authority': {'key': 'authority', 'type': 'str'}, 'signup_policy_name': {'key': 'signupPolicyName', 'type': 'str'}, 'signin_policy_name': {'key': 'signinPolicyName', 'type': 'str'}, 'profile_editing_policy_name': {'key': 'profileEditingPolicyName', 'type': 'str'}, @@ -56,6 +60,7 @@ def __init__(self, **kwargs): super(IdentityProviderBaseParameters, self).__init__(**kwargs) self.type = kwargs.get('type', None) self.allowed_tenants = kwargs.get('allowed_tenants', None) + self.authority = kwargs.get('authority', None) self.signup_policy_name = kwargs.get('signup_policy_name', None) self.signin_policy_name = kwargs.get('signin_policy_name', None) self.profile_editing_policy_name = kwargs.get('profile_editing_policy_name', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_base_parameters_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_base_parameters_py3.py index 859112aa287e..e29979994684 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_base_parameters_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_base_parameters_py3.py @@ -21,6 +21,9 @@ class IdentityProviderBaseParameters(Model): :param allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory login. :type allowed_tenants: list[str] + :param authority: OpenID Connect discovery endpoint hostname for AAD or + AAD B2C. + :type authority: str :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. :type signup_policy_name: str @@ -46,16 +49,18 @@ class IdentityProviderBaseParameters(Model): _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'allowed_tenants': {'key': 'allowedTenants', 'type': '[str]'}, + 'authority': {'key': 'authority', 'type': 'str'}, 'signup_policy_name': {'key': 'signupPolicyName', 'type': 'str'}, 'signin_policy_name': {'key': 'signinPolicyName', 'type': 'str'}, 'profile_editing_policy_name': {'key': 'profileEditingPolicyName', 'type': 'str'}, 'password_reset_policy_name': {'key': 'passwordResetPolicyName', 'type': 'str'}, } - def __init__(self, *, type=None, allowed_tenants=None, signup_policy_name: str=None, signin_policy_name: str=None, profile_editing_policy_name: str=None, password_reset_policy_name: str=None, **kwargs) -> None: + def __init__(self, *, type=None, allowed_tenants=None, authority: str=None, signup_policy_name: str=None, signin_policy_name: str=None, profile_editing_policy_name: str=None, password_reset_policy_name: str=None, **kwargs) -> None: super(IdentityProviderBaseParameters, self).__init__(**kwargs) self.type = type self.allowed_tenants = allowed_tenants + self.authority = authority self.signup_policy_name = signup_policy_name self.signin_policy_name = signin_policy_name self.profile_editing_policy_name = profile_editing_policy_name diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_contract.py index 662e6ad9dad6..6acc2feb7d52 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_contract.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_contract.py @@ -34,6 +34,9 @@ class IdentityProviderContract(Resource): :param allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory login. :type allowed_tenants: list[str] + :param authority: OpenID Connect discovery endpoint hostname for AAD or + AAD B2C. + :type authority: str :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. :type signup_policy_name: str @@ -76,6 +79,7 @@ class IdentityProviderContract(Resource): 'type': {'key': 'type', 'type': 'str'}, 'identity_provider_contract_type': {'key': 'properties.type', 'type': 'str'}, 'allowed_tenants': {'key': 'properties.allowedTenants', 'type': '[str]'}, + 'authority': {'key': 'properties.authority', 'type': 'str'}, 'signup_policy_name': {'key': 'properties.signupPolicyName', 'type': 'str'}, 'signin_policy_name': {'key': 'properties.signinPolicyName', 'type': 'str'}, 'profile_editing_policy_name': {'key': 'properties.profileEditingPolicyName', 'type': 'str'}, @@ -88,6 +92,7 @@ def __init__(self, **kwargs): super(IdentityProviderContract, self).__init__(**kwargs) self.identity_provider_contract_type = kwargs.get('identity_provider_contract_type', None) self.allowed_tenants = kwargs.get('allowed_tenants', None) + self.authority = kwargs.get('authority', None) self.signup_policy_name = kwargs.get('signup_policy_name', None) self.signin_policy_name = kwargs.get('signin_policy_name', None) self.profile_editing_policy_name = kwargs.get('profile_editing_policy_name', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_contract_py3.py index d96b8e34df59..d27cad4a2691 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_contract_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_contract_py3.py @@ -34,6 +34,9 @@ class IdentityProviderContract(Resource): :param allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory login. :type allowed_tenants: list[str] + :param authority: OpenID Connect discovery endpoint hostname for AAD or + AAD B2C. + :type authority: str :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. :type signup_policy_name: str @@ -76,6 +79,7 @@ class IdentityProviderContract(Resource): 'type': {'key': 'type', 'type': 'str'}, 'identity_provider_contract_type': {'key': 'properties.type', 'type': 'str'}, 'allowed_tenants': {'key': 'properties.allowedTenants', 'type': '[str]'}, + 'authority': {'key': 'properties.authority', 'type': 'str'}, 'signup_policy_name': {'key': 'properties.signupPolicyName', 'type': 'str'}, 'signin_policy_name': {'key': 'properties.signinPolicyName', 'type': 'str'}, 'profile_editing_policy_name': {'key': 'properties.profileEditingPolicyName', 'type': 'str'}, @@ -84,10 +88,11 @@ class IdentityProviderContract(Resource): 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, } - def __init__(self, *, client_id: str, client_secret: str, identity_provider_contract_type=None, allowed_tenants=None, signup_policy_name: str=None, signin_policy_name: str=None, profile_editing_policy_name: str=None, password_reset_policy_name: str=None, **kwargs) -> None: + def __init__(self, *, client_id: str, client_secret: str, identity_provider_contract_type=None, allowed_tenants=None, authority: str=None, signup_policy_name: str=None, signin_policy_name: str=None, profile_editing_policy_name: str=None, password_reset_policy_name: str=None, **kwargs) -> None: super(IdentityProviderContract, self).__init__(**kwargs) self.identity_provider_contract_type = identity_provider_contract_type self.allowed_tenants = allowed_tenants + self.authority = authority self.signup_policy_name = signup_policy_name self.signin_policy_name = signin_policy_name self.profile_editing_policy_name = profile_editing_policy_name diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_update_parameters.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_update_parameters.py index deb45fefcb36..ef23abf0a398 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_update_parameters.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_update_parameters.py @@ -21,6 +21,9 @@ class IdentityProviderUpdateParameters(Model): :param allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory login. :type allowed_tenants: list[str] + :param authority: OpenID Connect discovery endpoint hostname for AAD or + AAD B2C. + :type authority: str :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. :type signup_policy_name: str @@ -57,6 +60,7 @@ class IdentityProviderUpdateParameters(Model): _attribute_map = { 'type': {'key': 'properties.type', 'type': 'str'}, 'allowed_tenants': {'key': 'properties.allowedTenants', 'type': '[str]'}, + 'authority': {'key': 'properties.authority', 'type': 'str'}, 'signup_policy_name': {'key': 'properties.signupPolicyName', 'type': 'str'}, 'signin_policy_name': {'key': 'properties.signinPolicyName', 'type': 'str'}, 'profile_editing_policy_name': {'key': 'properties.profileEditingPolicyName', 'type': 'str'}, @@ -69,6 +73,7 @@ def __init__(self, **kwargs): super(IdentityProviderUpdateParameters, self).__init__(**kwargs) self.type = kwargs.get('type', None) self.allowed_tenants = kwargs.get('allowed_tenants', None) + self.authority = kwargs.get('authority', None) self.signup_policy_name = kwargs.get('signup_policy_name', None) self.signin_policy_name = kwargs.get('signin_policy_name', None) self.profile_editing_policy_name = kwargs.get('profile_editing_policy_name', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_update_parameters_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_update_parameters_py3.py index 4d2aaeb14ff1..2cad5892a326 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_update_parameters_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_update_parameters_py3.py @@ -21,6 +21,9 @@ class IdentityProviderUpdateParameters(Model): :param allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory login. :type allowed_tenants: list[str] + :param authority: OpenID Connect discovery endpoint hostname for AAD or + AAD B2C. + :type authority: str :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. :type signup_policy_name: str @@ -57,6 +60,7 @@ class IdentityProviderUpdateParameters(Model): _attribute_map = { 'type': {'key': 'properties.type', 'type': 'str'}, 'allowed_tenants': {'key': 'properties.allowedTenants', 'type': '[str]'}, + 'authority': {'key': 'properties.authority', 'type': 'str'}, 'signup_policy_name': {'key': 'properties.signupPolicyName', 'type': 'str'}, 'signin_policy_name': {'key': 'properties.signinPolicyName', 'type': 'str'}, 'profile_editing_policy_name': {'key': 'properties.profileEditingPolicyName', 'type': 'str'}, @@ -65,10 +69,11 @@ class IdentityProviderUpdateParameters(Model): 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, } - def __init__(self, *, type=None, allowed_tenants=None, signup_policy_name: str=None, signin_policy_name: str=None, profile_editing_policy_name: str=None, password_reset_policy_name: str=None, client_id: str=None, client_secret: str=None, **kwargs) -> None: + def __init__(self, *, type=None, allowed_tenants=None, authority: str=None, signup_policy_name: str=None, signin_policy_name: str=None, profile_editing_policy_name: str=None, password_reset_policy_name: str=None, client_id: str=None, client_secret: str=None, **kwargs) -> None: super(IdentityProviderUpdateParameters, self).__init__(**kwargs) self.type = type self.allowed_tenants = allowed_tenants + self.authority = authority self.signup_policy_name = signup_policy_name self.signin_policy_name = signin_policy_name self.profile_editing_policy_name = profile_editing_policy_name diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_contract.py index d73d8fba23ec..16213cac73bb 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_contract.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_contract.py @@ -38,6 +38,9 @@ class LoggerContract(Resource): :param is_buffered: Whether records are buffered in the logger before publishing. Default is assumed to be true. :type is_buffered: bool + :param resource_id: Azure Resource Id of a log target (either Azure Event + Hub resource or Azure Application Insights resource). + :type resource_id: str """ _validation = { @@ -57,6 +60,7 @@ class LoggerContract(Resource): 'description': {'key': 'properties.description', 'type': 'str'}, 'credentials': {'key': 'properties.credentials', 'type': '{str}'}, 'is_buffered': {'key': 'properties.isBuffered', 'type': 'bool'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, } def __init__(self, **kwargs): @@ -65,3 +69,4 @@ def __init__(self, **kwargs): self.description = kwargs.get('description', None) self.credentials = kwargs.get('credentials', None) self.is_buffered = kwargs.get('is_buffered', None) + self.resource_id = kwargs.get('resource_id', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_contract_py3.py index fa2b08eea139..59ceb33e5ea3 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_contract_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_contract_py3.py @@ -38,6 +38,9 @@ class LoggerContract(Resource): :param is_buffered: Whether records are buffered in the logger before publishing. Default is assumed to be true. :type is_buffered: bool + :param resource_id: Azure Resource Id of a log target (either Azure Event + Hub resource or Azure Application Insights resource). + :type resource_id: str """ _validation = { @@ -57,11 +60,13 @@ class LoggerContract(Resource): 'description': {'key': 'properties.description', 'type': 'str'}, 'credentials': {'key': 'properties.credentials', 'type': '{str}'}, 'is_buffered': {'key': 'properties.isBuffered', 'type': 'bool'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, } - def __init__(self, *, logger_type, credentials, description: str=None, is_buffered: bool=None, **kwargs) -> None: + def __init__(self, *, logger_type, credentials, description: str=None, is_buffered: bool=None, resource_id: str=None, **kwargs) -> None: super(LoggerContract, self).__init__(**kwargs) self.logger_type = logger_type self.description = description self.credentials = credentials self.is_buffered = is_buffered + self.resource_id = resource_id diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/parameter_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/parameter_contract.py index 031f708372d9..147a96efdf68 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/parameter_contract.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/parameter_contract.py @@ -25,7 +25,7 @@ class ParameterContract(Model): :type type: str :param default_value: Default parameter value. :type default_value: str - :param required: whether parameter is required or not. + :param required: Specifies whether parameter is required or not. :type required: bool :param values: Parameter values. :type values: list[str] diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/parameter_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/parameter_contract_py3.py index 34a0c66a77d5..5f6ea4a0e91b 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/parameter_contract_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/parameter_contract_py3.py @@ -25,7 +25,7 @@ class ParameterContract(Model): :type type: str :param default_value: Default parameter value. :type default_value: str - :param required: whether parameter is required or not. + :param required: Specifies whether parameter is required or not. :type required: bool :param values: Parameter values. :type values: list[str] diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/pipeline_diagnostic_settings.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/pipeline_diagnostic_settings.py new file mode 100644 index 000000000000..0089215e3802 --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/pipeline_diagnostic_settings.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PipelineDiagnosticSettings(Model): + """Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. + + :param request: Diagnostic settings for request. + :type request: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic + :param response: Diagnostic settings for response. + :type response: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic + """ + + _attribute_map = { + 'request': {'key': 'request', 'type': 'HttpMessageDiagnostic'}, + 'response': {'key': 'response', 'type': 'HttpMessageDiagnostic'}, + } + + def __init__(self, **kwargs): + super(PipelineDiagnosticSettings, self).__init__(**kwargs) + self.request = kwargs.get('request', None) + self.response = kwargs.get('response', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/pipeline_diagnostic_settings_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/pipeline_diagnostic_settings_py3.py new file mode 100644 index 000000000000..ba30e8468d35 --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/pipeline_diagnostic_settings_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PipelineDiagnosticSettings(Model): + """Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. + + :param request: Diagnostic settings for request. + :type request: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic + :param response: Diagnostic settings for response. + :type response: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic + """ + + _attribute_map = { + 'request': {'key': 'request', 'type': 'HttpMessageDiagnostic'}, + 'response': {'key': 'response', 'type': 'HttpMessageDiagnostic'}, + } + + def __init__(self, *, request=None, response=None, **kwargs) -> None: + super(PipelineDiagnosticSettings, self).__init__(**kwargs) + self.request = request + self.response = response diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_contract.py index 63747be29cfd..313c69931b1c 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_contract.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_contract.py @@ -26,32 +26,29 @@ class PolicyContract(Resource): :vartype name: str :ivar type: Resource type for API Management resource. :vartype type: str - :param policy_content: Required. Json escaped Xml Encoded contents of the - Policy. - :type policy_content: str - :param content_format: Format of the policyContent. Possible values - include: 'xml', 'xml-link', 'rawxml', 'rawxml-link'. Default value: "xml" - . - :type content_format: str or - ~azure.mgmt.apimanagement.models.PolicyContentFormat + :param value: Required. Contents of the Policy as defined by the format. + :type value: str + :param format: Format of the policyContent. Possible values include: + 'xml', 'xml-link', 'rawxml', 'rawxml-link'. Default value: "xml" . + :type format: str or ~azure.mgmt.apimanagement.models.PolicyContentFormat """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'policy_content': {'required': True}, + 'value': {'required': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'policy_content': {'key': 'properties.policyContent', 'type': 'str'}, - 'content_format': {'key': 'properties.contentFormat', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'str'}, } def __init__(self, **kwargs): super(PolicyContract, self).__init__(**kwargs) - self.policy_content = kwargs.get('policy_content', None) - self.content_format = kwargs.get('content_format', "xml") + self.value = kwargs.get('value', None) + self.format = kwargs.get('format', "xml") diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_contract_py3.py index 51b99639b6d4..34ff1900dac8 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_contract_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_contract_py3.py @@ -26,32 +26,29 @@ class PolicyContract(Resource): :vartype name: str :ivar type: Resource type for API Management resource. :vartype type: str - :param policy_content: Required. Json escaped Xml Encoded contents of the - Policy. - :type policy_content: str - :param content_format: Format of the policyContent. Possible values - include: 'xml', 'xml-link', 'rawxml', 'rawxml-link'. Default value: "xml" - . - :type content_format: str or - ~azure.mgmt.apimanagement.models.PolicyContentFormat + :param value: Required. Contents of the Policy as defined by the format. + :type value: str + :param format: Format of the policyContent. Possible values include: + 'xml', 'xml-link', 'rawxml', 'rawxml-link'. Default value: "xml" . + :type format: str or ~azure.mgmt.apimanagement.models.PolicyContentFormat """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'policy_content': {'required': True}, + 'value': {'required': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'policy_content': {'key': 'properties.policyContent', 'type': 'str'}, - 'content_format': {'key': 'properties.contentFormat', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'str'}, } - def __init__(self, *, policy_content: str, content_format="xml", **kwargs) -> None: + def __init__(self, *, value: str, format="xml", **kwargs) -> None: super(PolicyContract, self).__init__(**kwargs) - self.policy_content = policy_content - self.content_format = content_format + self.value = value + self.format = format diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_contract.py index 82bde48700b9..c25ec9bde595 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_contract.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_contract.py @@ -48,7 +48,7 @@ class ProductContract(Resource): subscriptionRequired property is present and has a value of false. :type approval_required: bool :param subscriptions_limit: Whether the number of subscriptions a user can - have to this product at the same time. Set to null or omit to allow + have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :type subscriptions_limit: int diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_contract_py3.py index adefb099a2e6..2183cdb4de8a 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_contract_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_contract_py3.py @@ -48,7 +48,7 @@ class ProductContract(Resource): subscriptionRequired property is present and has a value of false. :type approval_required: bool :param subscriptions_limit: Whether the number of subscriptions a user can - have to this product at the same time. Set to null or omit to allow + have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :type subscriptions_limit: int diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_entity_base_parameters.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_entity_base_parameters.py index 25ab8d74a8c1..4e1f97bc6694 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_entity_base_parameters.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_entity_base_parameters.py @@ -37,7 +37,7 @@ class ProductEntityBaseParameters(Model): subscriptionRequired property is present and has a value of false. :type approval_required: bool :param subscriptions_limit: Whether the number of subscriptions a user can - have to this product at the same time. Set to null or omit to allow + have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :type subscriptions_limit: int diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_entity_base_parameters_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_entity_base_parameters_py3.py index df6476ffa2cd..5574461683ea 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_entity_base_parameters_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_entity_base_parameters_py3.py @@ -37,7 +37,7 @@ class ProductEntityBaseParameters(Model): subscriptionRequired property is present and has a value of false. :type approval_required: bool :param subscriptions_limit: Whether the number of subscriptions a user can - have to this product at the same time. Set to null or omit to allow + have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :type subscriptions_limit: int diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_tag_resource_contract_properties.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_tag_resource_contract_properties.py index ee62ee30fd43..0b32a2c9df40 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_tag_resource_contract_properties.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_tag_resource_contract_properties.py @@ -39,7 +39,7 @@ class ProductTagResourceContractProperties(ProductEntityBaseParameters): subscriptionRequired property is present and has a value of false. :type approval_required: bool :param subscriptions_limit: Whether the number of subscriptions a user can - have to this product at the same time. Set to null or omit to allow + have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :type subscriptions_limit: int diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_tag_resource_contract_properties_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_tag_resource_contract_properties_py3.py index d0b95a1d9782..ecb7fef20809 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_tag_resource_contract_properties_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_tag_resource_contract_properties_py3.py @@ -39,7 +39,7 @@ class ProductTagResourceContractProperties(ProductEntityBaseParameters): subscriptionRequired property is present and has a value of false. :type approval_required: bool :param subscriptions_limit: Whether the number of subscriptions a user can - have to this product at the same time. Set to null or omit to allow + have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :type subscriptions_limit: int diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_update_parameters.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_update_parameters.py index 3d71fde94ca9..ce8e0d73d728 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_update_parameters.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_update_parameters.py @@ -37,7 +37,7 @@ class ProductUpdateParameters(Model): subscriptionRequired property is present and has a value of false. :type approval_required: bool :param subscriptions_limit: Whether the number of subscriptions a user can - have to this product at the same time. Set to null or omit to allow + have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :type subscriptions_limit: int diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_update_parameters_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_update_parameters_py3.py index 76d097f2f94c..9154962e697d 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_update_parameters_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_update_parameters_py3.py @@ -37,7 +37,7 @@ class ProductUpdateParameters(Model): subscriptionRequired property is present and has a value of false. :type approval_required: bool :param subscriptions_limit: Whether the number of subscriptions a user can - have to this product at the same time. Set to null or omit to allow + have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :type subscriptions_limit: int diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku.py index 5a9872227d45..c130ac57f637 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku.py @@ -16,7 +16,7 @@ class ResourceSku(Model): """Describes an available API Management SKU. :param name: Name of the Sku. Possible values include: 'Developer', - 'Standard', 'Premium', 'Basic' + 'Standard', 'Premium', 'Basic', 'Consumption' :type name: str or ~azure.mgmt.apimanagement.models.SkuType """ diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_capacity.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_capacity.py index d18bd3fcc18d..54109ac235b1 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_capacity.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_capacity.py @@ -41,7 +41,7 @@ class ResourceSkuCapacity(Model): 'minimum': {'key': 'minimum', 'type': 'int'}, 'maximum': {'key': 'maximum', 'type': 'int'}, 'default': {'key': 'default', 'type': 'int'}, - 'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, } def __init__(self, **kwargs): diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_capacity_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_capacity_py3.py index a42454714695..27d799babc94 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_capacity_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_capacity_py3.py @@ -41,7 +41,7 @@ class ResourceSkuCapacity(Model): 'minimum': {'key': 'minimum', 'type': 'int'}, 'maximum': {'key': 'maximum', 'type': 'int'}, 'default': {'key': 'default', 'type': 'int'}, - 'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, } def __init__(self, **kwargs) -> None: diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_py3.py index cf3af157e84a..7e30812cefcd 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_py3.py @@ -16,7 +16,7 @@ class ResourceSku(Model): """Describes an available API Management SKU. :param name: Name of the Sku. Possible values include: 'Developer', - 'Standard', 'Premium', 'Basic' + 'Standard', 'Premium', 'Basic', 'Consumption' :type name: str or ~azure.mgmt.apimanagement.models.SkuType """ diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/sampling_settings.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/sampling_settings.py new file mode 100644 index 000000000000..c773f5b593b1 --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/sampling_settings.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SamplingSettings(Model): + """Sampling settings for Diagnostic. + + :param sampling_type: Sampling type. Possible values include: 'fixed' + :type sampling_type: str or ~azure.mgmt.apimanagement.models.SamplingType + :param percentage: Rate of sampling for fixed-rate sampling. + :type percentage: float + """ + + _validation = { + 'percentage': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'sampling_type': {'key': 'samplingType', 'type': 'str'}, + 'percentage': {'key': 'percentage', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(SamplingSettings, self).__init__(**kwargs) + self.sampling_type = kwargs.get('sampling_type', None) + self.percentage = kwargs.get('percentage', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/sampling_settings_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/sampling_settings_py3.py new file mode 100644 index 000000000000..544dbda52a7f --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/sampling_settings_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SamplingSettings(Model): + """Sampling settings for Diagnostic. + + :param sampling_type: Sampling type. Possible values include: 'fixed' + :type sampling_type: str or ~azure.mgmt.apimanagement.models.SamplingType + :param percentage: Rate of sampling for fixed-rate sampling. + :type percentage: float + """ + + _validation = { + 'percentage': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'sampling_type': {'key': 'samplingType', 'type': 'str'}, + 'percentage': {'key': 'percentage', 'type': 'float'}, + } + + def __init__(self, *, sampling_type=None, percentage: float=None, **kwargs) -> None: + super(SamplingSettings, self).__init__(**kwargs) + self.sampling_type = sampling_type + self.percentage = percentage diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_contract.py index ad74a6e536c2..98d716699780 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_contract.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_contract.py @@ -26,14 +26,13 @@ class SubscriptionContract(Resource): :vartype name: str :ivar type: Resource type for API Management resource. :vartype type: str - :param user_id: Required. The user resource identifier of the subscription - owner. The value is a valid relative URL in the format of /users/{uid} - where {uid} is a user identifier. - :type user_id: str - :param product_id: Required. The product resource identifier of the - subscribed product. The value is a valid relative URL in the format of - /products/{productId} where {productId} is a product identifier. - :type product_id: str + :param owner_id: The user resource identifier of the subscription owner. + The value is a valid relative URL in the format of /users/{userId} where + {userId} is a user identifier. + :type owner_id: str + :param scope: Required. Scope like /products/{productId} or /apis or + /apis/{apiId}. + :type scope: str :param display_name: The name of the subscription, or null if the subscription has no name. :type display_name: str @@ -80,14 +79,15 @@ class SubscriptionContract(Resource): :param state_comment: Optional subscription comment added by an administrator. :type state_comment: str + :param allow_tracing: Determines whether tracing is enabled + :type allow_tracing: bool """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'user_id': {'required': True}, - 'product_id': {'required': True}, + 'scope': {'required': True}, 'display_name': {'max_length': 100, 'min_length': 0}, 'state': {'required': True}, 'created_date': {'readonly': True}, @@ -99,8 +99,8 @@ class SubscriptionContract(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'user_id': {'key': 'properties.userId', 'type': 'str'}, - 'product_id': {'key': 'properties.productId', 'type': 'str'}, + 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, @@ -111,12 +111,13 @@ class SubscriptionContract(Resource): 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, 'state_comment': {'key': 'properties.stateComment', 'type': 'str'}, + 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, } def __init__(self, **kwargs): super(SubscriptionContract, self).__init__(**kwargs) - self.user_id = kwargs.get('user_id', None) - self.product_id = kwargs.get('product_id', None) + self.owner_id = kwargs.get('owner_id', None) + self.scope = kwargs.get('scope', None) self.display_name = kwargs.get('display_name', None) self.state = kwargs.get('state', None) self.created_date = None @@ -127,3 +128,4 @@ def __init__(self, **kwargs): self.primary_key = kwargs.get('primary_key', None) self.secondary_key = kwargs.get('secondary_key', None) self.state_comment = kwargs.get('state_comment', None) + self.allow_tracing = kwargs.get('allow_tracing', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_contract_py3.py index 11147bb64947..3735162a4c76 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_contract_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_contract_py3.py @@ -26,14 +26,13 @@ class SubscriptionContract(Resource): :vartype name: str :ivar type: Resource type for API Management resource. :vartype type: str - :param user_id: Required. The user resource identifier of the subscription - owner. The value is a valid relative URL in the format of /users/{uid} - where {uid} is a user identifier. - :type user_id: str - :param product_id: Required. The product resource identifier of the - subscribed product. The value is a valid relative URL in the format of - /products/{productId} where {productId} is a product identifier. - :type product_id: str + :param owner_id: The user resource identifier of the subscription owner. + The value is a valid relative URL in the format of /users/{userId} where + {userId} is a user identifier. + :type owner_id: str + :param scope: Required. Scope like /products/{productId} or /apis or + /apis/{apiId}. + :type scope: str :param display_name: The name of the subscription, or null if the subscription has no name. :type display_name: str @@ -80,14 +79,15 @@ class SubscriptionContract(Resource): :param state_comment: Optional subscription comment added by an administrator. :type state_comment: str + :param allow_tracing: Determines whether tracing is enabled + :type allow_tracing: bool """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'user_id': {'required': True}, - 'product_id': {'required': True}, + 'scope': {'required': True}, 'display_name': {'max_length': 100, 'min_length': 0}, 'state': {'required': True}, 'created_date': {'readonly': True}, @@ -99,8 +99,8 @@ class SubscriptionContract(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'user_id': {'key': 'properties.userId', 'type': 'str'}, - 'product_id': {'key': 'properties.productId', 'type': 'str'}, + 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, @@ -111,12 +111,13 @@ class SubscriptionContract(Resource): 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, 'state_comment': {'key': 'properties.stateComment', 'type': 'str'}, + 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, } - def __init__(self, *, user_id: str, product_id: str, state, primary_key: str, secondary_key: str, display_name: str=None, start_date=None, expiration_date=None, end_date=None, notification_date=None, state_comment: str=None, **kwargs) -> None: + def __init__(self, *, scope: str, state, primary_key: str, secondary_key: str, owner_id: str=None, display_name: str=None, start_date=None, expiration_date=None, end_date=None, notification_date=None, state_comment: str=None, allow_tracing: bool=None, **kwargs) -> None: super(SubscriptionContract, self).__init__(**kwargs) - self.user_id = user_id - self.product_id = product_id + self.owner_id = owner_id + self.scope = scope self.display_name = display_name self.state = state self.created_date = None @@ -127,3 +128,4 @@ def __init__(self, *, user_id: str, product_id: str, state, primary_key: str, se self.primary_key = primary_key self.secondary_key = secondary_key self.state_comment = state_comment + self.allow_tracing = allow_tracing diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_create_parameters.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_create_parameters.py index 08d8d2c0ebaa..9d5789c6a4a4 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_create_parameters.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_create_parameters.py @@ -17,12 +17,12 @@ class SubscriptionCreateParameters(Model): All required parameters must be populated in order to send to Azure. - :param user_id: Required. User (user id path) for whom subscription is - being created in form /users/{uid} - :type user_id: str - :param product_id: Required. Product (product id path) for which - subscription is being created in form /products/{productId} - :type product_id: str + :param owner_id: User (user id path) for whom subscription is being + created in form /users/{userId} + :type owner_id: str + :param scope: Required. Scope like /products/{productId} or /apis or + /apis/{apiId}. + :type scope: str :param display_name: Required. Subscription name. :type display_name: str :param primary_key: Primary subscription key. If not specified during @@ -42,30 +42,33 @@ class SubscriptionCreateParameters(Model): reached its expiration date and was deactivated. Possible values include: 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled' :type state: str or ~azure.mgmt.apimanagement.models.SubscriptionState + :param allow_tracing: Determines whether tracing can be enabled + :type allow_tracing: bool """ _validation = { - 'user_id': {'required': True}, - 'product_id': {'required': True}, + 'scope': {'required': True}, 'display_name': {'required': True, 'max_length': 100, 'min_length': 1}, 'primary_key': {'max_length': 256, 'min_length': 1}, 'secondary_key': {'max_length': 256, 'min_length': 1}, } _attribute_map = { - 'user_id': {'key': 'properties.userId', 'type': 'str'}, - 'product_id': {'key': 'properties.productId', 'type': 'str'}, + 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, + 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, } def __init__(self, **kwargs): super(SubscriptionCreateParameters, self).__init__(**kwargs) - self.user_id = kwargs.get('user_id', None) - self.product_id = kwargs.get('product_id', None) + self.owner_id = kwargs.get('owner_id', None) + self.scope = kwargs.get('scope', None) self.display_name = kwargs.get('display_name', None) self.primary_key = kwargs.get('primary_key', None) self.secondary_key = kwargs.get('secondary_key', None) self.state = kwargs.get('state', None) + self.allow_tracing = kwargs.get('allow_tracing', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_create_parameters_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_create_parameters_py3.py index 143619798113..10eac288ec91 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_create_parameters_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_create_parameters_py3.py @@ -17,12 +17,12 @@ class SubscriptionCreateParameters(Model): All required parameters must be populated in order to send to Azure. - :param user_id: Required. User (user id path) for whom subscription is - being created in form /users/{uid} - :type user_id: str - :param product_id: Required. Product (product id path) for which - subscription is being created in form /products/{productId} - :type product_id: str + :param owner_id: User (user id path) for whom subscription is being + created in form /users/{userId} + :type owner_id: str + :param scope: Required. Scope like /products/{productId} or /apis or + /apis/{apiId}. + :type scope: str :param display_name: Required. Subscription name. :type display_name: str :param primary_key: Primary subscription key. If not specified during @@ -42,30 +42,33 @@ class SubscriptionCreateParameters(Model): reached its expiration date and was deactivated. Possible values include: 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled' :type state: str or ~azure.mgmt.apimanagement.models.SubscriptionState + :param allow_tracing: Determines whether tracing can be enabled + :type allow_tracing: bool """ _validation = { - 'user_id': {'required': True}, - 'product_id': {'required': True}, + 'scope': {'required': True}, 'display_name': {'required': True, 'max_length': 100, 'min_length': 1}, 'primary_key': {'max_length': 256, 'min_length': 1}, 'secondary_key': {'max_length': 256, 'min_length': 1}, } _attribute_map = { - 'user_id': {'key': 'properties.userId', 'type': 'str'}, - 'product_id': {'key': 'properties.productId', 'type': 'str'}, + 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, + 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, } - def __init__(self, *, user_id: str, product_id: str, display_name: str, primary_key: str=None, secondary_key: str=None, state=None, **kwargs) -> None: + def __init__(self, *, scope: str, display_name: str, owner_id: str=None, primary_key: str=None, secondary_key: str=None, state=None, allow_tracing: bool=None, **kwargs) -> None: super(SubscriptionCreateParameters, self).__init__(**kwargs) - self.user_id = user_id - self.product_id = product_id + self.owner_id = owner_id + self.scope = scope self.display_name = display_name self.primary_key = primary_key self.secondary_key = secondary_key self.state = state + self.allow_tracing = allow_tracing diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_update_parameters.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_update_parameters.py index 7dc1180eb57e..c17af927f3ad 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_update_parameters.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_update_parameters.py @@ -15,10 +15,10 @@ class SubscriptionUpdateParameters(Model): """Subscription update details. - :param user_id: User identifier path: /users/{uid} - :type user_id: str - :param product_id: Product identifier path: /products/{productId} - :type product_id: str + :param owner_id: User identifier path: /users/{userId} + :type owner_id: str + :param scope: Scope like /products/{productId} or /apis or /apis/{apiId} + :type scope: str :param expiration_date: Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The @@ -44,6 +44,8 @@ class SubscriptionUpdateParameters(Model): :param state_comment: Comments describing subscription state change by the administrator. :type state_comment: str + :param allow_tracing: Determines whether tracing can be enabled + :type allow_tracing: bool """ _validation = { @@ -52,23 +54,25 @@ class SubscriptionUpdateParameters(Model): } _attribute_map = { - 'user_id': {'key': 'properties.userId', 'type': 'str'}, - 'product_id': {'key': 'properties.productId', 'type': 'str'}, + 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, 'state_comment': {'key': 'properties.stateComment', 'type': 'str'}, + 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, } def __init__(self, **kwargs): super(SubscriptionUpdateParameters, self).__init__(**kwargs) - self.user_id = kwargs.get('user_id', None) - self.product_id = kwargs.get('product_id', None) + self.owner_id = kwargs.get('owner_id', None) + self.scope = kwargs.get('scope', None) self.expiration_date = kwargs.get('expiration_date', None) self.display_name = kwargs.get('display_name', None) self.primary_key = kwargs.get('primary_key', None) self.secondary_key = kwargs.get('secondary_key', None) self.state = kwargs.get('state', None) self.state_comment = kwargs.get('state_comment', None) + self.allow_tracing = kwargs.get('allow_tracing', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_update_parameters_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_update_parameters_py3.py index 1a4e344d340e..18e1dd2f5df8 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_update_parameters_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_update_parameters_py3.py @@ -15,10 +15,10 @@ class SubscriptionUpdateParameters(Model): """Subscription update details. - :param user_id: User identifier path: /users/{uid} - :type user_id: str - :param product_id: Product identifier path: /products/{productId} - :type product_id: str + :param owner_id: User identifier path: /users/{userId} + :type owner_id: str + :param scope: Scope like /products/{productId} or /apis or /apis/{apiId} + :type scope: str :param expiration_date: Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The @@ -44,6 +44,8 @@ class SubscriptionUpdateParameters(Model): :param state_comment: Comments describing subscription state change by the administrator. :type state_comment: str + :param allow_tracing: Determines whether tracing can be enabled + :type allow_tracing: bool """ _validation = { @@ -52,23 +54,25 @@ class SubscriptionUpdateParameters(Model): } _attribute_map = { - 'user_id': {'key': 'properties.userId', 'type': 'str'}, - 'product_id': {'key': 'properties.productId', 'type': 'str'}, + 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, 'state_comment': {'key': 'properties.stateComment', 'type': 'str'}, + 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, } - def __init__(self, *, user_id: str=None, product_id: str=None, expiration_date=None, display_name: str=None, primary_key: str=None, secondary_key: str=None, state=None, state_comment: str=None, **kwargs) -> None: + def __init__(self, *, owner_id: str=None, scope: str=None, expiration_date=None, display_name: str=None, primary_key: str=None, secondary_key: str=None, state=None, state_comment: str=None, allow_tracing: bool=None, **kwargs) -> None: super(SubscriptionUpdateParameters, self).__init__(**kwargs) - self.user_id = user_id - self.product_id = product_id + self.owner_id = owner_id + self.scope = scope self.expiration_date = expiration_date self.display_name = display_name self.primary_key = primary_key self.secondary_key = secondary_key self.state = state self.state_comment = state_comment + self.allow_tracing = allow_tracing diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py index 6a0ca6ece5e8..1e1aeda77f92 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py @@ -9,40 +9,43 @@ # regenerated. # -------------------------------------------------------------------------- -from .policy_operations import PolicyOperations -from .policy_snippets_operations import PolicySnippetsOperations -from .regions_operations import RegionsOperations from .api_operations import ApiOperations -from .api_revisions_operations import ApiRevisionsOperations +from .api_revision_operations import ApiRevisionOperations from .api_release_operations import ApiReleaseOperations from .api_operation_operations import ApiOperationOperations from .api_operation_policy_operations import ApiOperationPolicyOperations +from .tag_operations import TagOperations from .api_product_operations import ApiProductOperations from .api_policy_operations import ApiPolicyOperations from .api_schema_operations import ApiSchemaOperations from .api_diagnostic_operations import ApiDiagnosticOperations -from .api_diagnostic_logger_operations import ApiDiagnosticLoggerOperations from .api_issue_operations import ApiIssueOperations from .api_issue_comment_operations import ApiIssueCommentOperations from .api_issue_attachment_operations import ApiIssueAttachmentOperations +from .api_tag_description_operations import ApiTagDescriptionOperations +from .operation_operations import OperationOperations +from .api_version_set_operations import ApiVersionSetOperations from .authorization_server_operations import AuthorizationServerOperations from .backend_operations import BackendOperations +from .cache_operations import CacheOperations from .certificate_operations import CertificateOperations from .api_management_operations import ApiManagementOperations from .api_management_service_skus_operations import ApiManagementServiceSkusOperations from .api_management_service_operations import ApiManagementServiceOperations from .diagnostic_operations import DiagnosticOperations -from .diagnostic_logger_operations import DiagnosticLoggerOperations from .email_template_operations import EmailTemplateOperations from .group_operations import GroupOperations from .group_user_operations import GroupUserOperations from .identity_provider_operations import IdentityProviderOperations +from .issue_operations import IssueOperations from .logger_operations import LoggerOperations +from .network_status_operations import NetworkStatusOperations from .notification_operations import NotificationOperations from .notification_recipient_user_operations import NotificationRecipientUserOperations from .notification_recipient_email_operations import NotificationRecipientEmailOperations -from .network_status_operations import NetworkStatusOperations from .open_id_connect_provider_operations import OpenIdConnectProviderOperations +from .policy_operations import PolicyOperations +from .policy_snippet_operations import PolicySnippetOperations from .sign_in_settings_operations import SignInSettingsOperations from .sign_up_settings_operations import SignUpSettingsOperations from .delegation_settings_operations import DelegationSettingsOperations @@ -54,12 +57,10 @@ from .property_operations import PropertyOperations from .quota_by_counter_keys_operations import QuotaByCounterKeysOperations from .quota_by_period_keys_operations import QuotaByPeriodKeysOperations +from .region_operations import RegionOperations from .reports_operations import ReportsOperations from .subscription_operations import SubscriptionOperations from .tag_resource_operations import TagResourceOperations -from .tag_operations import TagOperations -from .tag_description_operations import TagDescriptionOperations -from .operation_operations import OperationOperations from .tenant_access_operations import TenantAccessOperations from .tenant_access_git_operations import TenantAccessGitOperations from .tenant_configuration_operations import TenantConfigurationOperations @@ -67,44 +68,47 @@ from .user_group_operations import UserGroupOperations from .user_subscription_operations import UserSubscriptionOperations from .user_identities_operations import UserIdentitiesOperations -from .api_version_set_operations import ApiVersionSetOperations +from .user_confirmation_password_operations import UserConfirmationPasswordOperations from .api_export_operations import ApiExportOperations __all__ = [ - 'PolicyOperations', - 'PolicySnippetsOperations', - 'RegionsOperations', 'ApiOperations', - 'ApiRevisionsOperations', + 'ApiRevisionOperations', 'ApiReleaseOperations', 'ApiOperationOperations', 'ApiOperationPolicyOperations', + 'TagOperations', 'ApiProductOperations', 'ApiPolicyOperations', 'ApiSchemaOperations', 'ApiDiagnosticOperations', - 'ApiDiagnosticLoggerOperations', 'ApiIssueOperations', 'ApiIssueCommentOperations', 'ApiIssueAttachmentOperations', + 'ApiTagDescriptionOperations', + 'OperationOperations', + 'ApiVersionSetOperations', 'AuthorizationServerOperations', 'BackendOperations', + 'CacheOperations', 'CertificateOperations', 'ApiManagementOperations', 'ApiManagementServiceSkusOperations', 'ApiManagementServiceOperations', 'DiagnosticOperations', - 'DiagnosticLoggerOperations', 'EmailTemplateOperations', 'GroupOperations', 'GroupUserOperations', 'IdentityProviderOperations', + 'IssueOperations', 'LoggerOperations', + 'NetworkStatusOperations', 'NotificationOperations', 'NotificationRecipientUserOperations', 'NotificationRecipientEmailOperations', - 'NetworkStatusOperations', 'OpenIdConnectProviderOperations', + 'PolicyOperations', + 'PolicySnippetOperations', 'SignInSettingsOperations', 'SignUpSettingsOperations', 'DelegationSettingsOperations', @@ -116,12 +120,10 @@ 'PropertyOperations', 'QuotaByCounterKeysOperations', 'QuotaByPeriodKeysOperations', + 'RegionOperations', 'ReportsOperations', 'SubscriptionOperations', 'TagResourceOperations', - 'TagOperations', - 'TagDescriptionOperations', - 'OperationOperations', 'TenantAccessOperations', 'TenantAccessGitOperations', 'TenantConfigurationOperations', @@ -129,6 +131,6 @@ 'UserGroupOperations', 'UserSubscriptionOperations', 'UserIdentitiesOperations', - 'ApiVersionSetOperations', + 'UserConfirmationPasswordOperations', 'ApiExportOperations', ] diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_diagnostic_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_diagnostic_operations.py index 2c4e7371c105..b00a8d13b667 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_diagnostic_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_diagnostic_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -47,11 +47,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 | Supported operators | Supported - functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | + :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 @@ -76,20 +76,20 @@ def internal_paging(next_link=None, raw=False): 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), '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') 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: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -155,8 +155,8 @@ def get_entity_tag( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -220,8 +220,8 @@ def get( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -265,7 +265,7 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}'} def create_or_update( - self, resource_group_name, service_name, api_id, diagnostic_id, enabled, if_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, api_id, diagnostic_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): """Creates a new Diagnostic for an API or updates an existing one. :param resource_group_name: The name of the resource group. @@ -278,9 +278,8 @@ def create_or_update( :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management service instance. :type diagnostic_id: str - :param enabled: Indicates whether a diagnostic should receive data or - not. - :type enabled: bool + :param parameters: Create parameters. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract :param if_match: ETag of the Entity. Not required when creating an entity, but required when updating an entity. :type if_match: str @@ -295,15 +294,13 @@ def create_or_update( :raises: :class:`ErrorResponseException` """ - parameters = models.DiagnosticContract(enabled=enabled) - # 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -336,21 +333,29 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('DiagnosticContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('DiagnosticContract', 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}/apis/{apiId}/diagnostics/{diagnosticId}'} def update( - self, resource_group_name, service_name, api_id, diagnostic_id, if_match, enabled, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, api_id, diagnostic_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): """Updates the details of the Diagnostic for an API specified by its identifier. @@ -364,13 +369,12 @@ def update( :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management service instance. :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract :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 enabled: Indicates whether a diagnostic should receive data or - not. - :type enabled: bool :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -381,15 +385,13 @@ def update( :raises: :class:`ErrorResponseException` """ - parameters = models.DiagnosticContract(enabled=enabled) - # Construct URL url = self.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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -457,8 +459,8 @@ def delete( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_export_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_export_operations.py index 5864d39a96d7..31674806ceca 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_export_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_export_operations.py @@ -23,7 +23,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._serialize = serializer self._deserialize = deserializer self.export = "true" - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -53,7 +53,7 @@ def get( :type api_id: str :param format: Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 minutes. Possible values - include: 'Swagger', 'Wsdl', 'Wadl' + include: 'Swagger', 'Wsdl', 'Wadl', 'OpenApi3' :type format: str or ~azure.mgmt.apimanagement.models.ExportFormat :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_attachment_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_attachment_operations.py index fbce4b7e5d00..859143e02e2f 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_attachment_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_attachment_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,13 +32,13 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config def list_by_service( self, resource_group_name, service_name, api_id, issue_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all comments for the Issue associated with the specified API. + """Lists all attachments for the Issue associated with the specified API. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -50,13 +50,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 | Supported operators | Supported - functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | + :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 |
:type filter: str :param top: Number of records to return. :type top: int @@ -81,7 +80,7 @@ def internal_paging(next_link=None, raw=False): 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -89,13 +88,13 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') 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: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -164,7 +163,7 @@ def get_entity_tag( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'attachmentId': self._serialize.url("attachment_id", attachment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -233,7 +232,7 @@ def get( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'attachmentId': self._serialize.url("attachment_id", attachment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -299,9 +298,8 @@ def create_or_update( :param parameters: Create parameters. :type parameters: ~azure.mgmt.apimanagement.models.IssueAttachmentContract - :param if_match: ETag of the Issue Entity. ETag should match the - current entity state from the header response of the GET request or it - should be * for unconditional 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 dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -319,7 +317,7 @@ def create_or_update( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'attachmentId': self._serialize.url("attachment_id", attachment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -354,14 +352,22 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('IssueAttachmentContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('IssueAttachmentContract', 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 @@ -384,9 +390,9 @@ def delete( :param attachment_id: Attachment identifier within an Issue. Must be unique in the current Issue. :type attachment_id: str - :param if_match: ETag of the Issue Entity. ETag should match the - current entity state from the header response of the GET request or it - should be * for unconditional update. + :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 @@ -403,7 +409,7 @@ def delete( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'attachmentId': self._serialize.url("attachment_id", attachment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_comment_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_comment_operations.py index a1c2661261d8..d6598520f1dc 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_comment_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_comment_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -50,13 +50,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 | Supported operators | Supported - functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | + :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 |
:type filter: str :param top: Number of records to return. :type top: int @@ -81,7 +80,7 @@ def internal_paging(next_link=None, raw=False): 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -89,13 +88,13 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') 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: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -164,7 +163,7 @@ def get_entity_tag( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'commentId': self._serialize.url("comment_id", comment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -233,7 +232,7 @@ def get( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'commentId': self._serialize.url("comment_id", comment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -299,9 +298,8 @@ def create_or_update( :param parameters: Create parameters. :type parameters: ~azure.mgmt.apimanagement.models.IssueCommentContract - :param if_match: ETag of the Issue Entity. ETag should match the - current entity state from the header response of the GET request or it - should be * for unconditional 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 dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -319,7 +317,7 @@ def create_or_update( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'commentId': self._serialize.url("comment_id", comment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -354,14 +352,22 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('IssueCommentContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('IssueCommentContract', 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 @@ -384,9 +390,9 @@ def delete( :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. :type comment_id: str - :param if_match: ETag of the Issue Entity. ETag should match the - current entity state from the header response of the GET request or it - should be * for unconditional update. + :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 @@ -403,7 +409,7 @@ def delete( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'commentId': self._serialize.url("comment_id", comment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py index 26aa942e1949..c513d93b2c20 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,12 +32,12 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config def list_by_service( - self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, api_id, filter=None, expand_comments_attachments=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): """Lists all issues associated with the specified API. :param resource_group_name: The name of the resource group. @@ -47,16 +47,16 @@ 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 | Supported operators | Supported - functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | - | state | eq | - | - | userId | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | + :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 | |
:type filter: str + :param expand_comments_attachments: Expand the comment attachments. + :type expand_comments_attachments: bool :param top: Number of records to return. :type top: int :param skip: Number of records to skip. @@ -80,20 +80,22 @@ def internal_paging(next_link=None, raw=False): 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), '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') if filter is not None: query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if expand_comments_attachments is not None: + query_parameters['expandCommentsAttachments'] = self._serialize.query("expand_comments_attachments", expand_comments_attachments, 'bool') if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) if skip is not None: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -159,7 +161,7 @@ def get_entity_tag( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -194,7 +196,7 @@ def get_entity_tag( get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'} def get( - self, resource_group_name, service_name, api_id, issue_id, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, api_id, issue_id, expand_comments_attachments=None, custom_headers=None, raw=False, **operation_config): """Gets the details of the Issue for an API specified by its identifier. :param resource_group_name: The name of the resource group. @@ -207,6 +209,8 @@ def get( :param issue_id: Issue identifier. Must be unique in the current API Management service instance. :type issue_id: str + :param expand_comments_attachments: Expand the comment attachments. + :type expand_comments_attachments: bool :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -223,7 +227,7 @@ def get( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -231,6 +235,8 @@ def get( # Construct parameters query_parameters = {} + if expand_comments_attachments is not None: + query_parameters['expandCommentsAttachments'] = self._serialize.query("expand_comments_attachments", expand_comments_attachments, 'bool') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -283,9 +289,8 @@ def create_or_update( :type issue_id: str :param parameters: Create parameters. :type parameters: ~azure.mgmt.apimanagement.models.IssueContract - :param if_match: ETag of the Issue Entity. ETag should match the - current entity state from the header response of the GET request or it - should be * for unconditional 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 dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -303,7 +308,7 @@ def create_or_update( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -337,21 +342,29 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('IssueContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('IssueContract', 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}/apis/{apiId}/issues/{issueId}'} def update( - self, resource_group_name, service_name, api_id, issue_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, api_id, issue_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): """Updates an existing issue for an API. :param resource_group_name: The name of the resource group. @@ -366,9 +379,9 @@ def update( :type issue_id: str :param parameters: Update parameters. :type parameters: ~azure.mgmt.apimanagement.models.IssueUpdateContract - :param if_match: ETag of the Issue Entity. ETag should match the - current entity state from the header response of the GET request or it - should be * for unconditional update. + :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 @@ -385,7 +398,7 @@ def update( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -402,8 +415,7 @@ def 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') + 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') @@ -436,9 +448,9 @@ def delete( :param issue_id: Issue identifier. Must be unique in the current API Management service instance. :type issue_id: str - :param if_match: ETag of the Issue Entity. ETag should match the - current entity state from the header response of the GET request or it - should be * for unconditional update. + :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 @@ -455,7 +467,7 @@ def delete( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_operations.py index 59b096dd6b81..a6e74dd10cce 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_operations.py @@ -23,7 +23,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_service_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_service_operations.py index 139163ce0d2e..5052b1c1fb30 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_service_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_service_operations.py @@ -25,7 +25,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ 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 = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -138,7 +138,7 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) @@ -243,7 +243,7 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) @@ -522,23 +522,9 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}'} - def delete( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing API Management service. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param 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:`CloudError` - """ + def _delete_initial( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -554,6 +540,7 @@ def delete( # 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: @@ -565,14 +552,68 @@ def delete( 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]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp + deserialized = None + + if response.status_code == 202: + deserialized = self._deserialize('ApiManagementServiceResource', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, service_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing API Management service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ApiManagementServiceResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.ApiManagementServiceResource]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ApiManagementServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}'} def list_by_resource_group( @@ -943,193 +984,8 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) apply_network_configuration_updates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates'} - - def upload_certificate( - self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, **operation_config): - """Upload Custom Domain SSL certificate for an API Management service. - This operation will be deprecated in future releases. - - :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 parameters: Parameters supplied to the Upload SSL certificate - for an API Management service operation. - :type parameters: - ~azure.mgmt.apimanagement.models.ApiManagementServiceUploadCertificateParameters - :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: CertificateInformation or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.CertificateInformation or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.upload_certificate.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') - - # 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()) - 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 body - body_content = self._serialize.body(parameters, 'ApiManagementServiceUploadCertificateParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CertificateInformation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - upload_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/updatecertificate'} - - - def _update_hostname_initial( - self, resource_group_name, service_name, update=None, delete=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ApiManagementServiceUpdateHostnameParameters(update=update, delete=delete) - - # Construct URL - url = self.update_hostname.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') - - # 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()) - 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 body - body_content = self._serialize.body(parameters, 'ApiManagementServiceUpdateHostnameParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApiManagementServiceResource', response) - if response.status_code == 202: - deserialized = self._deserialize('ApiManagementServiceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_hostname( - self, resource_group_name, service_name, update=None, delete=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates, updates, or deletes the custom hostnames for an API Management - service. The custom hostname can be applied to the Proxy and Portal - endpoint. This is a long running operation and could take several - minutes to complete. This operation will be deprecated in the next - version update. - - :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 update: Hostnames to create or update. - :type update: - list[~azure.mgmt.apimanagement.models.HostnameConfigurationOld] - :param delete: Hostnames types to delete. - :type delete: list[str or - ~azure.mgmt.apimanagement.models.HostnameType] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ApiManagementServiceResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.ApiManagementServiceResource]] - :raises: :class:`CloudError` - """ - raw_result = self._update_hostname_initial( - resource_group_name=resource_group_name, - service_name=service_name, - update=update, - delete=delete, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ApiManagementServiceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/updatehostname'} diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_service_skus_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_service_skus_operations.py index 7d8d6005bd15..876da69e682e 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_service_skus_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_service_skus_operations.py @@ -23,7 +23,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_operations.py index 70631edd59b9..596f3528bf20 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,12 +32,12 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config def list_by_api( - self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, tags=None, custom_headers=None, raw=False, **operation_config): """Lists a collection of the operations for the specified API. :param resource_group_name: The name of the resource group. @@ -48,22 +48,24 @@ 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 | Supported operators | Supported - functions | - |-------------|------------------------|-----------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | - | method | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | - | description | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | + :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 | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + 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 |
:type filter: str :param top: Number of records to return. :type top: int :param skip: Number of records to skip. :type skip: int + :param tags: Include tags in the response. + :type tags: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -96,6 +98,8 @@ def internal_paging(next_link=None, raw=False): query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) if skip is not None: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if tags is not None: + query_parameters['tags'] = self._serialize.query("tags", tags, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: @@ -164,7 +168,7 @@ def get_entity_tag( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -229,7 +233,7 @@ def get( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -309,7 +313,7 @@ def create_or_update( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -342,14 +346,22 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('OperationContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('OperationContract', 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 @@ -394,7 +406,7 @@ def update( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -464,7 +476,7 @@ def delete( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_policy_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_policy_operations.py index ed672d947a4a..0f53e5664778 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_policy_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_policy_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". :ivar policy_id: The identifier of the Policy. Constant value: "policy". """ @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.policy_id = "policy" self.config = config @@ -70,7 +70,7 @@ def list_by_operation( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -140,7 +140,7 @@ def get_entity_tag( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -206,7 +206,7 @@ def get( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -251,7 +251,7 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}'} def create_or_update( - self, resource_group_name, service_name, api_id, operation_id, policy_content, if_match=None, content_format="xml", custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, api_id, operation_id, value, if_match=None, format="xml", custom_headers=None, raw=False, **operation_config): """Creates or updates policy configuration for the API Operation level. :param resource_group_name: The name of the resource group. @@ -265,15 +265,14 @@ def create_or_update( :param operation_id: Operation identifier within an API. Must be unique in the current API Management service instance. :type operation_id: str - :param policy_content: Json escaped Xml Encoded contents of the - Policy. - :type policy_content: str + :param value: Contents of the Policy as defined by the format. + :type value: 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 content_format: Format of the policyContent. Possible values - include: 'xml', 'xml-link', 'rawxml', 'rawxml-link' - :type content_format: str or + :param format: Format of the policyContent. Possible values include: + 'xml', 'xml-link', 'rawxml', 'rawxml-link' + :type format: str or ~azure.mgmt.apimanagement.models.PolicyContentFormat :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -286,7 +285,7 @@ def create_or_update( :raises: :class:`ErrorResponseException` """ - parameters = models.PolicyContract(policy_content=policy_content, content_format=content_format) + parameters = models.PolicyContract(value=value, format=format) # Construct URL url = self.create_or_update.metadata['url'] @@ -294,7 +293,7 @@ def create_or_update( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -328,14 +327,22 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('PolicyContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('PolicyContract', 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 @@ -376,7 +383,7 @@ def delete( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operations.py index 10760f4dee9e..9828b2d15211 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operations.py @@ -11,7 +11,8 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -23,7 +24,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,36 +34,36 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, expand_api_version_set=False, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, filter=None, top=None, skip=None, tags=None, expand_api_version_set=None, custom_headers=None, raw=False, **operation_config): """Lists all APIs of the API Management 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 | Supported operators | Supported - functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | - | name | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | - | description | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | - | serviceUrl | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | - | path | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | + :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 |
| + 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 |
:type filter: str :param top: Number of records to return. :type top: int :param skip: Number of records to skip. :type skip: int + :param tags: Include tags in the response. + :type tags: str :param expand_api_version_set: Include full ApiVersionSet resource in response :type expand_api_version_set: bool @@ -97,9 +98,11 @@ def internal_paging(next_link=None, raw=False): query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) if skip is not None: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if tags is not None: + query_parameters['tags'] = self._serialize.query("tags", tags, 'str') if expand_api_version_set is not None: query_parameters['expandApiVersionSet'] = self._serialize.query("expand_api_version_set", expand_api_version_set, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -267,36 +270,9 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}'} - def create_or_update( - self, resource_group_name, service_name, api_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates new or updates existing specified API of the API Management - 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 api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param parameters: Create or update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter - :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: ApiContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.ApiContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ + def _create_or_update_initial( + self, resource_group_name, service_name, api_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -331,7 +307,7 @@ def create_or_update( request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 201]: + if response.status_code not in [200, 201, 202]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -354,6 +330,71 @@ def create_or_update( return client_raw_response return deserialized + + def create_or_update( + self, resource_group_name, service_name, api_id, parameters, if_match=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates new or updates existing specified API of the API Management + 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 api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param parameters: Create or update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter + :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: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ApiContract or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.ApiContract] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.ApiContract]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + parameters=parameters, + if_match=if_match, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'ETag': 'str', + } + deserialized = self._deserialize('ApiContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}'} def update( @@ -491,7 +532,7 @@ def delete( delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}'} def list_by_tags( - self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, filter=None, top=None, skip=None, include_not_tagged_apis=None, custom_headers=None, raw=False, **operation_config): """Lists a collection of apis associated with tags. :param resource_group_name: The name of the resource group. @@ -499,29 +540,28 @@ def list_by_tags( :param service_name: The name of the API Management service. :type service_name: str :param filter: | Field | Supported operators | Supported - functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | aid | 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 | substringof, contains, - startswith, endswith | + 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 | | :type filter: str :param top: Number of records to return. :type top: int :param skip: Number of records to skip. :type skip: int + :param include_not_tagged_apis: Include not tagged APIs. + :type include_not_tagged_apis: bool :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -530,7 +570,8 @@ def list_by_tags( :return: An iterator like instance of TagResourceContract :rtype: ~azure.mgmt.apimanagement.models.TagResourceContractPaged[~azure.mgmt.apimanagement.models.TagResourceContract] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -552,6 +593,8 @@ def internal_paging(next_link=None, raw=False): query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) if skip is not None: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if include_not_tagged_apis is not None: + query_parameters['includeNotTaggedApis'] = self._serialize.query("include_not_tagged_apis", include_not_tagged_apis, 'bool') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: @@ -573,9 +616,7 @@ def internal_paging(next_link=None, raw=False): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) return response diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_policy_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_policy_operations.py index 5cdfe669fca7..f4bf695bcd4c 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_policy_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_policy_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". :ivar policy_id: The identifier of the Policy. Constant value: "policy". """ @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.policy_id = "policy" self.config = config @@ -93,17 +93,12 @@ def list_by_api( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - header_dict = {} if response.status_code == 200: deserialized = self._deserialize('PolicyCollection', 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 @@ -244,7 +239,7 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}'} def create_or_update( - self, resource_group_name, service_name, api_id, policy_content, if_match=None, content_format="xml", custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, api_id, value, if_match=None, format="xml", custom_headers=None, raw=False, **operation_config): """Creates or updates policy configuration for the API. :param resource_group_name: The name of the resource group. @@ -255,15 +250,14 @@ def create_or_update( API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. :type api_id: str - :param policy_content: Json escaped Xml Encoded contents of the - Policy. - :type policy_content: str + :param value: Contents of the Policy as defined by the format. + :type value: 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 content_format: Format of the policyContent. Possible values - include: 'xml', 'xml-link', 'rawxml', 'rawxml-link' - :type content_format: str or + :param format: Format of the policyContent. Possible values include: + 'xml', 'xml-link', 'rawxml', 'rawxml-link' + :type format: str or ~azure.mgmt.apimanagement.models.PolicyContentFormat :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -276,7 +270,7 @@ def create_or_update( :raises: :class:`ErrorResponseException` """ - parameters = models.PolicyContract(policy_content=policy_content, content_format=content_format) + parameters = models.PolicyContract(value=value, format=format) # Construct URL url = self.create_or_update.metadata['url'] @@ -317,14 +311,22 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('PolicyContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('PolicyContract', 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/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_product_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_product_operations.py index 2522feb28b70..27542a5e3b4a 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_product_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_product_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -47,11 +47,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 | Supported operators | Supported functions - | - |-------|------------------------|---------------------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith | + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + 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 @@ -76,7 +76,7 @@ def internal_paging(next_link=None, raw=False): 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_release_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_release_operations.py index a9bc52e3744d..c00e71b80676 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_release_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_release_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,11 +32,11 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config - def list( + def list_by_service( self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): """Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous @@ -50,12 +50,11 @@ def list( :param api_id: API identifier. Must be unique in the current API Management service instance. :type api_id: str - :param filter: | Field | Supported operators | Supported functions - | - |-------|------------------------|---------------------------------------------| - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith | - |notes|ge le eq ne gt lt|substringof contains startswith endswith| + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int @@ -76,24 +75,24 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list.metadata['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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), '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') 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: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -127,7 +126,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases'} + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases'} def get_entity_tag( self, resource_group_name, service_name, api_id, release_id, custom_headers=None, raw=False, **operation_config): @@ -158,9 +157,9 @@ def get_entity_tag( 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'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)') + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -222,9 +221,9 @@ def get( 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'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)') + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -250,19 +249,24 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('ApiReleaseContract', 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}/apis/{apiId}/releases/{releaseId}'} - def create( - self, resource_group_name, service_name, api_id, release_id, api_id1=None, notes=None, custom_headers=None, raw=False, **operation_config): + def create_or_update( + self, resource_group_name, service_name, api_id, release_id, if_match=None, api_id1=None, notes=None, custom_headers=None, raw=False, **operation_config): """Creates a new Release for the API. :param resource_group_name: The name of the resource group. @@ -275,6 +279,9 @@ def create( :param release_id: Release identifier within an API. Must be unique in the current API Management service instance. :type release_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 api_id1: Identifier of the API the release belongs to. :type api_id1: str :param notes: Release Notes @@ -293,13 +300,13 @@ def create( parameters = models.ApiReleaseContract(api_id=api_id1, notes=notes) # Construct URL - url = self.create.metadata['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])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)') + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -315,6 +322,8 @@ def create( 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') @@ -329,18 +338,26 @@ def create( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('ApiReleaseContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('ApiReleaseContract', 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}'} def update( self, resource_group_name, service_name, api_id, release_id, if_match, api_id1=None, notes=None, custom_headers=None, raw=False, **operation_config): @@ -382,9 +399,9 @@ def update( 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'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)') + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -451,9 +468,9 @@ def delete( 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'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)') + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_revisions_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_revision_operations.py similarity index 85% rename from azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_revisions_operations.py rename to azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_revision_operations.py index 93b577d75ce9..fc654cfe9f18 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_revisions_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_revision_operations.py @@ -15,14 +15,14 @@ from .. import models -class ApiRevisionsOperations(object): - """ApiRevisionsOperations operations. +class ApiRevisionOperations(object): + """ApiRevisionOperations operations. :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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,11 +32,11 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config - def list( + def list_by_service( self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): """Lists all revisions of an API. @@ -47,11 +47,11 @@ def list( :param api_id: API identifier. Must be unique in the current API Management service instance. :type api_id: str - :param filter: | Field | Supported operators | Supported - functions | - |-------------|------------------------|-----------------------------------| - |apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith| + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
:type filter: str :param top: Number of records to return. :type top: int @@ -72,24 +72,24 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list.metadata['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'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)') + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + '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') 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: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -123,4 +123,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions'} + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions'} diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_schema_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_schema_operations.py index 840e113bf93a..2dd1c43f6238 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_schema_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_schema_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,12 +32,12 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config def list_by_api( - self, resource_group_name, service_name, api_id, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): """Get the schema configuration at the API level. :param resource_group_name: The name of the resource group. @@ -48,6 +48,16 @@ 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 + |
|-------------|-------------|-------------|-------------|
| + contentType | 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. + :type skip: int :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -74,6 +84,12 @@ def internal_paging(next_link=None, raw=False): # 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: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: @@ -142,7 +158,7 @@ def get_entity_tag( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'schemaId': self._serialize.url("schema_id", schema_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'schemaId': self._serialize.url("schema_id", schema_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -207,7 +223,7 @@ def get( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'schemaId': self._serialize.url("schema_id", schema_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'schemaId': self._serialize.url("schema_id", schema_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -294,7 +310,7 @@ def create_or_update( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'schemaId': self._serialize.url("schema_id", schema_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'schemaId': self._serialize.url("schema_id", schema_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -327,21 +343,29 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('SchemaContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('SchemaContract', 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}/apis/{apiId}/schemas/{schemaId}'} def delete( - self, resource_group_name, service_name, api_id, schema_id, if_match, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, api_id, schema_id, if_match, force=None, custom_headers=None, raw=False, **operation_config): """Deletes the schema configuration at the Api. :param resource_group_name: The name of the resource group. @@ -359,6 +383,9 @@ 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: If true removes all references to the schema before + deleting it. + :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 @@ -375,13 +402,15 @@ def delete( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'schemaId': self._serialize.url("schema_id", schema_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'schemaId': self._serialize.url("schema_id", schema_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), '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 = {} + 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/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tag_description_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_tag_description_operations.py similarity index 92% rename from azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tag_description_operations.py rename to azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_tag_description_operations.py index caf2d810f52b..9c2324b24d6f 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tag_description_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_tag_description_operations.py @@ -15,14 +15,14 @@ from .. import models -class TagDescriptionOperations(object): - """TagDescriptionOperations operations. +class ApiTagDescriptionOperations(object): + """ApiTagDescriptionOperations operations. :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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,11 +32,11 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config - def list_by_api( + def list_by_service( self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): """Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the @@ -50,13 +50,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 | Supported operators | Supported - functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | + :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 |
:type filter: str :param top: Number of records to return. :type top: int @@ -77,7 +76,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_api.metadata['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])?$'), @@ -128,9 +127,9 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions'} + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions'} - def get_entity_state( + def get_entity_tag( self, resource_group_name, service_name, api_id, tag_id, custom_headers=None, raw=False, **operation_config): """Gets the entity state version of the tag specified by its identifier. @@ -156,12 +155,12 @@ def get_entity_state( :class:`ErrorResponseException` """ # Construct URL - url = self.get_entity_state.metadata['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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -192,11 +191,11 @@ def get_entity_state( 'ETag': 'str', }) return client_raw_response - get_entity_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}'} + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}'} def get( self, resource_group_name, service_name, api_id, tag_id, custom_headers=None, raw=False, **operation_config): - """Get tag associated with the API. + """Get Tag description in scope of API. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -226,7 +225,7 @@ def get( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -307,7 +306,7 @@ def create_or_update( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -340,14 +339,22 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('TagDescriptionContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('TagDescriptionContract', 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 @@ -388,7 +395,7 @@ def delete( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_version_set_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_version_set_operations.py index 857602360179..72173a8b483f 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_version_set_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_version_set_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -45,23 +45,9 @@ 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 | Supported operators | Supported - functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | state | eq | N/A - | - | registrationDate | ge, le, eq, ne, gt, lt | N/A - | - | note | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
:type filter: str :param top: Number of records to return. :type top: int @@ -92,13 +78,13 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') 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: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -132,7 +118,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets'} + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets'} def get_entity_tag( self, resource_group_name, service_name, version_set_id, custom_headers=None, raw=False, **operation_config): @@ -161,8 +147,8 @@ def get_entity_tag( 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'), - 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)') + 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -192,7 +178,7 @@ def get_entity_tag( 'ETag': 'str', }) return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}'} + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}'} def get( self, resource_group_name, service_name, version_set_id, custom_headers=None, raw=False, **operation_config): @@ -221,8 +207,8 @@ def get( 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'), - 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)') + 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -262,7 +248,7 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}'} def create_or_update( self, resource_group_name, service_name, version_set_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): @@ -297,8 +283,8 @@ def create_or_update( 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'), - 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)') + 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -330,18 +316,26 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('ApiVersionSetContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('ApiVersionSetContract', 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}/api-version-sets/{versionSetId}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}'} def update( self, resource_group_name, service_name, version_set_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): @@ -376,8 +370,8 @@ def update( 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'), - 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)') + 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -409,7 +403,7 @@ def update( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}'} def delete( self, resource_group_name, service_name, version_set_id, if_match, custom_headers=None, raw=False, **operation_config): @@ -441,8 +435,8 @@ def delete( 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'), - 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)') + 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -470,4 +464,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}'} diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/authorization_server_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/authorization_server_operations.py index c5eae94af39f..7473c7856313 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/authorization_server_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/authorization_server_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -46,13 +45,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 | Supported operators | Supported functions - | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith | + :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 |
:type filter: str :param top: Number of records to return. :type top: int @@ -66,7 +64,8 @@ def list_by_service( :return: An iterator like instance of AuthorizationServerContract :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContractPaged[~azure.mgmt.apimanagement.models.AuthorizationServerContract] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -109,9 +108,7 @@ def internal_paging(next_link=None, raw=False): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) return response @@ -152,7 +149,7 @@ def get_entity_tag( 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])?$'), - 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -212,7 +209,7 @@ def get( 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])?$'), - 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -288,7 +285,7 @@ def create_or_update( 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])?$'), - 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -321,14 +318,22 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('AuthorizationServerContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('AuthorizationServerContract', 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 @@ -367,7 +372,7 @@ def update( 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])?$'), - 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -431,7 +436,7 @@ def delete( 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])?$'), - 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/backend_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/backend_operations.py index 9fe26f649aea..5afb9bbb081a 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/backend_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/backend_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -44,13 +44,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 | Supported operators | Supported functions - | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith | - | host | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith | + :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 | +
:type filter: str :param top: Number of records to return. :type top: int @@ -124,7 +125,7 @@ def internal_paging(next_link=None, raw=False): list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends'} def get_entity_tag( - self, resource_group_name, service_name, backendid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, backend_id, custom_headers=None, raw=False, **operation_config): """Gets the entity state (Etag) version of the backend specified by its identifier. @@ -132,9 +133,9 @@ def get_entity_tag( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param backendid: Identifier of the Backend entity. Must be unique in + :param backend_id: Identifier of the Backend entity. Must be unique in the current API Management service instance. - :type backendid: str + :type backend_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 @@ -150,7 +151,7 @@ def get_entity_tag( 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])?$'), - 'backendid': self._serialize.url("backendid", backendid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -181,19 +182,19 @@ def get_entity_tag( 'ETag': 'str', }) return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}'} + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}'} def get( - self, resource_group_name, service_name, backendid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, backend_id, custom_headers=None, raw=False, **operation_config): """Gets the details of the backend specified by its identifier. :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 backendid: Identifier of the Backend entity. Must be unique in + :param backend_id: Identifier of the Backend entity. Must be unique in the current API Management service instance. - :type backendid: str + :type backend_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 @@ -210,7 +211,7 @@ def get( 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])?$'), - 'backendid': self._serialize.url("backendid", backendid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -251,19 +252,19 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}'} def create_or_update( - self, resource_group_name, service_name, backendid, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, backend_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): """Creates or Updates a backend. :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 backendid: Identifier of the Backend entity. Must be unique in + :param backend_id: Identifier of the Backend entity. Must be unique in the current API Management service instance. - :type backendid: str + :type backend_id: str :param parameters: Create parameters. :type parameters: ~azure.mgmt.apimanagement.models.BackendContract :param if_match: ETag of the Entity. Not required when creating an @@ -285,7 +286,7 @@ def create_or_update( 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])?$'), - 'backendid': self._serialize.url("backendid", backendid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -318,30 +319,38 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('BackendContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('BackendContract', 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}/backends/{backendid}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}'} def update( - self, resource_group_name, service_name, backendid, parameters, if_match, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, backend_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): """Updates an existing backend. :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 backendid: Identifier of the Backend entity. Must be unique in + :param backend_id: Identifier of the Backend entity. Must be unique in the current API Management service instance. - :type backendid: str + :type backend_id: str :param parameters: Update parameters. :type parameters: ~azure.mgmt.apimanagement.models.BackendUpdateParameters @@ -364,7 +373,7 @@ def update( 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])?$'), - 'backendid': self._serialize.url("backendid", backendid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -397,19 +406,19 @@ def update( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}'} def delete( - self, resource_group_name, service_name, backendid, if_match, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, backend_id, if_match, custom_headers=None, raw=False, **operation_config): """Deletes the specified backend. :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 backendid: Identifier of the Backend entity. Must be unique in + :param backend_id: Identifier of the Backend entity. Must be unique in the current API Management service instance. - :type backendid: str + :type backend_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. @@ -429,7 +438,7 @@ def delete( 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])?$'), - 'backendid': self._serialize.url("backendid", backendid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -458,10 +467,10 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}'} def reconnect( - self, resource_group_name, service_name, backendid, after=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, backend_id, after=None, custom_headers=None, raw=False, **operation_config): """Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. @@ -470,9 +479,9 @@ def reconnect( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param backendid: Identifier of the Backend entity. Must be unique in + :param backend_id: Identifier of the Backend entity. Must be unique in the current API Management service instance. - :type backendid: str + :type backend_id: str :param after: Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M. :type after: timedelta @@ -495,7 +504,7 @@ def reconnect( 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])?$'), - 'backendid': self._serialize.url("backendid", backendid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -530,4 +539,4 @@ def reconnect( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - reconnect.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}/reconnect'} + reconnect.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}/reconnect'} diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_diagnostic_logger_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/cache_operations.py similarity index 50% rename from azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_diagnostic_logger_operations.py rename to azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/cache_operations.py index 2f9a9861c8dc..165b93f2c6f3 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_diagnostic_logger_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/cache_operations.py @@ -15,14 +15,14 @@ from .. import models -class ApiDiagnosticLoggerOperations(object): - """ApiDiagnosticLoggerOperations operations. +class CacheOperations(object): + """CacheOperations operations. :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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,32 +32,19 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config def list_by_service( - self, resource_group_name, service_name, api_id, diagnostic_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all loggers associated with the specified Diagnostic of an API. + self, resource_group_name, service_name, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of all external Caches in the specified 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 api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param filter: | Field | Supported operators | Supported - functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | - | type | eq | - | - :type filter: str :param top: Number of records to return. :type top: int :param skip: Number of records to skip. @@ -67,9 +54,9 @@ def list_by_service( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of LoggerContract + :return: An iterator like instance of CacheContract :rtype: - ~azure.mgmt.apimanagement.models.LoggerContractPaged[~azure.mgmt.apimanagement.models.LoggerContract] + ~azure.mgmt.apimanagement.models.CacheContractPaged[~azure.mgmt.apimanagement.models.CacheContract] :raises: :class:`ErrorResponseException` """ @@ -81,21 +68,17 @@ def internal_paging(next_link=None, raw=False): 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)') + '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') - 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: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -121,52 +104,44 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LoggerContractPaged(internal_paging, self._deserialize.dependencies) + deserialized = models.CacheContractPaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.LoggerContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.CacheContractPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}/loggers'} + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches'} - def check_entity_exists( - self, resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers=None, raw=False, **operation_config): - """Checks that logger entity specified by identifier is associated with - the diagnostics entity. + def get_entity_tag( + self, resource_group_name, service_name, cache_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the Cache specified by its + identifier. :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 api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param loggerid: Logger identifier. Must be unique in the API - Management service instance. - :type loggerid: str + :param cache_id: Identifier of the Cache entity. Cache identifier + (should be either 'default' or valid Azure region identifier). + :type cache_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: bool or ClientRawResponse if raw=true - :rtype: bool or ~msrest.pipeline.ClientRawResponse + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ # Construct URL - url = self.check_entity_exists.metadata['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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'loggerid': self._serialize.url("loggerid", loggerid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'cacheId': self._serialize.url("cache_id", cache_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -188,40 +163,111 @@ def check_entity_exists( request = self._client.head(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204, 404]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) - deserialized = (response.status_code == 204) + 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}/caches/{cacheId}'} + + def get( + self, resource_group_name, service_name, cache_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the Cache specified by its identifier. + + :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 cache_id: Identifier of the Cache entity. Cache identifier + (should be either 'default' or valid Azure region identifier). + :type cache_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: CacheContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.CacheContract 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])?$'), + 'cacheId': self._serialize.url("cache_id", cache_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + '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) + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('CacheContract', 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 - check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}/loggers/{loggerid}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}'} def create_or_update( - self, resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers=None, raw=False, **operation_config): - """Attaches a logger to a diagnostic for an API. + self, resource_group_name, service_name, cache_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates an External Cache to be used in Api Management + 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 api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param loggerid: Logger identifier. Must be unique in the API - Management service instance. - :type loggerid: str + :param cache_id: Identifier of the Cache entity. Cache identifier + (should be either 'default' or valid Azure region identifier). + :type cache_id: str + :param parameters: Create or Update parameters. + :type parameters: ~azure.mgmt.apimanagement.models.CacheContract + :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: LoggerContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract or + :return: CacheContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.CacheContract or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` @@ -231,9 +277,7 @@ def create_or_update( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'loggerid': self._serialize.url("loggerid", loggerid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'cacheId': self._serialize.url("cache_id", cache_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -245,51 +289,131 @@ def create_or_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()) 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 body + body_content = self._serialize.body(parameters, 'CacheContract') + # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) + request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: - deserialized = self._deserialize('LoggerContract', response) + deserialized = self._deserialize('CacheContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: - deserialized = self._deserialize('LoggerContract', response) + deserialized = self._deserialize('CacheContract', 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}/apis/{apiId}/diagnostics/{diagnosticId}/loggers/{loggerid}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}'} + + def update( + self, resource_group_name, service_name, cache_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Updates the details of the cache specified by its identifier. + + :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 cache_id: Identifier of the Cache entity. Cache identifier + (should be either 'default' or valid Azure region identifier). + :type cache_id: str + :param parameters: Update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.CacheUpdateParameters + :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.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])?$'), + 'cacheId': self._serialize.url("cache_id", cache_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + '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['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(parameters, 'CacheUpdateParameters') + + # 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]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}'} def delete( - self, resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers=None, raw=False, **operation_config): - """Deletes the specified Logger from Diagnostic for an API. + self, resource_group_name, service_name, cache_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes specific Cache. :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 api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param loggerid: Logger identifier. Must be unique in the API - Management service instance. - :type loggerid: str + :param cache_id: Identifier of the Cache entity. Cache identifier + (should be either 'default' or valid Azure region identifier). + :type cache_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 @@ -305,9 +429,7 @@ def delete( 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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'loggerid': self._serialize.url("loggerid", loggerid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'cacheId': self._serialize.url("cache_id", cache_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -322,6 +444,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') @@ -335,4 +458,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}/loggers/{loggerid}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}'} diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/certificate_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/certificate_operations.py index 4c36d9ddeea0..12276ecf2d2c 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/certificate_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/certificate_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -45,17 +45,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 | Supported operators | Supported - functions | - |----------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | subject | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | thumbprint | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | expirationDate | ge, le, eq, ne, gt, lt | N/A - | + :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 | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| expirationDate | filter | ge, le, eq, ne, gt, lt | + |
:type filter: str :param top: Number of records to return. :type top: int @@ -155,7 +153,7 @@ def get_entity_tag( 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])?$'), - 'certificateId': self._serialize.url("certificate_id", certificate_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'certificateId': self._serialize.url("certificate_id", certificate_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -215,7 +213,7 @@ def get( 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])?$'), - 'certificateId': self._serialize.url("certificate_id", certificate_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'certificateId': self._serialize.url("certificate_id", certificate_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -296,7 +294,7 @@ def create_or_update( 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])?$'), - 'certificateId': self._serialize.url("certificate_id", certificate_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'certificateId': self._serialize.url("certificate_id", certificate_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -329,14 +327,22 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('CertificateContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('CertificateContract', 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 @@ -372,7 +378,7 @@ def delete( 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])?$'), - 'certificateId': self._serialize.url("certificate_id", certificate_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'certificateId': self._serialize.url("certificate_id", certificate_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/delegation_settings_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/delegation_settings_operations.py index a43ca87018ba..d3671260fe47 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/delegation_settings_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/delegation_settings_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -94,7 +93,7 @@ def get_entity_tag( def get( self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Get Delegation settings. + """Get Delegation Settings for the Portal. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -108,7 +107,8 @@ def get( :return: PortalDelegationSettings or ClientRawResponse if raw=true :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -138,9 +138,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None header_dict = {} @@ -224,7 +222,7 @@ def update( update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation'} def create_or_update( - self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): """Create or Update Delegation settings. :param resource_group_name: The name of the resource group. @@ -234,6 +232,9 @@ def create_or_update( :param parameters: Create or update parameters. :type parameters: ~azure.mgmt.apimanagement.models.PortalDelegationSettings + :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 @@ -266,6 +267,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') diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/diagnostic_logger_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/diagnostic_logger_operations.py deleted file mode 100644 index d5b7b7ee9ca9..000000000000 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/diagnostic_logger_operations.py +++ /dev/null @@ -1,323 +0,0 @@ -# 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 DiagnosticLoggerOperations(object): - """DiagnosticLoggerOperations operations. - - :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: "2018-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, diagnostic_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all loggers associated with the specified Diagnostic of the API - Management 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 diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param filter: | Field | Supported operators | Supported - functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | - | type | eq | - | - :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :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 LoggerContract - :rtype: - ~azure.mgmt.apimanagement.models.LoggerContractPaged[~azure.mgmt.apimanagement.models.LoggerContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - 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'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)') - } - 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') - 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: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - - 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) - 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 - deserialized = models.LoggerContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LoggerContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers'} - - def check_entity_exists( - self, resource_group_name, service_name, diagnostic_id, loggerid, custom_headers=None, raw=False, **operation_config): - """Checks that logger entity specified by identifier is associated with - the diagnostics entity. - - :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 diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param loggerid: Logger identifier. Must be unique in the API - Management service instance. - :type loggerid: 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: bool or ClientRawResponse if raw=true - :rtype: bool or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.check_entity_exists.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])?$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'loggerid': self._serialize.url("loggerid", loggerid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - '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 [204, 404]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = (response.status_code == 204) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized - check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers/{loggerid}'} - - def create_or_update( - self, resource_group_name, service_name, diagnostic_id, loggerid, custom_headers=None, raw=False, **operation_config): - """Attaches a logger to a diagnostic. - - :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 diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param loggerid: Logger identifier. Must be unique in the API - Management service instance. - :type loggerid: 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: LoggerContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract 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])?$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'loggerid': self._serialize.url("loggerid", loggerid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - '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.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) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('LoggerContract', response) - if response.status_code == 201: - deserialized = self._deserialize('LoggerContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers/{loggerid}'} - - def delete( - self, resource_group_name, service_name, diagnostic_id, loggerid, custom_headers=None, raw=False, **operation_config): - """Deletes the specified Logger from Diagnostic. - - :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 diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param loggerid: Logger identifier. Must be unique in the API - Management service instance. - :type loggerid: 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])?$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'loggerid': self._serialize.url("loggerid", loggerid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - '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.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}/diagnostics/{diagnosticId}/loggers/{loggerid}'} diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/diagnostic_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/diagnostic_operations.py index 6cc4144a945f..8aeb6d1d3ed8 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/diagnostic_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/diagnostic_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -44,11 +44,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 | Supported operators | Supported - functions | - |-------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, startswith, - endswith | + :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 @@ -79,13 +79,13 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') 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: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -148,7 +148,7 @@ def get_entity_tag( 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])?$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -208,7 +208,7 @@ def get( 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])?$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -252,7 +252,7 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}'} def create_or_update( - self, resource_group_name, service_name, diagnostic_id, enabled, if_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, diagnostic_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): """Creates a new Diagnostic or updates an existing one. :param resource_group_name: The name of the resource group. @@ -262,9 +262,8 @@ def create_or_update( :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management service instance. :type diagnostic_id: str - :param enabled: Indicates whether a diagnostic should receive data or - not. - :type enabled: bool + :param parameters: Create parameters. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract :param if_match: ETag of the Entity. Not required when creating an entity, but required when updating an entity. :type if_match: str @@ -279,14 +278,12 @@ def create_or_update( :raises: :class:`ErrorResponseException` """ - parameters = models.DiagnosticContract(enabled=enabled) - # 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])?$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -319,21 +316,29 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('DiagnosticContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('DiagnosticContract', 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}/diagnostics/{diagnosticId}'} def update( - self, resource_group_name, service_name, diagnostic_id, if_match, enabled, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, diagnostic_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): """Updates the details of the Diagnostic specified by its identifier. :param resource_group_name: The name of the resource group. @@ -343,13 +348,12 @@ def update( :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management service instance. :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract :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 enabled: Indicates whether a diagnostic should receive data or - not. - :type enabled: bool :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -360,14 +364,12 @@ def update( :raises: :class:`ErrorResponseException` """ - parameters = models.DiagnosticContract(enabled=enabled) - # Construct URL url = self.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])?$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -432,7 +434,7 @@ def delete( 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])?$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/email_template_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/email_template_operations.py index 96653c6abda1..65badc17e0bb 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/email_template_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/email_template_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,18 +32,24 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" 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 properties 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 + |
|-------------|-------------|-------------|-------------|
| + 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. @@ -57,7 +62,8 @@ def list_by_service( :return: An iterator like instance of EmailTemplateContract :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContractPaged[~azure.mgmt.apimanagement.models.EmailTemplateContract] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -73,6 +79,8 @@ def internal_paging(next_link=None, raw=False): # 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: @@ -98,9 +106,7 @@ def internal_paging(next_link=None, raw=False): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) return response @@ -358,7 +364,7 @@ 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, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, template_name, parameters, if_match, custom_headers=None, raw=False, **operation_config): """Updates the specific Email Template. :param resource_group_name: The name of the resource group. @@ -382,6 +388,10 @@ def update( :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 dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -413,6 +423,7 @@ def update( 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/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/group_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/group_operations.py index c25ba92710c8..a7cda28143af 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/group_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/group_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -45,17 +44,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 | Supported operators | Supported - functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | type | eq, ne | N/A - | + :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 |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| aadObjectId | filter | eq | |
:type filter: str :param top: Number of records to return. :type top: int @@ -69,7 +65,8 @@ def list_by_service( :return: An iterator like instance of GroupContract :rtype: ~azure.mgmt.apimanagement.models.GroupContractPaged[~azure.mgmt.apimanagement.models.GroupContract] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -112,9 +109,7 @@ def internal_paging(next_link=None, raw=False): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) return response @@ -156,7 +151,7 @@ def get_entity_tag( 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])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -216,7 +211,7 @@ def get( 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])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -292,7 +287,7 @@ def create_or_update( 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])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -325,14 +320,22 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('GroupContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('GroupContract', 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 @@ -371,7 +374,7 @@ def update( 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])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -436,7 +439,7 @@ def delete( 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])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/group_user_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/group_user_operations.py index 90e60fde0033..728f33598003 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/group_user_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/group_user_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,14 +32,13 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config def list( self, resource_group_name, service_name, group_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of the members of the group, specified by its - identifier. + """Lists a collection of user entities associated with the group. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -48,23 +47,18 @@ def list( :param group_id: Group identifier. Must be unique in the current API Management service instance. :type group_id: str - :param filter: | Field | Supported operators | Supported - functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | state | eq | N/A - | - | registrationDate | ge, le, eq, ne, gt, lt | N/A - | - | note | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | + :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 | + 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 | +
:type filter: str :param top: Number of records to return. :type top: int @@ -89,7 +83,7 @@ def internal_paging(next_link=None, raw=False): 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])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -139,7 +133,7 @@ def internal_paging(next_link=None, raw=False): list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users'} def check_entity_exists( - self, resource_group_name, service_name, group_id, uid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, group_id, user_id, custom_headers=None, raw=False, **operation_config): """Checks that user entity specified by identifier is associated with the group entity. @@ -150,9 +144,9 @@ def check_entity_exists( :param group_id: Group identifier. Must be unique in the current API Management service instance. :type group_id: str - :param uid: User identifier. Must be unique in the current API + :param user_id: User identifier. Must be unique in the current API Management service instance. - :type uid: str + :type user_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 @@ -168,8 +162,8 @@ def check_entity_exists( 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])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'uid': self._serialize.url("uid", uid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -199,11 +193,11 @@ def check_entity_exists( client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{uid}'} + check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}'} def create( - self, resource_group_name, service_name, group_id, uid, custom_headers=None, raw=False, **operation_config): - """Adds a user to the specified group. + self, resource_group_name, service_name, group_id, user_id, custom_headers=None, raw=False, **operation_config): + """Add existing user to existing group. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -212,9 +206,9 @@ def create( :param group_id: Group identifier. Must be unique in the current API Management service instance. :type group_id: str - :param uid: User identifier. Must be unique in the current API + :param user_id: User identifier. Must be unique in the current API Management service instance. - :type uid: str + :type user_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 @@ -231,8 +225,8 @@ def create( 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])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'uid': self._serialize.url("uid", uid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -270,10 +264,10 @@ def create( return client_raw_response return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{uid}'} + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}'} def delete( - self, resource_group_name, service_name, group_id, uid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, group_id, user_id, custom_headers=None, raw=False, **operation_config): """Remove existing user from existing group. :param resource_group_name: The name of the resource group. @@ -283,9 +277,9 @@ def delete( :param group_id: Group identifier. Must be unique in the current API Management service instance. :type group_id: str - :param uid: User identifier. Must be unique in the current API + :param user_id: User identifier. Must be unique in the current API Management service instance. - :type uid: str + :type user_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 @@ -301,8 +295,8 @@ def delete( 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])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'uid': self._serialize.url("uid", uid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -330,4 +324,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{uid}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}'} diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/identity_provider_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/identity_provider_operations.py index 764fcdb3a349..601391c42832 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/identity_provider_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/identity_provider_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -62,9 +62,9 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = self.list_by_service.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), '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])?$') + '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) @@ -133,10 +133,10 @@ def get_entity_tag( # Construct URL url = self.get_entity_tag.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), '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])?$'), - 'identityProviderName': self._serialize.url("identity_provider_name", identity_provider_name, 'str') + 'identityProviderName': self._serialize.url("identity_provider_name", identity_provider_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -196,10 +196,10 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), '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])?$'), - 'identityProviderName': self._serialize.url("identity_provider_name", identity_provider_name, 'str') + 'identityProviderName': self._serialize.url("identity_provider_name", identity_provider_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -309,14 +309,22 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('IdentityProviderContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('IdentityProviderContract', 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/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/issue_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/issue_operations.py new file mode 100644 index 000000000000..370534595261 --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/issue_operations.py @@ -0,0 +1,198 @@ +# 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 IssueOperations(object): + """IssueOperations operations. + + :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: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + 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 issues in the specified 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 |
| 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 + :param skip: Number of records to skip. + :type skip: int + :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 IssueContract + :rtype: + ~azure.mgmt.apimanagement.models.IssueContractPaged[~azure.mgmt.apimanagement.models.IssueContract] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + 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 = {} + 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: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + 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) + 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 + deserialized = models.IssueContractPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.IssueContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues'} + + def get( + self, resource_group_name, service_name, issue_id, custom_headers=None, raw=False, **operation_config): + """Gets API Management issue 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 issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_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: IssueContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.IssueContract 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])?$'), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + '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) + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('IssueContract', 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}/issues/{issueId}'} diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/logger_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/logger_operations.py index d86ffdc7f5fe..b8ac594d7456 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/logger_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/logger_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -44,13 +44,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 | Supported operators | Supported functions - | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith | - | type | eq | - | + :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 |
:type filter: str :param top: Number of records to return. :type top: int @@ -124,7 +125,7 @@ def internal_paging(next_link=None, raw=False): list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers'} def get_entity_tag( - self, resource_group_name, service_name, loggerid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, logger_id, custom_headers=None, raw=False, **operation_config): """Gets the entity state (Etag) version of the logger specified by its identifier. @@ -132,9 +133,9 @@ def get_entity_tag( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param loggerid: Logger identifier. Must be unique in the API + :param logger_id: Logger identifier. Must be unique in the API Management service instance. - :type loggerid: str + :type logger_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 @@ -150,7 +151,7 @@ def get_entity_tag( 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])?$'), - 'loggerid': self._serialize.url("loggerid", loggerid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'loggerId': self._serialize.url("logger_id", logger_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -181,19 +182,19 @@ def get_entity_tag( 'ETag': 'str', }) return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}'} + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}'} def get( - self, resource_group_name, service_name, loggerid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, logger_id, custom_headers=None, raw=False, **operation_config): """Gets the details of the logger specified by its identifier. :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 loggerid: Logger identifier. Must be unique in the API + :param logger_id: Logger identifier. Must be unique in the API Management service instance. - :type loggerid: str + :type logger_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 @@ -210,7 +211,7 @@ def get( 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])?$'), - 'loggerid': self._serialize.url("loggerid", loggerid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'loggerId': self._serialize.url("logger_id", logger_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -251,19 +252,19 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}'} def create_or_update( - self, resource_group_name, service_name, loggerid, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, logger_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): """Creates or Updates a logger. :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 loggerid: Logger identifier. Must be unique in the API + :param logger_id: Logger identifier. Must be unique in the API Management service instance. - :type loggerid: str + :type logger_id: str :param parameters: Create parameters. :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract :param if_match: ETag of the Entity. Not required when creating an @@ -285,7 +286,7 @@ def create_or_update( 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])?$'), - 'loggerid': self._serialize.url("loggerid", loggerid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'loggerId': self._serialize.url("logger_id", logger_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -318,30 +319,38 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('LoggerContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('LoggerContract', 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}/loggers/{loggerid}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}'} def update( - self, resource_group_name, service_name, loggerid, parameters, if_match, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, logger_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): """Updates an existing logger. :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 loggerid: Logger identifier. Must be unique in the API + :param logger_id: Logger identifier. Must be unique in the API Management service instance. - :type loggerid: str + :type logger_id: str :param parameters: Update parameters. :type parameters: ~azure.mgmt.apimanagement.models.LoggerUpdateContract @@ -364,7 +373,7 @@ def update( 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])?$'), - 'loggerid': self._serialize.url("loggerid", loggerid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'loggerId': self._serialize.url("logger_id", logger_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -397,23 +406,25 @@ def update( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}'} def delete( - self, resource_group_name, service_name, loggerid, if_match, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, logger_id, if_match, force=None, custom_headers=None, raw=False, **operation_config): """Deletes the specified logger. :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 loggerid: Logger identifier. Must be unique in the API + :param logger_id: Logger identifier. Must be unique in the API Management service instance. - :type loggerid: str + :type logger_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 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 @@ -429,13 +440,15 @@ def delete( 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])?$'), - 'loggerid': self._serialize.url("loggerid", loggerid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'loggerId': self._serialize.url("logger_id", logger_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), '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 = {} + 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 @@ -458,4 +471,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}'} diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/network_status_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/network_status_operations.py index 4ca95549cf00..3dd3986da8e7 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/network_status_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/network_status_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_operations.py index 4f0abab7ef4f..51ca2ea6c65f 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -57,7 +56,8 @@ def list_by_service( :return: An iterator like instance of NotificationContract :rtype: ~azure.mgmt.apimanagement.models.NotificationContractPaged[~azure.mgmt.apimanagement.models.NotificationContract] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -98,9 +98,7 @@ def internal_paging(next_link=None, raw=False): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) return response @@ -187,7 +185,7 @@ def get( def create_or_update( self, resource_group_name, service_name, notification_name, if_match=None, custom_headers=None, raw=False, **operation_config): - """Updates an Notification. + """Create or Update API Management publisher notification. :param resource_group_name: The name of the resource group. :type resource_group_name: str diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_recipient_email_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_recipient_email_operations.py index 327db8d4310c..036de63f16aa 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_recipient_email_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_recipient_email_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -131,8 +131,8 @@ def check_entity_exists( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: bool or ClientRawResponse if raw=true - :rtype: bool or ~msrest.pipeline.ClientRawResponse + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -164,14 +164,12 @@ def check_entity_exists( request = self._client.head(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204, 404]: + if response.status_code not in [204]: raise models.ErrorResponseException(self._deserialize, response) - deserialized = (response.status_code == 204) if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}'} def create_or_update( diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_recipient_user_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_recipient_user_operations.py index 519805924706..4c1b19a91811 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_recipient_user_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_recipient_user_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -108,7 +108,7 @@ def list_by_notification( list_by_notification.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers'} def check_entity_exists( - self, resource_group_name, service_name, notification_name, uid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, notification_name, user_id, custom_headers=None, raw=False, **operation_config): """Determine if the Notification Recipient User is subscribed to the notification. @@ -124,16 +124,16 @@ def check_entity_exists( 'QuotaLimitApproachingPublisherNotificationMessage' :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param uid: User identifier. Must be unique in the current API + :param user_id: User identifier. Must be unique in the current API Management service instance. - :type uid: str + :type user_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: bool or ClientRawResponse if raw=true - :rtype: bool or ~msrest.pipeline.ClientRawResponse + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -143,7 +143,7 @@ def check_entity_exists( '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])?$'), 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), - 'uid': self._serialize.url("uid", uid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -165,18 +165,16 @@ def check_entity_exists( request = self._client.head(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204, 404]: + if response.status_code not in [204]: raise models.ErrorResponseException(self._deserialize, response) - deserialized = (response.status_code == 204) if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{uid}'} + check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}'} def create_or_update( - self, resource_group_name, service_name, notification_name, uid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, notification_name, user_id, custom_headers=None, raw=False, **operation_config): """Adds the API Management User to the list of Recipients for the Notification. @@ -192,9 +190,9 @@ def create_or_update( 'QuotaLimitApproachingPublisherNotificationMessage' :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param uid: User identifier. Must be unique in the current API + :param user_id: User identifier. Must be unique in the current API Management service instance. - :type uid: str + :type user_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 @@ -212,7 +210,7 @@ def create_or_update( '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])?$'), 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), - 'uid': self._serialize.url("uid", uid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -250,10 +248,10 @@ def create_or_update( return client_raw_response return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{uid}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}'} def delete( - self, resource_group_name, service_name, notification_name, uid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, notification_name, user_id, custom_headers=None, raw=False, **operation_config): """Removes the API Management user from the list of Notification. :param resource_group_name: The name of the resource group. @@ -268,9 +266,9 @@ def delete( 'QuotaLimitApproachingPublisherNotificationMessage' :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param uid: User identifier. Must be unique in the current API + :param user_id: User identifier. Must be unique in the current API Management service instance. - :type uid: str + :type user_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 @@ -287,7 +285,7 @@ def delete( '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])?$'), 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), - 'uid': self._serialize.url("uid", uid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -315,4 +313,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{uid}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}'} diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/open_id_connect_provider_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/open_id_connect_provider_operations.py index eb6151adee2c..1987a36bceed 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/open_id_connect_provider_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/open_id_connect_provider_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,25 +32,24 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" 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 all OpenID Connect Providers. + """Lists of all the OpenId Connect Providers. :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 | Supported operators | Supported functions - | - |-------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith | + :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 |
:type filter: str :param top: Number of records to return. :type top: int @@ -65,7 +63,8 @@ def list_by_service( :return: An iterator like instance of OpenidConnectProviderContract :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContractPaged[~azure.mgmt.apimanagement.models.OpenidConnectProviderContract] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -108,9 +107,7 @@ def internal_paging(next_link=None, raw=False): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) return response @@ -320,14 +317,22 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('OpenidConnectProviderContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('OpenidConnectProviderContract', 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/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/operation_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/operation_operations.py index 46f16f6e1129..d3289232f1e2 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/operation_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/operation_operations.py @@ -23,7 +23,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,12 +33,12 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config def list_by_tags( - self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, include_not_tagged_operations=None, custom_headers=None, raw=False, **operation_config): """Lists a collection of operations associated with tags. :param resource_group_name: The name of the resource group. @@ -49,26 +49,25 @@ 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 | Supported operators | Supported - functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | apiName | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | + :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 |
:type filter: str :param top: Number of records to return. :type top: int :param skip: Number of records to skip. :type skip: int + :param include_not_tagged_operations: Include not tagged Operations. + :type include_not_tagged_operations: bool :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -100,6 +99,8 @@ def internal_paging(next_link=None, raw=False): query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) if skip is not None: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if include_not_tagged_operations is not None: + query_parameters['includeNotTaggedOperations'] = self._serialize.query("include_not_tagged_operations", include_not_tagged_operations, 'bool') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_operations.py index e564813dfa05..a937acaa2932 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". :ivar policy_id: The identifier of the Policy. Constant value: "policy". """ @@ -34,23 +33,19 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.policy_id = "policy" self.config = config def list_by_service( - self, resource_group_name, service_name, scope=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): """Lists all the Global Policy definitions of the Api Management service. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param scope: Policy scope. Possible values include: 'Tenant', - 'Product', 'Api', 'Operation', 'All' - :type scope: str or - ~azure.mgmt.apimanagement.models.PolicyScopeContract :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -59,7 +54,8 @@ def list_by_service( :return: PolicyCollection or ClientRawResponse if raw=true :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.list_by_service.metadata['url'] @@ -72,8 +68,6 @@ def list_by_service( # Construct parameters query_parameters = {} - if scope is not None: - query_parameters['scope'] = self._serialize.query("scope", scope, 'PolicyScopeContract') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -91,9 +85,7 @@ def list_by_service( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -232,7 +224,7 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}'} def create_or_update( - self, resource_group_name, service_name, policy_content, content_format="xml", custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, value, if_match=None, format="xml", custom_headers=None, raw=False, **operation_config): """Creates or updates the global policy configuration of the Api Management service. @@ -240,12 +232,14 @@ def create_or_update( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param policy_content: Json escaped Xml Encoded contents of the - Policy. - :type policy_content: str - :param content_format: Format of the policyContent. Possible values - include: 'xml', 'xml-link', 'rawxml', 'rawxml-link' - :type content_format: str or + :param value: Contents of the Policy as defined by the format. + :type value: 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 format: Format of the policyContent. Possible values include: + 'xml', 'xml-link', 'rawxml', 'rawxml-link' + :type format: str or ~azure.mgmt.apimanagement.models.PolicyContentFormat :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -258,7 +252,7 @@ def create_or_update( :raises: :class:`ErrorResponseException` """ - parameters = models.PolicyContract(policy_content=policy_content, content_format=content_format) + parameters = models.PolicyContract(value=value, format=format) # Construct URL url = self.create_or_update.metadata['url'] @@ -282,6 +276,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') @@ -296,14 +292,22 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('PolicyContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('PolicyContract', 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/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_snippets_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_snippet_operations.py similarity index 90% rename from azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_snippets_operations.py rename to azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_snippet_operations.py index 073cd8de13c0..97872fd324fd 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_snippets_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_snippet_operations.py @@ -11,19 +11,18 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models -class PolicySnippetsOperations(object): - """PolicySnippetsOperations operations. +class PolicySnippetOperations(object): + """PolicySnippetOperations operations. :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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -57,7 +56,8 @@ def list_by_service( :return: PolicySnippetsCollection or ClientRawResponse if raw=true :rtype: ~azure.mgmt.apimanagement.models.PolicySnippetsCollection or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.list_by_service.metadata['url'] @@ -89,9 +89,7 @@ def list_by_service( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_api_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_api_operations.py index bd5e5c9be192..5263136fbbaf 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_api_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_api_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -47,19 +47,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 | Supported operators | Supported - functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | name | 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 | - | path | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | + :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 |
| + 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 |
:type filter: str :param top: Number of records to return. :type top: int @@ -84,7 +82,7 @@ def internal_paging(next_link=None, raw=False): 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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -154,8 +152,8 @@ def check_entity_exists( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: bool or ClientRawResponse if raw=true - :rtype: bool or ~msrest.pipeline.ClientRawResponse + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -164,7 +162,7 @@ def check_entity_exists( 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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -187,14 +185,12 @@ def check_entity_exists( request = self._client.head(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204, 404]: + if response.status_code not in [204]: raise models.ErrorResponseException(self._deserialize, response) - deserialized = (response.status_code == 204) if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}'} def create_or_update( @@ -228,7 +224,7 @@ def create_or_update( 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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -299,7 +295,7 @@ def delete( 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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_group_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_group_operations.py index 0094fee005ba..cefd7ce25cdb 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_group_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_group_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -48,17 +48,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 | Supported operators | Supported - functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | type | eq, ne | N/A - | + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + 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 @@ -83,7 +78,7 @@ def internal_paging(next_link=None, raw=False): 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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -152,8 +147,8 @@ def check_entity_exists( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: bool or ClientRawResponse if raw=true - :rtype: bool or ~msrest.pipeline.ClientRawResponse + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -162,8 +157,8 @@ def check_entity_exists( 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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -185,14 +180,12 @@ def check_entity_exists( request = self._client.head(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204, 404]: + if response.status_code not in [204]: raise models.ErrorResponseException(self._deserialize, response) - deserialized = (response.status_code == 204) if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}'} def create_or_update( @@ -226,8 +219,8 @@ def create_or_update( 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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -296,8 +289,8 @@ def delete( 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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_operations.py index d1c93d44123c..ab5a195f764f 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,31 +32,28 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, expand_groups=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, filter=None, top=None, skip=None, expand_groups=None, tags=None, custom_headers=None, raw=False, **operation_config): """Lists a collection of products in the specified 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 | Supported operators | Supported - functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | terms | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | state | 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 |
| + 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 | | |
:type filter: str :param top: Number of records to return. :type top: int @@ -65,6 +62,8 @@ def list_by_service( :param expand_groups: When set to true, the response contains an array of groups that have visibility to the product. The default is false. :type expand_groups: bool + :param tags: Products which are part of a specific tag. + :type tags: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -98,6 +97,8 @@ def internal_paging(next_link=None, raw=False): query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) if expand_groups is not None: query_parameters['expandGroups'] = self._serialize.query("expand_groups", expand_groups, 'bool') + if tags is not None: + query_parameters['tags'] = self._serialize.query("tags", tags, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: @@ -161,7 +162,7 @@ def get_entity_tag( 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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -221,7 +222,7 @@ def get( 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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -296,7 +297,7 @@ def create_or_update( 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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -329,14 +330,22 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('ProductContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('ProductContract', 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 @@ -344,7 +353,7 @@ def create_or_update( def update( self, resource_group_name, service_name, product_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Update product. + """Update existing product details. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -375,7 +384,7 @@ def update( 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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -443,7 +452,7 @@ def delete( 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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -475,3 +484,97 @@ def delete( client_raw_response = ClientRawResponse(None, response) return client_raw_response delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}'} + + def list_by_tags( + self, resource_group_name, service_name, filter=None, top=None, skip=None, include_not_tagged_products=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of products associated with tags. + + :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 |
| 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 |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param include_not_tagged_products: Include not tagged Products. + :type include_not_tagged_products: bool + :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 TagResourceContract + :rtype: + ~azure.mgmt.apimanagement.models.TagResourceContractPaged[~azure.mgmt.apimanagement.models.TagResourceContract] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_tags.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 = {} + 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: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if include_not_tagged_products is not None: + query_parameters['includeNotTaggedProducts'] = self._serialize.query("include_not_tagged_products", include_not_tagged_products, 'bool') + 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) + 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 + deserialized = models.TagResourceContractPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.TagResourceContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags'} diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_policy_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_policy_operations.py index 7c544c3ce3d1..6f2e91f169dd 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_policy_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_policy_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". :ivar policy_id: The identifier of the Policy. Constant value: "policy". """ @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.policy_id = "policy" self.config = config @@ -65,8 +65,8 @@ def list_by_product( 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'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)') + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -92,17 +92,12 @@ def list_by_product( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - header_dict = {} if response.status_code == 200: deserialized = self._deserialize('PolicyCollection', 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 @@ -134,9 +129,9 @@ def get_entity_tag( 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'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str') + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -195,9 +190,9 @@ def get( 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'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str') + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -240,7 +235,7 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}'} def create_or_update( - self, resource_group_name, service_name, product_id, policy_content, if_match=None, content_format="xml", custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, product_id, value, if_match=None, format="xml", custom_headers=None, raw=False, **operation_config): """Creates or updates policy configuration for the Product. :param resource_group_name: The name of the resource group. @@ -250,15 +245,14 @@ def create_or_update( :param product_id: Product identifier. Must be unique in the current API Management service instance. :type product_id: str - :param policy_content: Json escaped Xml Encoded contents of the - Policy. - :type policy_content: str + :param value: Contents of the Policy as defined by the format. + :type value: 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 content_format: Format of the policyContent. Possible values - include: 'xml', 'xml-link', 'rawxml', 'rawxml-link' - :type content_format: str or + :param format: Format of the policyContent. Possible values include: + 'xml', 'xml-link', 'rawxml', 'rawxml-link' + :type format: str or ~azure.mgmt.apimanagement.models.PolicyContentFormat :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -271,14 +265,14 @@ def create_or_update( :raises: :class:`ErrorResponseException` """ - parameters = models.PolicyContract(policy_content=policy_content, content_format=content_format) + parameters = models.PolicyContract(value=value, format=format) # 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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -312,14 +306,22 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('PolicyContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('PolicyContract', 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 @@ -355,7 +357,7 @@ def delete( 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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_subscriptions_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_subscriptions_operations.py index b91eea2bdbee..fee36bbc7942 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_subscriptions_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_subscriptions_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -47,21 +47,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 | Supported operators | Supported - functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | state | 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 |
| + 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 | + | |
:type filter: str :param top: Number of records to return. :type top: int @@ -86,7 +86,7 @@ def internal_paging(next_link=None, raw=False): 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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/property_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/property_operations.py index 67ab31103e11..3c243740613c 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/property_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/property_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,7 @@ class PropertyOperations(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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -45,13 +44,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 | Supported operators | Supported functions - | - |-------|------------------------|-------------------------------------------------------| - | tags | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith, any, all | - | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith | + :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 |
:type filter: str :param top: Number of records to return. :type top: int @@ -65,7 +63,8 @@ def list_by_service( :return: An iterator like instance of PropertyContract :rtype: ~azure.mgmt.apimanagement.models.PropertyContractPaged[~azure.mgmt.apimanagement.models.PropertyContract] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -108,9 +107,7 @@ def internal_paging(next_link=None, raw=False): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) return response @@ -151,7 +148,7 @@ def get_entity_tag( 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])?$'), - 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -210,7 +207,7 @@ def get( 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])?$'), - 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -284,7 +281,7 @@ def create_or_update( 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])?$'), - 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -317,14 +314,22 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('PropertyContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('PropertyContract', 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 @@ -362,7 +367,7 @@ def update( 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])?$'), - 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -426,7 +431,7 @@ def delete( 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])?$'), - 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/quota_by_counter_keys_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/quota_by_counter_keys_operations.py index 3722a4f234aa..6c6da85b6b02 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/quota_by_counter_keys_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/quota_by_counter_keys_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -67,10 +67,10 @@ def list_by_service( # Construct URL url = self.list_by_service.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), '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])?$'), - 'quotaCounterKey': self._serialize.url("quota_counter_key", quota_counter_key, 'str') + 'quotaCounterKey': self._serialize.url("quota_counter_key", quota_counter_key, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/quota_by_period_keys_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/quota_by_period_keys_operations.py index 09bd84880a0c..ac05c971c9ae 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/quota_by_period_keys_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/quota_by_period_keys_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -68,11 +68,11 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), '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])?$'), 'quotaCounterKey': self._serialize.url("quota_counter_key", quota_counter_key, 'str'), - 'quotaPeriodKey': self._serialize.url("quota_period_key", quota_period_key, 'str') + 'quotaPeriodKey': self._serialize.url("quota_period_key", quota_period_key, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/regions_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/region_operations.py similarity index 91% rename from azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/regions_operations.py rename to azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/region_operations.py index a6dc3b0f1a41..c57466505a4a 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/regions_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/region_operations.py @@ -11,19 +11,18 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models -class RegionsOperations(object): - """RegionsOperations operations. +class RegionOperations(object): + """RegionOperations operations. :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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -53,7 +52,8 @@ def list_by_service( :return: An iterator like instance of RegionContract :rtype: ~azure.mgmt.apimanagement.models.RegionContractPaged[~azure.mgmt.apimanagement.models.RegionContract] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -90,9 +90,7 @@ def internal_paging(next_link=None, raw=False): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) return response diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/reports_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/reports_operations.py index ecc16e252ada..1e238b46aa3f 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/reports_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/reports_operations.py @@ -23,7 +23,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,12 +33,12 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config def list_by_api( - self, resource_group_name, service_name, filter, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, filter, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): """Lists report records by API. :param resource_group_name: The name of the resource group. @@ -51,6 +51,8 @@ def list_by_api( :type top: int :param skip: Number of records to skip. :type skip: int + :param orderby: OData order by query option. + :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -80,6 +82,8 @@ def internal_paging(next_link=None, raw=False): query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) if skip is not None: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: @@ -119,19 +123,39 @@ def internal_paging(next_link=None, raw=False): list_by_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi'} def list_by_user( - self, resource_group_name, service_name, filter, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, filter, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): """Lists report records by User. :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: The filter to apply on the operation. + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + timestamp | filter | ge, le | |
| displayName | select, + orderBy | | |
| userId | select, filter | eq | | +
| apiRegion | filter | eq | |
| productId | filter | eq + | |
| subscriptionId | filter | eq | |
| apiId | + filter | eq | |
| operationId | filter | eq | |
| + callCountSuccess | select, orderBy | | |
| + callCountBlocked | select, orderBy | | |
| + callCountFailed | select, orderBy | | |
| callCountOther + | select, orderBy | | |
| callCountTotal | select, + orderBy | | |
| bandwidth | select, orderBy | | | +
| cacheHitsCount | select | | |
| cacheMissCount | + select | | |
| apiTimeAvg | select, orderBy | | | +
| apiTimeMin | select | | |
| apiTimeMax | select | + | |
| serviceTimeAvg | select | | |
| + serviceTimeMin | select | | |
| serviceTimeMax | select | + | |
:type filter: str :param top: Number of records to return. :type top: int :param skip: Number of records to skip. :type skip: int + :param orderby: OData order by query option. + :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -161,6 +185,8 @@ def internal_paging(next_link=None, raw=False): query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) if skip is not None: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: @@ -200,19 +226,39 @@ def internal_paging(next_link=None, raw=False): list_by_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser'} def list_by_operation( - self, resource_group_name, service_name, filter, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, filter, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): """Lists report records by API Operations. :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: The filter to apply on the operation. + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + timestamp | filter | ge, le | |
| displayName | select, + orderBy | | |
| apiRegion | filter | eq | |
| + userId | filter | eq | |
| productId | filter | eq | | +
| subscriptionId | filter | eq | |
| apiId | filter | eq + | |
| operationId | select, filter | eq | |
| + callCountSuccess | select, orderBy | | |
| + callCountBlocked | select, orderBy | | |
| + callCountFailed | select, orderBy | | |
| callCountOther + | select, orderBy | | |
| callCountTotal | select, + orderBy | | |
| bandwidth | select, orderBy | | | +
| cacheHitsCount | select | | |
| cacheMissCount | + select | | |
| apiTimeAvg | select, orderBy | | | +
| apiTimeMin | select | | |
| apiTimeMax | select | + | |
| serviceTimeAvg | select | | |
| + serviceTimeMin | select | | |
| serviceTimeMax | select | + | |
:type filter: str :param top: Number of records to return. :type top: int :param skip: Number of records to skip. :type skip: int + :param orderby: OData order by query option. + :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -242,6 +288,8 @@ def internal_paging(next_link=None, raw=False): query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) if skip is not None: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: @@ -281,19 +329,37 @@ def internal_paging(next_link=None, raw=False): list_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation'} def list_by_product( - self, resource_group_name, service_name, filter, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, filter, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): """Lists report records by Product. :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: The filter to apply on the operation. + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + timestamp | filter | ge, le | |
| displayName | select, + orderBy | | |
| apiRegion | filter | eq | |
| + userId | filter | eq | |
| productId | select, filter | eq | + |
| subscriptionId | filter | eq | |
| callCountSuccess + | select, orderBy | | |
| callCountBlocked | select, + orderBy | | |
| callCountFailed | select, orderBy | | + |
| callCountOther | select, orderBy | | |
| + callCountTotal | select, orderBy | | |
| bandwidth | + select, orderBy | | |
| cacheHitsCount | select | | + |
| cacheMissCount | select | | |
| apiTimeAvg | + select, orderBy | | |
| apiTimeMin | select | | | +
| apiTimeMax | select | | |
| serviceTimeAvg | + select | | |
| serviceTimeMin | select | | | +
| serviceTimeMax | select | | |
:type filter: str :param top: Number of records to return. :type top: int :param skip: Number of records to skip. :type skip: int + :param orderby: OData order by query option. + :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -323,6 +389,8 @@ def internal_paging(next_link=None, raw=False): query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) if skip is not None: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: @@ -362,14 +430,30 @@ def internal_paging(next_link=None, raw=False): list_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct'} def list_by_geo( - self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, filter, top=None, skip=None, custom_headers=None, raw=False, **operation_config): """Lists report records by geography. :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: The filter to apply on the operation. + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + timestamp | filter | ge, le | |
| country | select | | + |
| region | select | | |
| zip | select | | + |
| apiRegion | filter | eq | |
| userId | filter | eq | + |
| productId | filter | eq | |
| subscriptionId | + filter | eq | |
| apiId | filter | eq | |
| + operationId | filter | eq | |
| callCountSuccess | select | + | |
| callCountBlocked | select | | |
| + callCountFailed | select | | |
| callCountOther | select + | | |
| bandwidth | select, orderBy | | |
| + cacheHitsCount | select | | |
| cacheMissCount | select | + | |
| apiTimeAvg | select | | |
| apiTimeMin | + select | | |
| apiTimeMax | select | | |
| + serviceTimeAvg | select | | |
| serviceTimeMin | select | + | |
| serviceTimeMax | select | | |
:type filter: str :param top: Number of records to return. :type top: int @@ -399,8 +483,7 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + 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: @@ -444,19 +527,38 @@ def internal_paging(next_link=None, raw=False): list_by_geo.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo'} def list_by_subscription( - self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, filter, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): """Lists report records by subscription. :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: The filter to apply on the operation. + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + timestamp | filter | ge, le | |
| displayName | select, + orderBy | | |
| apiRegion | filter | eq | |
| + userId | select, filter | eq | |
| productId | select, filter + | eq | |
| subscriptionId | select, filter | eq | | +
| callCountSuccess | select, orderBy | | |
| + callCountBlocked | select, orderBy | | |
| + callCountFailed | select, orderBy | | |
| callCountOther + | select, orderBy | | |
| callCountTotal | select, + orderBy | | |
| bandwidth | select, orderBy | | | +
| cacheHitsCount | select | | |
| cacheMissCount | + select | | |
| apiTimeAvg | select, orderBy | | | +
| apiTimeMin | select | | |
| apiTimeMax | select | + | |
| serviceTimeAvg | select | | |
| + serviceTimeMin | select | | |
| serviceTimeMax | select | + | |
:type filter: str :param top: Number of records to return. :type top: int :param skip: Number of records to skip. :type skip: int + :param orderby: OData order by query option. + :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -481,12 +583,13 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + 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: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: @@ -526,25 +629,43 @@ def internal_paging(next_link=None, raw=False): list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription'} def list_by_time( - self, resource_group_name, service_name, interval, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, filter, interval, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): """Lists report records by Time. :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 + |
|-------------|-------------|-------------|-------------|
| + timestamp | filter, select | ge, le | |
| interval | select | + | |
| apiRegion | filter | eq | |
| userId | filter + | eq | |
| productId | filter | eq | |
| + subscriptionId | filter | eq | |
| apiId | filter | eq | + |
| operationId | filter | eq | |
| callCountSuccess | + select | | |
| callCountBlocked | select | | | +
| callCountFailed | select | | |
| callCountOther | + select | | |
| bandwidth | select, orderBy | | | +
| cacheHitsCount | select | | |
| cacheMissCount | + select | | |
| apiTimeAvg | select | | |
| + apiTimeMin | select | | |
| apiTimeMax | select | | + |
| serviceTimeAvg | select | | |
| serviceTimeMin | + select | | |
| serviceTimeMax | select | | | +
+ :type filter: str :param interval: By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: - XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)) + XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). :type interval: timedelta - :param filter: The filter to apply on the operation. - :type filter: str :param top: Number of records to return. :type top: int :param skip: Number of records to skip. :type skip: int + :param orderby: OData order by query option. + :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -569,12 +690,13 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + 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: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') query_parameters['interval'] = self._serialize.query("interval", interval, 'duration') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') @@ -622,7 +744,13 @@ def list_by_request( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param filter: The filter to apply on the operation. + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + timestamp | filter | ge, le | |
| apiId | filter | eq | | +
| operationId | filter | eq | |
| productId | filter | + eq | |
| userId | filter | eq | |
| apiRegion | + filter | eq | |
| subscriptionId | filter | eq | |
:type filter: str :param top: Number of records to return. :type top: int diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/sign_in_settings_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/sign_in_settings_operations.py index b77d65c4262a..c93a303527d2 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/sign_in_settings_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/sign_in_settings_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -94,7 +93,7 @@ def get_entity_tag( def get( self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Get Sign-In settings. + """Get Sign In Settings for the Portal. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -108,7 +107,8 @@ def get( :return: PortalSigninSettings or ClientRawResponse if raw=true :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -138,9 +138,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None header_dict = {} @@ -225,13 +223,16 @@ def update( update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin'} def create_or_update( - self, resource_group_name, service_name, enabled=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, if_match=None, enabled=None, custom_headers=None, raw=False, **operation_config): """Create or Update Sign-In settings. :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 if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str :param enabled: Redirect Anonymous users to the Sign-In page. :type enabled: bool :param dict custom_headers: headers that will be added to the request @@ -268,6 +269,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') diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/sign_up_settings_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/sign_up_settings_operations.py index 1c037d109642..b8639ccaff81 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/sign_up_settings_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/sign_up_settings_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -94,7 +93,7 @@ def get_entity_tag( def get( self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Get Sign-Up settings. + """Get Sign Up Settings for the Portal. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -108,7 +107,8 @@ def get( :return: PortalSignupSettings or ClientRawResponse if raw=true :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -138,9 +138,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None header_dict = {} @@ -228,13 +226,16 @@ def update( update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup'} def create_or_update( - self, resource_group_name, service_name, enabled=None, terms_of_service=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, if_match=None, enabled=None, terms_of_service=None, custom_headers=None, raw=False, **operation_config): """Create or Update Sign-Up settings. :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 if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str :param enabled: Allow users to sign up on a developer portal. :type enabled: bool :param terms_of_service: Terms of service contract properties. @@ -274,6 +275,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') diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/subscription_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/subscription_operations.py index 7ace53698d09..848dd5ecd901 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/subscription_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/subscription_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -44,21 +44,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 | Supported operators | Supported - functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | state | 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 |
| + 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 | + | |
:type filter: str :param top: Number of records to return. :type top: int @@ -158,7 +158,7 @@ def get_entity_tag( 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])?$'), - 'sid': self._serialize.url("sid", sid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -218,7 +218,7 @@ def get( 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])?$'), - 'sid': self._serialize.url("sid", sid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -300,7 +300,7 @@ def create_or_update( 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])?$'), - 'sid': self._serialize.url("sid", sid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -335,14 +335,22 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('SubscriptionContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('SubscriptionContract', 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 @@ -386,7 +394,7 @@ def update( 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])?$'), - 'sid': self._serialize.url("sid", sid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -453,7 +461,7 @@ def delete( 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])?$'), - 'sid': self._serialize.url("sid", sid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -511,7 +519,7 @@ def regenerate_primary_key( 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])?$'), - 'sid': self._serialize.url("sid", sid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -568,7 +576,7 @@ def regenerate_secondary_key( 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])?$'), - 'sid': self._serialize.url("sid", sid, 'str', max_length=80, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tag_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tag_operations.py index eee4a3eee21d..9c314c560929 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tag_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tag_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,25 +32,31 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" 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 tags defined within a service instance. + def list_by_operation( + self, resource_group_name, service_name, api_id, operation_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists all Tags associated with the Operation. :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 | Supported operators | Supported - functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :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 + |
|-------------|-------------|-------------|-------------|
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, + 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 @@ -65,16 +70,19 @@ def list_by_service( :return: An iterator like instance of TagContract :rtype: ~azure.mgmt.apimanagement.models.TagContractPaged[~azure.mgmt.apimanagement.models.TagContract] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_service.metadata['url'] + url = self.list_by_operation.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])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -108,9 +116,7 @@ def internal_paging(next_link=None, raw=False): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) return response @@ -123,16 +129,23 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags'} + list_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags'} - def get_entity_state( - self, resource_group_name, service_name, tag_id, custom_headers=None, raw=False, **operation_config): + def get_entity_state_by_operation( + self, resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers=None, raw=False, **operation_config): """Gets the entity state version of the tag specified by its identifier. :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 api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str :param tag_id: Tag identifier. Must be unique in the current API Management service instance. :type tag_id: str @@ -147,11 +160,13 @@ def get_entity_state( :class:`ErrorResponseException` """ # Construct URL - url = self.get_entity_state.metadata['url'] + url = self.get_entity_state_by_operation.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])?$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -182,16 +197,23 @@ def get_entity_state( 'ETag': 'str', }) return client_raw_response - get_entity_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} + get_entity_state_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'} - def get( - self, resource_group_name, service_name, tag_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the tag specified by its identifier. + def get_by_operation( + self, resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Get tag associated with the Operation. :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 api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str :param tag_id: Tag identifier. Must be unique in the current API Management service instance. :type tag_id: str @@ -207,11 +229,13 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = self.get.metadata['url'] + url = self.get_by_operation.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])?$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -252,21 +276,26 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} + get_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'} - def create_or_update( - self, resource_group_name, service_name, tag_id, display_name, custom_headers=None, raw=False, **operation_config): - """Creates a tag. + def assign_to_operation( + self, resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Assign tag to the Operation. :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 api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str :param tag_id: Tag identifier. Must be unique in the current API Management service instance. :type tag_id: str - :param display_name: Tag name. - :type display_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 @@ -278,14 +307,14 @@ def create_or_update( :raises: :class:`ErrorResponseException` """ - parameters = models.TagCreateUpdateParameters(display_name=display_name) - # Construct URL - url = self.create_or_update.metadata['url'] + url = self.assign_to_operation.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])?$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -297,7 +326,6 @@ def create_or_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()) if custom_headers: @@ -305,11 +333,8 @@ def create_or_update( 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 body - body_content = self._serialize.body(parameters, 'TagCreateUpdateParameters') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) + 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]: @@ -327,92 +352,26 @@ def create_or_update( return client_raw_response return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} - - def update( - self, resource_group_name, service_name, tag_id, if_match, display_name, custom_headers=None, raw=False, **operation_config): - """Updates the details of the tag specified by its identifier. - - :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 tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_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 display_name: Tag name. - :type display_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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.TagCreateUpdateParameters(display_name=display_name) - - # Construct URL - url = self.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])?$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - '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['Content-Type'] = 'application/json; charset=utf-8' - 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 body - body_content = self._serialize.body(parameters, 'TagCreateUpdateParameters') - - # 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]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} + assign_to_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'} - def delete( - self, resource_group_name, service_name, tag_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes specific tag of the API Management service instance. + def detach_from_operation( + self, resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Detach the tag from the Operation. :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 api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str :param tag_id: Tag identifier. Must be unique in the current API Management service instance. :type tag_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 @@ -424,11 +383,13 @@ def delete( :class:`ErrorResponseException` """ # Construct URL - url = self.delete.metadata['url'] + url = self.detach_from_operation.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])?$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -443,7 +404,6 @@ 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') @@ -457,7 +417,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} + detach_from_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'} def list_by_api( self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): @@ -471,13 +431,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 | Supported operators | Supported - functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | + :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 |
:type filter: str :param top: Number of records to return. :type top: int @@ -582,7 +541,7 @@ def get_entity_state_by_api( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -647,7 +606,7 @@ def get_by_api( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -691,7 +650,7 @@ def get_by_api( get_by_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}'} def assign_to_api( - self, resource_group_name, service_name, api_id, tag_id, if_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, api_id, tag_id, custom_headers=None, raw=False, **operation_config): """Assign tag to the Api. :param resource_group_name: The name of the resource group. @@ -705,9 +664,6 @@ def assign_to_api( :param tag_id: Tag identifier. Must be unique in the current API Management service instance. :type tag_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 @@ -725,7 +681,7 @@ def assign_to_api( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -741,8 +697,6 @@ def assign_to_api( 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') @@ -754,21 +708,29 @@ def assign_to_api( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('TagContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('TagContract', 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 assign_to_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}'} def detach_from_api( - self, resource_group_name, service_name, api_id, tag_id, if_match, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, api_id, tag_id, custom_headers=None, raw=False, **operation_config): """Detach the tag from the Api. :param resource_group_name: The name of the resource group. @@ -782,10 +744,6 @@ def detach_from_api( :param tag_id: Tag identifier. Must be unique in the current API Management service instance. :type tag_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 @@ -802,7 +760,7 @@ def detach_from_api( '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])?$'), 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -817,7 +775,6 @@ def detach_from_api( 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') @@ -833,34 +790,23 @@ def detach_from_api( return client_raw_response detach_from_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}'} - def list_by_operation( - self, resource_group_name, service_name, api_id, operation_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all Tags associated with the Operation. + def list_by_product( + self, resource_group_name, service_name, product_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists all Tags associated with the Product. :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 api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :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 | Supported operators | Supported - functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | method | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | + :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 + |
|-------------|-------------|-------------|-------------|
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, + 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 @@ -881,12 +827,11 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_operation.metadata['url'] + url = self.list_by_product.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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -933,23 +878,19 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags'} + list_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags'} - def get_entity_state_by_operation( - self, resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers=None, raw=False, **operation_config): + def get_entity_state_by_product( + self, resource_group_name, service_name, product_id, tag_id, custom_headers=None, raw=False, **operation_config): """Gets the entity state version of the tag specified by its identifier. :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 api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str :param tag_id: Tag identifier. Must be unique in the current API Management service instance. :type tag_id: str @@ -964,13 +905,12 @@ def get_entity_state_by_operation( :class:`ErrorResponseException` """ # Construct URL - url = self.get_entity_state_by_operation.metadata['url'] + url = self.get_entity_state_by_product.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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1001,23 +941,19 @@ def get_entity_state_by_operation( 'ETag': 'str', }) return client_raw_response - get_entity_state_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'} + get_entity_state_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'} - def get_by_operation( - self, resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers=None, raw=False, **operation_config): - """Get tag associated with the Operation. + def get_by_product( + self, resource_group_name, service_name, product_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Get tag associated with the Product. :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 api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str :param tag_id: Tag identifier. Must be unique in the current API Management service instance. :type tag_id: str @@ -1033,13 +969,12 @@ def get_by_operation( :class:`ErrorResponseException` """ # Construct URL - url = self.get_by_operation.metadata['url'] + url = self.get_by_product.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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1080,29 +1015,22 @@ def get_by_operation( return client_raw_response return deserialized - get_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'} + get_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'} - def assign_to_operation( - self, resource_group_name, service_name, api_id, operation_id, tag_id, if_match=None, custom_headers=None, raw=False, **operation_config): - """Assign tag to the Operation. + def assign_to_product( + self, resource_group_name, service_name, product_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Assign tag to the Product. :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 api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str :param tag_id: Tag identifier. Must be unique in the current API Management service instance. :type tag_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 @@ -1115,13 +1043,12 @@ def assign_to_operation( :class:`ErrorResponseException` """ # Construct URL - url = self.assign_to_operation.metadata['url'] + url = self.assign_to_product.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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1137,8 +1064,6 @@ def assign_to_operation( 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') @@ -1161,30 +1086,22 @@ def assign_to_operation( return client_raw_response return deserialized - assign_to_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'} + assign_to_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'} - def detach_from_operation( - self, resource_group_name, service_name, api_id, operation_id, tag_id, if_match, custom_headers=None, raw=False, **operation_config): - """Detach the tag from the Operation. + def detach_from_product( + self, resource_group_name, service_name, product_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Detach the tag from the Product. :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 api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str :param tag_id: Tag identifier. Must be unique in the current API Management service instance. :type tag_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 @@ -1196,13 +1113,12 @@ def detach_from_operation( :class:`ErrorResponseException` """ # Construct URL - url = self.detach_from_operation.metadata['url'] + url = self.detach_from_product.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])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1217,7 +1133,6 @@ def detach_from_operation( 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') @@ -1231,31 +1146,29 @@ def detach_from_operation( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - detach_from_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'} + detach_from_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'} - def list_by_product( - self, resource_group_name, service_name, product_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all Tags associated with the Product. + def list_by_service( + self, resource_group_name, service_name, filter=None, top=None, skip=None, scope=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of tags 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 product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param filter: | Field | Supported operators | Supported - functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | + :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 |
:type filter: str :param top: Number of records to return. :type top: int :param skip: Number of records to skip. :type skip: int + :param scope: Scope like 'apis', 'products' or 'apis/{apiId} + :type scope: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -1271,11 +1184,10 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_product.metadata['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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1288,6 +1200,8 @@ def internal_paging(next_link=None, raw=False): query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) if skip is not None: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if scope is not None: + query_parameters['scope'] = self._serialize.query("scope", scope, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: @@ -1322,19 +1236,16 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags'} + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags'} - def get_entity_state_by_product( - self, resource_group_name, service_name, product_id, tag_id, custom_headers=None, raw=False, **operation_config): + def get_entity_state( + self, resource_group_name, service_name, tag_id, custom_headers=None, raw=False, **operation_config): """Gets the entity state version of the tag specified by its identifier. :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 product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str :param tag_id: Tag identifier. Must be unique in the current API Management service instance. :type tag_id: str @@ -1349,12 +1260,11 @@ def get_entity_state_by_product( :class:`ErrorResponseException` """ # Construct URL - url = self.get_entity_state_by_product.metadata['url'] + url = self.get_entity_state.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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1385,19 +1295,16 @@ def get_entity_state_by_product( 'ETag': 'str', }) return client_raw_response - get_entity_state_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'} + get_entity_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} - def get_by_product( - self, resource_group_name, service_name, product_id, tag_id, custom_headers=None, raw=False, **operation_config): - """Get tag associated with the Product. + def get( + self, resource_group_name, service_name, tag_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the tag specified by its identifier. :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 product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str :param tag_id: Tag identifier. Must be unique in the current API Management service instance. :type tag_id: str @@ -1413,12 +1320,11 @@ def get_by_product( :class:`ErrorResponseException` """ # Construct URL - url = self.get_by_product.metadata['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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1459,22 +1365,21 @@ def get_by_product( return client_raw_response return deserialized - get_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} - def assign_to_product( - self, resource_group_name, service_name, product_id, tag_id, if_match=None, custom_headers=None, raw=False, **operation_config): - """Assign tag to the Product. + def create_or_update( + self, resource_group_name, service_name, tag_id, display_name, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates a tag. :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 product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str :param tag_id: Tag identifier. Must be unique in the current API Management service instance. :type tag_id: str + :param display_name: Tag name. + :type display_name: str :param if_match: ETag of the Entity. Not required when creating an entity, but required when updating an entity. :type if_match: str @@ -1489,13 +1394,14 @@ def assign_to_product( :raises: :class:`ErrorResponseException` """ + parameters = models.TagCreateUpdateParameters(display_name=display_name) + # Construct URL - url = self.assign_to_product.metadata['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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1507,6 +1413,7 @@ def assign_to_product( # 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()) if custom_headers: @@ -1516,38 +1423,46 @@ def assign_to_product( 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 body + body_content = self._serialize.body(parameters, 'TagCreateUpdateParameters') + # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) + request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('TagContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('TagContract', 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 - assign_to_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} - def detach_from_product( - self, resource_group_name, service_name, product_id, tag_id, if_match, custom_headers=None, raw=False, **operation_config): - """Detach the tag from the Product. + def update( + self, resource_group_name, service_name, tag_id, if_match, display_name, custom_headers=None, raw=False, **operation_config): + """Updates the details of the tag specified by its identifier. :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 product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str :param tag_id: Tag identifier. Must be unique in the current API Management service instance. :type tag_id: str @@ -1555,6 +1470,8 @@ def detach_from_product( entity state from the header response of the GET request or it should be * for unconditional update. :type if_match: str + :param display_name: Tag name. + :type display_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 @@ -1565,13 +1482,79 @@ def detach_from_product( :raises: :class:`ErrorResponseException` """ + parameters = models.TagCreateUpdateParameters(display_name=display_name) + # Construct URL - url = self.detach_from_product.metadata['url'] + url = self.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])?$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + '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['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(parameters, 'TagCreateUpdateParameters') + + # 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]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} + + def delete( + self, resource_group_name, service_name, tag_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes specific tag of the API Management 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 tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_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])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1600,4 +1583,4 @@ def detach_from_product( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - detach_from_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tag_resource_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tag_resource_operations.py index 8834c67f5e97..4fb092521714 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tag_resource_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tag_resource_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config @@ -45,35 +44,27 @@ 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 | Supported operators | Supported - functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | aid | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | apiName | 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 | - | method | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | terms | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | state | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | isCurrent | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | + :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 | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + 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 | + 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 | | +
:type filter: str :param top: Number of records to return. :type top: int @@ -87,7 +78,8 @@ def list_by_service( :return: An iterator like instance of TagResourceContract :rtype: ~azure.mgmt.apimanagement.models.TagResourceContractPaged[~azure.mgmt.apimanagement.models.TagResourceContract] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -130,9 +122,7 @@ def internal_paging(next_link=None, raw=False): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) return response diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_access_git_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_access_git_operations.py index 626269771483..84740f7e47f6 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_access_git_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_access_git_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". :ivar access_name: The identifier of the Access configuration. Constant value: "access". """ @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.access_name = "access" self.config = config diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_access_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_access_operations.py index 0d5403f0ee63..3c7deb2493c9 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_access_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_access_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". :ivar access_name: The identifier of the Access configuration. Constant value: "access". """ @@ -34,11 +33,67 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.access_name = "access" self.config = config + def get_entity_tag( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Tenant access 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 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])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'accessName': self._serialize.url("self.access_name", self.access_name, '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}/tenant/{accessName}'} + def get( self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): """Get tenant access information details. @@ -55,7 +110,8 @@ def get( :return: AccessInformationContract or ClientRawResponse if raw=true :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -86,9 +142,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None header_dict = {} @@ -119,8 +173,7 @@ def update( entity state from the header response of the GET request or it should be * for unconditional update. :type if_match: str - :param enabled: Tenant access information of the API Management - service. + :param enabled: Determines whether direct access is enabled. :type enabled: bool :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_configuration_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_configuration_operations.py index 2b640a49dde5..7b4a9bf37a4d 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_configuration_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_configuration_operations.py @@ -25,7 +25,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". :ivar configuration_name: The identifier of the Git Configuration Operation. Constant value: "configuration". """ @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.configuration_name = "configuration" self.config = config @@ -144,7 +144,7 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) @@ -254,7 +254,7 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) @@ -362,7 +362,7 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_confirmation_password_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_confirmation_password_operations.py new file mode 100644 index 000000000000..faa76b03f4d2 --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_confirmation_password_operations.py @@ -0,0 +1,93 @@ +# 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 UserConfirmationPasswordOperations(object): + """UserConfirmationPasswordOperations operations. + + :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: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def send( + self, resource_group_name, service_name, user_id, custom_headers=None, raw=False, **operation_config): + """Sends confirmation. + + :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 user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_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.send.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])?$'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + '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.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + send.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/confirmations/password/send'} diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_group_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_group_operations.py index 10c90866f585..d43a29185134 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_group_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_group_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,30 +32,29 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config def list( - self, resource_group_name, service_name, uid, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, user_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): """Lists all user groups. :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 uid: User identifier. Must be unique in the current API + :param user_id: User identifier. Must be unique in the current API Management service instance. - :type uid: str - :param filter: | Field | Supported operators | Supported - functions | - |-------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | description | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | + :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 |
| + 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 @@ -80,7 +79,7 @@ def internal_paging(next_link=None, raw=False): 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])?$'), - 'uid': self._serialize.url("uid", uid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -127,4 +126,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/groups'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups'} diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_identities_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_identities_operations.py index 32d58b37d88e..6a9ce0a5b8e2 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_identities_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_identities_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,21 +32,21 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config def list( - self, resource_group_name, service_name, uid, custom_headers=None, raw=False, **operation_config): - """Lists all user identities. + self, resource_group_name, service_name, user_id, custom_headers=None, raw=False, **operation_config): + """List of all user identities. :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 uid: User identifier. Must be unique in the current API + :param user_id: User identifier. Must be unique in the current API Management service instance. - :type uid: str + :type user_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 @@ -66,7 +66,7 @@ def internal_paging(next_link=None, raw=False): 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])?$'), - 'uid': self._serialize.url("uid", uid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -107,4 +107,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/identities'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities'} diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_operations.py index 1576ffdd718c..79e55902d2e5 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,73 +32,12 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config - def get_identity( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Returns calling user identity information. - - :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: CurrentUserIdentity or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.CurrentUserIdentity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_identity.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') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CurrentUserIdentity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_identity.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identity'} - def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, filter=None, top=None, skip=None, expand_groups=None, custom_headers=None, raw=False, **operation_config): """Lists a collection of registered users in the specified service instance. @@ -106,28 +45,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 | Supported operators | Supported - functions | - |------------------|------------------------|-----------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | firstName | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | lastName | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | email | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | state | eq | N/A - | - | registrationDate | ge, le, eq, ne, gt, lt | N/A - | - | note | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | + :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 | + 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 | | | +
:type filter: str :param top: Number of records to return. :type top: int :param skip: Number of records to skip. :type skip: int + :param expand_groups: Detailed Group in response. + :type expand_groups: bool :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -159,6 +96,8 @@ def internal_paging(next_link=None, raw=False): query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) if skip is not None: query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if expand_groups is not None: + query_parameters['expandGroups'] = self._serialize.query("expand_groups", expand_groups, 'bool') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: @@ -196,7 +135,7 @@ def internal_paging(next_link=None, raw=False): list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users'} def get_entity_tag( - self, resource_group_name, service_name, uid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, user_id, custom_headers=None, raw=False, **operation_config): """Gets the entity state (Etag) version of the user specified by its identifier. @@ -204,9 +143,9 @@ def get_entity_tag( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param uid: User identifier. Must be unique in the current API + :param user_id: User identifier. Must be unique in the current API Management service instance. - :type uid: str + :type user_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 @@ -222,7 +161,7 @@ def get_entity_tag( 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])?$'), - 'uid': self._serialize.url("uid", uid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -253,19 +192,19 @@ def get_entity_tag( 'ETag': 'str', }) return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}'} + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}'} def get( - self, resource_group_name, service_name, uid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, user_id, custom_headers=None, raw=False, **operation_config): """Gets the details of the user specified by its identifier. :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 uid: User identifier. Must be unique in the current API + :param user_id: User identifier. Must be unique in the current API Management service instance. - :type uid: str + :type user_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 @@ -282,7 +221,7 @@ def get( 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])?$'), - 'uid': self._serialize.url("uid", uid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -323,19 +262,19 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}'} def create_or_update( - self, resource_group_name, service_name, uid, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, user_id, parameters, 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. :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param uid: User identifier. Must be unique in the current API + :param user_id: User identifier. Must be unique in the current API Management service instance. - :type uid: str + :type user_id: str :param parameters: Create or update parameters. :type parameters: ~azure.mgmt.apimanagement.models.UserCreateParameters @@ -358,7 +297,7 @@ def create_or_update( 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])?$'), - 'uid': self._serialize.url("uid", uid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -391,30 +330,38 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None + header_dict = {} if response.status_code == 200: deserialized = self._deserialize('UserContract', response) + header_dict = { + 'ETag': 'str', + } if response.status_code == 201: deserialized = self._deserialize('UserContract', 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}/users/{uid}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}'} def update( - self, resource_group_name, service_name, uid, parameters, if_match, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, user_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): """Updates the details of the user specified by its identifier. :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 uid: User identifier. Must be unique in the current API + :param user_id: User identifier. Must be unique in the current API Management service instance. - :type uid: str + :type user_id: str :param parameters: Update parameters. :type parameters: ~azure.mgmt.apimanagement.models.UserUpdateParameters @@ -437,7 +384,7 @@ def update( 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])?$'), - 'uid': self._serialize.url("uid", uid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -470,19 +417,19 @@ def update( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}'} def delete( - self, resource_group_name, service_name, uid, 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, custom_headers=None, raw=False, **operation_config): """Deletes specific user. :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 uid: User identifier. Must be unique in the current API + :param user_id: User identifier. Must be unique in the current API Management service instance. - :type uid: str + :type user_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. @@ -507,7 +454,7 @@ def delete( 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])?$'), - 'uid': self._serialize.url("uid", uid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -540,10 +487,10 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}'} def generate_sso_url( - self, resource_group_name, service_name, uid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, user_id, custom_headers=None, raw=False, **operation_config): """Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. @@ -551,9 +498,9 @@ def generate_sso_url( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param uid: User identifier. Must be unique in the current API + :param user_id: User identifier. Must be unique in the current API Management service instance. - :type uid: str + :type user_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 @@ -570,7 +517,7 @@ def generate_sso_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])?$'), - 'uid': self._serialize.url("uid", uid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -606,19 +553,19 @@ def generate_sso_url( return client_raw_response return deserialized - generate_sso_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/generateSsoUrl'} + generate_sso_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/generateSsoUrl'} def get_shared_access_token( - self, resource_group_name, service_name, uid, expiry, key_type="primary", custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, user_id, expiry, key_type="primary", custom_headers=None, raw=False, **operation_config): """Gets the Shared Access Authorization Token for the User. :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 uid: User identifier. Must be unique in the current API + :param user_id: User identifier. Must be unique in the current API Management service instance. - :type uid: str + :type user_id: str :param key_type: The Key to be used to generate token for user. Possible values include: 'primary', 'secondary' :type key_type: str or ~azure.mgmt.apimanagement.models.KeyType @@ -644,7 +591,7 @@ def get_shared_access_token( 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])?$'), - 'uid': self._serialize.url("uid", uid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -684,4 +631,4 @@ def get_shared_access_token( return client_raw_response return deserialized - get_shared_access_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/token'} + get_shared_access_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/token'} diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_subscription_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_subscription_operations.py index 964af1516d09..bf2802f5bab9 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_subscription_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_subscription_operations.py @@ -22,7 +22,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: "2018-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -32,36 +32,35 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01" + self.api_version = "2019-01-01" self.config = config def list( - self, resource_group_name, service_name, uid, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, user_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): """Lists the collection of subscriptions of the specified user. :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 uid: User identifier. Must be unique in the current API + :param user_id: User identifier. Must be unique in the current API Management service instance. - :type uid: str - :param filter: | Field | Supported operators | Supported - functions | - |--------------|------------------------|---------------------------------------------| - | id | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | name | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | userId | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | productId | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith | - | state | eq | - | + :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 | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
:type filter: str :param top: Number of records to return. :type top: int @@ -86,7 +85,7 @@ def internal_paging(next_link=None, raw=False): 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])?$'), - 'uid': self._serialize.url("uid", uid, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -133,4 +132,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/subscriptions'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions'} diff --git a/azure-mgmt-apimanagement/setup.py b/azure-mgmt-apimanagement/setup.py index 627faf0d088f..37fdad48736f 100644 --- a/azure-mgmt-apimanagement/setup.py +++ b/azure-mgmt-apimanagement/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com',