зеркало из https://github.com/Azure/autorest.az.git
Adapt to new modelerfour (#489)
This commit is contained in:
Родитель
e6eaa93c13
Коммит
9162046231
|
@ -12,8 +12,8 @@ output-folder: $(az-output-folder)
|
|||
debug-output-folder: $(az-output-folder)/_az_debug
|
||||
|
||||
use-extension:
|
||||
"@autorest/python": "5.0.0-preview.7"
|
||||
"@autorest/clicommon": "0.4.10"
|
||||
"@autorest/python": "5.1.0-preview.4"
|
||||
"@autorest/clicommon": "0.4.13"
|
||||
#"@autorest/python": "latest"
|
||||
|
||||
cli:
|
||||
|
|
|
@ -10,7 +10,7 @@ from ._attestation_management_client import AttestationManagementClient
|
|||
__all__ = ['AttestationManagementClient']
|
||||
|
||||
try:
|
||||
from ._patch import patch_sdk
|
||||
from ._patch import patch_sdk # type: ignore
|
||||
patch_sdk()
|
||||
except ImportError:
|
||||
pass
|
||||
|
|
|
@ -10,6 +10,7 @@ from typing import TYPE_CHECKING
|
|||
|
||||
from azure.core.configuration import Configuration
|
||||
from azure.core.pipeline import policies
|
||||
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# pylint: disable=unused-import,ungrouped-imports
|
||||
|
@ -61,6 +62,7 @@ class AttestationManagementClientConfiguration(Configuration):
|
|||
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
|
||||
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
|
||||
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
|
||||
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
|
||||
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
|
||||
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
|
||||
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
|
||||
|
|
|
@ -10,6 +10,7 @@ from typing import Any, TYPE_CHECKING
|
|||
|
||||
from azure.core.configuration import Configuration
|
||||
from azure.core.pipeline import policies
|
||||
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# pylint: disable=unused-import,ungrouped-imports
|
||||
|
@ -57,6 +58,7 @@ class AttestationManagementClientConfiguration(Configuration):
|
|||
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
|
||||
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
|
||||
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
|
||||
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
|
||||
self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs)
|
||||
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
|
||||
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
|
||||
|
|
|
@ -79,7 +79,6 @@ class AttestationProviderOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -156,7 +155,6 @@ class AttestationProviderOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_creation_params, 'AttestationServiceCreationParams')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -169,7 +167,6 @@ class AttestationProviderOperations:
|
|||
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
||||
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
|
||||
|
||||
deserialized = None
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('AttestationProvider', pipeline_response)
|
||||
|
||||
|
@ -228,7 +225,6 @@ class AttestationProviderOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_update_params, 'AttestationServicePatchParams')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -287,7 +283,6 @@ class AttestationProviderOperations:
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.delete(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -332,7 +327,6 @@ class AttestationProviderOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -384,7 +378,6 @@ class AttestationProviderOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
|
|
@ -67,7 +67,6 @@ class OperationOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
|
|
@ -6,12 +6,30 @@
|
|||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from enum import Enum
|
||||
from enum import Enum, EnumMeta
|
||||
from six import with_metaclass
|
||||
|
||||
class AttestationServiceStatus(str, Enum):
|
||||
class _CaseInsensitiveEnumMeta(EnumMeta):
|
||||
def __getitem__(self, name):
|
||||
return super().__getitem__(name.upper())
|
||||
|
||||
def __getattr__(cls, name):
|
||||
"""Return the enum member matching `name`
|
||||
We use __getattr__ instead of descriptors or inserting into the enum
|
||||
class' __dict__ in order to support `name` and `value` being both
|
||||
properties for enum members (which live in the class' __dict__) and
|
||||
enum members themselves.
|
||||
"""
|
||||
try:
|
||||
return cls._member_map_[name.upper()]
|
||||
except KeyError:
|
||||
raise AttributeError(name)
|
||||
|
||||
|
||||
class AttestationServiceStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""Status of attestation service.
|
||||
"""
|
||||
|
||||
ready = "Ready"
|
||||
not_ready = "NotReady"
|
||||
error = "Error"
|
||||
READY = "Ready"
|
||||
NOT_READY = "NotReady"
|
||||
ERROR = "Error"
|
||||
|
|
|
@ -84,7 +84,6 @@ class AttestationProviderOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -162,7 +161,6 @@ class AttestationProviderOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_creation_params, 'AttestationServiceCreationParams')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -175,7 +173,6 @@ class AttestationProviderOperations(object):
|
|||
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
||||
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
|
||||
|
||||
deserialized = None
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('AttestationProvider', pipeline_response)
|
||||
|
||||
|
@ -235,7 +232,6 @@ class AttestationProviderOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_update_params, 'AttestationServicePatchParams')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -295,7 +291,6 @@ class AttestationProviderOperations(object):
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.delete(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -341,7 +336,6 @@ class AttestationProviderOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -394,7 +388,6 @@ class AttestationProviderOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
|
|
@ -72,7 +72,6 @@ class OperationOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
|
|
@ -10,7 +10,7 @@ from ._auto_rest_test_service import AutoRestTestService
|
|||
__all__ = ['AutoRestTestService']
|
||||
|
||||
try:
|
||||
from ._patch import patch_sdk
|
||||
from ._patch import patch_sdk # type: ignore
|
||||
patch_sdk()
|
||||
except ImportError:
|
||||
pass
|
||||
|
|
|
@ -10,6 +10,7 @@ from typing import TYPE_CHECKING
|
|||
|
||||
from azure.core.configuration import Configuration
|
||||
from azure.core.pipeline import policies
|
||||
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# pylint: disable=unused-import,ungrouped-imports
|
||||
|
@ -54,6 +55,7 @@ class AutoRestTestServiceConfiguration(Configuration):
|
|||
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
|
||||
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
|
||||
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
|
||||
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
|
||||
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
|
||||
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
|
||||
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
|
||||
|
|
|
@ -10,6 +10,7 @@ from typing import Any, TYPE_CHECKING
|
|||
|
||||
from azure.core.configuration import Configuration
|
||||
from azure.core.pipeline import policies
|
||||
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# pylint: disable=unused-import,ungrouped-imports
|
||||
|
@ -50,6 +51,7 @@ class AutoRestTestServiceConfiguration(Configuration):
|
|||
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
|
||||
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
|
||||
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
|
||||
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
|
||||
self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs)
|
||||
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
|
||||
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
|
||||
|
|
|
@ -65,7 +65,6 @@ class BoolOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -110,7 +109,6 @@ class BoolOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(bool_body, 'bool')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -154,7 +152,6 @@ class BoolOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -199,7 +196,6 @@ class BoolOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(bool_body, 'bool')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -243,7 +239,6 @@ class BoolOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -286,7 +281,6 @@ class BoolOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
|
|
@ -70,7 +70,6 @@ class BoolOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -116,7 +115,6 @@ class BoolOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(bool_body, 'bool')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -161,7 +159,6 @@ class BoolOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -207,7 +204,6 @@ class BoolOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(bool_body, 'bool')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -252,7 +248,6 @@ class BoolOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -296,7 +291,6 @@ class BoolOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
|
|
@ -2059,7 +2059,10 @@
|
|||
"$ref": "#/definitions/FactoryIdentity",
|
||||
"description": "Managed service identity of the factory."
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"identity"
|
||||
]
|
||||
},
|
||||
"FactoryIdentity": {
|
||||
"description": "Identity properties of the factory resource.",
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
# pylint: disable=too-many-lines
|
||||
# pylint: disable=unused-argument
|
||||
|
||||
import json
|
||||
from knack.util import CLIError
|
||||
from azure.cli.core.util import sdk_no_wait
|
||||
|
||||
|
@ -55,10 +54,10 @@ def datafactory_create(client,
|
|||
if_match=if_match,
|
||||
location=location,
|
||||
tags=tags,
|
||||
identity=json.loads("{\"type\": \"SystemAssigned\"}"),
|
||||
repo_configuration=repo_configuration,
|
||||
fake_identity=fake_identity,
|
||||
zones=zones)
|
||||
zones=zones,
|
||||
type="SystemAssigned")
|
||||
|
||||
|
||||
def datafactory_update(client,
|
||||
|
@ -68,7 +67,7 @@ def datafactory_update(client,
|
|||
return client.update(resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
tags=tags,
|
||||
identity=json.loads("{\"type\": \"SystemAssigned\"}"))
|
||||
type="SystemAssigned")
|
||||
|
||||
|
||||
def datafactory_delete(client,
|
||||
|
@ -197,7 +196,7 @@ def datafactory_trigger_query_by_factory(client,
|
|||
parent_trigger_name=None):
|
||||
return client.query_by_factory(resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
continuation_token=continuation_token,
|
||||
continuation_token_parameter=continuation_token,
|
||||
parent_trigger_name=parent_trigger_name)
|
||||
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ from ._dfaz_management_client import DFAZManagementClient
|
|||
__all__ = ['DFAZManagementClient']
|
||||
|
||||
try:
|
||||
from ._patch import patch_sdk
|
||||
from ._patch import patch_sdk # type: ignore
|
||||
patch_sdk()
|
||||
except ImportError:
|
||||
pass
|
||||
|
|
|
@ -10,6 +10,7 @@ from typing import TYPE_CHECKING
|
|||
|
||||
from azure.core.configuration import Configuration
|
||||
from azure.core.pipeline import policies
|
||||
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# pylint: disable=unused-import,ungrouped-imports
|
||||
|
@ -61,6 +62,7 @@ class DFAZManagementClientConfiguration(Configuration):
|
|||
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
|
||||
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
|
||||
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
|
||||
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
|
||||
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
|
||||
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
|
||||
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
|
||||
|
|
|
@ -10,6 +10,7 @@ from typing import Any, TYPE_CHECKING
|
|||
|
||||
from azure.core.configuration import Configuration
|
||||
from azure.core.pipeline import policies
|
||||
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# pylint: disable=unused-import,ungrouped-imports
|
||||
|
@ -57,6 +58,7 @@ class DFAZManagementClientConfiguration(Configuration):
|
|||
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
|
||||
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
|
||||
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
|
||||
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
|
||||
self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs)
|
||||
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
|
||||
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar
|
||||
from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union
|
||||
import warnings
|
||||
|
||||
from azure.core.async_paging import AsyncItemPaged, AsyncList
|
||||
|
@ -58,6 +58,10 @@ class FactoryOperations:
|
|||
api_version = "2018-06-01"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list.metadata['url'] # type: ignore
|
||||
|
@ -69,15 +73,11 @@ class FactoryOperations:
|
|||
query_parameters = {} # type: Dict[str, Any]
|
||||
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
async def extract_data(pipeline_response):
|
||||
|
@ -149,7 +149,6 @@ class FactoryOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_factory_repo_update, 'FactoryRepoUpdate')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -190,6 +189,10 @@ class FactoryOperations:
|
|||
api_version = "2018-06-01"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list_by_resource_group.metadata['url'] # type: ignore
|
||||
|
@ -202,15 +205,11 @@ class FactoryOperations:
|
|||
query_parameters = {} # type: Dict[str, Any]
|
||||
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
async def extract_data(pipeline_response):
|
||||
|
@ -244,10 +243,10 @@ class FactoryOperations:
|
|||
if_match: Optional[str] = None,
|
||||
location: Optional[str] = None,
|
||||
tags: Optional[Dict[str, str]] = None,
|
||||
identity: Optional["models.FactoryIdentity"] = None,
|
||||
repo_configuration: Optional["models.FactoryRepoConfiguration"] = None,
|
||||
fake_identity: Optional["models.FakeFactoryIdentity"] = None,
|
||||
zones: Optional[List[str]] = None,
|
||||
type: Optional[Union[str, "models.FactoryIdentityType"]] = None,
|
||||
**kwargs
|
||||
) -> "models.Factory":
|
||||
"""Creates or updates a factory.
|
||||
|
@ -263,14 +262,14 @@ class FactoryOperations:
|
|||
:type location: str
|
||||
:param tags: The resource tags.
|
||||
:type tags: dict[str, str]
|
||||
:param identity: Managed service identity of the factory.
|
||||
:type identity: ~dfaz_management_client.models.FactoryIdentity
|
||||
:param repo_configuration: Git repo information of the factory.
|
||||
:type repo_configuration: ~dfaz_management_client.models.FactoryRepoConfiguration
|
||||
:param fake_identity: This is only for az test.
|
||||
:type fake_identity: ~dfaz_management_client.models.FakeFactoryIdentity
|
||||
:param zones: This is only for az test.
|
||||
:type zones: list[str]
|
||||
:param type: The identity type. Currently the only supported type is 'SystemAssigned'.
|
||||
:type type: str or ~dfaz_management_client.models.FactoryIdentityType
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:return: Factory, or the result of cls(response)
|
||||
:rtype: ~dfaz_management_client.models.Factory
|
||||
|
@ -280,7 +279,7 @@ class FactoryOperations:
|
|||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
|
||||
_factory = models.Factory(location=location, tags=tags, identity=identity, repo_configuration=repo_configuration, fake_identity=fake_identity, zones=zones)
|
||||
_factory = models.Factory(location=location, tags=tags, repo_configuration=repo_configuration, fake_identity=fake_identity, zones=zones, type_identity_type=type)
|
||||
api_version = "2018-06-01"
|
||||
content_type = kwargs.pop("content_type", "application/json")
|
||||
|
||||
|
@ -304,7 +303,6 @@ class FactoryOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_factory, 'Factory')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -329,8 +327,8 @@ class FactoryOperations:
|
|||
self,
|
||||
resource_group_name: str,
|
||||
factory_name: str,
|
||||
type: Union[str, "models.FactoryIdentityType"],
|
||||
tags: Optional[Dict[str, str]] = None,
|
||||
identity: Optional["models.FactoryIdentity"] = None,
|
||||
**kwargs
|
||||
) -> "models.Factory":
|
||||
"""Updates a factory.
|
||||
|
@ -339,10 +337,10 @@ class FactoryOperations:
|
|||
:type resource_group_name: str
|
||||
:param factory_name: The factory name.
|
||||
:type factory_name: str
|
||||
:param type: The identity type. Currently the only supported type is 'SystemAssigned'.
|
||||
:type type: str or ~dfaz_management_client.models.FactoryIdentityType
|
||||
:param tags: The resource tags.
|
||||
:type tags: dict[str, str]
|
||||
:param identity: Managed service identity of the factory.
|
||||
:type identity: ~dfaz_management_client.models.FactoryIdentity
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:return: Factory, or the result of cls(response)
|
||||
:rtype: ~dfaz_management_client.models.Factory
|
||||
|
@ -352,7 +350,7 @@ class FactoryOperations:
|
|||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
|
||||
_factory_update_parameters = models.FactoryUpdateParameters(tags=tags, identity=identity)
|
||||
_factory_update_parameters = models.FactoryUpdateParameters(tags=tags, type=type)
|
||||
api_version = "2018-06-01"
|
||||
content_type = kwargs.pop("content_type", "application/json")
|
||||
|
||||
|
@ -374,7 +372,6 @@ class FactoryOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_factory_update_parameters, 'FactoryUpdateParameters')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -401,7 +398,7 @@ class FactoryOperations:
|
|||
factory_name: str,
|
||||
if_none_match: Optional[str] = None,
|
||||
**kwargs
|
||||
) -> "models.Factory":
|
||||
) -> Optional["models.Factory"]:
|
||||
"""Gets a factory.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -416,7 +413,7 @@ class FactoryOperations:
|
|||
:rtype: ~dfaz_management_client.models.Factory or None
|
||||
:raises: ~azure.core.exceptions.HttpResponseError
|
||||
"""
|
||||
cls = kwargs.pop('cls', None) # type: ClsType["models.Factory"]
|
||||
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Factory"]]
|
||||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
api_version = "2018-06-01"
|
||||
|
@ -440,7 +437,6 @@ class FactoryOperations:
|
|||
header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -497,7 +493,6 @@ class FactoryOperations:
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.delete(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -563,7 +558,6 @@ class FactoryOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_git_hub_access_token_request, 'GitHubAccessTokenRequest')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -646,7 +640,6 @@ class FactoryOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_policy, 'UserAccessPolicy')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
|
|
@ -12,7 +12,7 @@ from azure.core.async_paging import AsyncItemPaged, AsyncList
|
|||
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
|
||||
from azure.core.pipeline import PipelineResponse
|
||||
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
|
||||
from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller
|
||||
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
|
||||
from azure.mgmt.core.exceptions import ARMErrorFormat
|
||||
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
|
||||
|
||||
|
@ -66,6 +66,10 @@ class IntegrationRuntimeOperations:
|
|||
api_version = "2018-06-01"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list_by_factory.metadata['url'] # type: ignore
|
||||
|
@ -79,15 +83,11 @@ class IntegrationRuntimeOperations:
|
|||
query_parameters = {} # type: Dict[str, Any]
|
||||
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
async def extract_data(pipeline_response):
|
||||
|
@ -170,7 +170,6 @@ class IntegrationRuntimeOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_integration_runtime, 'IntegrationRuntimeResource')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -198,7 +197,7 @@ class IntegrationRuntimeOperations:
|
|||
integration_runtime_name: str,
|
||||
if_none_match: Optional[str] = None,
|
||||
**kwargs
|
||||
) -> "models.IntegrationRuntimeResource":
|
||||
) -> Optional["models.IntegrationRuntimeResource"]:
|
||||
"""Gets an integration runtime.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -216,7 +215,7 @@ class IntegrationRuntimeOperations:
|
|||
:rtype: ~dfaz_management_client.models.IntegrationRuntimeResource or None
|
||||
:raises: ~azure.core.exceptions.HttpResponseError
|
||||
"""
|
||||
cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationRuntimeResource"]
|
||||
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.IntegrationRuntimeResource"]]
|
||||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
api_version = "2018-06-01"
|
||||
|
@ -241,7 +240,6 @@ class IntegrationRuntimeOperations:
|
|||
header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -315,7 +313,6 @@ class IntegrationRuntimeOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_update_integration_runtime_request, 'UpdateIntegrationRuntimeRequest')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -378,7 +375,6 @@ class IntegrationRuntimeOperations:
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.delete(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -435,7 +431,6 @@ class IntegrationRuntimeOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -459,7 +454,8 @@ class IntegrationRuntimeOperations:
|
|||
integration_runtime_name: str,
|
||||
**kwargs
|
||||
) -> "models.IntegrationRuntimeConnectionInfo":
|
||||
"""Gets the on-premises integration runtime connection information for encrypting the on-premises data source credentials.
|
||||
"""Gets the on-premises integration runtime connection information for encrypting the on-premises
|
||||
data source credentials.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
:type resource_group_name: str
|
||||
|
@ -495,7 +491,6 @@ class IntegrationRuntimeOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -562,7 +557,6 @@ class IntegrationRuntimeOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_regenerate_key_parameters, 'IntegrationRuntimeRegenerateKeyParameters')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -626,7 +620,6 @@ class IntegrationRuntimeOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -649,8 +642,8 @@ class IntegrationRuntimeOperations:
|
|||
factory_name: str,
|
||||
integration_runtime_name: str,
|
||||
**kwargs
|
||||
) -> "models.IntegrationRuntimeStatusResponse":
|
||||
cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationRuntimeStatusResponse"]
|
||||
) -> Optional["models.IntegrationRuntimeStatusResponse"]:
|
||||
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.IntegrationRuntimeStatusResponse"]]
|
||||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
api_version = "2018-06-01"
|
||||
|
@ -673,7 +666,6 @@ class IntegrationRuntimeOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -692,13 +684,13 @@ class IntegrationRuntimeOperations:
|
|||
return deserialized
|
||||
_start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/start'} # type: ignore
|
||||
|
||||
async def start(
|
||||
async def begin_start(
|
||||
self,
|
||||
resource_group_name: str,
|
||||
factory_name: str,
|
||||
integration_runtime_name: str,
|
||||
**kwargs
|
||||
) -> "models.IntegrationRuntimeStatusResponse":
|
||||
) -> AsyncLROPoller["models.IntegrationRuntimeStatusResponse"]:
|
||||
"""Starts a ManagedReserved type integration runtime.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -708,12 +700,13 @@ class IntegrationRuntimeOperations:
|
|||
:param integration_runtime_name: The integration runtime name.
|
||||
:type integration_runtime_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
|
||||
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
|
||||
:return: IntegrationRuntimeStatusResponse, or the result of cls(response)
|
||||
:rtype: ~dfaz_management_client.models.IntegrationRuntimeStatusResponse
|
||||
:return: An instance of AsyncLROPoller that returns either IntegrationRuntimeStatusResponse or the result of cls(response)
|
||||
:rtype: ~azure.core.polling.AsyncLROPoller[~dfaz_management_client.models.IntegrationRuntimeStatusResponse]
|
||||
:raises ~azure.core.exceptions.HttpResponseError:
|
||||
"""
|
||||
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
|
||||
|
@ -722,13 +715,15 @@ class IntegrationRuntimeOperations:
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = await self._start_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
integration_runtime_name=integration_runtime_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = await self._start_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
integration_runtime_name=integration_runtime_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -743,8 +738,16 @@ class IntegrationRuntimeOperations:
|
|||
if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
|
||||
elif polling is False: polling_method = AsyncNoPolling()
|
||||
else: polling_method = polling
|
||||
return await async_poller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/start'} # type: ignore
|
||||
if cont_token:
|
||||
return AsyncLROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/start'} # type: ignore
|
||||
|
||||
async def _stop_initial(
|
||||
self,
|
||||
|
@ -775,7 +778,6 @@ class IntegrationRuntimeOperations:
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -789,13 +791,13 @@ class IntegrationRuntimeOperations:
|
|||
|
||||
_stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/stop'} # type: ignore
|
||||
|
||||
async def stop(
|
||||
async def begin_stop(
|
||||
self,
|
||||
resource_group_name: str,
|
||||
factory_name: str,
|
||||
integration_runtime_name: str,
|
||||
**kwargs
|
||||
) -> None:
|
||||
) -> AsyncLROPoller[None]:
|
||||
"""Stops a ManagedReserved type integration runtime.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -805,12 +807,13 @@ class IntegrationRuntimeOperations:
|
|||
:param integration_runtime_name: The integration runtime name.
|
||||
:type integration_runtime_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
|
||||
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
|
||||
:return: None, or the result of cls(response)
|
||||
:rtype: None
|
||||
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
|
||||
:rtype: ~azure.core.polling.AsyncLROPoller[None]
|
||||
:raises ~azure.core.exceptions.HttpResponseError:
|
||||
"""
|
||||
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
|
||||
|
@ -819,13 +822,15 @@ class IntegrationRuntimeOperations:
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = await self._stop_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
integration_runtime_name=integration_runtime_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = await self._stop_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
integration_runtime_name=integration_runtime_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -837,8 +842,16 @@ class IntegrationRuntimeOperations:
|
|||
if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
|
||||
elif polling is False: polling_method = AsyncNoPolling()
|
||||
else: polling_method = polling
|
||||
return await async_poller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/stop'} # type: ignore
|
||||
if cont_token:
|
||||
return AsyncLROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/stop'} # type: ignore
|
||||
|
||||
async def sync_credentials(
|
||||
self,
|
||||
|
@ -847,7 +860,10 @@ class IntegrationRuntimeOperations:
|
|||
integration_runtime_name: str,
|
||||
**kwargs
|
||||
) -> None:
|
||||
"""Force the integration runtime to synchronize credentials across integration runtime nodes, and this will override the credentials across all worker nodes with those available on the dispatcher node. If you already have the latest credential backup file, you should manually import it (preferred) on any self-hosted integration runtime node than using this API directly.
|
||||
"""Force the integration runtime to synchronize credentials across integration runtime nodes, and
|
||||
this will override the credentials across all worker nodes with those available on the
|
||||
dispatcher node. If you already have the latest credential backup file, you should manually
|
||||
import it (preferred) on any self-hosted integration runtime node than using this API directly.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
:type resource_group_name: str
|
||||
|
@ -882,7 +898,6 @@ class IntegrationRuntimeOperations:
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -903,7 +918,8 @@ class IntegrationRuntimeOperations:
|
|||
integration_runtime_name: str,
|
||||
**kwargs
|
||||
) -> "models.IntegrationRuntimeMonitoringData":
|
||||
"""Get the integration runtime monitoring data, which includes the monitor data for all the nodes under this integration runtime.
|
||||
"""Get the integration runtime monitoring data, which includes the monitor data for all the nodes
|
||||
under this integration runtime.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
:type resource_group_name: str
|
||||
|
@ -939,7 +955,6 @@ class IntegrationRuntimeOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -998,7 +1013,6 @@ class IntegrationRuntimeOperations:
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -1020,7 +1034,8 @@ class IntegrationRuntimeOperations:
|
|||
linked_factory_name: str,
|
||||
**kwargs
|
||||
) -> None:
|
||||
"""Remove all linked integration runtimes under specific data factory in a self-hosted integration runtime.
|
||||
"""Remove all linked integration runtimes under specific data factory in a self-hosted integration
|
||||
runtime.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
:type resource_group_name: str
|
||||
|
@ -1061,7 +1076,6 @@ class IntegrationRuntimeOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_linked_integration_runtime_request, 'LinkedIntegrationRuntimeRequest')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -1141,7 +1155,6 @@ class IntegrationRuntimeOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_create_linked_integration_runtime_request, 'CreateLinkedIntegrationRuntimeRequest')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
|
|
@ -12,7 +12,7 @@ from azure.core.async_paging import AsyncItemPaged, AsyncList
|
|||
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
|
||||
from azure.core.pipeline import PipelineResponse
|
||||
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
|
||||
from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller
|
||||
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
|
||||
from azure.mgmt.core.exceptions import ARMErrorFormat
|
||||
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
|
||||
|
||||
|
@ -66,6 +66,10 @@ class TriggerOperations:
|
|||
api_version = "2018-06-01"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list_by_factory.metadata['url'] # type: ignore
|
||||
|
@ -79,15 +83,11 @@ class TriggerOperations:
|
|||
query_parameters = {} # type: Dict[str, Any]
|
||||
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
async def extract_data(pipeline_response):
|
||||
|
@ -118,7 +118,7 @@ class TriggerOperations:
|
|||
self,
|
||||
resource_group_name: str,
|
||||
factory_name: str,
|
||||
continuation_token: Optional[str] = None,
|
||||
continuation_token_parameter: Optional[str] = None,
|
||||
parent_trigger_name: Optional[str] = None,
|
||||
**kwargs
|
||||
) -> "models.TriggerQueryResponse":
|
||||
|
@ -128,9 +128,9 @@ class TriggerOperations:
|
|||
:type resource_group_name: str
|
||||
:param factory_name: The factory name.
|
||||
:type factory_name: str
|
||||
:param continuation_token: The continuation token for getting the next page of results. Null
|
||||
for first page.
|
||||
:type continuation_token: str
|
||||
:param continuation_token_parameter: The continuation token for getting the next page of
|
||||
results. Null for first page.
|
||||
:type continuation_token_parameter: str
|
||||
:param parent_trigger_name: The name of the parent TumblingWindowTrigger to get the child rerun
|
||||
triggers.
|
||||
:type parent_trigger_name: str
|
||||
|
@ -143,7 +143,7 @@ class TriggerOperations:
|
|||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
|
||||
_filter_parameters = models.TriggerFilterParameters(continuation_token=continuation_token, parent_trigger_name=parent_trigger_name)
|
||||
_filter_parameters = models.TriggerFilterParameters(continuation_token=continuation_token_parameter, parent_trigger_name=parent_trigger_name)
|
||||
api_version = "2018-06-01"
|
||||
content_type = kwargs.pop("content_type", "application/json")
|
||||
|
||||
|
@ -165,7 +165,6 @@ class TriggerOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_filter_parameters, 'TriggerFilterParameters')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -242,7 +241,6 @@ class TriggerOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_trigger, 'TriggerResource')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -270,7 +268,7 @@ class TriggerOperations:
|
|||
trigger_name: str,
|
||||
if_none_match: Optional[str] = None,
|
||||
**kwargs
|
||||
) -> "models.TriggerResource":
|
||||
) -> Optional["models.TriggerResource"]:
|
||||
"""Gets a trigger.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -287,7 +285,7 @@ class TriggerOperations:
|
|||
:rtype: ~dfaz_management_client.models.TriggerResource or None
|
||||
:raises: ~azure.core.exceptions.HttpResponseError
|
||||
"""
|
||||
cls = kwargs.pop('cls', None) # type: ClsType["models.TriggerResource"]
|
||||
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.TriggerResource"]]
|
||||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
api_version = "2018-06-01"
|
||||
|
@ -312,7 +310,6 @@ class TriggerOperations:
|
|||
header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -373,7 +370,6 @@ class TriggerOperations:
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.delete(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -393,8 +389,8 @@ class TriggerOperations:
|
|||
factory_name: str,
|
||||
trigger_name: str,
|
||||
**kwargs
|
||||
) -> "models.TriggerSubscriptionOperationStatus":
|
||||
cls = kwargs.pop('cls', None) # type: ClsType["models.TriggerSubscriptionOperationStatus"]
|
||||
) -> Optional["models.TriggerSubscriptionOperationStatus"]:
|
||||
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.TriggerSubscriptionOperationStatus"]]
|
||||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
api_version = "2018-06-01"
|
||||
|
@ -417,7 +413,6 @@ class TriggerOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -436,13 +431,13 @@ class TriggerOperations:
|
|||
return deserialized
|
||||
_subscribe_to_event_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/subscribeToEvents'} # type: ignore
|
||||
|
||||
async def subscribe_to_event(
|
||||
async def begin_subscribe_to_event(
|
||||
self,
|
||||
resource_group_name: str,
|
||||
factory_name: str,
|
||||
trigger_name: str,
|
||||
**kwargs
|
||||
) -> "models.TriggerSubscriptionOperationStatus":
|
||||
) -> AsyncLROPoller["models.TriggerSubscriptionOperationStatus"]:
|
||||
"""Subscribe event trigger to events.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -452,12 +447,13 @@ class TriggerOperations:
|
|||
:param trigger_name: The trigger name.
|
||||
:type trigger_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
|
||||
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
|
||||
:return: TriggerSubscriptionOperationStatus, or the result of cls(response)
|
||||
:rtype: ~dfaz_management_client.models.TriggerSubscriptionOperationStatus
|
||||
:return: An instance of AsyncLROPoller that returns either TriggerSubscriptionOperationStatus or the result of cls(response)
|
||||
:rtype: ~azure.core.polling.AsyncLROPoller[~dfaz_management_client.models.TriggerSubscriptionOperationStatus]
|
||||
:raises ~azure.core.exceptions.HttpResponseError:
|
||||
"""
|
||||
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
|
||||
|
@ -466,13 +462,15 @@ class TriggerOperations:
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = await self._subscribe_to_event_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
trigger_name=trigger_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = await self._subscribe_to_event_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
trigger_name=trigger_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -487,8 +485,16 @@ class TriggerOperations:
|
|||
if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
|
||||
elif polling is False: polling_method = AsyncNoPolling()
|
||||
else: polling_method = polling
|
||||
return await async_poller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
subscribe_to_event.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/subscribeToEvents'} # type: ignore
|
||||
if cont_token:
|
||||
return AsyncLROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_subscribe_to_event.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/subscribeToEvents'} # type: ignore
|
||||
|
||||
async def get_event_subscription_status(
|
||||
self,
|
||||
|
@ -533,7 +539,6 @@ class TriggerOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -556,8 +561,8 @@ class TriggerOperations:
|
|||
factory_name: str,
|
||||
trigger_name: str,
|
||||
**kwargs
|
||||
) -> "models.TriggerSubscriptionOperationStatus":
|
||||
cls = kwargs.pop('cls', None) # type: ClsType["models.TriggerSubscriptionOperationStatus"]
|
||||
) -> Optional["models.TriggerSubscriptionOperationStatus"]:
|
||||
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.TriggerSubscriptionOperationStatus"]]
|
||||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
api_version = "2018-06-01"
|
||||
|
@ -580,7 +585,6 @@ class TriggerOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -599,13 +603,13 @@ class TriggerOperations:
|
|||
return deserialized
|
||||
_unsubscribe_from_event_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/unsubscribeFromEvents'} # type: ignore
|
||||
|
||||
async def unsubscribe_from_event(
|
||||
async def begin_unsubscribe_from_event(
|
||||
self,
|
||||
resource_group_name: str,
|
||||
factory_name: str,
|
||||
trigger_name: str,
|
||||
**kwargs
|
||||
) -> "models.TriggerSubscriptionOperationStatus":
|
||||
) -> AsyncLROPoller["models.TriggerSubscriptionOperationStatus"]:
|
||||
"""Unsubscribe event trigger from events.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -615,12 +619,13 @@ class TriggerOperations:
|
|||
:param trigger_name: The trigger name.
|
||||
:type trigger_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
|
||||
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
|
||||
:return: TriggerSubscriptionOperationStatus, or the result of cls(response)
|
||||
:rtype: ~dfaz_management_client.models.TriggerSubscriptionOperationStatus
|
||||
:return: An instance of AsyncLROPoller that returns either TriggerSubscriptionOperationStatus or the result of cls(response)
|
||||
:rtype: ~azure.core.polling.AsyncLROPoller[~dfaz_management_client.models.TriggerSubscriptionOperationStatus]
|
||||
:raises ~azure.core.exceptions.HttpResponseError:
|
||||
"""
|
||||
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
|
||||
|
@ -629,13 +634,15 @@ class TriggerOperations:
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = await self._unsubscribe_from_event_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
trigger_name=trigger_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = await self._unsubscribe_from_event_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
trigger_name=trigger_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -650,8 +657,16 @@ class TriggerOperations:
|
|||
if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
|
||||
elif polling is False: polling_method = AsyncNoPolling()
|
||||
else: polling_method = polling
|
||||
return await async_poller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
unsubscribe_from_event.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/unsubscribeFromEvents'} # type: ignore
|
||||
if cont_token:
|
||||
return AsyncLROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_unsubscribe_from_event.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/unsubscribeFromEvents'} # type: ignore
|
||||
|
||||
async def _start_initial(
|
||||
self,
|
||||
|
@ -682,7 +697,6 @@ class TriggerOperations:
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -696,13 +710,13 @@ class TriggerOperations:
|
|||
|
||||
_start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/start'} # type: ignore
|
||||
|
||||
async def start(
|
||||
async def begin_start(
|
||||
self,
|
||||
resource_group_name: str,
|
||||
factory_name: str,
|
||||
trigger_name: str,
|
||||
**kwargs
|
||||
) -> None:
|
||||
) -> AsyncLROPoller[None]:
|
||||
"""Starts a trigger.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -712,12 +726,13 @@ class TriggerOperations:
|
|||
:param trigger_name: The trigger name.
|
||||
:type trigger_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
|
||||
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
|
||||
:return: None, or the result of cls(response)
|
||||
:rtype: None
|
||||
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
|
||||
:rtype: ~azure.core.polling.AsyncLROPoller[None]
|
||||
:raises ~azure.core.exceptions.HttpResponseError:
|
||||
"""
|
||||
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
|
||||
|
@ -726,13 +741,15 @@ class TriggerOperations:
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = await self._start_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
trigger_name=trigger_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = await self._start_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
trigger_name=trigger_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -744,8 +761,16 @@ class TriggerOperations:
|
|||
if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
|
||||
elif polling is False: polling_method = AsyncNoPolling()
|
||||
else: polling_method = polling
|
||||
return await async_poller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/start'} # type: ignore
|
||||
if cont_token:
|
||||
return AsyncLROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/start'} # type: ignore
|
||||
|
||||
async def _stop_initial(
|
||||
self,
|
||||
|
@ -776,7 +801,6 @@ class TriggerOperations:
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -790,13 +814,13 @@ class TriggerOperations:
|
|||
|
||||
_stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/stop'} # type: ignore
|
||||
|
||||
async def stop(
|
||||
async def begin_stop(
|
||||
self,
|
||||
resource_group_name: str,
|
||||
factory_name: str,
|
||||
trigger_name: str,
|
||||
**kwargs
|
||||
) -> None:
|
||||
) -> AsyncLROPoller[None]:
|
||||
"""Stops a trigger.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -806,12 +830,13 @@ class TriggerOperations:
|
|||
:param trigger_name: The trigger name.
|
||||
:type trigger_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
|
||||
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
|
||||
:return: None, or the result of cls(response)
|
||||
:rtype: None
|
||||
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
|
||||
:rtype: ~azure.core.polling.AsyncLROPoller[None]
|
||||
:raises ~azure.core.exceptions.HttpResponseError:
|
||||
"""
|
||||
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
|
||||
|
@ -820,13 +845,15 @@ class TriggerOperations:
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = await self._stop_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
trigger_name=trigger_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = await self._stop_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
trigger_name=trigger_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -838,5 +865,13 @@ class TriggerOperations:
|
|||
if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
|
||||
elif polling is False: polling_method = AsyncNoPolling()
|
||||
else: polling_method = polling
|
||||
return await async_poller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/stop'} # type: ignore
|
||||
if cont_token:
|
||||
return AsyncLROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/stop'} # type: ignore
|
||||
|
|
|
@ -21,7 +21,6 @@ try:
|
|||
from ._models_py3 import EnvironmentVariableSetup
|
||||
from ._models_py3 import Factory
|
||||
from ._models_py3 import FactoryGitHubConfiguration
|
||||
from ._models_py3 import FactoryIdentity
|
||||
from ._models_py3 import FactoryListResponse
|
||||
from ._models_py3 import FactoryRepoConfiguration
|
||||
from ._models_py3 import FactoryRepoUpdate
|
||||
|
@ -115,7 +114,6 @@ except (SyntaxError, ImportError):
|
|||
from ._models import EnvironmentVariableSetup # type: ignore
|
||||
from ._models import Factory # type: ignore
|
||||
from ._models import FactoryGitHubConfiguration # type: ignore
|
||||
from ._models import FactoryIdentity # type: ignore
|
||||
from ._models import FactoryListResponse # type: ignore
|
||||
from ._models import FactoryRepoConfiguration # type: ignore
|
||||
from ._models import FactoryRepoUpdate # type: ignore
|
||||
|
@ -201,6 +199,7 @@ from ._dfaz_management_client_enums import (
|
|||
DayOfWeek,
|
||||
DaysOfWeek,
|
||||
EventSubscriptionStatus,
|
||||
FactoryIdentityType,
|
||||
IntegrationRuntimeAuthKeyName,
|
||||
IntegrationRuntimeAutoUpdate,
|
||||
IntegrationRuntimeEdition,
|
||||
|
@ -234,7 +233,6 @@ __all__ = [
|
|||
'EnvironmentVariableSetup',
|
||||
'Factory',
|
||||
'FactoryGitHubConfiguration',
|
||||
'FactoryIdentity',
|
||||
'FactoryListResponse',
|
||||
'FactoryRepoConfiguration',
|
||||
'FactoryRepoUpdate',
|
||||
|
@ -318,6 +316,7 @@ __all__ = [
|
|||
'DayOfWeek',
|
||||
'DaysOfWeek',
|
||||
'EventSubscriptionStatus',
|
||||
'FactoryIdentityType',
|
||||
'IntegrationRuntimeAuthKeyName',
|
||||
'IntegrationRuntimeAutoUpdate',
|
||||
'IntegrationRuntimeEdition',
|
||||
|
|
|
@ -6,190 +6,214 @@
|
|||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from enum import Enum
|
||||
from enum import Enum, EnumMeta
|
||||
from six import with_metaclass
|
||||
|
||||
class BlobEventTypes(str, Enum):
|
||||
class _CaseInsensitiveEnumMeta(EnumMeta):
|
||||
def __getitem__(self, name):
|
||||
return super().__getitem__(name.upper())
|
||||
|
||||
microsoft_storage_blob_created = "Microsoft.Storage.BlobCreated"
|
||||
microsoft_storage_blob_deleted = "Microsoft.Storage.BlobDeleted"
|
||||
def __getattr__(cls, name):
|
||||
"""Return the enum member matching `name`
|
||||
We use __getattr__ instead of descriptors or inserting into the enum
|
||||
class' __dict__ in order to support `name` and `value` being both
|
||||
properties for enum members (which live in the class' __dict__) and
|
||||
enum members themselves.
|
||||
"""
|
||||
try:
|
||||
return cls._member_map_[name.upper()]
|
||||
except KeyError:
|
||||
raise AttributeError(name)
|
||||
|
||||
class DataFlowComputeType(str, Enum):
|
||||
|
||||
class BlobEventTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
|
||||
MICROSOFT_STORAGE_BLOB_CREATED = "Microsoft.Storage.BlobCreated"
|
||||
MICROSOFT_STORAGE_BLOB_DELETED = "Microsoft.Storage.BlobDeleted"
|
||||
|
||||
class DataFlowComputeType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""Compute type of the cluster which will execute data flow job.
|
||||
"""
|
||||
|
||||
general = "General"
|
||||
memory_optimized = "MemoryOptimized"
|
||||
compute_optimized = "ComputeOptimized"
|
||||
GENERAL = "General"
|
||||
MEMORY_OPTIMIZED = "MemoryOptimized"
|
||||
COMPUTE_OPTIMIZED = "ComputeOptimized"
|
||||
|
||||
class DayOfWeek(str, Enum):
|
||||
class DayOfWeek(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""The days of the week.
|
||||
"""
|
||||
|
||||
sunday = "Sunday"
|
||||
monday = "Monday"
|
||||
tuesday = "Tuesday"
|
||||
wednesday = "Wednesday"
|
||||
thursday = "Thursday"
|
||||
friday = "Friday"
|
||||
saturday = "Saturday"
|
||||
SUNDAY = "Sunday"
|
||||
MONDAY = "Monday"
|
||||
TUESDAY = "Tuesday"
|
||||
WEDNESDAY = "Wednesday"
|
||||
THURSDAY = "Thursday"
|
||||
FRIDAY = "Friday"
|
||||
SATURDAY = "Saturday"
|
||||
|
||||
class DaysOfWeek(str, Enum):
|
||||
class DaysOfWeek(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
|
||||
sunday = "Sunday"
|
||||
monday = "Monday"
|
||||
tuesday = "Tuesday"
|
||||
wednesday = "Wednesday"
|
||||
thursday = "Thursday"
|
||||
friday = "Friday"
|
||||
saturday = "Saturday"
|
||||
SUNDAY = "Sunday"
|
||||
MONDAY = "Monday"
|
||||
TUESDAY = "Tuesday"
|
||||
WEDNESDAY = "Wednesday"
|
||||
THURSDAY = "Thursday"
|
||||
FRIDAY = "Friday"
|
||||
SATURDAY = "Saturday"
|
||||
|
||||
class EventSubscriptionStatus(str, Enum):
|
||||
class EventSubscriptionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""Event Subscription Status.
|
||||
"""
|
||||
|
||||
enabled = "Enabled"
|
||||
provisioning = "Provisioning"
|
||||
deprovisioning = "Deprovisioning"
|
||||
disabled = "Disabled"
|
||||
unknown = "Unknown"
|
||||
ENABLED = "Enabled"
|
||||
PROVISIONING = "Provisioning"
|
||||
DEPROVISIONING = "Deprovisioning"
|
||||
DISABLED = "Disabled"
|
||||
UNKNOWN = "Unknown"
|
||||
|
||||
class IntegrationRuntimeAuthKeyName(str, Enum):
|
||||
class FactoryIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""The identity type. Currently the only supported type is 'SystemAssigned'.
|
||||
"""
|
||||
|
||||
SYSTEM_ASSIGNED = "SystemAssigned"
|
||||
|
||||
class IntegrationRuntimeAuthKeyName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""The name of the authentication key to regenerate.
|
||||
"""
|
||||
|
||||
auth_key1 = "authKey1"
|
||||
auth_key2 = "authKey2"
|
||||
AUTH_KEY1 = "authKey1"
|
||||
AUTH_KEY2 = "authKey2"
|
||||
|
||||
class IntegrationRuntimeAutoUpdate(str, Enum):
|
||||
class IntegrationRuntimeAutoUpdate(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""The state of integration runtime auto update.
|
||||
"""
|
||||
|
||||
on = "On"
|
||||
off = "Off"
|
||||
ON = "On"
|
||||
OFF = "Off"
|
||||
|
||||
class IntegrationRuntimeEdition(str, Enum):
|
||||
class IntegrationRuntimeEdition(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""The edition for the SSIS Integration Runtime
|
||||
"""
|
||||
|
||||
standard = "Standard"
|
||||
enterprise = "Enterprise"
|
||||
STANDARD = "Standard"
|
||||
ENTERPRISE = "Enterprise"
|
||||
|
||||
class IntegrationRuntimeEntityReferenceType(str, Enum):
|
||||
class IntegrationRuntimeEntityReferenceType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""The type of this referenced entity.
|
||||
"""
|
||||
|
||||
integration_runtime_reference = "IntegrationRuntimeReference"
|
||||
linked_service_reference = "LinkedServiceReference"
|
||||
INTEGRATION_RUNTIME_REFERENCE = "IntegrationRuntimeReference"
|
||||
LINKED_SERVICE_REFERENCE = "LinkedServiceReference"
|
||||
|
||||
class IntegrationRuntimeInternalChannelEncryptionMode(str, Enum):
|
||||
class IntegrationRuntimeInternalChannelEncryptionMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""It is used to set the encryption mode for node-node communication channel (when more than 2
|
||||
self-hosted integration runtime nodes exist).
|
||||
"""
|
||||
|
||||
not_set = "NotSet"
|
||||
ssl_encrypted = "SslEncrypted"
|
||||
not_encrypted = "NotEncrypted"
|
||||
NOT_SET = "NotSet"
|
||||
SSL_ENCRYPTED = "SslEncrypted"
|
||||
NOT_ENCRYPTED = "NotEncrypted"
|
||||
|
||||
class IntegrationRuntimeLicenseType(str, Enum):
|
||||
class IntegrationRuntimeLicenseType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""License type for bringing your own license scenario.
|
||||
"""
|
||||
|
||||
base_price = "BasePrice"
|
||||
license_included = "LicenseIncluded"
|
||||
BASE_PRICE = "BasePrice"
|
||||
LICENSE_INCLUDED = "LicenseIncluded"
|
||||
|
||||
class IntegrationRuntimeSsisCatalogPricingTier(str, Enum):
|
||||
class IntegrationRuntimeSsisCatalogPricingTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""The pricing tier for the catalog database. The valid values could be found in
|
||||
https://azure.microsoft.com/en-us/pricing/details/sql-database/
|
||||
"""
|
||||
|
||||
basic = "Basic"
|
||||
standard = "Standard"
|
||||
premium = "Premium"
|
||||
premium_rs = "PremiumRS"
|
||||
BASIC = "Basic"
|
||||
STANDARD = "Standard"
|
||||
PREMIUM = "Premium"
|
||||
PREMIUM_RS = "PremiumRS"
|
||||
|
||||
class IntegrationRuntimeState(str, Enum):
|
||||
class IntegrationRuntimeState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""The state of integration runtime.
|
||||
"""
|
||||
|
||||
initial = "Initial"
|
||||
stopped = "Stopped"
|
||||
started = "Started"
|
||||
starting = "Starting"
|
||||
stopping = "Stopping"
|
||||
need_registration = "NeedRegistration"
|
||||
online = "Online"
|
||||
limited = "Limited"
|
||||
offline = "Offline"
|
||||
access_denied = "AccessDenied"
|
||||
INITIAL = "Initial"
|
||||
STOPPED = "Stopped"
|
||||
STARTED = "Started"
|
||||
STARTING = "Starting"
|
||||
STOPPING = "Stopping"
|
||||
NEED_REGISTRATION = "NeedRegistration"
|
||||
ONLINE = "Online"
|
||||
LIMITED = "Limited"
|
||||
OFFLINE = "Offline"
|
||||
ACCESS_DENIED = "AccessDenied"
|
||||
|
||||
class IntegrationRuntimeType(str, Enum):
|
||||
class IntegrationRuntimeType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""The type of integration runtime.
|
||||
"""
|
||||
|
||||
managed = "Managed"
|
||||
self_hosted = "SelfHosted"
|
||||
MANAGED = "Managed"
|
||||
SELF_HOSTED = "SelfHosted"
|
||||
|
||||
class IntegrationRuntimeUpdateResult(str, Enum):
|
||||
class IntegrationRuntimeUpdateResult(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""The result of the last integration runtime node update.
|
||||
"""
|
||||
|
||||
none = "None"
|
||||
succeed = "Succeed"
|
||||
fail = "Fail"
|
||||
NONE = "None"
|
||||
SUCCEED = "Succeed"
|
||||
FAIL = "Fail"
|
||||
|
||||
class ManagedIntegrationRuntimeNodeStatus(str, Enum):
|
||||
class ManagedIntegrationRuntimeNodeStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""The managed integration runtime node status.
|
||||
"""
|
||||
|
||||
starting = "Starting"
|
||||
available = "Available"
|
||||
recycling = "Recycling"
|
||||
unavailable = "Unavailable"
|
||||
STARTING = "Starting"
|
||||
AVAILABLE = "Available"
|
||||
RECYCLING = "Recycling"
|
||||
UNAVAILABLE = "Unavailable"
|
||||
|
||||
class RecurrenceFrequency(str, Enum):
|
||||
class RecurrenceFrequency(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""Enumerates possible frequency option for the schedule trigger.
|
||||
"""
|
||||
|
||||
not_specified = "NotSpecified"
|
||||
minute = "Minute"
|
||||
hour = "Hour"
|
||||
day = "Day"
|
||||
week = "Week"
|
||||
month = "Month"
|
||||
year = "Year"
|
||||
NOT_SPECIFIED = "NotSpecified"
|
||||
MINUTE = "Minute"
|
||||
HOUR = "Hour"
|
||||
DAY = "Day"
|
||||
WEEK = "Week"
|
||||
MONTH = "Month"
|
||||
YEAR = "Year"
|
||||
|
||||
class SelfHostedIntegrationRuntimeNodeStatus(str, Enum):
|
||||
class SelfHostedIntegrationRuntimeNodeStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""Status of the integration runtime node.
|
||||
"""
|
||||
|
||||
need_registration = "NeedRegistration"
|
||||
online = "Online"
|
||||
limited = "Limited"
|
||||
offline = "Offline"
|
||||
upgrading = "Upgrading"
|
||||
initializing = "Initializing"
|
||||
initialize_failed = "InitializeFailed"
|
||||
NEED_REGISTRATION = "NeedRegistration"
|
||||
ONLINE = "Online"
|
||||
LIMITED = "Limited"
|
||||
OFFLINE = "Offline"
|
||||
UPGRADING = "Upgrading"
|
||||
INITIALIZING = "Initializing"
|
||||
INITIALIZE_FAILED = "InitializeFailed"
|
||||
|
||||
class SsisObjectMetadataType(str, Enum):
|
||||
class SsisObjectMetadataType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""The type of SSIS object metadata.
|
||||
"""
|
||||
|
||||
folder = "Folder"
|
||||
project = "Project"
|
||||
package = "Package"
|
||||
environment = "Environment"
|
||||
FOLDER = "Folder"
|
||||
PROJECT = "Project"
|
||||
PACKAGE = "Package"
|
||||
ENVIRONMENT = "Environment"
|
||||
|
||||
class TriggerRuntimeState(str, Enum):
|
||||
class TriggerRuntimeState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""Enumerates possible state of Triggers.
|
||||
"""
|
||||
|
||||
started = "Started"
|
||||
stopped = "Stopped"
|
||||
disabled = "Disabled"
|
||||
STARTED = "Started"
|
||||
STOPPED = "Stopped"
|
||||
DISABLED = "Disabled"
|
||||
|
||||
class TumblingWindowFrequency(str, Enum):
|
||||
class TumblingWindowFrequency(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""Enumerates possible frequency option for the tumbling window trigger.
|
||||
"""
|
||||
|
||||
minute = "Minute"
|
||||
hour = "Hour"
|
||||
MINUTE = "Minute"
|
||||
HOUR = "Hour"
|
||||
|
|
|
@ -83,7 +83,7 @@ class Trigger(msrest.serialization.Model):
|
|||
):
|
||||
super(Trigger, self).__init__(**kwargs)
|
||||
self.additional_properties = kwargs.get('additional_properties', None)
|
||||
self.type = 'Trigger'
|
||||
self.type = 'Trigger' # type: str
|
||||
self.description = kwargs.get('description', None)
|
||||
self.runtime_state = None
|
||||
self.annotations = kwargs.get('annotations', None)
|
||||
|
@ -138,7 +138,7 @@ class MultiplePipelineTrigger(Trigger):
|
|||
**kwargs
|
||||
):
|
||||
super(MultiplePipelineTrigger, self).__init__(**kwargs)
|
||||
self.type = 'MultiplePipelineTrigger'
|
||||
self.type = 'MultiplePipelineTrigger' # type: str
|
||||
self.pipelines = kwargs.get('pipelines', None)
|
||||
|
||||
|
||||
|
@ -206,7 +206,7 @@ class BlobEventsTrigger(MultiplePipelineTrigger):
|
|||
**kwargs
|
||||
):
|
||||
super(BlobEventsTrigger, self).__init__(**kwargs)
|
||||
self.type = 'BlobEventsTrigger'
|
||||
self.type = 'BlobEventsTrigger' # type: str
|
||||
self.blob_path_begins_with = kwargs.get('blob_path_begins_with', None)
|
||||
self.blob_path_ends_with = kwargs.get('blob_path_ends_with', None)
|
||||
self.ignore_empty_blobs = kwargs.get('ignore_empty_blobs', None)
|
||||
|
@ -269,7 +269,7 @@ class BlobTrigger(MultiplePipelineTrigger):
|
|||
**kwargs
|
||||
):
|
||||
super(BlobTrigger, self).__init__(**kwargs)
|
||||
self.type = 'BlobTrigger'
|
||||
self.type = 'BlobTrigger' # type: str
|
||||
self.folder_path = kwargs['folder_path']
|
||||
self.max_concurrency = kwargs['max_concurrency']
|
||||
self.linked_service = kwargs['linked_service']
|
||||
|
@ -328,7 +328,7 @@ class ChainingTrigger(Trigger):
|
|||
**kwargs
|
||||
):
|
||||
super(ChainingTrigger, self).__init__(**kwargs)
|
||||
self.type = 'ChainingTrigger'
|
||||
self.type = 'ChainingTrigger' # type: str
|
||||
self.pipeline = kwargs['pipeline']
|
||||
self.depends_on = kwargs['depends_on']
|
||||
self.run_dimension = kwargs['run_dimension']
|
||||
|
@ -401,7 +401,7 @@ class CustomSetupBase(msrest.serialization.Model):
|
|||
**kwargs
|
||||
):
|
||||
super(CustomSetupBase, self).__init__(**kwargs)
|
||||
self.type = None
|
||||
self.type = None # type: Optional[str]
|
||||
|
||||
|
||||
class CmdkeySetup(CustomSetupBase):
|
||||
|
@ -438,7 +438,7 @@ class CmdkeySetup(CustomSetupBase):
|
|||
**kwargs
|
||||
):
|
||||
super(CmdkeySetup, self).__init__(**kwargs)
|
||||
self.type = 'CmdkeySetup'
|
||||
self.type = 'CmdkeySetup' # type: str
|
||||
self.target_name = kwargs['target_name']
|
||||
self.user_name = kwargs['user_name']
|
||||
self.password = kwargs['password']
|
||||
|
@ -473,7 +473,7 @@ class ComponentSetup(CustomSetupBase):
|
|||
**kwargs
|
||||
):
|
||||
super(ComponentSetup, self).__init__(**kwargs)
|
||||
self.type = 'ComponentSetup'
|
||||
self.type = 'ComponentSetup' # type: str
|
||||
self.component_name = kwargs['component_name']
|
||||
self.license_key = kwargs.get('license_key', None)
|
||||
|
||||
|
@ -541,7 +541,7 @@ class DependencyReference(msrest.serialization.Model):
|
|||
**kwargs
|
||||
):
|
||||
super(DependencyReference, self).__init__(**kwargs)
|
||||
self.type = None
|
||||
self.type = None # type: Optional[str]
|
||||
|
||||
|
||||
class EntityReference(msrest.serialization.Model):
|
||||
|
@ -598,7 +598,7 @@ class EnvironmentVariableSetup(CustomSetupBase):
|
|||
**kwargs
|
||||
):
|
||||
super(EnvironmentVariableSetup, self).__init__(**kwargs)
|
||||
self.type = 'EnvironmentVariableSetup'
|
||||
self.type = 'EnvironmentVariableSetup' # type: str
|
||||
self.variable_name = kwargs['variable_name']
|
||||
self.variable_value = kwargs['variable_value']
|
||||
|
||||
|
@ -671,8 +671,6 @@ class Factory(Resource):
|
|||
:param additional_properties: Unmatched properties from the message are deserialized to this
|
||||
collection.
|
||||
:type additional_properties: dict[str, object]
|
||||
:param identity: Managed service identity of the factory.
|
||||
:type identity: ~dfaz_management_client.models.FactoryIdentity
|
||||
:ivar provisioning_state: Factory provisioning state, example Succeeded.
|
||||
:vartype provisioning_state: str
|
||||
:ivar create_time: Time the factory was created in ISO8601 format.
|
||||
|
@ -685,6 +683,13 @@ class Factory(Resource):
|
|||
:type fake_identity: ~dfaz_management_client.models.FakeFactoryIdentity
|
||||
:param zones: This is only for az test.
|
||||
:type zones: list[str]
|
||||
:param type_identity_type: The identity type. Currently the only supported type is
|
||||
'SystemAssigned'. Possible values include: "SystemAssigned".
|
||||
:type type_identity_type: str or ~dfaz_management_client.models.FactoryIdentityType
|
||||
:ivar principal_id: The principal id of the identity.
|
||||
:vartype principal_id: str
|
||||
:ivar tenant_id: The client tenant id of the identity.
|
||||
:vartype tenant_id: str
|
||||
"""
|
||||
|
||||
_validation = {
|
||||
|
@ -695,6 +700,8 @@ class Factory(Resource):
|
|||
'provisioning_state': {'readonly': True},
|
||||
'create_time': {'readonly': True},
|
||||
'version': {'readonly': True},
|
||||
'principal_id': {'readonly': True},
|
||||
'tenant_id': {'readonly': True},
|
||||
}
|
||||
|
||||
_attribute_map = {
|
||||
|
@ -705,13 +712,15 @@ class Factory(Resource):
|
|||
'tags': {'key': 'tags', 'type': '{str}'},
|
||||
'e_tag': {'key': 'eTag', 'type': 'str'},
|
||||
'additional_properties': {'key': '', 'type': '{object}'},
|
||||
'identity': {'key': 'identity', 'type': 'FactoryIdentity'},
|
||||
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
|
||||
'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'},
|
||||
'version': {'key': 'properties.version', 'type': 'str'},
|
||||
'repo_configuration': {'key': 'properties.repoConfiguration', 'type': 'FactoryRepoConfiguration'},
|
||||
'fake_identity': {'key': 'properties.fakeIdentity', 'type': 'FakeFactoryIdentity'},
|
||||
'zones': {'key': 'properties.zones', 'type': '[str]'},
|
||||
'type_identity_type': {'key': 'identity.type', 'type': 'str'},
|
||||
'principal_id': {'key': 'identity.principalId', 'type': 'str'},
|
||||
'tenant_id': {'key': 'identity.tenantId', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(
|
||||
|
@ -720,13 +729,15 @@ class Factory(Resource):
|
|||
):
|
||||
super(Factory, self).__init__(**kwargs)
|
||||
self.additional_properties = kwargs.get('additional_properties', None)
|
||||
self.identity = kwargs.get('identity', None)
|
||||
self.provisioning_state = None
|
||||
self.create_time = None
|
||||
self.version = None
|
||||
self.repo_configuration = kwargs.get('repo_configuration', None)
|
||||
self.fake_identity = kwargs.get('fake_identity', None)
|
||||
self.zones = kwargs.get('zones', None)
|
||||
self.type_identity_type = kwargs.get('type_identity_type', None)
|
||||
self.principal_id = None
|
||||
self.tenant_id = None
|
||||
|
||||
|
||||
class FactoryRepoConfiguration(msrest.serialization.Model):
|
||||
|
@ -777,7 +788,7 @@ class FactoryRepoConfiguration(msrest.serialization.Model):
|
|||
**kwargs
|
||||
):
|
||||
super(FactoryRepoConfiguration, self).__init__(**kwargs)
|
||||
self.type = None
|
||||
self.type = None # type: Optional[str]
|
||||
self.account_name = kwargs['account_name']
|
||||
self.repository_name = kwargs['repository_name']
|
||||
self.collaboration_branch = kwargs['collaboration_branch']
|
||||
|
@ -829,49 +840,10 @@ class FactoryGitHubConfiguration(FactoryRepoConfiguration):
|
|||
**kwargs
|
||||
):
|
||||
super(FactoryGitHubConfiguration, self).__init__(**kwargs)
|
||||
self.type = 'FactoryGitHubConfiguration'
|
||||
self.type = 'FactoryGitHubConfiguration' # type: str
|
||||
self.host_name = kwargs.get('host_name', None)
|
||||
|
||||
|
||||
class FactoryIdentity(msrest.serialization.Model):
|
||||
"""Identity properties of the factory resource.
|
||||
|
||||
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 type: Required. The identity type. Currently the only supported type is 'SystemAssigned'.
|
||||
Default value: "SystemAssigned".
|
||||
:vartype type: str
|
||||
:ivar principal_id: The principal id of the identity.
|
||||
:vartype principal_id: str
|
||||
:ivar tenant_id: The client tenant id of the identity.
|
||||
:vartype tenant_id: str
|
||||
"""
|
||||
|
||||
_validation = {
|
||||
'type': {'required': True, 'constant': True},
|
||||
'principal_id': {'readonly': True},
|
||||
'tenant_id': {'readonly': True},
|
||||
}
|
||||
|
||||
_attribute_map = {
|
||||
'type': {'key': 'type', 'type': 'str'},
|
||||
'principal_id': {'key': 'principalId', 'type': 'str'},
|
||||
'tenant_id': {'key': 'tenantId', 'type': 'str'},
|
||||
}
|
||||
|
||||
type = "SystemAssigned"
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
**kwargs
|
||||
):
|
||||
super(FactoryIdentity, self).__init__(**kwargs)
|
||||
self.principal_id = None
|
||||
self.tenant_id = None
|
||||
|
||||
|
||||
class FactoryListResponse(msrest.serialization.Model):
|
||||
"""A list of factory resources.
|
||||
|
||||
|
@ -927,15 +899,32 @@ class FactoryRepoUpdate(msrest.serialization.Model):
|
|||
class FactoryUpdateParameters(msrest.serialization.Model):
|
||||
"""Parameters for updating a factory resource.
|
||||
|
||||
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.
|
||||
|
||||
:param tags: A set of tags. The resource tags.
|
||||
:type tags: dict[str, str]
|
||||
:param identity: Managed service identity of the factory.
|
||||
:type identity: ~dfaz_management_client.models.FactoryIdentity
|
||||
:param type: Required. The identity type. Currently the only supported type is
|
||||
'SystemAssigned'. Possible values include: "SystemAssigned".
|
||||
:type type: str or ~dfaz_management_client.models.FactoryIdentityType
|
||||
:ivar principal_id: The principal id of the identity.
|
||||
:vartype principal_id: str
|
||||
:ivar tenant_id: The client tenant id of the identity.
|
||||
:vartype tenant_id: str
|
||||
"""
|
||||
|
||||
_validation = {
|
||||
'type': {'required': True},
|
||||
'principal_id': {'readonly': True},
|
||||
'tenant_id': {'readonly': True},
|
||||
}
|
||||
|
||||
_attribute_map = {
|
||||
'tags': {'key': 'tags', 'type': '{str}'},
|
||||
'identity': {'key': 'identity', 'type': 'FactoryIdentity'},
|
||||
'type': {'key': 'identity.type', 'type': 'str'},
|
||||
'principal_id': {'key': 'identity.principalId', 'type': 'str'},
|
||||
'tenant_id': {'key': 'identity.tenantId', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(
|
||||
|
@ -944,7 +933,9 @@ class FactoryUpdateParameters(msrest.serialization.Model):
|
|||
):
|
||||
super(FactoryUpdateParameters, self).__init__(**kwargs)
|
||||
self.tags = kwargs.get('tags', None)
|
||||
self.identity = kwargs.get('identity', None)
|
||||
self.type = kwargs['type']
|
||||
self.principal_id = None
|
||||
self.tenant_id = None
|
||||
|
||||
|
||||
class FactoryVstsConfiguration(FactoryRepoConfiguration):
|
||||
|
@ -995,7 +986,7 @@ class FactoryVstsConfiguration(FactoryRepoConfiguration):
|
|||
**kwargs
|
||||
):
|
||||
super(FactoryVstsConfiguration, self).__init__(**kwargs)
|
||||
self.type = 'FactoryVSTSConfiguration'
|
||||
self.type = 'FactoryVSTSConfiguration' # type: str
|
||||
self.project_name = kwargs['project_name']
|
||||
self.tenant_id = kwargs.get('tenant_id', None)
|
||||
|
||||
|
@ -1120,7 +1111,7 @@ class IntegrationRuntime(msrest.serialization.Model):
|
|||
):
|
||||
super(IntegrationRuntime, self).__init__(**kwargs)
|
||||
self.additional_properties = kwargs.get('additional_properties', None)
|
||||
self.type = 'IntegrationRuntime'
|
||||
self.type = 'IntegrationRuntime' # type: str
|
||||
self.description = kwargs.get('description', None)
|
||||
|
||||
|
||||
|
@ -1777,7 +1768,7 @@ class IntegrationRuntimeStatus(msrest.serialization.Model):
|
|||
):
|
||||
super(IntegrationRuntimeStatus, self).__init__(**kwargs)
|
||||
self.additional_properties = kwargs.get('additional_properties', None)
|
||||
self.type = 'IntegrationRuntimeStatus'
|
||||
self.type = 'IntegrationRuntimeStatus' # type: str
|
||||
self.data_factory_name = None
|
||||
self.state = None
|
||||
|
||||
|
@ -1953,7 +1944,7 @@ class LinkedIntegrationRuntimeType(msrest.serialization.Model):
|
|||
**kwargs
|
||||
):
|
||||
super(LinkedIntegrationRuntimeType, self).__init__(**kwargs)
|
||||
self.authorization_type = None
|
||||
self.authorization_type = None # type: Optional[str]
|
||||
|
||||
|
||||
class LinkedIntegrationRuntimeKeyAuthorization(LinkedIntegrationRuntimeType):
|
||||
|
@ -1983,7 +1974,7 @@ class LinkedIntegrationRuntimeKeyAuthorization(LinkedIntegrationRuntimeType):
|
|||
**kwargs
|
||||
):
|
||||
super(LinkedIntegrationRuntimeKeyAuthorization, self).__init__(**kwargs)
|
||||
self.authorization_type = 'Key'
|
||||
self.authorization_type = 'Key' # type: str
|
||||
self.key = kwargs['key']
|
||||
|
||||
|
||||
|
@ -2014,7 +2005,7 @@ class LinkedIntegrationRuntimeRbacAuthorization(LinkedIntegrationRuntimeType):
|
|||
**kwargs
|
||||
):
|
||||
super(LinkedIntegrationRuntimeRbacAuthorization, self).__init__(**kwargs)
|
||||
self.authorization_type = 'RBAC'
|
||||
self.authorization_type = 'RBAC' # type: str
|
||||
self.resource_id = kwargs['resource_id']
|
||||
|
||||
|
||||
|
@ -2133,7 +2124,7 @@ class ManagedIntegrationRuntime(IntegrationRuntime):
|
|||
**kwargs
|
||||
):
|
||||
super(ManagedIntegrationRuntime, self).__init__(**kwargs)
|
||||
self.type = 'Managed'
|
||||
self.type = 'Managed' # type: str
|
||||
self.state = None
|
||||
self.repo_configuration = kwargs.get('repo_configuration', None)
|
||||
self.fake_identity = kwargs.get('fake_identity', None)
|
||||
|
@ -2338,7 +2329,7 @@ class ManagedIntegrationRuntimeStatus(IntegrationRuntimeStatus):
|
|||
**kwargs
|
||||
):
|
||||
super(ManagedIntegrationRuntimeStatus, self).__init__(**kwargs)
|
||||
self.type = 'Managed'
|
||||
self.type = 'Managed' # type: str
|
||||
self.create_time = None
|
||||
self.nodes = None
|
||||
self.other_errors = None
|
||||
|
@ -2539,7 +2530,7 @@ class RerunTumblingWindowTrigger(Trigger):
|
|||
**kwargs
|
||||
):
|
||||
super(RerunTumblingWindowTrigger, self).__init__(**kwargs)
|
||||
self.type = 'RerunTumblingWindowTrigger'
|
||||
self.type = 'RerunTumblingWindowTrigger' # type: str
|
||||
self.parent_trigger = kwargs['parent_trigger']
|
||||
self.requested_start_time = kwargs['requested_start_time']
|
||||
self.requested_end_time = kwargs['requested_end_time']
|
||||
|
@ -2620,7 +2611,7 @@ class ScheduleTrigger(MultiplePipelineTrigger):
|
|||
**kwargs
|
||||
):
|
||||
super(ScheduleTrigger, self).__init__(**kwargs)
|
||||
self.type = 'ScheduleTrigger'
|
||||
self.type = 'ScheduleTrigger' # type: str
|
||||
self.recurrence = kwargs['recurrence']
|
||||
|
||||
|
||||
|
@ -2698,7 +2689,7 @@ class SecretBase(msrest.serialization.Model):
|
|||
**kwargs
|
||||
):
|
||||
super(SecretBase, self).__init__(**kwargs)
|
||||
self.type = None
|
||||
self.type = None # type: Optional[str]
|
||||
|
||||
|
||||
class SecureString(SecretBase):
|
||||
|
@ -2727,7 +2718,7 @@ class SecureString(SecretBase):
|
|||
**kwargs
|
||||
):
|
||||
super(SecureString, self).__init__(**kwargs)
|
||||
self.type = 'SecureString'
|
||||
self.type = 'SecureString' # type: str
|
||||
self.value = kwargs['value']
|
||||
|
||||
|
||||
|
@ -2763,7 +2754,7 @@ class SelfDependencyTumblingWindowTriggerReference(DependencyReference):
|
|||
**kwargs
|
||||
):
|
||||
super(SelfDependencyTumblingWindowTriggerReference, self).__init__(**kwargs)
|
||||
self.type = 'SelfDependencyTumblingWindowTriggerReference'
|
||||
self.type = 'SelfDependencyTumblingWindowTriggerReference' # type: str
|
||||
self.offset = kwargs['offset']
|
||||
self.size = kwargs.get('size', None)
|
||||
|
||||
|
@ -2801,7 +2792,7 @@ class SelfHostedIntegrationRuntime(IntegrationRuntime):
|
|||
**kwargs
|
||||
):
|
||||
super(SelfHostedIntegrationRuntime, self).__init__(**kwargs)
|
||||
self.type = 'SelfHosted'
|
||||
self.type = 'SelfHosted' # type: str
|
||||
self.linked_info = kwargs.get('linked_info', None)
|
||||
|
||||
|
||||
|
@ -3036,7 +3027,7 @@ class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus):
|
|||
**kwargs
|
||||
):
|
||||
super(SelfHostedIntegrationRuntimeStatus, self).__init__(**kwargs)
|
||||
self.type = 'SelfHosted'
|
||||
self.type = 'SelfHosted' # type: str
|
||||
self.create_time = None
|
||||
self.task_queue_id = None
|
||||
self.internal_channel_encryption = None
|
||||
|
@ -3094,7 +3085,7 @@ class SsisObjectMetadata(msrest.serialization.Model):
|
|||
**kwargs
|
||||
):
|
||||
super(SsisObjectMetadata, self).__init__(**kwargs)
|
||||
self.type = None
|
||||
self.type = None # type: Optional[str]
|
||||
self.id = kwargs.get('id', None)
|
||||
self.name = kwargs.get('name', None)
|
||||
self.description = kwargs.get('description', None)
|
||||
|
@ -3138,7 +3129,7 @@ class SsisEnvironment(SsisObjectMetadata):
|
|||
**kwargs
|
||||
):
|
||||
super(SsisEnvironment, self).__init__(**kwargs)
|
||||
self.type = 'Environment'
|
||||
self.type = 'Environment' # type: str
|
||||
self.folder_id = kwargs.get('folder_id', None)
|
||||
self.variables = kwargs.get('variables', None)
|
||||
|
||||
|
@ -3206,7 +3197,7 @@ class SsisFolder(SsisObjectMetadata):
|
|||
**kwargs
|
||||
):
|
||||
super(SsisFolder, self).__init__(**kwargs)
|
||||
self.type = 'Folder'
|
||||
self.type = 'Folder' # type: str
|
||||
|
||||
|
||||
class SsisObjectMetadataListResponse(msrest.serialization.Model):
|
||||
|
@ -3276,7 +3267,7 @@ class SsisPackage(SsisObjectMetadata):
|
|||
**kwargs
|
||||
):
|
||||
super(SsisPackage, self).__init__(**kwargs)
|
||||
self.type = 'Package'
|
||||
self.type = 'Package' # type: str
|
||||
self.folder_id = kwargs.get('folder_id', None)
|
||||
self.project_version = kwargs.get('project_version', None)
|
||||
self.project_id = kwargs.get('project_id', None)
|
||||
|
@ -3390,7 +3381,7 @@ class SsisProject(SsisObjectMetadata):
|
|||
**kwargs
|
||||
):
|
||||
super(SsisProject, self).__init__(**kwargs)
|
||||
self.type = 'Project'
|
||||
self.type = 'Project' # type: str
|
||||
self.folder_id = kwargs.get('folder_id', None)
|
||||
self.version = kwargs.get('version', None)
|
||||
self.environment_refs = kwargs.get('environment_refs', None)
|
||||
|
@ -3473,7 +3464,7 @@ class TriggerDependencyReference(DependencyReference):
|
|||
**kwargs
|
||||
):
|
||||
super(TriggerDependencyReference, self).__init__(**kwargs)
|
||||
self.type = 'TriggerDependencyReference'
|
||||
self.type = 'TriggerDependencyReference' # type: str
|
||||
self.reference_trigger = kwargs['reference_trigger']
|
||||
|
||||
|
||||
|
@ -3771,7 +3762,7 @@ class TumblingWindowTrigger(Trigger):
|
|||
**kwargs
|
||||
):
|
||||
super(TumblingWindowTrigger, self).__init__(**kwargs)
|
||||
self.type = 'TumblingWindowTrigger'
|
||||
self.type = 'TumblingWindowTrigger' # type: str
|
||||
self.pipeline = kwargs['pipeline']
|
||||
self.frequency = kwargs['frequency']
|
||||
self.interval = kwargs['interval']
|
||||
|
@ -3819,7 +3810,7 @@ class TumblingWindowTriggerDependencyReference(TriggerDependencyReference):
|
|||
**kwargs
|
||||
):
|
||||
super(TumblingWindowTriggerDependencyReference, self).__init__(**kwargs)
|
||||
self.type = 'TumblingWindowTriggerDependencyReference'
|
||||
self.type = 'TumblingWindowTriggerDependencyReference' # type: str
|
||||
self.offset = kwargs.get('offset', None)
|
||||
self.size = kwargs.get('size', None)
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ class Trigger(msrest.serialization.Model):
|
|||
):
|
||||
super(Trigger, self).__init__(**kwargs)
|
||||
self.additional_properties = additional_properties
|
||||
self.type: str = 'Trigger'
|
||||
self.type = 'Trigger' # type: str
|
||||
self.description = description
|
||||
self.runtime_state = None
|
||||
self.annotations = annotations
|
||||
|
@ -156,7 +156,7 @@ class MultiplePipelineTrigger(Trigger):
|
|||
**kwargs
|
||||
):
|
||||
super(MultiplePipelineTrigger, self).__init__(additional_properties=additional_properties, description=description, annotations=annotations, **kwargs)
|
||||
self.type: str = 'MultiplePipelineTrigger'
|
||||
self.type = 'MultiplePipelineTrigger' # type: str
|
||||
self.pipelines = pipelines
|
||||
|
||||
|
||||
|
@ -234,7 +234,7 @@ class BlobEventsTrigger(MultiplePipelineTrigger):
|
|||
**kwargs
|
||||
):
|
||||
super(BlobEventsTrigger, self).__init__(additional_properties=additional_properties, description=description, annotations=annotations, pipelines=pipelines, **kwargs)
|
||||
self.type: str = 'BlobEventsTrigger'
|
||||
self.type = 'BlobEventsTrigger' # type: str
|
||||
self.blob_path_begins_with = blob_path_begins_with
|
||||
self.blob_path_ends_with = blob_path_ends_with
|
||||
self.ignore_empty_blobs = ignore_empty_blobs
|
||||
|
@ -305,7 +305,7 @@ class BlobTrigger(MultiplePipelineTrigger):
|
|||
**kwargs
|
||||
):
|
||||
super(BlobTrigger, self).__init__(additional_properties=additional_properties, description=description, annotations=annotations, pipelines=pipelines, **kwargs)
|
||||
self.type: str = 'BlobTrigger'
|
||||
self.type = 'BlobTrigger' # type: str
|
||||
self.folder_path = folder_path
|
||||
self.max_concurrency = max_concurrency
|
||||
self.linked_service = linked_service
|
||||
|
@ -371,7 +371,7 @@ class ChainingTrigger(Trigger):
|
|||
**kwargs
|
||||
):
|
||||
super(ChainingTrigger, self).__init__(additional_properties=additional_properties, description=description, annotations=annotations, **kwargs)
|
||||
self.type: str = 'ChainingTrigger'
|
||||
self.type = 'ChainingTrigger' # type: str
|
||||
self.pipeline = pipeline
|
||||
self.depends_on = depends_on
|
||||
self.run_dimension = run_dimension
|
||||
|
@ -449,7 +449,7 @@ class CustomSetupBase(msrest.serialization.Model):
|
|||
**kwargs
|
||||
):
|
||||
super(CustomSetupBase, self).__init__(**kwargs)
|
||||
self.type: Optional[str] = None
|
||||
self.type = None # type: Optional[str]
|
||||
|
||||
|
||||
class CmdkeySetup(CustomSetupBase):
|
||||
|
@ -490,7 +490,7 @@ class CmdkeySetup(CustomSetupBase):
|
|||
**kwargs
|
||||
):
|
||||
super(CmdkeySetup, self).__init__(**kwargs)
|
||||
self.type: str = 'CmdkeySetup'
|
||||
self.type = 'CmdkeySetup' # type: str
|
||||
self.target_name = target_name
|
||||
self.user_name = user_name
|
||||
self.password = password
|
||||
|
@ -528,7 +528,7 @@ class ComponentSetup(CustomSetupBase):
|
|||
**kwargs
|
||||
):
|
||||
super(ComponentSetup, self).__init__(**kwargs)
|
||||
self.type: str = 'ComponentSetup'
|
||||
self.type = 'ComponentSetup' # type: str
|
||||
self.component_name = component_name
|
||||
self.license_key = license_key
|
||||
|
||||
|
@ -601,7 +601,7 @@ class DependencyReference(msrest.serialization.Model):
|
|||
**kwargs
|
||||
):
|
||||
super(DependencyReference, self).__init__(**kwargs)
|
||||
self.type: Optional[str] = None
|
||||
self.type = None # type: Optional[str]
|
||||
|
||||
|
||||
class EntityReference(msrest.serialization.Model):
|
||||
|
@ -664,7 +664,7 @@ class EnvironmentVariableSetup(CustomSetupBase):
|
|||
**kwargs
|
||||
):
|
||||
super(EnvironmentVariableSetup, self).__init__(**kwargs)
|
||||
self.type: str = 'EnvironmentVariableSetup'
|
||||
self.type = 'EnvironmentVariableSetup' # type: str
|
||||
self.variable_name = variable_name
|
||||
self.variable_value = variable_value
|
||||
|
||||
|
@ -740,8 +740,6 @@ class Factory(Resource):
|
|||
:param additional_properties: Unmatched properties from the message are deserialized to this
|
||||
collection.
|
||||
:type additional_properties: dict[str, object]
|
||||
:param identity: Managed service identity of the factory.
|
||||
:type identity: ~dfaz_management_client.models.FactoryIdentity
|
||||
:ivar provisioning_state: Factory provisioning state, example Succeeded.
|
||||
:vartype provisioning_state: str
|
||||
:ivar create_time: Time the factory was created in ISO8601 format.
|
||||
|
@ -754,6 +752,13 @@ class Factory(Resource):
|
|||
:type fake_identity: ~dfaz_management_client.models.FakeFactoryIdentity
|
||||
:param zones: This is only for az test.
|
||||
:type zones: list[str]
|
||||
:param type_identity_type: The identity type. Currently the only supported type is
|
||||
'SystemAssigned'. Possible values include: "SystemAssigned".
|
||||
:type type_identity_type: str or ~dfaz_management_client.models.FactoryIdentityType
|
||||
:ivar principal_id: The principal id of the identity.
|
||||
:vartype principal_id: str
|
||||
:ivar tenant_id: The client tenant id of the identity.
|
||||
:vartype tenant_id: str
|
||||
"""
|
||||
|
||||
_validation = {
|
||||
|
@ -764,6 +769,8 @@ class Factory(Resource):
|
|||
'provisioning_state': {'readonly': True},
|
||||
'create_time': {'readonly': True},
|
||||
'version': {'readonly': True},
|
||||
'principal_id': {'readonly': True},
|
||||
'tenant_id': {'readonly': True},
|
||||
}
|
||||
|
||||
_attribute_map = {
|
||||
|
@ -774,13 +781,15 @@ class Factory(Resource):
|
|||
'tags': {'key': 'tags', 'type': '{str}'},
|
||||
'e_tag': {'key': 'eTag', 'type': 'str'},
|
||||
'additional_properties': {'key': '', 'type': '{object}'},
|
||||
'identity': {'key': 'identity', 'type': 'FactoryIdentity'},
|
||||
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
|
||||
'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'},
|
||||
'version': {'key': 'properties.version', 'type': 'str'},
|
||||
'repo_configuration': {'key': 'properties.repoConfiguration', 'type': 'FactoryRepoConfiguration'},
|
||||
'fake_identity': {'key': 'properties.fakeIdentity', 'type': 'FakeFactoryIdentity'},
|
||||
'zones': {'key': 'properties.zones', 'type': '[str]'},
|
||||
'type_identity_type': {'key': 'identity.type', 'type': 'str'},
|
||||
'principal_id': {'key': 'identity.principalId', 'type': 'str'},
|
||||
'tenant_id': {'key': 'identity.tenantId', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(
|
||||
|
@ -789,21 +798,23 @@ class Factory(Resource):
|
|||
location: Optional[str] = None,
|
||||
tags: Optional[Dict[str, str]] = None,
|
||||
additional_properties: Optional[Dict[str, object]] = None,
|
||||
identity: Optional["FactoryIdentity"] = None,
|
||||
repo_configuration: Optional["FactoryRepoConfiguration"] = None,
|
||||
fake_identity: Optional["FakeFactoryIdentity"] = None,
|
||||
zones: Optional[List[str]] = None,
|
||||
type_identity_type: Optional[Union[str, "FactoryIdentityType"]] = None,
|
||||
**kwargs
|
||||
):
|
||||
super(Factory, self).__init__(location=location, tags=tags, **kwargs)
|
||||
self.additional_properties = additional_properties
|
||||
self.identity = identity
|
||||
self.provisioning_state = None
|
||||
self.create_time = None
|
||||
self.version = None
|
||||
self.repo_configuration = repo_configuration
|
||||
self.fake_identity = fake_identity
|
||||
self.zones = zones
|
||||
self.type_identity_type = type_identity_type
|
||||
self.principal_id = None
|
||||
self.tenant_id = None
|
||||
|
||||
|
||||
class FactoryRepoConfiguration(msrest.serialization.Model):
|
||||
|
@ -860,7 +871,7 @@ class FactoryRepoConfiguration(msrest.serialization.Model):
|
|||
**kwargs
|
||||
):
|
||||
super(FactoryRepoConfiguration, self).__init__(**kwargs)
|
||||
self.type: Optional[str] = None
|
||||
self.type = None # type: Optional[str]
|
||||
self.account_name = account_name
|
||||
self.repository_name = repository_name
|
||||
self.collaboration_branch = collaboration_branch
|
||||
|
@ -919,49 +930,10 @@ class FactoryGitHubConfiguration(FactoryRepoConfiguration):
|
|||
**kwargs
|
||||
):
|
||||
super(FactoryGitHubConfiguration, self).__init__(account_name=account_name, repository_name=repository_name, collaboration_branch=collaboration_branch, root_folder=root_folder, last_commit_id=last_commit_id, **kwargs)
|
||||
self.type: str = 'FactoryGitHubConfiguration'
|
||||
self.type = 'FactoryGitHubConfiguration' # type: str
|
||||
self.host_name = host_name
|
||||
|
||||
|
||||
class FactoryIdentity(msrest.serialization.Model):
|
||||
"""Identity properties of the factory resource.
|
||||
|
||||
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 type: Required. The identity type. Currently the only supported type is 'SystemAssigned'.
|
||||
Default value: "SystemAssigned".
|
||||
:vartype type: str
|
||||
:ivar principal_id: The principal id of the identity.
|
||||
:vartype principal_id: str
|
||||
:ivar tenant_id: The client tenant id of the identity.
|
||||
:vartype tenant_id: str
|
||||
"""
|
||||
|
||||
_validation = {
|
||||
'type': {'required': True, 'constant': True},
|
||||
'principal_id': {'readonly': True},
|
||||
'tenant_id': {'readonly': True},
|
||||
}
|
||||
|
||||
_attribute_map = {
|
||||
'type': {'key': 'type', 'type': 'str'},
|
||||
'principal_id': {'key': 'principalId', 'type': 'str'},
|
||||
'tenant_id': {'key': 'tenantId', 'type': 'str'},
|
||||
}
|
||||
|
||||
type = "SystemAssigned"
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
**kwargs
|
||||
):
|
||||
super(FactoryIdentity, self).__init__(**kwargs)
|
||||
self.principal_id = None
|
||||
self.tenant_id = None
|
||||
|
||||
|
||||
class FactoryListResponse(msrest.serialization.Model):
|
||||
"""A list of factory resources.
|
||||
|
||||
|
@ -1023,27 +995,46 @@ class FactoryRepoUpdate(msrest.serialization.Model):
|
|||
class FactoryUpdateParameters(msrest.serialization.Model):
|
||||
"""Parameters for updating a factory resource.
|
||||
|
||||
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.
|
||||
|
||||
:param tags: A set of tags. The resource tags.
|
||||
:type tags: dict[str, str]
|
||||
:param identity: Managed service identity of the factory.
|
||||
:type identity: ~dfaz_management_client.models.FactoryIdentity
|
||||
:param type: Required. The identity type. Currently the only supported type is
|
||||
'SystemAssigned'. Possible values include: "SystemAssigned".
|
||||
:type type: str or ~dfaz_management_client.models.FactoryIdentityType
|
||||
:ivar principal_id: The principal id of the identity.
|
||||
:vartype principal_id: str
|
||||
:ivar tenant_id: The client tenant id of the identity.
|
||||
:vartype tenant_id: str
|
||||
"""
|
||||
|
||||
_validation = {
|
||||
'type': {'required': True},
|
||||
'principal_id': {'readonly': True},
|
||||
'tenant_id': {'readonly': True},
|
||||
}
|
||||
|
||||
_attribute_map = {
|
||||
'tags': {'key': 'tags', 'type': '{str}'},
|
||||
'identity': {'key': 'identity', 'type': 'FactoryIdentity'},
|
||||
'type': {'key': 'identity.type', 'type': 'str'},
|
||||
'principal_id': {'key': 'identity.principalId', 'type': 'str'},
|
||||
'tenant_id': {'key': 'identity.tenantId', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
type: Union[str, "FactoryIdentityType"],
|
||||
tags: Optional[Dict[str, str]] = None,
|
||||
identity: Optional["FactoryIdentity"] = None,
|
||||
**kwargs
|
||||
):
|
||||
super(FactoryUpdateParameters, self).__init__(**kwargs)
|
||||
self.tags = tags
|
||||
self.identity = identity
|
||||
self.type = type
|
||||
self.principal_id = None
|
||||
self.tenant_id = None
|
||||
|
||||
|
||||
class FactoryVstsConfiguration(FactoryRepoConfiguration):
|
||||
|
@ -1102,7 +1093,7 @@ class FactoryVstsConfiguration(FactoryRepoConfiguration):
|
|||
**kwargs
|
||||
):
|
||||
super(FactoryVstsConfiguration, self).__init__(account_name=account_name, repository_name=repository_name, collaboration_branch=collaboration_branch, root_folder=root_folder, last_commit_id=last_commit_id, **kwargs)
|
||||
self.type: str = 'FactoryVSTSConfiguration'
|
||||
self.type = 'FactoryVSTSConfiguration' # type: str
|
||||
self.project_name = project_name
|
||||
self.tenant_id = tenant_id
|
||||
|
||||
|
@ -1239,7 +1230,7 @@ class IntegrationRuntime(msrest.serialization.Model):
|
|||
):
|
||||
super(IntegrationRuntime, self).__init__(**kwargs)
|
||||
self.additional_properties = additional_properties
|
||||
self.type: str = 'IntegrationRuntime'
|
||||
self.type = 'IntegrationRuntime' # type: str
|
||||
self.description = description
|
||||
|
||||
|
||||
|
@ -1953,7 +1944,7 @@ class IntegrationRuntimeStatus(msrest.serialization.Model):
|
|||
):
|
||||
super(IntegrationRuntimeStatus, self).__init__(**kwargs)
|
||||
self.additional_properties = additional_properties
|
||||
self.type: str = 'IntegrationRuntimeStatus'
|
||||
self.type = 'IntegrationRuntimeStatus' # type: str
|
||||
self.data_factory_name = None
|
||||
self.state = None
|
||||
|
||||
|
@ -2139,7 +2130,7 @@ class LinkedIntegrationRuntimeType(msrest.serialization.Model):
|
|||
**kwargs
|
||||
):
|
||||
super(LinkedIntegrationRuntimeType, self).__init__(**kwargs)
|
||||
self.authorization_type: Optional[str] = None
|
||||
self.authorization_type = None # type: Optional[str]
|
||||
|
||||
|
||||
class LinkedIntegrationRuntimeKeyAuthorization(LinkedIntegrationRuntimeType):
|
||||
|
@ -2171,7 +2162,7 @@ class LinkedIntegrationRuntimeKeyAuthorization(LinkedIntegrationRuntimeType):
|
|||
**kwargs
|
||||
):
|
||||
super(LinkedIntegrationRuntimeKeyAuthorization, self).__init__(**kwargs)
|
||||
self.authorization_type: str = 'Key'
|
||||
self.authorization_type = 'Key' # type: str
|
||||
self.key = key
|
||||
|
||||
|
||||
|
@ -2204,7 +2195,7 @@ class LinkedIntegrationRuntimeRbacAuthorization(LinkedIntegrationRuntimeType):
|
|||
**kwargs
|
||||
):
|
||||
super(LinkedIntegrationRuntimeRbacAuthorization, self).__init__(**kwargs)
|
||||
self.authorization_type: str = 'RBAC'
|
||||
self.authorization_type = 'RBAC' # type: str
|
||||
self.resource_id = resource_id
|
||||
|
||||
|
||||
|
@ -2336,7 +2327,7 @@ class ManagedIntegrationRuntime(IntegrationRuntime):
|
|||
**kwargs
|
||||
):
|
||||
super(ManagedIntegrationRuntime, self).__init__(additional_properties=additional_properties, description=description, **kwargs)
|
||||
self.type: str = 'Managed'
|
||||
self.type = 'Managed' # type: str
|
||||
self.state = None
|
||||
self.repo_configuration = repo_configuration
|
||||
self.fake_identity = fake_identity
|
||||
|
@ -2550,7 +2541,7 @@ class ManagedIntegrationRuntimeStatus(IntegrationRuntimeStatus):
|
|||
**kwargs
|
||||
):
|
||||
super(ManagedIntegrationRuntimeStatus, self).__init__(additional_properties=additional_properties, **kwargs)
|
||||
self.type: str = 'Managed'
|
||||
self.type = 'Managed' # type: str
|
||||
self.create_time = None
|
||||
self.nodes = None
|
||||
self.other_errors = None
|
||||
|
@ -2776,7 +2767,7 @@ class RerunTumblingWindowTrigger(Trigger):
|
|||
**kwargs
|
||||
):
|
||||
super(RerunTumblingWindowTrigger, self).__init__(additional_properties=additional_properties, description=description, annotations=annotations, **kwargs)
|
||||
self.type: str = 'RerunTumblingWindowTrigger'
|
||||
self.type = 'RerunTumblingWindowTrigger' # type: str
|
||||
self.parent_trigger = parent_trigger
|
||||
self.requested_start_time = requested_start_time
|
||||
self.requested_end_time = requested_end_time
|
||||
|
@ -2866,7 +2857,7 @@ class ScheduleTrigger(MultiplePipelineTrigger):
|
|||
**kwargs
|
||||
):
|
||||
super(ScheduleTrigger, self).__init__(additional_properties=additional_properties, description=description, annotations=annotations, pipelines=pipelines, **kwargs)
|
||||
self.type: str = 'ScheduleTrigger'
|
||||
self.type = 'ScheduleTrigger' # type: str
|
||||
self.recurrence = recurrence
|
||||
|
||||
|
||||
|
@ -2952,7 +2943,7 @@ class SecretBase(msrest.serialization.Model):
|
|||
**kwargs
|
||||
):
|
||||
super(SecretBase, self).__init__(**kwargs)
|
||||
self.type: Optional[str] = None
|
||||
self.type = None # type: Optional[str]
|
||||
|
||||
|
||||
class SecureString(SecretBase):
|
||||
|
@ -2983,7 +2974,7 @@ class SecureString(SecretBase):
|
|||
**kwargs
|
||||
):
|
||||
super(SecureString, self).__init__(**kwargs)
|
||||
self.type: str = 'SecureString'
|
||||
self.type = 'SecureString' # type: str
|
||||
self.value = value
|
||||
|
||||
|
||||
|
@ -3022,7 +3013,7 @@ class SelfDependencyTumblingWindowTriggerReference(DependencyReference):
|
|||
**kwargs
|
||||
):
|
||||
super(SelfDependencyTumblingWindowTriggerReference, self).__init__(**kwargs)
|
||||
self.type: str = 'SelfDependencyTumblingWindowTriggerReference'
|
||||
self.type = 'SelfDependencyTumblingWindowTriggerReference' # type: str
|
||||
self.offset = offset
|
||||
self.size = size
|
||||
|
||||
|
@ -3064,7 +3055,7 @@ class SelfHostedIntegrationRuntime(IntegrationRuntime):
|
|||
**kwargs
|
||||
):
|
||||
super(SelfHostedIntegrationRuntime, self).__init__(additional_properties=additional_properties, description=description, **kwargs)
|
||||
self.type: str = 'SelfHosted'
|
||||
self.type = 'SelfHosted' # type: str
|
||||
self.linked_info = linked_info
|
||||
|
||||
|
||||
|
@ -3305,7 +3296,7 @@ class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus):
|
|||
**kwargs
|
||||
):
|
||||
super(SelfHostedIntegrationRuntimeStatus, self).__init__(additional_properties=additional_properties, **kwargs)
|
||||
self.type: str = 'SelfHosted'
|
||||
self.type = 'SelfHosted' # type: str
|
||||
self.create_time = None
|
||||
self.task_queue_id = None
|
||||
self.internal_channel_encryption = None
|
||||
|
@ -3367,7 +3358,7 @@ class SsisObjectMetadata(msrest.serialization.Model):
|
|||
**kwargs
|
||||
):
|
||||
super(SsisObjectMetadata, self).__init__(**kwargs)
|
||||
self.type: Optional[str] = None
|
||||
self.type = None # type: Optional[str]
|
||||
self.id = id
|
||||
self.name = name
|
||||
self.description = description
|
||||
|
@ -3417,7 +3408,7 @@ class SsisEnvironment(SsisObjectMetadata):
|
|||
**kwargs
|
||||
):
|
||||
super(SsisEnvironment, self).__init__(id=id, name=name, description=description, **kwargs)
|
||||
self.type: str = 'Environment'
|
||||
self.type = 'Environment' # type: str
|
||||
self.folder_id = folder_id
|
||||
self.variables = variables
|
||||
|
||||
|
@ -3494,7 +3485,7 @@ class SsisFolder(SsisObjectMetadata):
|
|||
**kwargs
|
||||
):
|
||||
super(SsisFolder, self).__init__(id=id, name=name, description=description, **kwargs)
|
||||
self.type: str = 'Folder'
|
||||
self.type = 'Folder' # type: str
|
||||
|
||||
|
||||
class SsisObjectMetadataListResponse(msrest.serialization.Model):
|
||||
|
@ -3575,7 +3566,7 @@ class SsisPackage(SsisObjectMetadata):
|
|||
**kwargs
|
||||
):
|
||||
super(SsisPackage, self).__init__(id=id, name=name, description=description, **kwargs)
|
||||
self.type: str = 'Package'
|
||||
self.type = 'Package' # type: str
|
||||
self.folder_id = folder_id
|
||||
self.project_version = project_version
|
||||
self.project_id = project_id
|
||||
|
@ -3710,7 +3701,7 @@ class SsisProject(SsisObjectMetadata):
|
|||
**kwargs
|
||||
):
|
||||
super(SsisProject, self).__init__(id=id, name=name, description=description, **kwargs)
|
||||
self.type: str = 'Project'
|
||||
self.type = 'Project' # type: str
|
||||
self.folder_id = folder_id
|
||||
self.version = version
|
||||
self.environment_refs = environment_refs
|
||||
|
@ -3803,7 +3794,7 @@ class TriggerDependencyReference(DependencyReference):
|
|||
**kwargs
|
||||
):
|
||||
super(TriggerDependencyReference, self).__init__(**kwargs)
|
||||
self.type: str = 'TriggerDependencyReference'
|
||||
self.type = 'TriggerDependencyReference' # type: str
|
||||
self.reference_trigger = reference_trigger
|
||||
|
||||
|
||||
|
@ -4130,7 +4121,7 @@ class TumblingWindowTrigger(Trigger):
|
|||
**kwargs
|
||||
):
|
||||
super(TumblingWindowTrigger, self).__init__(additional_properties=additional_properties, description=description, annotations=annotations, **kwargs)
|
||||
self.type: str = 'TumblingWindowTrigger'
|
||||
self.type = 'TumblingWindowTrigger' # type: str
|
||||
self.pipeline = pipeline
|
||||
self.frequency = frequency
|
||||
self.interval = interval
|
||||
|
@ -4182,7 +4173,7 @@ class TumblingWindowTriggerDependencyReference(TriggerDependencyReference):
|
|||
**kwargs
|
||||
):
|
||||
super(TumblingWindowTriggerDependencyReference, self).__init__(reference_trigger=reference_trigger, **kwargs)
|
||||
self.type: str = 'TumblingWindowTriggerDependencyReference'
|
||||
self.type = 'TumblingWindowTriggerDependencyReference' # type: str
|
||||
self.offset = offset
|
||||
self.size = size
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ from .. import models
|
|||
|
||||
if TYPE_CHECKING:
|
||||
# pylint: disable=unused-import,ungrouped-imports
|
||||
from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar
|
||||
from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union
|
||||
|
||||
T = TypeVar('T')
|
||||
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
|
||||
|
@ -63,6 +63,10 @@ class FactoryOperations(object):
|
|||
api_version = "2018-06-01"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list.metadata['url'] # type: ignore
|
||||
|
@ -74,15 +78,11 @@ class FactoryOperations(object):
|
|||
query_parameters = {} # type: Dict[str, Any]
|
||||
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
def extract_data(pipeline_response):
|
||||
|
@ -155,7 +155,6 @@ class FactoryOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_factory_repo_update, 'FactoryRepoUpdate')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -197,6 +196,10 @@ class FactoryOperations(object):
|
|||
api_version = "2018-06-01"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list_by_resource_group.metadata['url'] # type: ignore
|
||||
|
@ -209,15 +212,11 @@ class FactoryOperations(object):
|
|||
query_parameters = {} # type: Dict[str, Any]
|
||||
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
def extract_data(pipeline_response):
|
||||
|
@ -251,10 +250,10 @@ class FactoryOperations(object):
|
|||
if_match=None, # type: Optional[str]
|
||||
location=None, # type: Optional[str]
|
||||
tags=None, # type: Optional[Dict[str, str]]
|
||||
identity=None, # type: Optional["models.FactoryIdentity"]
|
||||
repo_configuration=None, # type: Optional["models.FactoryRepoConfiguration"]
|
||||
fake_identity=None, # type: Optional["models.FakeFactoryIdentity"]
|
||||
zones=None, # type: Optional[List[str]]
|
||||
type=None, # type: Optional[Union[str, "models.FactoryIdentityType"]]
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> "models.Factory"
|
||||
|
@ -271,14 +270,14 @@ class FactoryOperations(object):
|
|||
:type location: str
|
||||
:param tags: The resource tags.
|
||||
:type tags: dict[str, str]
|
||||
:param identity: Managed service identity of the factory.
|
||||
:type identity: ~dfaz_management_client.models.FactoryIdentity
|
||||
:param repo_configuration: Git repo information of the factory.
|
||||
:type repo_configuration: ~dfaz_management_client.models.FactoryRepoConfiguration
|
||||
:param fake_identity: This is only for az test.
|
||||
:type fake_identity: ~dfaz_management_client.models.FakeFactoryIdentity
|
||||
:param zones: This is only for az test.
|
||||
:type zones: list[str]
|
||||
:param type: The identity type. Currently the only supported type is 'SystemAssigned'.
|
||||
:type type: str or ~dfaz_management_client.models.FactoryIdentityType
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:return: Factory, or the result of cls(response)
|
||||
:rtype: ~dfaz_management_client.models.Factory
|
||||
|
@ -288,7 +287,7 @@ class FactoryOperations(object):
|
|||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
|
||||
_factory = models.Factory(location=location, tags=tags, identity=identity, repo_configuration=repo_configuration, fake_identity=fake_identity, zones=zones)
|
||||
_factory = models.Factory(location=location, tags=tags, repo_configuration=repo_configuration, fake_identity=fake_identity, zones=zones, type_identity_type=type)
|
||||
api_version = "2018-06-01"
|
||||
content_type = kwargs.pop("content_type", "application/json")
|
||||
|
||||
|
@ -312,7 +311,6 @@ class FactoryOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_factory, 'Factory')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -337,8 +335,8 @@ class FactoryOperations(object):
|
|||
self,
|
||||
resource_group_name, # type: str
|
||||
factory_name, # type: str
|
||||
type, # type: Union[str, "models.FactoryIdentityType"]
|
||||
tags=None, # type: Optional[Dict[str, str]]
|
||||
identity=None, # type: Optional["models.FactoryIdentity"]
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> "models.Factory"
|
||||
|
@ -348,10 +346,10 @@ class FactoryOperations(object):
|
|||
:type resource_group_name: str
|
||||
:param factory_name: The factory name.
|
||||
:type factory_name: str
|
||||
:param type: The identity type. Currently the only supported type is 'SystemAssigned'.
|
||||
:type type: str or ~dfaz_management_client.models.FactoryIdentityType
|
||||
:param tags: The resource tags.
|
||||
:type tags: dict[str, str]
|
||||
:param identity: Managed service identity of the factory.
|
||||
:type identity: ~dfaz_management_client.models.FactoryIdentity
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:return: Factory, or the result of cls(response)
|
||||
:rtype: ~dfaz_management_client.models.Factory
|
||||
|
@ -361,7 +359,7 @@ class FactoryOperations(object):
|
|||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
|
||||
_factory_update_parameters = models.FactoryUpdateParameters(tags=tags, identity=identity)
|
||||
_factory_update_parameters = models.FactoryUpdateParameters(tags=tags, type=type)
|
||||
api_version = "2018-06-01"
|
||||
content_type = kwargs.pop("content_type", "application/json")
|
||||
|
||||
|
@ -383,7 +381,6 @@ class FactoryOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_factory_update_parameters, 'FactoryUpdateParameters')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -411,7 +408,7 @@ class FactoryOperations(object):
|
|||
if_none_match=None, # type: Optional[str]
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> "models.Factory"
|
||||
# type: (...) -> Optional["models.Factory"]
|
||||
"""Gets a factory.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -426,7 +423,7 @@ class FactoryOperations(object):
|
|||
:rtype: ~dfaz_management_client.models.Factory or None
|
||||
:raises: ~azure.core.exceptions.HttpResponseError
|
||||
"""
|
||||
cls = kwargs.pop('cls', None) # type: ClsType["models.Factory"]
|
||||
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Factory"]]
|
||||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
api_version = "2018-06-01"
|
||||
|
@ -450,7 +447,6 @@ class FactoryOperations(object):
|
|||
header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -508,7 +504,6 @@ class FactoryOperations(object):
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.delete(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -575,7 +570,6 @@ class FactoryOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_git_hub_access_token_request, 'GitHubAccessTokenRequest')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -659,7 +653,6 @@ class FactoryOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_policy, 'UserAccessPolicy')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
|
|
@ -71,6 +71,10 @@ class IntegrationRuntimeOperations(object):
|
|||
api_version = "2018-06-01"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list_by_factory.metadata['url'] # type: ignore
|
||||
|
@ -84,15 +88,11 @@ class IntegrationRuntimeOperations(object):
|
|||
query_parameters = {} # type: Dict[str, Any]
|
||||
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
def extract_data(pipeline_response):
|
||||
|
@ -176,7 +176,6 @@ class IntegrationRuntimeOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_integration_runtime, 'IntegrationRuntimeResource')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -205,7 +204,7 @@ class IntegrationRuntimeOperations(object):
|
|||
if_none_match=None, # type: Optional[str]
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> "models.IntegrationRuntimeResource"
|
||||
# type: (...) -> Optional["models.IntegrationRuntimeResource"]
|
||||
"""Gets an integration runtime.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -223,7 +222,7 @@ class IntegrationRuntimeOperations(object):
|
|||
:rtype: ~dfaz_management_client.models.IntegrationRuntimeResource or None
|
||||
:raises: ~azure.core.exceptions.HttpResponseError
|
||||
"""
|
||||
cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationRuntimeResource"]
|
||||
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.IntegrationRuntimeResource"]]
|
||||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
api_version = "2018-06-01"
|
||||
|
@ -248,7 +247,6 @@ class IntegrationRuntimeOperations(object):
|
|||
header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -323,7 +321,6 @@ class IntegrationRuntimeOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_update_integration_runtime_request, 'UpdateIntegrationRuntimeRequest')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -387,7 +384,6 @@ class IntegrationRuntimeOperations(object):
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.delete(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -445,7 +441,6 @@ class IntegrationRuntimeOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -470,7 +465,8 @@ class IntegrationRuntimeOperations(object):
|
|||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> "models.IntegrationRuntimeConnectionInfo"
|
||||
"""Gets the on-premises integration runtime connection information for encrypting the on-premises data source credentials.
|
||||
"""Gets the on-premises integration runtime connection information for encrypting the on-premises
|
||||
data source credentials.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
:type resource_group_name: str
|
||||
|
@ -506,7 +502,6 @@ class IntegrationRuntimeOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -574,7 +569,6 @@ class IntegrationRuntimeOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_regenerate_key_parameters, 'IntegrationRuntimeRegenerateKeyParameters')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -639,7 +633,6 @@ class IntegrationRuntimeOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -663,8 +656,8 @@ class IntegrationRuntimeOperations(object):
|
|||
integration_runtime_name, # type: str
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> "models.IntegrationRuntimeStatusResponse"
|
||||
cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationRuntimeStatusResponse"]
|
||||
# type: (...) -> Optional["models.IntegrationRuntimeStatusResponse"]
|
||||
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.IntegrationRuntimeStatusResponse"]]
|
||||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
api_version = "2018-06-01"
|
||||
|
@ -687,7 +680,6 @@ class IntegrationRuntimeOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -713,7 +705,7 @@ class IntegrationRuntimeOperations(object):
|
|||
integration_runtime_name, # type: str
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> LROPoller
|
||||
# type: (...) -> LROPoller["models.IntegrationRuntimeStatusResponse"]
|
||||
"""Starts a ManagedReserved type integration runtime.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -723,6 +715,7 @@ class IntegrationRuntimeOperations(object):
|
|||
:param integration_runtime_name: The integration runtime name.
|
||||
:type integration_runtime_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.PollingMethod
|
||||
|
@ -737,13 +730,15 @@ class IntegrationRuntimeOperations(object):
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = self._start_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
integration_runtime_name=integration_runtime_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = self._start_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
integration_runtime_name=integration_runtime_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -758,7 +753,15 @@ class IntegrationRuntimeOperations(object):
|
|||
if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
|
||||
elif polling is False: polling_method = NoPolling()
|
||||
else: polling_method = polling
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
if cont_token:
|
||||
return LROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/start'} # type: ignore
|
||||
|
||||
def _stop_initial(
|
||||
|
@ -791,7 +794,6 @@ class IntegrationRuntimeOperations(object):
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -812,7 +814,7 @@ class IntegrationRuntimeOperations(object):
|
|||
integration_runtime_name, # type: str
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> LROPoller
|
||||
# type: (...) -> LROPoller[None]
|
||||
"""Stops a ManagedReserved type integration runtime.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -822,6 +824,7 @@ class IntegrationRuntimeOperations(object):
|
|||
:param integration_runtime_name: The integration runtime name.
|
||||
:type integration_runtime_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.PollingMethod
|
||||
|
@ -836,13 +839,15 @@ class IntegrationRuntimeOperations(object):
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = self._stop_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
integration_runtime_name=integration_runtime_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = self._stop_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
integration_runtime_name=integration_runtime_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -854,7 +859,15 @@ class IntegrationRuntimeOperations(object):
|
|||
if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
|
||||
elif polling is False: polling_method = NoPolling()
|
||||
else: polling_method = polling
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
if cont_token:
|
||||
return LROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/stop'} # type: ignore
|
||||
|
||||
def sync_credentials(
|
||||
|
@ -865,7 +878,10 @@ class IntegrationRuntimeOperations(object):
|
|||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> None
|
||||
"""Force the integration runtime to synchronize credentials across integration runtime nodes, and this will override the credentials across all worker nodes with those available on the dispatcher node. If you already have the latest credential backup file, you should manually import it (preferred) on any self-hosted integration runtime node than using this API directly.
|
||||
"""Force the integration runtime to synchronize credentials across integration runtime nodes, and
|
||||
this will override the credentials across all worker nodes with those available on the
|
||||
dispatcher node. If you already have the latest credential backup file, you should manually
|
||||
import it (preferred) on any self-hosted integration runtime node than using this API directly.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
:type resource_group_name: str
|
||||
|
@ -900,7 +916,6 @@ class IntegrationRuntimeOperations(object):
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -922,7 +937,8 @@ class IntegrationRuntimeOperations(object):
|
|||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> "models.IntegrationRuntimeMonitoringData"
|
||||
"""Get the integration runtime monitoring data, which includes the monitor data for all the nodes under this integration runtime.
|
||||
"""Get the integration runtime monitoring data, which includes the monitor data for all the nodes
|
||||
under this integration runtime.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
:type resource_group_name: str
|
||||
|
@ -958,7 +974,6 @@ class IntegrationRuntimeOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -1018,7 +1033,6 @@ class IntegrationRuntimeOperations(object):
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -1041,7 +1055,8 @@ class IntegrationRuntimeOperations(object):
|
|||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> None
|
||||
"""Remove all linked integration runtimes under specific data factory in a self-hosted integration runtime.
|
||||
"""Remove all linked integration runtimes under specific data factory in a self-hosted integration
|
||||
runtime.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
:type resource_group_name: str
|
||||
|
@ -1082,7 +1097,6 @@ class IntegrationRuntimeOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_linked_integration_runtime_request, 'LinkedIntegrationRuntimeRequest')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -1163,7 +1177,6 @@ class IntegrationRuntimeOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_create_linked_integration_runtime_request, 'CreateLinkedIntegrationRuntimeRequest')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
|
|
@ -71,6 +71,10 @@ class TriggerOperations(object):
|
|||
api_version = "2018-06-01"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list_by_factory.metadata['url'] # type: ignore
|
||||
|
@ -84,15 +88,11 @@ class TriggerOperations(object):
|
|||
query_parameters = {} # type: Dict[str, Any]
|
||||
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
def extract_data(pipeline_response):
|
||||
|
@ -123,7 +123,7 @@ class TriggerOperations(object):
|
|||
self,
|
||||
resource_group_name, # type: str
|
||||
factory_name, # type: str
|
||||
continuation_token=None, # type: Optional[str]
|
||||
continuation_token_parameter=None, # type: Optional[str]
|
||||
parent_trigger_name=None, # type: Optional[str]
|
||||
**kwargs # type: Any
|
||||
):
|
||||
|
@ -134,9 +134,9 @@ class TriggerOperations(object):
|
|||
:type resource_group_name: str
|
||||
:param factory_name: The factory name.
|
||||
:type factory_name: str
|
||||
:param continuation_token: The continuation token for getting the next page of results. Null
|
||||
for first page.
|
||||
:type continuation_token: str
|
||||
:param continuation_token_parameter: The continuation token for getting the next page of
|
||||
results. Null for first page.
|
||||
:type continuation_token_parameter: str
|
||||
:param parent_trigger_name: The name of the parent TumblingWindowTrigger to get the child rerun
|
||||
triggers.
|
||||
:type parent_trigger_name: str
|
||||
|
@ -149,7 +149,7 @@ class TriggerOperations(object):
|
|||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
|
||||
_filter_parameters = models.TriggerFilterParameters(continuation_token=continuation_token, parent_trigger_name=parent_trigger_name)
|
||||
_filter_parameters = models.TriggerFilterParameters(continuation_token=continuation_token_parameter, parent_trigger_name=parent_trigger_name)
|
||||
api_version = "2018-06-01"
|
||||
content_type = kwargs.pop("content_type", "application/json")
|
||||
|
||||
|
@ -171,7 +171,6 @@ class TriggerOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_filter_parameters, 'TriggerFilterParameters')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -249,7 +248,6 @@ class TriggerOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_trigger, 'TriggerResource')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -278,7 +276,7 @@ class TriggerOperations(object):
|
|||
if_none_match=None, # type: Optional[str]
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> "models.TriggerResource"
|
||||
# type: (...) -> Optional["models.TriggerResource"]
|
||||
"""Gets a trigger.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -295,7 +293,7 @@ class TriggerOperations(object):
|
|||
:rtype: ~dfaz_management_client.models.TriggerResource or None
|
||||
:raises: ~azure.core.exceptions.HttpResponseError
|
||||
"""
|
||||
cls = kwargs.pop('cls', None) # type: ClsType["models.TriggerResource"]
|
||||
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.TriggerResource"]]
|
||||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
api_version = "2018-06-01"
|
||||
|
@ -320,7 +318,6 @@ class TriggerOperations(object):
|
|||
header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -382,7 +379,6 @@ class TriggerOperations(object):
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.delete(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -403,8 +399,8 @@ class TriggerOperations(object):
|
|||
trigger_name, # type: str
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> "models.TriggerSubscriptionOperationStatus"
|
||||
cls = kwargs.pop('cls', None) # type: ClsType["models.TriggerSubscriptionOperationStatus"]
|
||||
# type: (...) -> Optional["models.TriggerSubscriptionOperationStatus"]
|
||||
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.TriggerSubscriptionOperationStatus"]]
|
||||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
api_version = "2018-06-01"
|
||||
|
@ -427,7 +423,6 @@ class TriggerOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -453,7 +448,7 @@ class TriggerOperations(object):
|
|||
trigger_name, # type: str
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> LROPoller
|
||||
# type: (...) -> LROPoller["models.TriggerSubscriptionOperationStatus"]
|
||||
"""Subscribe event trigger to events.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -463,6 +458,7 @@ class TriggerOperations(object):
|
|||
:param trigger_name: The trigger name.
|
||||
:type trigger_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.PollingMethod
|
||||
|
@ -477,13 +473,15 @@ class TriggerOperations(object):
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = self._subscribe_to_event_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
trigger_name=trigger_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = self._subscribe_to_event_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
trigger_name=trigger_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -498,7 +496,15 @@ class TriggerOperations(object):
|
|||
if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
|
||||
elif polling is False: polling_method = NoPolling()
|
||||
else: polling_method = polling
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
if cont_token:
|
||||
return LROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_subscribe_to_event.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/subscribeToEvents'} # type: ignore
|
||||
|
||||
def get_event_subscription_status(
|
||||
|
@ -545,7 +551,6 @@ class TriggerOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -569,8 +574,8 @@ class TriggerOperations(object):
|
|||
trigger_name, # type: str
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> "models.TriggerSubscriptionOperationStatus"
|
||||
cls = kwargs.pop('cls', None) # type: ClsType["models.TriggerSubscriptionOperationStatus"]
|
||||
# type: (...) -> Optional["models.TriggerSubscriptionOperationStatus"]
|
||||
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.TriggerSubscriptionOperationStatus"]]
|
||||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
api_version = "2018-06-01"
|
||||
|
@ -593,7 +598,6 @@ class TriggerOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -619,7 +623,7 @@ class TriggerOperations(object):
|
|||
trigger_name, # type: str
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> LROPoller
|
||||
# type: (...) -> LROPoller["models.TriggerSubscriptionOperationStatus"]
|
||||
"""Unsubscribe event trigger from events.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -629,6 +633,7 @@ class TriggerOperations(object):
|
|||
:param trigger_name: The trigger name.
|
||||
:type trigger_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.PollingMethod
|
||||
|
@ -643,13 +648,15 @@ class TriggerOperations(object):
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = self._unsubscribe_from_event_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
trigger_name=trigger_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = self._unsubscribe_from_event_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
trigger_name=trigger_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -664,7 +671,15 @@ class TriggerOperations(object):
|
|||
if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
|
||||
elif polling is False: polling_method = NoPolling()
|
||||
else: polling_method = polling
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
if cont_token:
|
||||
return LROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_unsubscribe_from_event.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/unsubscribeFromEvents'} # type: ignore
|
||||
|
||||
def _start_initial(
|
||||
|
@ -697,7 +712,6 @@ class TriggerOperations(object):
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -718,7 +732,7 @@ class TriggerOperations(object):
|
|||
trigger_name, # type: str
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> LROPoller
|
||||
# type: (...) -> LROPoller[None]
|
||||
"""Starts a trigger.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -728,6 +742,7 @@ class TriggerOperations(object):
|
|||
:param trigger_name: The trigger name.
|
||||
:type trigger_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.PollingMethod
|
||||
|
@ -742,13 +757,15 @@ class TriggerOperations(object):
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = self._start_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
trigger_name=trigger_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = self._start_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
trigger_name=trigger_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -760,7 +777,15 @@ class TriggerOperations(object):
|
|||
if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
|
||||
elif polling is False: polling_method = NoPolling()
|
||||
else: polling_method = polling
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
if cont_token:
|
||||
return LROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/start'} # type: ignore
|
||||
|
||||
def _stop_initial(
|
||||
|
@ -793,7 +818,6 @@ class TriggerOperations(object):
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -814,7 +838,7 @@ class TriggerOperations(object):
|
|||
trigger_name, # type: str
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> LROPoller
|
||||
# type: (...) -> LROPoller[None]
|
||||
"""Stops a trigger.
|
||||
|
||||
:param resource_group_name: The resource group name.
|
||||
|
@ -824,6 +848,7 @@ class TriggerOperations(object):
|
|||
:param trigger_name: The trigger name.
|
||||
:type trigger_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.PollingMethod
|
||||
|
@ -838,13 +863,15 @@ class TriggerOperations(object):
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = self._stop_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
trigger_name=trigger_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = self._stop_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
factory_name=factory_name,
|
||||
trigger_name=trigger_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -856,5 +883,13 @@ class TriggerOperations(object):
|
|||
if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
|
||||
elif polling is False: polling_method = NoPolling()
|
||||
else: polling_method = polling
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
if cont_token:
|
||||
return LROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/stop'} # type: ignore
|
||||
|
|
|
@ -138,6 +138,7 @@ def managed_network_mn_group_create(client,
|
|||
managed_network_name=managed_network_name,
|
||||
managed_network_group_name=group_name,
|
||||
location=location,
|
||||
kind="Connectivity",
|
||||
management_groups=management_groups,
|
||||
subscriptions=subscriptions,
|
||||
virtual_networks=virtual_networks,
|
||||
|
@ -160,6 +161,7 @@ def managed_network_mn_group_update(client,
|
|||
managed_network_name=managed_network_name,
|
||||
managed_network_group_name=group_name,
|
||||
location=location,
|
||||
kind="Connectivity",
|
||||
management_groups=management_groups,
|
||||
subscriptions=subscriptions,
|
||||
virtual_networks=virtual_networks,
|
||||
|
|
|
@ -10,7 +10,7 @@ from ._managed_network_management_client import ManagedNetworkManagementClient
|
|||
__all__ = ['ManagedNetworkManagementClient']
|
||||
|
||||
try:
|
||||
from ._patch import patch_sdk
|
||||
from ._patch import patch_sdk # type: ignore
|
||||
patch_sdk()
|
||||
except ImportError:
|
||||
pass
|
||||
|
|
|
@ -10,6 +10,7 @@ from typing import TYPE_CHECKING
|
|||
|
||||
from azure.core.configuration import Configuration
|
||||
from azure.core.pipeline import policies
|
||||
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# pylint: disable=unused-import,ungrouped-imports
|
||||
|
@ -61,6 +62,7 @@ class ManagedNetworkManagementClientConfiguration(Configuration):
|
|||
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
|
||||
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
|
||||
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
|
||||
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
|
||||
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
|
||||
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
|
||||
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
|
||||
|
|
|
@ -10,6 +10,7 @@ from typing import Any, TYPE_CHECKING
|
|||
|
||||
from azure.core.configuration import Configuration
|
||||
from azure.core.pipeline import policies
|
||||
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# pylint: disable=unused-import,ungrouped-imports
|
||||
|
@ -57,6 +58,7 @@ class ManagedNetworkManagementClientConfiguration(Configuration):
|
|||
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
|
||||
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
|
||||
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
|
||||
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
|
||||
self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs)
|
||||
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
|
||||
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
|
||||
|
|
|
@ -12,7 +12,7 @@ from azure.core.async_paging import AsyncItemPaged, AsyncList
|
|||
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
|
||||
from azure.core.pipeline import PipelineResponse
|
||||
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
|
||||
from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller
|
||||
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
|
||||
from azure.mgmt.core.exceptions import ARMErrorFormat
|
||||
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
|
||||
|
||||
|
@ -50,7 +50,8 @@ class ManagedNetworkGroupOperations:
|
|||
managed_network_group_name: str,
|
||||
**kwargs
|
||||
) -> "models.ManagedNetworkGroup":
|
||||
"""The Get ManagedNetworkGroups operation gets a Managed Network Group specified by the resource group, Managed Network name, and group name.
|
||||
"""The Get ManagedNetworkGroups operation gets a Managed Network Group specified by the resource
|
||||
group, Managed Network name, and group name.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -86,7 +87,6 @@ class ManagedNetworkGroupOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -110,6 +110,7 @@ class ManagedNetworkGroupOperations:
|
|||
managed_network_name: str,
|
||||
managed_network_group_name: str,
|
||||
location: Optional[str] = None,
|
||||
kind: Optional[Union[str, "models.Kind"]] = None,
|
||||
management_groups: Optional[List["models.ResourceId"]] = None,
|
||||
subscriptions: Optional[List["models.ResourceId"]] = None,
|
||||
virtual_networks: Optional[List["models.ResourceId"]] = None,
|
||||
|
@ -120,7 +121,7 @@ class ManagedNetworkGroupOperations:
|
|||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
|
||||
_managed_network_group = models.ManagedNetworkGroup(location=location, management_groups=management_groups, subscriptions=subscriptions, virtual_networks=virtual_networks, subnets=subnets)
|
||||
_managed_network_group = models.ManagedNetworkGroup(location=location, kind=kind, management_groups=management_groups, subscriptions=subscriptions, virtual_networks=virtual_networks, subnets=subnets)
|
||||
api_version = "2019-06-01-preview"
|
||||
content_type = kwargs.pop("content_type", "application/json")
|
||||
|
||||
|
@ -143,7 +144,6 @@ class ManagedNetworkGroupOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_managed_network_group, 'ManagedNetworkGroup')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -157,7 +157,6 @@ class ManagedNetworkGroupOperations:
|
|||
error = self._deserialize(models.ErrorResponse, response)
|
||||
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
|
||||
|
||||
deserialized = None
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('ManagedNetworkGroup', pipeline_response)
|
||||
|
||||
|
@ -170,18 +169,19 @@ class ManagedNetworkGroupOperations:
|
|||
return deserialized
|
||||
_create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkGroups/{managedNetworkGroupName}'} # type: ignore
|
||||
|
||||
async def create_or_update(
|
||||
async def begin_create_or_update(
|
||||
self,
|
||||
resource_group_name: str,
|
||||
managed_network_name: str,
|
||||
managed_network_group_name: str,
|
||||
location: Optional[str] = None,
|
||||
kind: Optional[Union[str, "models.Kind"]] = None,
|
||||
management_groups: Optional[List["models.ResourceId"]] = None,
|
||||
subscriptions: Optional[List["models.ResourceId"]] = None,
|
||||
virtual_networks: Optional[List["models.ResourceId"]] = None,
|
||||
subnets: Optional[List["models.ResourceId"]] = None,
|
||||
**kwargs
|
||||
) -> "models.ManagedNetworkGroup":
|
||||
) -> AsyncLROPoller["models.ManagedNetworkGroup"]:
|
||||
"""The Put ManagedNetworkGroups operation creates or updates a Managed Network Group resource.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
|
@ -192,6 +192,8 @@ class ManagedNetworkGroupOperations:
|
|||
:type managed_network_group_name: str
|
||||
:param location: The geo-location where the resource lives.
|
||||
:type location: str
|
||||
:param kind: Responsibility role under which this Managed Network Group will be created.
|
||||
:type kind: str or ~managed_network_management_client.models.Kind
|
||||
:param management_groups: The collection of management groups covered by the Managed Network.
|
||||
:type management_groups: list[~managed_network_management_client.models.ResourceId]
|
||||
:param subscriptions: The collection of subscriptions covered by the Managed Network.
|
||||
|
@ -201,12 +203,13 @@ class ManagedNetworkGroupOperations:
|
|||
:param subnets: The collection of subnets covered by the Managed Network.
|
||||
:type subnets: list[~managed_network_management_client.models.ResourceId]
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
|
||||
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
|
||||
:return: ManagedNetworkGroup, or the result of cls(response)
|
||||
:rtype: ~managed_network_management_client.models.ManagedNetworkGroup
|
||||
:return: An instance of AsyncLROPoller that returns either ManagedNetworkGroup or the result of cls(response)
|
||||
:rtype: ~azure.core.polling.AsyncLROPoller[~managed_network_management_client.models.ManagedNetworkGroup]
|
||||
:raises ~azure.core.exceptions.HttpResponseError:
|
||||
"""
|
||||
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
|
||||
|
@ -215,18 +218,21 @@ class ManagedNetworkGroupOperations:
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = await self._create_or_update_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
managed_network_group_name=managed_network_group_name,
|
||||
location=location,
|
||||
management_groups=management_groups,
|
||||
subscriptions=subscriptions,
|
||||
virtual_networks=virtual_networks,
|
||||
subnets=subnets,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = await self._create_or_update_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
managed_network_group_name=managed_network_group_name,
|
||||
location=location,
|
||||
kind=kind,
|
||||
management_groups=management_groups,
|
||||
subscriptions=subscriptions,
|
||||
virtual_networks=virtual_networks,
|
||||
subnets=subnets,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -241,8 +247,16 @@ class ManagedNetworkGroupOperations:
|
|||
if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs)
|
||||
elif polling is False: polling_method = AsyncNoPolling()
|
||||
else: polling_method = polling
|
||||
return await async_poller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkGroups/{managedNetworkGroupName}'} # type: ignore
|
||||
if cont_token:
|
||||
return AsyncLROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkGroups/{managedNetworkGroupName}'} # type: ignore
|
||||
|
||||
async def _delete_initial(
|
||||
self,
|
||||
|
@ -273,7 +287,6 @@ class ManagedNetworkGroupOperations:
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.delete(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -288,14 +301,15 @@ class ManagedNetworkGroupOperations:
|
|||
|
||||
_delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkGroups/{managedNetworkGroupName}'} # type: ignore
|
||||
|
||||
async def delete(
|
||||
async def begin_delete(
|
||||
self,
|
||||
resource_group_name: str,
|
||||
managed_network_name: str,
|
||||
managed_network_group_name: str,
|
||||
**kwargs
|
||||
) -> None:
|
||||
"""The Delete ManagedNetworkGroups operation deletes a Managed Network Group specified by the resource group, Managed Network name, and group name.
|
||||
) -> AsyncLROPoller[None]:
|
||||
"""The Delete ManagedNetworkGroups operation deletes a Managed Network Group specified by the
|
||||
resource group, Managed Network name, and group name.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -304,12 +318,13 @@ class ManagedNetworkGroupOperations:
|
|||
:param managed_network_group_name: The name of the Managed Network Group.
|
||||
:type managed_network_group_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
|
||||
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
|
||||
:return: None, or the result of cls(response)
|
||||
:rtype: None
|
||||
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
|
||||
:rtype: ~azure.core.polling.AsyncLROPoller[None]
|
||||
:raises ~azure.core.exceptions.HttpResponseError:
|
||||
"""
|
||||
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
|
||||
|
@ -318,13 +333,15 @@ class ManagedNetworkGroupOperations:
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = await self._delete_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
managed_network_group_name=managed_network_group_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = await self._delete_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
managed_network_group_name=managed_network_group_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -336,8 +353,16 @@ class ManagedNetworkGroupOperations:
|
|||
if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs)
|
||||
elif polling is False: polling_method = AsyncNoPolling()
|
||||
else: polling_method = polling
|
||||
return await async_poller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkGroups/{managedNetworkGroupName}'} # type: ignore
|
||||
if cont_token:
|
||||
return AsyncLROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkGroups/{managedNetworkGroupName}'} # type: ignore
|
||||
|
||||
def list_by_managed_network(
|
||||
self,
|
||||
|
@ -347,7 +372,8 @@ class ManagedNetworkGroupOperations:
|
|||
skiptoken: Optional[str] = None,
|
||||
**kwargs
|
||||
) -> AsyncIterable["models.ManagedNetworkGroupListResult"]:
|
||||
"""The ListByManagedNetwork ManagedNetworkGroup operation retrieves all the Managed Network Groups in a specified Managed Networks in a paginated format.
|
||||
"""The ListByManagedNetwork ManagedNetworkGroup operation retrieves all the Managed Network Groups
|
||||
in a specified Managed Networks in a paginated format.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -356,8 +382,8 @@ class ManagedNetworkGroupOperations:
|
|||
:param top: May be used to limit the number of results in a page for list queries.
|
||||
:type top: int
|
||||
:param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If
|
||||
a previous response contains a nextLink element, the value of the nextLink element will include
|
||||
a skiptoken parameter that specifies a starting point to use for subsequent calls.
|
||||
a previous response contains a nextLink element, the value of the nextLink element will include
|
||||
a skiptoken parameter that specifies a starting point to use for subsequent calls.
|
||||
:type skiptoken: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:return: An iterator like instance of either ManagedNetworkGroupListResult or the result of cls(response)
|
||||
|
@ -370,6 +396,10 @@ class ManagedNetworkGroupOperations:
|
|||
api_version = "2019-06-01-preview"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list_by_managed_network.metadata['url'] # type: ignore
|
||||
|
@ -387,15 +417,11 @@ class ManagedNetworkGroupOperations:
|
|||
if skiptoken is not None:
|
||||
query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
async def extract_data(pipeline_response):
|
||||
|
|
|
@ -12,7 +12,7 @@ from azure.core.async_paging import AsyncItemPaged, AsyncList
|
|||
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
|
||||
from azure.core.pipeline import PipelineResponse
|
||||
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
|
||||
from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller
|
||||
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
|
||||
from azure.mgmt.core.exceptions import ARMErrorFormat
|
||||
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
|
||||
|
||||
|
@ -49,7 +49,8 @@ class ManagedNetworkOperations:
|
|||
managed_network_name: str,
|
||||
**kwargs
|
||||
) -> "models.ManagedNetwork":
|
||||
"""The Get ManagedNetworks operation gets a Managed Network Resource, specified by the resource group and Managed Network name.
|
||||
"""The Get ManagedNetworks operation gets a Managed Network Resource, specified by the resource
|
||||
group and Managed Network name.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -82,7 +83,6 @@ class ManagedNetworkOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -109,7 +109,8 @@ class ManagedNetworkOperations:
|
|||
properties: Optional["models.ManagedNetworkProperties"] = None,
|
||||
**kwargs
|
||||
) -> "models.ManagedNetwork":
|
||||
"""The Put ManagedNetworks operation creates/updates a Managed Network Resource, specified by resource group and Managed Network name.
|
||||
"""The Put ManagedNetworks operation creates/updates a Managed Network Resource, specified by
|
||||
resource group and Managed Network name.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -152,7 +153,6 @@ class ManagedNetworkOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_managed_network, 'ManagedNetwork')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -166,7 +166,6 @@ class ManagedNetworkOperations:
|
|||
error = self._deserialize(models.ErrorResponse, response)
|
||||
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
|
||||
|
||||
deserialized = None
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('ManagedNetwork', pipeline_response)
|
||||
|
||||
|
@ -206,7 +205,6 @@ class ManagedNetworkOperations:
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.delete(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -221,25 +219,27 @@ class ManagedNetworkOperations:
|
|||
|
||||
_delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}'} # type: ignore
|
||||
|
||||
async def delete(
|
||||
async def begin_delete(
|
||||
self,
|
||||
resource_group_name: str,
|
||||
managed_network_name: str,
|
||||
**kwargs
|
||||
) -> None:
|
||||
"""The Delete ManagedNetworks operation deletes a Managed Network Resource, specified by the resource group and Managed Network name.
|
||||
) -> AsyncLROPoller[None]:
|
||||
"""The Delete ManagedNetworks operation deletes a Managed Network Resource, specified by the
|
||||
resource group and Managed Network name.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
:param managed_network_name: The name of the Managed Network.
|
||||
:type managed_network_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
|
||||
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
|
||||
:return: None, or the result of cls(response)
|
||||
:rtype: None
|
||||
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
|
||||
:rtype: ~azure.core.polling.AsyncLROPoller[None]
|
||||
:raises ~azure.core.exceptions.HttpResponseError:
|
||||
"""
|
||||
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
|
||||
|
@ -248,12 +248,14 @@ class ManagedNetworkOperations:
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = await self._delete_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = await self._delete_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -265,8 +267,16 @@ class ManagedNetworkOperations:
|
|||
if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs)
|
||||
elif polling is False: polling_method = AsyncNoPolling()
|
||||
else: polling_method = polling
|
||||
return await async_poller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}'} # type: ignore
|
||||
if cont_token:
|
||||
return AsyncLROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}'} # type: ignore
|
||||
|
||||
async def _update_initial(
|
||||
self,
|
||||
|
@ -301,7 +311,6 @@ class ManagedNetworkOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_parameters, 'ManagedNetworkUpdate')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -315,7 +324,6 @@ class ManagedNetworkOperations:
|
|||
error = self._deserialize(models.ErrorResponse, response)
|
||||
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
|
||||
|
||||
deserialized = None
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('ManagedNetwork', pipeline_response)
|
||||
|
||||
|
@ -328,13 +336,13 @@ class ManagedNetworkOperations:
|
|||
return deserialized
|
||||
_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}'} # type: ignore
|
||||
|
||||
async def update(
|
||||
async def begin_update(
|
||||
self,
|
||||
resource_group_name: str,
|
||||
managed_network_name: str,
|
||||
tags: Optional[Dict[str, str]] = None,
|
||||
**kwargs
|
||||
) -> "models.ManagedNetwork":
|
||||
) -> AsyncLROPoller["models.ManagedNetwork"]:
|
||||
"""Updates the specified Managed Network resource tags.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
|
@ -344,12 +352,13 @@ class ManagedNetworkOperations:
|
|||
:param tags: Resource tags.
|
||||
:type tags: dict[str, str]
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
|
||||
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
|
||||
:return: ManagedNetwork, or the result of cls(response)
|
||||
:rtype: ~managed_network_management_client.models.ManagedNetwork
|
||||
:return: An instance of AsyncLROPoller that returns either ManagedNetwork or the result of cls(response)
|
||||
:rtype: ~azure.core.polling.AsyncLROPoller[~managed_network_management_client.models.ManagedNetwork]
|
||||
:raises ~azure.core.exceptions.HttpResponseError:
|
||||
"""
|
||||
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
|
||||
|
@ -358,13 +367,15 @@ class ManagedNetworkOperations:
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = await self._update_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
tags=tags,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = await self._update_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
tags=tags,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -379,8 +390,16 @@ class ManagedNetworkOperations:
|
|||
if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs)
|
||||
elif polling is False: polling_method = AsyncNoPolling()
|
||||
else: polling_method = polling
|
||||
return await async_poller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}'} # type: ignore
|
||||
if cont_token:
|
||||
return AsyncLROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}'} # type: ignore
|
||||
|
||||
def list_by_resource_group(
|
||||
self,
|
||||
|
@ -389,15 +408,16 @@ class ManagedNetworkOperations:
|
|||
skiptoken: Optional[str] = None,
|
||||
**kwargs
|
||||
) -> AsyncIterable["models.ManagedNetworkListResult"]:
|
||||
"""The ListByResourceGroup ManagedNetwork operation retrieves all the Managed Network resources in a resource group in a paginated format.
|
||||
"""The ListByResourceGroup ManagedNetwork operation retrieves all the Managed Network resources in
|
||||
a resource group in a paginated format.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
:param top: May be used to limit the number of results in a page for list queries.
|
||||
:type top: int
|
||||
:param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If
|
||||
a previous response contains a nextLink element, the value of the nextLink element will include
|
||||
a skiptoken parameter that specifies a starting point to use for subsequent calls.
|
||||
a previous response contains a nextLink element, the value of the nextLink element will include
|
||||
a skiptoken parameter that specifies a starting point to use for subsequent calls.
|
||||
:type skiptoken: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:return: An iterator like instance of either ManagedNetworkListResult or the result of cls(response)
|
||||
|
@ -410,6 +430,10 @@ class ManagedNetworkOperations:
|
|||
api_version = "2019-06-01-preview"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list_by_resource_group.metadata['url'] # type: ignore
|
||||
|
@ -426,15 +450,11 @@ class ManagedNetworkOperations:
|
|||
if skiptoken is not None:
|
||||
query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
async def extract_data(pipeline_response):
|
||||
|
@ -468,13 +488,14 @@ class ManagedNetworkOperations:
|
|||
skiptoken: Optional[str] = None,
|
||||
**kwargs
|
||||
) -> AsyncIterable["models.ManagedNetworkListResult"]:
|
||||
"""The ListBySubscription ManagedNetwork operation retrieves all the Managed Network Resources in the current subscription in a paginated format.
|
||||
"""The ListBySubscription ManagedNetwork operation retrieves all the Managed Network Resources in
|
||||
the current subscription in a paginated format.
|
||||
|
||||
:param top: May be used to limit the number of results in a page for list queries.
|
||||
:type top: int
|
||||
:param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If
|
||||
a previous response contains a nextLink element, the value of the nextLink element will include
|
||||
a skiptoken parameter that specifies a starting point to use for subsequent calls.
|
||||
a previous response contains a nextLink element, the value of the nextLink element will include
|
||||
a skiptoken parameter that specifies a starting point to use for subsequent calls.
|
||||
:type skiptoken: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:return: An iterator like instance of either ManagedNetworkListResult or the result of cls(response)
|
||||
|
@ -487,6 +508,10 @@ class ManagedNetworkOperations:
|
|||
api_version = "2019-06-01-preview"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list_by_subscription.metadata['url'] # type: ignore
|
||||
|
@ -502,15 +527,11 @@ class ManagedNetworkOperations:
|
|||
if skiptoken is not None:
|
||||
query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
async def extract_data(pipeline_response):
|
||||
|
|
|
@ -12,7 +12,7 @@ from azure.core.async_paging import AsyncItemPaged, AsyncList
|
|||
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
|
||||
from azure.core.pipeline import PipelineResponse
|
||||
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
|
||||
from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller
|
||||
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
|
||||
from azure.mgmt.core.exceptions import ARMErrorFormat
|
||||
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
|
||||
|
||||
|
@ -50,7 +50,8 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
managed_network_peering_policy_name: str,
|
||||
**kwargs
|
||||
) -> "models.ManagedNetworkPeeringPolicy":
|
||||
"""The Get ManagedNetworkPeeringPolicies operation gets a Managed Network Peering Policy resource, specified by the resource group, Managed Network name, and peering policy name.
|
||||
"""The Get ManagedNetworkPeeringPolicies operation gets a Managed Network Peering Policy resource,
|
||||
specified by the resource group, Managed Network name, and peering policy name.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -86,7 +87,6 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -140,7 +140,6 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_managed_network_policy, 'ManagedNetworkPeeringPolicy')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -154,7 +153,6 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
error = self._deserialize(models.ErrorResponse, response)
|
||||
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
|
||||
|
||||
deserialized = None
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('ManagedNetworkPeeringPolicy', pipeline_response)
|
||||
|
||||
|
@ -167,7 +165,7 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
return deserialized
|
||||
_create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkPeeringPolicies/{managedNetworkPeeringPolicyName}'} # type: ignore
|
||||
|
||||
async def create_or_update(
|
||||
async def begin_create_or_update(
|
||||
self,
|
||||
resource_group_name: str,
|
||||
managed_network_name: str,
|
||||
|
@ -175,8 +173,9 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
location: Optional[str] = None,
|
||||
properties: Optional["models.ManagedNetworkPeeringPolicyProperties"] = None,
|
||||
**kwargs
|
||||
) -> "models.ManagedNetworkPeeringPolicy":
|
||||
"""The Put ManagedNetworkPeeringPolicies operation creates/updates a new Managed Network Peering Policy.
|
||||
) -> AsyncLROPoller["models.ManagedNetworkPeeringPolicy"]:
|
||||
"""The Put ManagedNetworkPeeringPolicies operation creates/updates a new Managed Network Peering
|
||||
Policy.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -189,12 +188,13 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
:param properties: Gets or sets the properties of a Managed Network Policy.
|
||||
:type properties: ~managed_network_management_client.models.ManagedNetworkPeeringPolicyProperties
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
|
||||
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
|
||||
:return: ManagedNetworkPeeringPolicy, or the result of cls(response)
|
||||
:rtype: ~managed_network_management_client.models.ManagedNetworkPeeringPolicy
|
||||
:return: An instance of AsyncLROPoller that returns either ManagedNetworkPeeringPolicy or the result of cls(response)
|
||||
:rtype: ~azure.core.polling.AsyncLROPoller[~managed_network_management_client.models.ManagedNetworkPeeringPolicy]
|
||||
:raises ~azure.core.exceptions.HttpResponseError:
|
||||
"""
|
||||
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
|
||||
|
@ -203,15 +203,17 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = await self._create_or_update_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
managed_network_peering_policy_name=managed_network_peering_policy_name,
|
||||
location=location,
|
||||
properties=properties,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = await self._create_or_update_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
managed_network_peering_policy_name=managed_network_peering_policy_name,
|
||||
location=location,
|
||||
properties=properties,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -226,8 +228,16 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs)
|
||||
elif polling is False: polling_method = AsyncNoPolling()
|
||||
else: polling_method = polling
|
||||
return await async_poller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkPeeringPolicies/{managedNetworkPeeringPolicyName}'} # type: ignore
|
||||
if cont_token:
|
||||
return AsyncLROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkPeeringPolicies/{managedNetworkPeeringPolicyName}'} # type: ignore
|
||||
|
||||
async def _delete_initial(
|
||||
self,
|
||||
|
@ -258,7 +268,6 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.delete(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -273,14 +282,15 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
|
||||
_delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkPeeringPolicies/{managedNetworkPeeringPolicyName}'} # type: ignore
|
||||
|
||||
async def delete(
|
||||
async def begin_delete(
|
||||
self,
|
||||
resource_group_name: str,
|
||||
managed_network_name: str,
|
||||
managed_network_peering_policy_name: str,
|
||||
**kwargs
|
||||
) -> None:
|
||||
"""The Delete ManagedNetworkPeeringPolicies operation deletes a Managed Network Peering Policy, specified by the resource group, Managed Network name, and peering policy name.
|
||||
) -> AsyncLROPoller[None]:
|
||||
"""The Delete ManagedNetworkPeeringPolicies operation deletes a Managed Network Peering Policy,
|
||||
specified by the resource group, Managed Network name, and peering policy name.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -289,12 +299,13 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
:param managed_network_peering_policy_name: The name of the Managed Network Peering Policy.
|
||||
:type managed_network_peering_policy_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
|
||||
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
|
||||
:return: None, or the result of cls(response)
|
||||
:rtype: None
|
||||
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
|
||||
:rtype: ~azure.core.polling.AsyncLROPoller[None]
|
||||
:raises ~azure.core.exceptions.HttpResponseError:
|
||||
"""
|
||||
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
|
||||
|
@ -303,13 +314,15 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = await self._delete_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
managed_network_peering_policy_name=managed_network_peering_policy_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = await self._delete_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
managed_network_peering_policy_name=managed_network_peering_policy_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -321,8 +334,16 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs)
|
||||
elif polling is False: polling_method = AsyncNoPolling()
|
||||
else: polling_method = polling
|
||||
return await async_poller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkPeeringPolicies/{managedNetworkPeeringPolicyName}'} # type: ignore
|
||||
if cont_token:
|
||||
return AsyncLROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkPeeringPolicies/{managedNetworkPeeringPolicyName}'} # type: ignore
|
||||
|
||||
def list_by_managed_network(
|
||||
self,
|
||||
|
@ -332,7 +353,8 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
skiptoken: Optional[str] = None,
|
||||
**kwargs
|
||||
) -> AsyncIterable["models.ManagedNetworkPeeringPolicyListResult"]:
|
||||
"""The ListByManagedNetwork PeeringPolicies operation retrieves all the Managed Network Peering Policies in a specified Managed Network, in a paginated format.
|
||||
"""The ListByManagedNetwork PeeringPolicies operation retrieves all the Managed Network Peering
|
||||
Policies in a specified Managed Network, in a paginated format.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -341,8 +363,8 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
:param top: May be used to limit the number of results in a page for list queries.
|
||||
:type top: int
|
||||
:param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If
|
||||
a previous response contains a nextLink element, the value of the nextLink element will include
|
||||
a skiptoken parameter that specifies a starting point to use for subsequent calls.
|
||||
a previous response contains a nextLink element, the value of the nextLink element will include
|
||||
a skiptoken parameter that specifies a starting point to use for subsequent calls.
|
||||
:type skiptoken: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:return: An iterator like instance of either ManagedNetworkPeeringPolicyListResult or the result of cls(response)
|
||||
|
@ -355,6 +377,10 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
api_version = "2019-06-01-preview"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list_by_managed_network.metadata['url'] # type: ignore
|
||||
|
@ -372,15 +398,11 @@ class ManagedNetworkPeeringPolicyOperations:
|
|||
if skiptoken is not None:
|
||||
query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
async def extract_data(pipeline_response):
|
||||
|
|
|
@ -58,6 +58,10 @@ class OperationOperations:
|
|||
api_version = "2019-06-01-preview"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list.metadata['url'] # type: ignore
|
||||
|
@ -65,15 +69,11 @@ class OperationOperations:
|
|||
query_parameters = {} # type: Dict[str, Any]
|
||||
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
async def extract_data(pipeline_response):
|
||||
|
|
|
@ -79,7 +79,6 @@ class ScopeAssignmentOperations:
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -149,7 +148,6 @@ class ScopeAssignmentOperations:
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_parameters, 'ScopeAssignment')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -163,7 +161,6 @@ class ScopeAssignmentOperations:
|
|||
error = self._deserialize(models.ErrorResponse, response)
|
||||
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
|
||||
|
||||
deserialized = None
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('ScopeAssignment', pipeline_response)
|
||||
|
||||
|
@ -213,7 +210,6 @@ class ScopeAssignmentOperations:
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.delete(url, query_parameters, header_parameters)
|
||||
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -247,6 +243,10 @@ class ScopeAssignmentOperations:
|
|||
api_version = "2019-06-01-preview"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list.metadata['url'] # type: ignore
|
||||
|
@ -258,15 +258,11 @@ class ScopeAssignmentOperations:
|
|||
query_parameters = {} # type: Dict[str, Any]
|
||||
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
async def extract_data(pipeline_response):
|
||||
|
|
|
@ -58,6 +58,7 @@ except (SyntaxError, ImportError):
|
|||
from ._models import TrackedResource # type: ignore
|
||||
|
||||
from ._managed_network_management_client_enums import (
|
||||
Kind,
|
||||
ProvisioningState,
|
||||
Type,
|
||||
)
|
||||
|
@ -87,6 +88,7 @@ __all__ = [
|
|||
'ScopeAssignmentListResult',
|
||||
'ScopeAssignmentProperties',
|
||||
'TrackedResource',
|
||||
'Kind',
|
||||
'ProvisioningState',
|
||||
'Type',
|
||||
]
|
||||
|
|
|
@ -6,20 +6,44 @@
|
|||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from enum import Enum
|
||||
from enum import Enum, EnumMeta
|
||||
from six import with_metaclass
|
||||
|
||||
class ProvisioningState(str, Enum):
|
||||
class _CaseInsensitiveEnumMeta(EnumMeta):
|
||||
def __getitem__(self, name):
|
||||
return super().__getitem__(name.upper())
|
||||
|
||||
def __getattr__(cls, name):
|
||||
"""Return the enum member matching `name`
|
||||
We use __getattr__ instead of descriptors or inserting into the enum
|
||||
class' __dict__ in order to support `name` and `value` being both
|
||||
properties for enum members (which live in the class' __dict__) and
|
||||
enum members themselves.
|
||||
"""
|
||||
try:
|
||||
return cls._member_map_[name.upper()]
|
||||
except KeyError:
|
||||
raise AttributeError(name)
|
||||
|
||||
|
||||
class Kind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""Responsibility role under which this Managed Network Group will be created
|
||||
"""
|
||||
|
||||
CONNECTIVITY = "Connectivity"
|
||||
|
||||
class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""Provisioning state of the ManagedNetwork resource.
|
||||
"""
|
||||
|
||||
updating = "Updating"
|
||||
deleting = "Deleting"
|
||||
failed = "Failed"
|
||||
succeeded = "Succeeded"
|
||||
UPDATING = "Updating"
|
||||
DELETING = "Deleting"
|
||||
FAILED = "Failed"
|
||||
SUCCEEDED = "Succeeded"
|
||||
|
||||
class Type(str, Enum):
|
||||
class Type(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
|
||||
"""Gets or sets the connectivity type of a network structure policy
|
||||
"""
|
||||
|
||||
hub_and_spoke_topology = "HubAndSpokeTopology"
|
||||
mesh_topology = "MeshTopology"
|
||||
HUB_AND_SPOKE_TOPOLOGY = "HubAndSpokeTopology"
|
||||
MESH_TOPOLOGY = "MeshTopology"
|
||||
|
|
|
@ -122,7 +122,7 @@ class ManagedNetworkPeeringPolicyProperties(ResourceProperties):
|
|||
**kwargs
|
||||
):
|
||||
super(ManagedNetworkPeeringPolicyProperties, self).__init__(**kwargs)
|
||||
self.type = 'ManagedNetworkPeeringPolicyProperties'
|
||||
self.type = 'ManagedNetworkPeeringPolicyProperties' # type: str
|
||||
self.hub = kwargs.get('hub', None)
|
||||
self.spokes = kwargs.get('spokes', None)
|
||||
self.mesh = kwargs.get('mesh', None)
|
||||
|
@ -172,7 +172,7 @@ class HubAndSpokePeeringPolicyProperties(ManagedNetworkPeeringPolicyProperties):
|
|||
**kwargs
|
||||
):
|
||||
super(HubAndSpokePeeringPolicyProperties, self).__init__(**kwargs)
|
||||
self.type = 'HubAndSpokeTopology'
|
||||
self.type = 'HubAndSpokeTopology' # type: str
|
||||
|
||||
|
||||
class Resource(msrest.serialization.Model):
|
||||
|
@ -316,9 +316,9 @@ class ManagedNetworkGroup(Resource):
|
|||
:vartype type: str
|
||||
:param location: The geo-location where the resource lives.
|
||||
:type location: str
|
||||
:ivar kind: Responsibility role under which this Managed Network Group will be created. Default
|
||||
value: "Connectivity".
|
||||
:vartype kind: str
|
||||
:param kind: Responsibility role under which this Managed Network Group will be created.
|
||||
Possible values include: "Connectivity".
|
||||
:type kind: str or ~managed_network_management_client.models.Kind
|
||||
:ivar provisioning_state: Provisioning state of the ManagedNetwork resource. Possible values
|
||||
include: "Updating", "Deleting", "Failed", "Succeeded".
|
||||
:vartype provisioning_state: str or ~managed_network_management_client.models.ProvisioningState
|
||||
|
@ -338,7 +338,6 @@ class ManagedNetworkGroup(Resource):
|
|||
'id': {'readonly': True},
|
||||
'name': {'readonly': True},
|
||||
'type': {'readonly': True},
|
||||
'kind': {'constant': True},
|
||||
'provisioning_state': {'readonly': True},
|
||||
'etag': {'readonly': True},
|
||||
}
|
||||
|
@ -357,13 +356,12 @@ class ManagedNetworkGroup(Resource):
|
|||
'subnets': {'key': 'properties.subnets', 'type': '[ResourceId]'},
|
||||
}
|
||||
|
||||
kind = "Connectivity"
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
**kwargs
|
||||
):
|
||||
super(ManagedNetworkGroup, self).__init__(**kwargs)
|
||||
self.kind = kwargs.get('kind', None)
|
||||
self.provisioning_state = None
|
||||
self.etag = None
|
||||
self.management_groups = kwargs.get('management_groups', None)
|
||||
|
@ -647,7 +645,7 @@ class MeshPeeringPolicyProperties(ManagedNetworkPeeringPolicyProperties):
|
|||
**kwargs
|
||||
):
|
||||
super(MeshPeeringPolicyProperties, self).__init__(**kwargs)
|
||||
self.type = 'MeshTopology'
|
||||
self.type = 'MeshTopology' # type: str
|
||||
|
||||
|
||||
class Operation(msrest.serialization.Model):
|
||||
|
|
|
@ -6,11 +6,13 @@
|
|||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from typing import Dict, List, Optional
|
||||
from typing import Dict, List, Optional, Union
|
||||
|
||||
from azure.core.exceptions import HttpResponseError
|
||||
import msrest.serialization
|
||||
|
||||
from ._managed_network_management_client_enums import *
|
||||
|
||||
|
||||
class ErrorResponse(msrest.serialization.Model):
|
||||
"""The error response that indicates why an operation has failed.
|
||||
|
@ -128,7 +130,7 @@ class ManagedNetworkPeeringPolicyProperties(ResourceProperties):
|
|||
**kwargs
|
||||
):
|
||||
super(ManagedNetworkPeeringPolicyProperties, self).__init__(**kwargs)
|
||||
self.type: str = 'ManagedNetworkPeeringPolicyProperties'
|
||||
self.type = 'ManagedNetworkPeeringPolicyProperties' # type: str
|
||||
self.hub = hub
|
||||
self.spokes = spokes
|
||||
self.mesh = mesh
|
||||
|
@ -182,7 +184,7 @@ class HubAndSpokePeeringPolicyProperties(ManagedNetworkPeeringPolicyProperties):
|
|||
**kwargs
|
||||
):
|
||||
super(HubAndSpokePeeringPolicyProperties, self).__init__(hub=hub, spokes=spokes, mesh=mesh, **kwargs)
|
||||
self.type: str = 'HubAndSpokeTopology'
|
||||
self.type = 'HubAndSpokeTopology' # type: str
|
||||
|
||||
|
||||
class Resource(msrest.serialization.Model):
|
||||
|
@ -335,9 +337,9 @@ class ManagedNetworkGroup(Resource):
|
|||
:vartype type: str
|
||||
:param location: The geo-location where the resource lives.
|
||||
:type location: str
|
||||
:ivar kind: Responsibility role under which this Managed Network Group will be created. Default
|
||||
value: "Connectivity".
|
||||
:vartype kind: str
|
||||
:param kind: Responsibility role under which this Managed Network Group will be created.
|
||||
Possible values include: "Connectivity".
|
||||
:type kind: str or ~managed_network_management_client.models.Kind
|
||||
:ivar provisioning_state: Provisioning state of the ManagedNetwork resource. Possible values
|
||||
include: "Updating", "Deleting", "Failed", "Succeeded".
|
||||
:vartype provisioning_state: str or ~managed_network_management_client.models.ProvisioningState
|
||||
|
@ -357,7 +359,6 @@ class ManagedNetworkGroup(Resource):
|
|||
'id': {'readonly': True},
|
||||
'name': {'readonly': True},
|
||||
'type': {'readonly': True},
|
||||
'kind': {'constant': True},
|
||||
'provisioning_state': {'readonly': True},
|
||||
'etag': {'readonly': True},
|
||||
}
|
||||
|
@ -376,12 +377,11 @@ class ManagedNetworkGroup(Resource):
|
|||
'subnets': {'key': 'properties.subnets', 'type': '[ResourceId]'},
|
||||
}
|
||||
|
||||
kind = "Connectivity"
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
location: Optional[str] = None,
|
||||
kind: Optional[Union[str, "Kind"]] = None,
|
||||
management_groups: Optional[List["ResourceId"]] = None,
|
||||
subscriptions: Optional[List["ResourceId"]] = None,
|
||||
virtual_networks: Optional[List["ResourceId"]] = None,
|
||||
|
@ -389,6 +389,7 @@ class ManagedNetworkGroup(Resource):
|
|||
**kwargs
|
||||
):
|
||||
super(ManagedNetworkGroup, self).__init__(location=location, **kwargs)
|
||||
self.kind = kind
|
||||
self.provisioning_state = None
|
||||
self.etag = None
|
||||
self.management_groups = management_groups
|
||||
|
@ -700,7 +701,7 @@ class MeshPeeringPolicyProperties(ManagedNetworkPeeringPolicyProperties):
|
|||
**kwargs
|
||||
):
|
||||
super(MeshPeeringPolicyProperties, self).__init__(hub=hub, spokes=spokes, mesh=mesh, **kwargs)
|
||||
self.type: str = 'MeshTopology'
|
||||
self.type = 'MeshTopology' # type: str
|
||||
|
||||
|
||||
class Operation(msrest.serialization.Model):
|
||||
|
|
|
@ -55,7 +55,8 @@ class ManagedNetworkGroupOperations(object):
|
|||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> "models.ManagedNetworkGroup"
|
||||
"""The Get ManagedNetworkGroups operation gets a Managed Network Group specified by the resource group, Managed Network name, and group name.
|
||||
"""The Get ManagedNetworkGroups operation gets a Managed Network Group specified by the resource
|
||||
group, Managed Network name, and group name.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -91,7 +92,6 @@ class ManagedNetworkGroupOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -115,6 +115,7 @@ class ManagedNetworkGroupOperations(object):
|
|||
managed_network_name, # type: str
|
||||
managed_network_group_name, # type: str
|
||||
location=None, # type: Optional[str]
|
||||
kind=None, # type: Optional[Union[str, "models.Kind"]]
|
||||
management_groups=None, # type: Optional[List["models.ResourceId"]]
|
||||
subscriptions=None, # type: Optional[List["models.ResourceId"]]
|
||||
virtual_networks=None, # type: Optional[List["models.ResourceId"]]
|
||||
|
@ -126,7 +127,7 @@ class ManagedNetworkGroupOperations(object):
|
|||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
|
||||
error_map.update(kwargs.pop('error_map', {}))
|
||||
|
||||
_managed_network_group = models.ManagedNetworkGroup(location=location, management_groups=management_groups, subscriptions=subscriptions, virtual_networks=virtual_networks, subnets=subnets)
|
||||
_managed_network_group = models.ManagedNetworkGroup(location=location, kind=kind, management_groups=management_groups, subscriptions=subscriptions, virtual_networks=virtual_networks, subnets=subnets)
|
||||
api_version = "2019-06-01-preview"
|
||||
content_type = kwargs.pop("content_type", "application/json")
|
||||
|
||||
|
@ -149,7 +150,6 @@ class ManagedNetworkGroupOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_managed_network_group, 'ManagedNetworkGroup')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -163,7 +163,6 @@ class ManagedNetworkGroupOperations(object):
|
|||
error = self._deserialize(models.ErrorResponse, response)
|
||||
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
|
||||
|
||||
deserialized = None
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('ManagedNetworkGroup', pipeline_response)
|
||||
|
||||
|
@ -182,13 +181,14 @@ class ManagedNetworkGroupOperations(object):
|
|||
managed_network_name, # type: str
|
||||
managed_network_group_name, # type: str
|
||||
location=None, # type: Optional[str]
|
||||
kind=None, # type: Optional[Union[str, "models.Kind"]]
|
||||
management_groups=None, # type: Optional[List["models.ResourceId"]]
|
||||
subscriptions=None, # type: Optional[List["models.ResourceId"]]
|
||||
virtual_networks=None, # type: Optional[List["models.ResourceId"]]
|
||||
subnets=None, # type: Optional[List["models.ResourceId"]]
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> LROPoller
|
||||
# type: (...) -> LROPoller["models.ManagedNetworkGroup"]
|
||||
"""The Put ManagedNetworkGroups operation creates or updates a Managed Network Group resource.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
|
@ -199,6 +199,8 @@ class ManagedNetworkGroupOperations(object):
|
|||
:type managed_network_group_name: str
|
||||
:param location: The geo-location where the resource lives.
|
||||
:type location: str
|
||||
:param kind: Responsibility role under which this Managed Network Group will be created.
|
||||
:type kind: str or ~managed_network_management_client.models.Kind
|
||||
:param management_groups: The collection of management groups covered by the Managed Network.
|
||||
:type management_groups: list[~managed_network_management_client.models.ResourceId]
|
||||
:param subscriptions: The collection of subscriptions covered by the Managed Network.
|
||||
|
@ -208,6 +210,7 @@ class ManagedNetworkGroupOperations(object):
|
|||
:param subnets: The collection of subnets covered by the Managed Network.
|
||||
:type subnets: list[~managed_network_management_client.models.ResourceId]
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.PollingMethod
|
||||
|
@ -222,18 +225,21 @@ class ManagedNetworkGroupOperations(object):
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = self._create_or_update_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
managed_network_group_name=managed_network_group_name,
|
||||
location=location,
|
||||
management_groups=management_groups,
|
||||
subscriptions=subscriptions,
|
||||
virtual_networks=virtual_networks,
|
||||
subnets=subnets,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = self._create_or_update_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
managed_network_group_name=managed_network_group_name,
|
||||
location=location,
|
||||
kind=kind,
|
||||
management_groups=management_groups,
|
||||
subscriptions=subscriptions,
|
||||
virtual_networks=virtual_networks,
|
||||
subnets=subnets,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -248,7 +254,15 @@ class ManagedNetworkGroupOperations(object):
|
|||
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs)
|
||||
elif polling is False: polling_method = NoPolling()
|
||||
else: polling_method = polling
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
if cont_token:
|
||||
return LROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkGroups/{managedNetworkGroupName}'} # type: ignore
|
||||
|
||||
def _delete_initial(
|
||||
|
@ -281,7 +295,6 @@ class ManagedNetworkGroupOperations(object):
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.delete(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -303,8 +316,9 @@ class ManagedNetworkGroupOperations(object):
|
|||
managed_network_group_name, # type: str
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> LROPoller
|
||||
"""The Delete ManagedNetworkGroups operation deletes a Managed Network Group specified by the resource group, Managed Network name, and group name.
|
||||
# type: (...) -> LROPoller[None]
|
||||
"""The Delete ManagedNetworkGroups operation deletes a Managed Network Group specified by the
|
||||
resource group, Managed Network name, and group name.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -313,6 +327,7 @@ class ManagedNetworkGroupOperations(object):
|
|||
:param managed_network_group_name: The name of the Managed Network Group.
|
||||
:type managed_network_group_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.PollingMethod
|
||||
|
@ -327,13 +342,15 @@ class ManagedNetworkGroupOperations(object):
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = self._delete_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
managed_network_group_name=managed_network_group_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = self._delete_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
managed_network_group_name=managed_network_group_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -345,7 +362,15 @@ class ManagedNetworkGroupOperations(object):
|
|||
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs)
|
||||
elif polling is False: polling_method = NoPolling()
|
||||
else: polling_method = polling
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
if cont_token:
|
||||
return LROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkGroups/{managedNetworkGroupName}'} # type: ignore
|
||||
|
||||
def list_by_managed_network(
|
||||
|
@ -357,7 +382,8 @@ class ManagedNetworkGroupOperations(object):
|
|||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> Iterable["models.ManagedNetworkGroupListResult"]
|
||||
"""The ListByManagedNetwork ManagedNetworkGroup operation retrieves all the Managed Network Groups in a specified Managed Networks in a paginated format.
|
||||
"""The ListByManagedNetwork ManagedNetworkGroup operation retrieves all the Managed Network Groups
|
||||
in a specified Managed Networks in a paginated format.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -366,8 +392,8 @@ class ManagedNetworkGroupOperations(object):
|
|||
:param top: May be used to limit the number of results in a page for list queries.
|
||||
:type top: int
|
||||
:param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If
|
||||
a previous response contains a nextLink element, the value of the nextLink element will include
|
||||
a skiptoken parameter that specifies a starting point to use for subsequent calls.
|
||||
a previous response contains a nextLink element, the value of the nextLink element will include
|
||||
a skiptoken parameter that specifies a starting point to use for subsequent calls.
|
||||
:type skiptoken: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:return: An iterator like instance of either ManagedNetworkGroupListResult or the result of cls(response)
|
||||
|
@ -380,6 +406,10 @@ class ManagedNetworkGroupOperations(object):
|
|||
api_version = "2019-06-01-preview"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list_by_managed_network.metadata['url'] # type: ignore
|
||||
|
@ -397,15 +427,11 @@ class ManagedNetworkGroupOperations(object):
|
|||
if skiptoken is not None:
|
||||
query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
def extract_data(pipeline_response):
|
||||
|
|
|
@ -54,7 +54,8 @@ class ManagedNetworkOperations(object):
|
|||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> "models.ManagedNetwork"
|
||||
"""The Get ManagedNetworks operation gets a Managed Network Resource, specified by the resource group and Managed Network name.
|
||||
"""The Get ManagedNetworks operation gets a Managed Network Resource, specified by the resource
|
||||
group and Managed Network name.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -87,7 +88,6 @@ class ManagedNetworkOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -115,7 +115,8 @@ class ManagedNetworkOperations(object):
|
|||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> "models.ManagedNetwork"
|
||||
"""The Put ManagedNetworks operation creates/updates a Managed Network Resource, specified by resource group and Managed Network name.
|
||||
"""The Put ManagedNetworks operation creates/updates a Managed Network Resource, specified by
|
||||
resource group and Managed Network name.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -158,7 +159,6 @@ class ManagedNetworkOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_managed_network, 'ManagedNetwork')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -172,7 +172,6 @@ class ManagedNetworkOperations(object):
|
|||
error = self._deserialize(models.ErrorResponse, response)
|
||||
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
|
||||
|
||||
deserialized = None
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('ManagedNetwork', pipeline_response)
|
||||
|
||||
|
@ -213,7 +212,6 @@ class ManagedNetworkOperations(object):
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.delete(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -234,14 +232,16 @@ class ManagedNetworkOperations(object):
|
|||
managed_network_name, # type: str
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> LROPoller
|
||||
"""The Delete ManagedNetworks operation deletes a Managed Network Resource, specified by the resource group and Managed Network name.
|
||||
# type: (...) -> LROPoller[None]
|
||||
"""The Delete ManagedNetworks operation deletes a Managed Network Resource, specified by the
|
||||
resource group and Managed Network name.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
:param managed_network_name: The name of the Managed Network.
|
||||
:type managed_network_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.PollingMethod
|
||||
|
@ -256,12 +256,14 @@ class ManagedNetworkOperations(object):
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = self._delete_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = self._delete_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -273,7 +275,15 @@ class ManagedNetworkOperations(object):
|
|||
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs)
|
||||
elif polling is False: polling_method = NoPolling()
|
||||
else: polling_method = polling
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
if cont_token:
|
||||
return LROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}'} # type: ignore
|
||||
|
||||
def _update_initial(
|
||||
|
@ -310,7 +320,6 @@ class ManagedNetworkOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_parameters, 'ManagedNetworkUpdate')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -324,7 +333,6 @@ class ManagedNetworkOperations(object):
|
|||
error = self._deserialize(models.ErrorResponse, response)
|
||||
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
|
||||
|
||||
deserialized = None
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('ManagedNetwork', pipeline_response)
|
||||
|
||||
|
@ -344,7 +352,7 @@ class ManagedNetworkOperations(object):
|
|||
tags=None, # type: Optional[Dict[str, str]]
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> LROPoller
|
||||
# type: (...) -> LROPoller["models.ManagedNetwork"]
|
||||
"""Updates the specified Managed Network resource tags.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
|
@ -354,6 +362,7 @@ class ManagedNetworkOperations(object):
|
|||
:param tags: Resource tags.
|
||||
:type tags: dict[str, str]
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.PollingMethod
|
||||
|
@ -368,13 +377,15 @@ class ManagedNetworkOperations(object):
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = self._update_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
tags=tags,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = self._update_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
tags=tags,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -389,7 +400,15 @@ class ManagedNetworkOperations(object):
|
|||
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs)
|
||||
elif polling is False: polling_method = NoPolling()
|
||||
else: polling_method = polling
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
if cont_token:
|
||||
return LROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}'} # type: ignore
|
||||
|
||||
def list_by_resource_group(
|
||||
|
@ -400,15 +419,16 @@ class ManagedNetworkOperations(object):
|
|||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> Iterable["models.ManagedNetworkListResult"]
|
||||
"""The ListByResourceGroup ManagedNetwork operation retrieves all the Managed Network resources in a resource group in a paginated format.
|
||||
"""The ListByResourceGroup ManagedNetwork operation retrieves all the Managed Network resources in
|
||||
a resource group in a paginated format.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
:param top: May be used to limit the number of results in a page for list queries.
|
||||
:type top: int
|
||||
:param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If
|
||||
a previous response contains a nextLink element, the value of the nextLink element will include
|
||||
a skiptoken parameter that specifies a starting point to use for subsequent calls.
|
||||
a previous response contains a nextLink element, the value of the nextLink element will include
|
||||
a skiptoken parameter that specifies a starting point to use for subsequent calls.
|
||||
:type skiptoken: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:return: An iterator like instance of either ManagedNetworkListResult or the result of cls(response)
|
||||
|
@ -421,6 +441,10 @@ class ManagedNetworkOperations(object):
|
|||
api_version = "2019-06-01-preview"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list_by_resource_group.metadata['url'] # type: ignore
|
||||
|
@ -437,15 +461,11 @@ class ManagedNetworkOperations(object):
|
|||
if skiptoken is not None:
|
||||
query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
def extract_data(pipeline_response):
|
||||
|
@ -480,13 +500,14 @@ class ManagedNetworkOperations(object):
|
|||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> Iterable["models.ManagedNetworkListResult"]
|
||||
"""The ListBySubscription ManagedNetwork operation retrieves all the Managed Network Resources in the current subscription in a paginated format.
|
||||
"""The ListBySubscription ManagedNetwork operation retrieves all the Managed Network Resources in
|
||||
the current subscription in a paginated format.
|
||||
|
||||
:param top: May be used to limit the number of results in a page for list queries.
|
||||
:type top: int
|
||||
:param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If
|
||||
a previous response contains a nextLink element, the value of the nextLink element will include
|
||||
a skiptoken parameter that specifies a starting point to use for subsequent calls.
|
||||
a previous response contains a nextLink element, the value of the nextLink element will include
|
||||
a skiptoken parameter that specifies a starting point to use for subsequent calls.
|
||||
:type skiptoken: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:return: An iterator like instance of either ManagedNetworkListResult or the result of cls(response)
|
||||
|
@ -499,6 +520,10 @@ class ManagedNetworkOperations(object):
|
|||
api_version = "2019-06-01-preview"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list_by_subscription.metadata['url'] # type: ignore
|
||||
|
@ -514,15 +539,11 @@ class ManagedNetworkOperations(object):
|
|||
if skiptoken is not None:
|
||||
query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
def extract_data(pipeline_response):
|
||||
|
|
|
@ -55,7 +55,8 @@ class ManagedNetworkPeeringPolicyOperations(object):
|
|||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> "models.ManagedNetworkPeeringPolicy"
|
||||
"""The Get ManagedNetworkPeeringPolicies operation gets a Managed Network Peering Policy resource, specified by the resource group, Managed Network name, and peering policy name.
|
||||
"""The Get ManagedNetworkPeeringPolicies operation gets a Managed Network Peering Policy resource,
|
||||
specified by the resource group, Managed Network name, and peering policy name.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -91,7 +92,6 @@ class ManagedNetworkPeeringPolicyOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -146,7 +146,6 @@ class ManagedNetworkPeeringPolicyOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_managed_network_policy, 'ManagedNetworkPeeringPolicy')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -160,7 +159,6 @@ class ManagedNetworkPeeringPolicyOperations(object):
|
|||
error = self._deserialize(models.ErrorResponse, response)
|
||||
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
|
||||
|
||||
deserialized = None
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('ManagedNetworkPeeringPolicy', pipeline_response)
|
||||
|
||||
|
@ -182,8 +180,9 @@ class ManagedNetworkPeeringPolicyOperations(object):
|
|||
properties=None, # type: Optional["models.ManagedNetworkPeeringPolicyProperties"]
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> LROPoller
|
||||
"""The Put ManagedNetworkPeeringPolicies operation creates/updates a new Managed Network Peering Policy.
|
||||
# type: (...) -> LROPoller["models.ManagedNetworkPeeringPolicy"]
|
||||
"""The Put ManagedNetworkPeeringPolicies operation creates/updates a new Managed Network Peering
|
||||
Policy.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -196,6 +195,7 @@ class ManagedNetworkPeeringPolicyOperations(object):
|
|||
:param properties: Gets or sets the properties of a Managed Network Policy.
|
||||
:type properties: ~managed_network_management_client.models.ManagedNetworkPeeringPolicyProperties
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.PollingMethod
|
||||
|
@ -210,15 +210,17 @@ class ManagedNetworkPeeringPolicyOperations(object):
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = self._create_or_update_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
managed_network_peering_policy_name=managed_network_peering_policy_name,
|
||||
location=location,
|
||||
properties=properties,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = self._create_or_update_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
managed_network_peering_policy_name=managed_network_peering_policy_name,
|
||||
location=location,
|
||||
properties=properties,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -233,7 +235,15 @@ class ManagedNetworkPeeringPolicyOperations(object):
|
|||
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs)
|
||||
elif polling is False: polling_method = NoPolling()
|
||||
else: polling_method = polling
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
if cont_token:
|
||||
return LROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkPeeringPolicies/{managedNetworkPeeringPolicyName}'} # type: ignore
|
||||
|
||||
def _delete_initial(
|
||||
|
@ -266,7 +276,6 @@ class ManagedNetworkPeeringPolicyOperations(object):
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.delete(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -288,8 +297,9 @@ class ManagedNetworkPeeringPolicyOperations(object):
|
|||
managed_network_peering_policy_name, # type: str
|
||||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> LROPoller
|
||||
"""The Delete ManagedNetworkPeeringPolicies operation deletes a Managed Network Peering Policy, specified by the resource group, Managed Network name, and peering policy name.
|
||||
# type: (...) -> LROPoller[None]
|
||||
"""The Delete ManagedNetworkPeeringPolicies operation deletes a Managed Network Peering Policy,
|
||||
specified by the resource group, Managed Network name, and peering policy name.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -298,6 +308,7 @@ class ManagedNetworkPeeringPolicyOperations(object):
|
|||
:param managed_network_peering_policy_name: The name of the Managed Network Peering Policy.
|
||||
:type managed_network_peering_policy_name: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
||||
:keyword polling: True for ARMPolling, False for no polling, or a
|
||||
polling object for personal polling strategy
|
||||
:paramtype polling: bool or ~azure.core.polling.PollingMethod
|
||||
|
@ -312,13 +323,15 @@ class ManagedNetworkPeeringPolicyOperations(object):
|
|||
'polling_interval',
|
||||
self._config.polling_interval
|
||||
)
|
||||
raw_result = self._delete_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
managed_network_peering_policy_name=managed_network_peering_policy_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
||||
if cont_token is None:
|
||||
raw_result = self._delete_initial(
|
||||
resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
managed_network_peering_policy_name=managed_network_peering_policy_name,
|
||||
cls=lambda x,y,z: x,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
kwargs.pop('error_map', None)
|
||||
kwargs.pop('content_type', None)
|
||||
|
@ -330,7 +343,15 @@ class ManagedNetworkPeeringPolicyOperations(object):
|
|||
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs)
|
||||
elif polling is False: polling_method = NoPolling()
|
||||
else: polling_method = polling
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
if cont_token:
|
||||
return LROPoller.from_continuation_token(
|
||||
polling_method=polling_method,
|
||||
continuation_token=cont_token,
|
||||
client=self._client,
|
||||
deserialization_callback=get_long_running_output
|
||||
)
|
||||
else:
|
||||
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
||||
begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkPeeringPolicies/{managedNetworkPeeringPolicyName}'} # type: ignore
|
||||
|
||||
def list_by_managed_network(
|
||||
|
@ -342,7 +363,8 @@ class ManagedNetworkPeeringPolicyOperations(object):
|
|||
**kwargs # type: Any
|
||||
):
|
||||
# type: (...) -> Iterable["models.ManagedNetworkPeeringPolicyListResult"]
|
||||
"""The ListByManagedNetwork PeeringPolicies operation retrieves all the Managed Network Peering Policies in a specified Managed Network, in a paginated format.
|
||||
"""The ListByManagedNetwork PeeringPolicies operation retrieves all the Managed Network Peering
|
||||
Policies in a specified Managed Network, in a paginated format.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
|
@ -351,8 +373,8 @@ class ManagedNetworkPeeringPolicyOperations(object):
|
|||
:param top: May be used to limit the number of results in a page for list queries.
|
||||
:type top: int
|
||||
:param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If
|
||||
a previous response contains a nextLink element, the value of the nextLink element will include
|
||||
a skiptoken parameter that specifies a starting point to use for subsequent calls.
|
||||
a previous response contains a nextLink element, the value of the nextLink element will include
|
||||
a skiptoken parameter that specifies a starting point to use for subsequent calls.
|
||||
:type skiptoken: str
|
||||
:keyword callable cls: A custom type or function that will be passed the direct response
|
||||
:return: An iterator like instance of either ManagedNetworkPeeringPolicyListResult or the result of cls(response)
|
||||
|
@ -365,6 +387,10 @@ class ManagedNetworkPeeringPolicyOperations(object):
|
|||
api_version = "2019-06-01-preview"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list_by_managed_network.metadata['url'] # type: ignore
|
||||
|
@ -382,15 +408,11 @@ class ManagedNetworkPeeringPolicyOperations(object):
|
|||
if skiptoken is not None:
|
||||
query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
def extract_data(pipeline_response):
|
||||
|
|
|
@ -63,6 +63,10 @@ class OperationOperations(object):
|
|||
api_version = "2019-06-01-preview"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list.metadata['url'] # type: ignore
|
||||
|
@ -70,15 +74,11 @@ class OperationOperations(object):
|
|||
query_parameters = {} # type: Dict[str, Any]
|
||||
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
def extract_data(pipeline_response):
|
||||
|
|
|
@ -84,7 +84,6 @@ class ScopeAssignmentOperations(object):
|
|||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -155,7 +154,6 @@ class ScopeAssignmentOperations(object):
|
|||
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
body_content_kwargs = {} # type: Dict[str, Any]
|
||||
body_content = self._serialize.body(_parameters, 'ScopeAssignment')
|
||||
body_content_kwargs['content'] = body_content
|
||||
|
@ -169,7 +167,6 @@ class ScopeAssignmentOperations(object):
|
|||
error = self._deserialize(models.ErrorResponse, response)
|
||||
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
|
||||
|
||||
deserialized = None
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('ScopeAssignment', pipeline_response)
|
||||
|
||||
|
@ -220,7 +217,6 @@ class ScopeAssignmentOperations(object):
|
|||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.delete(url, query_parameters, header_parameters)
|
||||
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
|
||||
response = pipeline_response.http_response
|
||||
|
@ -255,6 +251,10 @@ class ScopeAssignmentOperations(object):
|
|||
api_version = "2019-06-01-preview"
|
||||
|
||||
def prepare_request(next_link=None):
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
if not next_link:
|
||||
# Construct URL
|
||||
url = self.list.metadata['url'] # type: ignore
|
||||
|
@ -266,15 +266,11 @@ class ScopeAssignmentOperations(object):
|
|||
query_parameters = {} # type: Dict[str, Any]
|
||||
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
|
||||
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
else:
|
||||
url = next_link
|
||||
query_parameters = {} # type: Dict[str, Any]
|
||||
# Construct headers
|
||||
header_parameters = {} # type: Dict[str, Any]
|
||||
header_parameters['Accept'] = 'application/json'
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
request = self._client.get(url, query_parameters, header_parameters)
|
||||
return request
|
||||
|
||||
def extract_data(pipeline_response):
|
||||
|
|
Загрузка…
Ссылка в новой задаче