Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
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
Expand All @@ -34,6 +35,7 @@
from .operations.api_management_operations import ApiManagementOperations
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
Expand Down Expand Up @@ -137,6 +139,8 @@ 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
Expand All @@ -155,6 +159,8 @@ 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
Expand Down Expand Up @@ -245,7 +251,7 @@ def __init__(
super(ApiManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-06-01-preview'
self.api_version = '2018-01-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down Expand Up @@ -273,6 +279,8 @@ 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(
Expand All @@ -291,6 +299,8 @@ 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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@
from .issue_contract_py3 import IssueContract
from .issue_comment_contract_py3 import IssueCommentContract
from .issue_attachment_contract_py3 import IssueAttachmentContract
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 .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
Expand Down Expand Up @@ -107,7 +104,6 @@
from .identity_provider_contract_py3 import IdentityProviderContract
from .identity_provider_update_parameters_py3 import IdentityProviderUpdateParameters
from .identity_provider_base_parameters_py3 import IdentityProviderBaseParameters
from .logger_contract_py3 import LoggerContract
from .logger_update_contract_py3 import LoggerUpdateContract
from .recipients_contract_properties_py3 import RecipientsContractProperties
from .notification_contract_py3 import NotificationContract
Expand Down Expand Up @@ -193,10 +189,7 @@
from .issue_contract import IssueContract
from .issue_comment_contract import IssueCommentContract
from .issue_attachment_contract import IssueAttachmentContract
from .body_diagnostic_settings import BodyDiagnosticSettings
from .http_message_diagnostic import HttpMessageDiagnostic
from .pipeline_diagnostic_settings import PipelineDiagnosticSettings
from .sampling_settings import SamplingSettings
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
Expand Down Expand Up @@ -256,7 +249,6 @@
from .identity_provider_contract import IdentityProviderContract
from .identity_provider_update_parameters import IdentityProviderUpdateParameters
from .identity_provider_base_parameters import IdentityProviderBaseParameters
from .logger_contract import LoggerContract
from .logger_update_contract import LoggerUpdateContract
from .recipients_contract_properties import RecipientsContractProperties
from .notification_contract import NotificationContract
Expand Down Expand Up @@ -316,6 +308,7 @@
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
Expand All @@ -328,7 +321,6 @@
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
Expand All @@ -346,8 +338,7 @@
SoapApiType,
ApiType,
State,
SamplingType,
AlwaysLog,
LoggerType,
ProductState,
GrantType,
AuthorizationMethod,
Expand All @@ -362,7 +353,6 @@
Confirmation,
UserState,
IdentityProviderType,
LoggerType,
ConnectivityStatusType,
SubscriptionState,
AsyncOperationStatus,
Expand Down Expand Up @@ -409,10 +399,7 @@
'IssueContract',
'IssueCommentContract',
'IssueAttachmentContract',
'BodyDiagnosticSettings',
'HttpMessageDiagnostic',
'PipelineDiagnosticSettings',
'SamplingSettings',
'LoggerContract',
'DiagnosticContract',
'ProductEntityBaseParameters',
'ProductTagResourceContractProperties',
Expand Down Expand Up @@ -472,7 +459,6 @@
'IdentityProviderContract',
'IdentityProviderUpdateParameters',
'IdentityProviderBaseParameters',
'LoggerContract',
'LoggerUpdateContract',
'RecipientsContractProperties',
'NotificationContract',
Expand Down Expand Up @@ -532,6 +518,7 @@
'ProductContractPaged',
'SchemaContractPaged',
'DiagnosticContractPaged',
'LoggerContractPaged',
'IssueContractPaged',
'IssueCommentContractPaged',
'IssueAttachmentContractPaged',
Expand All @@ -544,7 +531,6 @@
'GroupContractPaged',
'UserContractPaged',
'IdentityProviderContractPaged',
'LoggerContractPaged',
'NotificationContractPaged',
'OpenidConnectProviderContractPaged',
'SubscriptionContractPaged',
Expand All @@ -561,8 +547,7 @@
'SoapApiType',
'ApiType',
'State',
'SamplingType',
'AlwaysLog',
'LoggerType',
'ProductState',
'GrantType',
'AuthorizationMethod',
Expand All @@ -577,7 +562,6 @@
'Confirmation',
'UserState',
'IdentityProviderType',
'LoggerType',
'ConnectivityStatusType',
'SubscriptionState',
'AsyncOperationStatus',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,10 @@ class State(str, Enum):
closed = "closed" #: The issue was closed.


class SamplingType(str, Enum):

fixed = "fixed" #: Fixed-rate sampling.


class AlwaysLog(str, Enum):
class LoggerType(str, Enum):

all_errors = "allErrors" #: Always log all erroneous request regardless of sampling settings.
azure_event_hub = "azureEventHub" #: Azure Event Hub as log destination.
application_insights = "applicationInsights" #: Azure Application Insights as log destination.


class ProductState(str, Enum):
Expand Down Expand Up @@ -172,12 +168,6 @@ 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"
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,44 +26,25 @@ class DiagnosticContract(Resource):
:vartype name: str
:ivar type: Resource type for API Management resource.
:vartype type: str
: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/outcoming HTTP messages
to the Gateway.
:type frontend:
~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings
:param backend: Diagnostic settings for incoming/outcoming HTTP messages
to the Backend
:type backend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings
:param enabled: Required. Indicates whether a diagnostic should receive
data or not.
:type enabled: bool
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'logger_id': {'required': True},
'enabled': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'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'},
'enabled': {'key': 'properties.enabled', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(DiagnosticContract, self).__init__(**kwargs)
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.enabled = kwargs.get('enabled', None)
Original file line number Diff line number Diff line change
Expand Up @@ -26,44 +26,25 @@ class DiagnosticContract(Resource):
:vartype name: str
:ivar type: Resource type for API Management resource.
:vartype type: str
: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/outcoming HTTP messages
to the Gateway.
:type frontend:
~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings
:param backend: Diagnostic settings for incoming/outcoming HTTP messages
to the Backend
:type backend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings
:param enabled: Required. Indicates whether a diagnostic should receive
data or not.
:type enabled: bool
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'logger_id': {'required': True},
'enabled': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'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'},
'enabled': {'key': 'properties.enabled', 'type': 'bool'},
}

def __init__(self, *, logger_id: str, always_log=None, sampling=None, frontend=None, backend=None, **kwargs) -> None:
def __init__(self, *, enabled: bool, **kwargs) -> None:
super(DiagnosticContract, self).__init__(**kwargs)
self.always_log = always_log
self.logger_id = logger_id
self.sampling = sampling
self.frontend = frontend
self.backend = backend
self.enabled = enabled
Original file line number Diff line number Diff line change
Expand Up @@ -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://<tenant>.onmicrosoft.com/groups/<group object id>`;
Directory aad://<tenant>.onmicrosoft.com/groups/<group object id>;
otherwise the value is null.
:type external_id: str
"""
Expand Down
Loading