diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py index 5638845c3e6e..1e84a8784d87 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py @@ -366,6 +366,7 @@ State, SamplingType, AlwaysLog, + HttpCorrelationProtocol, PolicyContentFormat, VersioningScheme, GrantType, @@ -594,6 +595,7 @@ 'State', 'SamplingType', 'AlwaysLog', + 'HttpCorrelationProtocol', 'PolicyContentFormat', 'VersioningScheme', 'GrantType', diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_client_enums.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_client_enums.py index 8dd8aae6af1f..b9e25c4dd3dd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_client_enums.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_client_enums.py @@ -82,6 +82,13 @@ class AlwaysLog(str, Enum): all_errors = "allErrors" #: Always log all erroneous request regardless of sampling settings. +class HttpCorrelationProtocol(str, Enum): + + none = "None" #: Do not read and inject correlation headers. + legacy = "Legacy" #: Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md. + w3_c = "W3C" #: Inject Trace Context headers. See https://w3c.github.io/trace-context. + + class PolicyContentFormat(str, Enum): xml = "xml" #: The contents are inline and Content type is an XML document. diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract.py index 041dd6002e6a..a0222b8ac388 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract.py @@ -44,6 +44,11 @@ class DiagnosticContract(Resource): Headers coming to Api Management Service. Only applicable to Application Insights diagnostics. Default is true. :type enable_http_correlation_headers: bool + :param http_correlation_protocol: Sets correlation protocol to use for + Application Insights diagnostics. Possible values include: 'None', + 'Legacy', 'W3C' + :type http_correlation_protocol: str or + ~azure.mgmt.apimanagement.models.HttpCorrelationProtocol """ _validation = { @@ -63,6 +68,7 @@ class DiagnosticContract(Resource): 'frontend': {'key': 'properties.frontend', 'type': 'PipelineDiagnosticSettings'}, 'backend': {'key': 'properties.backend', 'type': 'PipelineDiagnosticSettings'}, 'enable_http_correlation_headers': {'key': 'properties.enableHttpCorrelationHeaders', 'type': 'bool'}, + 'http_correlation_protocol': {'key': 'properties.httpCorrelationProtocol', 'type': 'str'}, } def __init__(self, **kwargs): @@ -73,3 +79,4 @@ def __init__(self, **kwargs): self.frontend = kwargs.get('frontend', None) self.backend = kwargs.get('backend', None) self.enable_http_correlation_headers = kwargs.get('enable_http_correlation_headers', None) + self.http_correlation_protocol = kwargs.get('http_correlation_protocol', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract_py3.py index b76b868476c7..8972ad8fb8af 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract_py3.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract_py3.py @@ -44,6 +44,11 @@ class DiagnosticContract(Resource): Headers coming to Api Management Service. Only applicable to Application Insights diagnostics. Default is true. :type enable_http_correlation_headers: bool + :param http_correlation_protocol: Sets correlation protocol to use for + Application Insights diagnostics. Possible values include: 'None', + 'Legacy', 'W3C' + :type http_correlation_protocol: str or + ~azure.mgmt.apimanagement.models.HttpCorrelationProtocol """ _validation = { @@ -63,9 +68,10 @@ class DiagnosticContract(Resource): 'frontend': {'key': 'properties.frontend', 'type': 'PipelineDiagnosticSettings'}, 'backend': {'key': 'properties.backend', 'type': 'PipelineDiagnosticSettings'}, 'enable_http_correlation_headers': {'key': 'properties.enableHttpCorrelationHeaders', 'type': 'bool'}, + 'http_correlation_protocol': {'key': 'properties.httpCorrelationProtocol', 'type': 'str'}, } - def __init__(self, *, logger_id: str, always_log=None, sampling=None, frontend=None, backend=None, enable_http_correlation_headers: bool=None, **kwargs) -> None: + def __init__(self, *, logger_id: str, always_log=None, sampling=None, frontend=None, backend=None, enable_http_correlation_headers: bool=None, http_correlation_protocol=None, **kwargs) -> None: super(DiagnosticContract, self).__init__(**kwargs) self.always_log = always_log self.logger_id = logger_id @@ -73,3 +79,4 @@ def __init__(self, *, logger_id: str, always_log=None, sampling=None, frontend=N self.frontend = frontend self.backend = backend self.enable_http_correlation_headers = enable_http_correlation_headers + self.http_correlation_protocol = http_correlation_protocol