diff --git a/.gitignore b/.gitignore index c554e3bf2d96..aeac92c5b51b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Python cache __pycache__/ *.pyc +.pytest_cache # Virtual environment env*/ diff --git a/azure-common/azure/common/client_factory.py b/azure-common/azure/common/client_factory.py index bc7bdf7994c2..b44c5a4095db 100644 --- a/azure-common/azure/common/client_factory.py +++ b/azure-common/azure/common/client_factory.py @@ -52,7 +52,7 @@ def get_client_from_cli_profile(client_class, **kwargs): .. versionadded:: 1.1.6 :param client_class: A SDK client class - :return: An instanciated client + :return: An instantiated client :raises: ImportError if azure-cli-core package is not available """ @@ -114,7 +114,7 @@ def get_client_from_json_dict(client_class, config_dict, **kwargs): :param client_class: A SDK client class :param dict config_dict: A config dict. - :return: An instanciated client + :return: An instantiated client """ parameters = { 'subscription_id': config_dict.get('subscriptionId'), @@ -183,7 +183,7 @@ def get_client_from_auth_file(client_class, auth_path=None, **kwargs): :param client_class: A SDK client class :param str auth_path: Path to the file. - :return: An instanciated client + :return: An instantiated client :raises: KeyError if AZURE_AUTH_LOCATION is not an environment variable and no path is provided :raises: FileNotFoundError if provided file path does not exists :raises: json.JSONDecodeError if provided file is not JSON valid diff --git a/azure-eventgrid/HISTORY.rst b/azure-eventgrid/HISTORY.rst index 36513a5ab0ad..5b774d604112 100644 --- a/azure-eventgrid/HISTORY.rst +++ b/azure-eventgrid/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +1.1.0 (2018-05-24) +++++++++++++++++++ + +- Event Schemas for EventGrid subscription validation event, Azure Media events, and ServiceBus events. + 1.0.0 (2018-04-26) ++++++++++++++++++ diff --git a/azure-eventgrid/azure/eventgrid/models/__init__.py b/azure-eventgrid/azure/eventgrid/models/__init__.py index ddea8d9d1677..57ba4b413989 100644 --- a/azure-eventgrid/azure/eventgrid/models/__init__.py +++ b/azure-eventgrid/azure/eventgrid/models/__init__.py @@ -20,6 +20,9 @@ from .resource_delete_failure_data_py3 import ResourceDeleteFailureData from .resource_delete_cancel_data_py3 import ResourceDeleteCancelData from .event_grid_event_py3 import EventGridEvent + from .subscription_validation_event_data_py3 import SubscriptionValidationEventData + from .subscription_validation_response_py3 import SubscriptionValidationResponse + from .subscription_deleted_event_data_py3 import SubscriptionDeletedEventData from .iot_hub_device_created_event_data_py3 import IotHubDeviceCreatedEventData from .iot_hub_device_deleted_event_data_py3 import IotHubDeviceDeletedEventData from .device_twin_metadata_py3 import DeviceTwinMetadata @@ -35,6 +38,9 @@ from .container_registry_event_actor_py3 import ContainerRegistryEventActor from .container_registry_event_source_py3 import ContainerRegistryEventSource from .container_registry_event_data_py3 import ContainerRegistryEventData + from .service_bus_active_messages_available_with_no_listeners_event_data_py3 import ServiceBusActiveMessagesAvailableWithNoListenersEventData + from .service_bus_deadletter_messages_available_with_no_listeners_event_data_py3 import ServiceBusDeadletterMessagesAvailableWithNoListenersEventData + from .media_job_state_change_event_data_py3 import MediaJobStateChangeEventData except (SyntaxError, ImportError): from .storage_blob_created_event_data import StorageBlobCreatedEventData from .storage_blob_deleted_event_data import StorageBlobDeletedEventData @@ -46,6 +52,9 @@ from .resource_delete_failure_data import ResourceDeleteFailureData from .resource_delete_cancel_data import ResourceDeleteCancelData from .event_grid_event import EventGridEvent + from .subscription_validation_event_data import SubscriptionValidationEventData + from .subscription_validation_response import SubscriptionValidationResponse + from .subscription_deleted_event_data import SubscriptionDeletedEventData from .iot_hub_device_created_event_data import IotHubDeviceCreatedEventData from .iot_hub_device_deleted_event_data import IotHubDeviceDeletedEventData from .device_twin_metadata import DeviceTwinMetadata @@ -61,6 +70,12 @@ from .container_registry_event_actor import ContainerRegistryEventActor from .container_registry_event_source import ContainerRegistryEventSource from .container_registry_event_data import ContainerRegistryEventData + from .service_bus_active_messages_available_with_no_listeners_event_data import ServiceBusActiveMessagesAvailableWithNoListenersEventData + from .service_bus_deadletter_messages_available_with_no_listeners_event_data import ServiceBusDeadletterMessagesAvailableWithNoListenersEventData + from .media_job_state_change_event_data import MediaJobStateChangeEventData +from .event_grid_client_enums import ( + JobState, +) __all__ = [ 'StorageBlobCreatedEventData', @@ -73,6 +88,9 @@ 'ResourceDeleteFailureData', 'ResourceDeleteCancelData', 'EventGridEvent', + 'SubscriptionValidationEventData', + 'SubscriptionValidationResponse', + 'SubscriptionDeletedEventData', 'IotHubDeviceCreatedEventData', 'IotHubDeviceDeletedEventData', 'DeviceTwinMetadata', @@ -88,4 +106,8 @@ 'ContainerRegistryEventActor', 'ContainerRegistryEventSource', 'ContainerRegistryEventData', + 'ServiceBusActiveMessagesAvailableWithNoListenersEventData', + 'ServiceBusDeadletterMessagesAvailableWithNoListenersEventData', + 'MediaJobStateChangeEventData', + 'JobState', ] diff --git a/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py index dc8924583b50..7365ea5c6a98 100644 --- a/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .container_registry_event_data import ContainerRegistryEventData +from .container_registry_event_data_py3 import ContainerRegistryEventData class ContainerRegistryImageDeletedEventData(ContainerRegistryEventData): diff --git a/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py index 0eb8a68e9462..f12aa21fc809 100644 --- a/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .container_registry_event_data import ContainerRegistryEventData +from .container_registry_event_data_py3 import ContainerRegistryEventData class ContainerRegistryImagePushedEventData(ContainerRegistryEventData): diff --git a/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties.py b/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties.py index 2384e13e5528..daa20dc9ef06 100644 --- a/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties.py +++ b/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties.py @@ -19,7 +19,7 @@ class DeviceLifeCycleEventProperties(Model): :param device_id: The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. + # * ? ! ( ) , = @ ; $ '. :type device_id: str :param hub_name: Name of the IoT Hub where the device was created or deleted. diff --git a/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties_py3.py b/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties_py3.py index 1502830091f0..f5033203064f 100644 --- a/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties_py3.py @@ -19,7 +19,7 @@ class DeviceLifeCycleEventProperties(Model): :param device_id: The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. + # * ? ! ( ) , = @ ; $ '. :type device_id: str :param hub_name: Name of the IoT Hub where the device was created or deleted. diff --git a/azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py b/azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py new file mode 100644 index 000000000000..f76069221076 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class JobState(str, Enum): + + canceled = "Canceled" #: The job was canceled. This is a final state for the job. + canceling = "Canceling" #: The job is in the process of being canceled. This is a transient state for the job. + error = "Error" #: The job has encountered an error. This is a final state for the job. + finished = "Finished" #: The job is finished. This is a final state for the job. + processing = "Processing" #: The job is processing. This is a transient state for the job. + queued = "Queued" #: The job is in a queued state, waiting for resources to become available. This is a transient state. + scheduled = "Scheduled" #: The job is being scheduled to run on an available resource. This is a transient state, between queued and processing states. diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data.py index 0e9ed01a4866..92c5392dd4c8 100644 --- a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data.py +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data.py @@ -18,7 +18,7 @@ class IotHubDeviceCreatedEventData(DeviceLifeCycleEventProperties): :param device_id: The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. + # * ? ! ( ) , = @ ; $ '. :type device_id: str :param hub_name: Name of the IoT Hub where the device was created or deleted. diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py index 8ddc99f32782..02b0ee8ce99d 100644 --- a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .device_life_cycle_event_properties import DeviceLifeCycleEventProperties +from .device_life_cycle_event_properties_py3 import DeviceLifeCycleEventProperties class IotHubDeviceCreatedEventData(DeviceLifeCycleEventProperties): @@ -18,7 +18,7 @@ class IotHubDeviceCreatedEventData(DeviceLifeCycleEventProperties): :param device_id: The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. + # * ? ! ( ) , = @ ; $ '. :type device_id: str :param hub_name: Name of the IoT Hub where the device was created or deleted. diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data.py index ef64033598c8..95fbdd3e1cca 100644 --- a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data.py +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data.py @@ -18,7 +18,7 @@ class IotHubDeviceDeletedEventData(DeviceLifeCycleEventProperties): :param device_id: The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. + # * ? ! ( ) , = @ ; $ '. :type device_id: str :param hub_name: Name of the IoT Hub where the device was created or deleted. diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py index 7d4745272f77..a090981744a5 100644 --- a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .device_life_cycle_event_properties import DeviceLifeCycleEventProperties +from .device_life_cycle_event_properties_py3 import DeviceLifeCycleEventProperties class IotHubDeviceDeletedEventData(DeviceLifeCycleEventProperties): @@ -18,7 +18,7 @@ class IotHubDeviceDeletedEventData(DeviceLifeCycleEventProperties): :param device_id: The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. + # * ? ! ( ) , = @ ; $ '. :type device_id: str :param hub_name: Name of the IoT Hub where the device was created or deleted. diff --git a/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data.py b/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data.py new file mode 100644 index 000000000000..02f704f2ca2b --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MediaJobStateChangeEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Media.JobStateChange event. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.JobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.JobState + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'JobState'}, + 'state': {'key': 'state', 'type': 'JobState'}, + } + + def __init__(self, **kwargs): + super(MediaJobStateChangeEventData, self).__init__(**kwargs) + self.previous_state = None + self.state = None diff --git a/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data_py3.py new file mode 100644 index 000000000000..ce69d00211eb --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MediaJobStateChangeEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Media.JobStateChange event. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.JobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.JobState + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'JobState'}, + 'state': {'key': 'state', 'type': 'JobState'}, + } + + def __init__(self, **kwargs) -> None: + super(MediaJobStateChangeEventData, self).__init__(**kwargs) + self.previous_state = None + self.state = None diff --git a/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data.py b/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data.py new file mode 100644 index 000000000000..c409c8396a05 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceBusActiveMessagesAvailableWithNoListenersEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus + resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. + Could be one of 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the + entity type is of type 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the + entity type is of type 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's + subscription. If the entity type is of type 'queue', then this value will + be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceBusActiveMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = kwargs.get('namespace_name', None) + self.request_uri = kwargs.get('request_uri', None) + self.entity_type = kwargs.get('entity_type', None) + self.queue_name = kwargs.get('queue_name', None) + self.topic_name = kwargs.get('topic_name', None) + self.subscription_name = kwargs.get('subscription_name', None) diff --git a/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data_py3.py new file mode 100644 index 000000000000..35a4108ae4d9 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceBusActiveMessagesAvailableWithNoListenersEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus + resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. + Could be one of 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the + entity type is of type 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the + entity type is of type 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's + subscription. If the entity type is of type 'queue', then this value will + be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, *, namespace_name: str=None, request_uri: str=None, entity_type: str=None, queue_name: str=None, topic_name: str=None, subscription_name: str=None, **kwargs) -> None: + super(ServiceBusActiveMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = namespace_name + self.request_uri = request_uri + self.entity_type = entity_type + self.queue_name = queue_name + self.topic_name = topic_name + self.subscription_name = subscription_name diff --git a/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data.py b/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data.py new file mode 100644 index 000000000000..60310de45628 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceBusDeadletterMessagesAvailableWithNoListenersEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListenersEvent event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus + resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. + Could be one of 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the + entity type is of type 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the + entity type is of type 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's + subscription. If the entity type is of type 'queue', then this value will + be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = kwargs.get('namespace_name', None) + self.request_uri = kwargs.get('request_uri', None) + self.entity_type = kwargs.get('entity_type', None) + self.queue_name = kwargs.get('queue_name', None) + self.topic_name = kwargs.get('topic_name', None) + self.subscription_name = kwargs.get('subscription_name', None) diff --git a/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data_py3.py new file mode 100644 index 000000000000..3f8afafc482c --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceBusDeadletterMessagesAvailableWithNoListenersEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListenersEvent event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus + resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. + Could be one of 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the + entity type is of type 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the + entity type is of type 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's + subscription. If the entity type is of type 'queue', then this value will + be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, *, namespace_name: str=None, request_uri: str=None, entity_type: str=None, queue_name: str=None, topic_name: str=None, subscription_name: str=None, **kwargs) -> None: + super(ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = namespace_name + self.request_uri = request_uri + self.entity_type = entity_type + self.queue_name = queue_name + self.topic_name = topic_name + self.subscription_name = subscription_name diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data.py b/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data.py new file mode 100644 index 000000000000..2aa366646706 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubscriptionDeletedEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.EventGrid.SubscriptionDeletedEvent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar event_subscription_id: The Azure resource ID of the deleted event + subscription. + :vartype event_subscription_id: str + """ + + _validation = { + 'event_subscription_id': {'readonly': True}, + } + + _attribute_map = { + 'event_subscription_id': {'key': 'eventSubscriptionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionDeletedEventData, self).__init__(**kwargs) + self.event_subscription_id = None diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data_py3.py new file mode 100644 index 000000000000..133338d9d112 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubscriptionDeletedEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.EventGrid.SubscriptionDeletedEvent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar event_subscription_id: The Azure resource ID of the deleted event + subscription. + :vartype event_subscription_id: str + """ + + _validation = { + 'event_subscription_id': {'readonly': True}, + } + + _attribute_map = { + 'event_subscription_id': {'key': 'eventSubscriptionId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionDeletedEventData, self).__init__(**kwargs) + self.event_subscription_id = None diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data.py b/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data.py new file mode 100644 index 000000000000..f9d0bfe7c431 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubscriptionValidationEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.EventGrid.SubscriptionValidationEvent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar validation_code: The validation code sent by Azure Event Grid to + validate an event subscription. To complete the validation handshake, the + subscriber must either respond with this validation code as part of the + validation response, or perform a GET request on the validationUrl + (available starting version 2018-05-01-preview). + :vartype validation_code: str + :ivar validation_url: The validation URL sent by Azure Event Grid + (available starting version 2018-05-01-preview). To complete the + validation handshake, the subscriber must either respond with the + validationCode as part of the validation response, or perform a GET + request on the validationUrl (available starting version + 2018-05-01-preview). + :vartype validation_url: str + """ + + _validation = { + 'validation_code': {'readonly': True}, + 'validation_url': {'readonly': True}, + } + + _attribute_map = { + 'validation_code': {'key': 'validationCode', 'type': 'str'}, + 'validation_url': {'key': 'validationUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionValidationEventData, self).__init__(**kwargs) + self.validation_code = None + self.validation_url = None diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data_py3.py new file mode 100644 index 000000000000..b4302b98927b --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubscriptionValidationEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.EventGrid.SubscriptionValidationEvent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar validation_code: The validation code sent by Azure Event Grid to + validate an event subscription. To complete the validation handshake, the + subscriber must either respond with this validation code as part of the + validation response, or perform a GET request on the validationUrl + (available starting version 2018-05-01-preview). + :vartype validation_code: str + :ivar validation_url: The validation URL sent by Azure Event Grid + (available starting version 2018-05-01-preview). To complete the + validation handshake, the subscriber must either respond with the + validationCode as part of the validation response, or perform a GET + request on the validationUrl (available starting version + 2018-05-01-preview). + :vartype validation_url: str + """ + + _validation = { + 'validation_code': {'readonly': True}, + 'validation_url': {'readonly': True}, + } + + _attribute_map = { + 'validation_code': {'key': 'validationCode', 'type': 'str'}, + 'validation_url': {'key': 'validationUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionValidationEventData, self).__init__(**kwargs) + self.validation_code = None + self.validation_url = None diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_validation_response.py b/azure-eventgrid/azure/eventgrid/models/subscription_validation_response.py new file mode 100644 index 000000000000..034d55d1faf1 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_validation_response.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubscriptionValidationResponse(Model): + """To complete an event subscription validation handshake, a subscriber can + use either the validationCode or the validationUrl received in a + SubscriptionValidationEvent. When the validationCode is used, the + SubscriptionValidationResponse can be used to build the response. + + :param validation_response: The validation response sent by the subscriber + to Azure Event Grid to complete the validation of an event subscription. + :type validation_response: str + """ + + _attribute_map = { + 'validation_response': {'key': 'validationResponse', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionValidationResponse, self).__init__(**kwargs) + self.validation_response = kwargs.get('validation_response', None) diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_validation_response_py3.py b/azure-eventgrid/azure/eventgrid/models/subscription_validation_response_py3.py new file mode 100644 index 000000000000..dc76e2a5ca6f --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_validation_response_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubscriptionValidationResponse(Model): + """To complete an event subscription validation handshake, a subscriber can + use either the validationCode or the validationUrl received in a + SubscriptionValidationEvent. When the validationCode is used, the + SubscriptionValidationResponse can be used to build the response. + + :param validation_response: The validation response sent by the subscriber + to Azure Event Grid to complete the validation of an event subscription. + :type validation_response: str + """ + + _attribute_map = { + 'validation_response': {'key': 'validationResponse', 'type': 'str'}, + } + + def __init__(self, *, validation_response: str=None, **kwargs) -> None: + super(SubscriptionValidationResponse, self).__init__(**kwargs) + self.validation_response = validation_response diff --git a/azure-eventgrid/azure/eventgrid/version.py b/azure-eventgrid/azure/eventgrid/version.py index a39916c162ce..24b9de3384da 100644 --- a/azure-eventgrid/azure/eventgrid/version.py +++ b/azure-eventgrid/azure/eventgrid/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.1.0" diff --git a/azure-mgmt-batch/HISTORY.rst b/azure-mgmt-batch/HISTORY.rst index 82c13322b2c3..0b76e6da402a 100644 --- a/azure-mgmt-batch/HISTORY.rst +++ b/azure-mgmt-batch/HISTORY.rst @@ -3,6 +3,14 @@ Release History =============== +5.0.1 (2018-05-25) +++++++++++++++++++ + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 +- msrestazure dependency version range + 5.0.0 (2017-11-13) ++++++++++++++++++ diff --git a/azure-mgmt-batch/azure/mgmt/batch/version.py b/azure-mgmt-batch/azure/mgmt/batch/version.py index 654c55a24205..40eafbac8cab 100644 --- a/azure-mgmt-batch/azure/mgmt/batch/version.py +++ b/azure-mgmt-batch/azure/mgmt/batch/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "5.0.0" +VERSION = "5.0.1" diff --git a/azure-mgmt-batch/build.json b/azure-mgmt-batch/build.json deleted file mode 100644 index 6a04d53159e4..000000000000 --- a/azure-mgmt-batch/build.json +++ /dev/null @@ -1,424 +0,0 @@ -{ - "autorest": [ - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest-core", - "version": "2.0.4216", - "engines": { - "node": ">=7.10.0" - }, - "dependencies": {}, - "optionalDependencies": {}, - "devDependencies": { - "@types/commonmark": "^0.27.0", - "@types/js-yaml": "^3.10.0", - "@types/jsonpath": "^0.1.29", - "@types/node": "^8.0.53", - "@types/source-map": "^0.5.0", - "@types/yargs": "^8.0.2", - "dts-generator": "^2.1.0", - "mocha": "^4.0.1", - "mocha-typescript": "^1.1.7", - "shx": "0.2.2", - "static-link": "^0.2.3", - "vscode-jsonrpc": "^3.3.1" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "_shasum": "f6b97454df552dfa54bd0df23f8309665be5fd4c", - "_shrinkwrap": null, - "bin": { - "autorest-core": "./dist/app.js", - "autorest-language-service": "dist/language-service/language-service.js" - }, - "_id": "@microsoft.azure/autorest-core@2.0.4216", - "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.1835.1988216098603.personal-lock", - "options": { - "port": 54439, - "host": "2130759828", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.1835.1988216098603.personal-lock:54439" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest-core", - "version": "2.0.4227", - "engines": { - "node": ">=7.10.0" - }, - "dependencies": {}, - "optionalDependencies": {}, - "devDependencies": { - "@types/commonmark": "^0.27.0", - "@types/js-yaml": "^3.10.0", - "@types/jsonpath": "^0.1.29", - "@types/node": "^8.0.53", - "@types/source-map": "^0.5.0", - "@types/yargs": "^8.0.2", - "@types/z-schema": "^3.16.31", - "dts-generator": "^2.1.0", - "mocha": "^4.0.1", - "mocha-typescript": "^1.1.7", - "shx": "0.2.2", - "static-link": "^0.2.3", - "vscode-jsonrpc": "^3.3.1" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "_shasum": "d29217f10a534571f15f28ad2556c308726c5e0e", - "_shrinkwrap": null, - "bin": { - "autorest-core": "./dist/app.js", - "autorest-language-service": "dist/language-service/language-service.js" - }, - "_id": "@microsoft.azure/autorest-core@2.0.4227", - "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.1835.1988216098603.personal-lock", - "options": { - "port": 54439, - "host": "2130759828", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.1835.1988216098603.personal-lock:54439" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.0.21", - "dependencies": { - "dotnet-2.0.0": "^1.3.2" - }, - "optionalDependencies": {}, - "devDependencies": { - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.1.1", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.0.21", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.1835.1988216098603.personal-lock", - "options": { - "port": 54439, - "host": "2130759828", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.1835.1988216098603.personal-lock:54439" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.3.38", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/autorest.testserver": "2.3.1", - "autorest": "^2.0.4201", - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "903bb77932e4ed1b8bc3b25cc39b167143494f6c", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.3.38", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.1835.1988216098603.personal-lock", - "options": { - "port": 54439, - "host": "2130759828", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.1835.1988216098603.personal-lock:54439" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.python", - "version": "2.1.28", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/autorest.testserver": "^2.3.13", - "autorest": "^2.0.4203", - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "_shasum": "864acf40daff5c5e073f0e7da55597c3a7994469", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.python@2.1.28", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.1835.1988216098603.personal-lock", - "options": { - "port": 54439, - "host": "2130759828", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.1835.1988216098603.personal-lock:54439" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - } - ], - "autorest_bootstrap": {} -} \ No newline at end of file diff --git a/azure-mgmt-batch/sdk_packaging.toml b/azure-mgmt-batch/sdk_packaging.toml new file mode 100644 index 000000000000..5d112a76b6b5 --- /dev/null +++ b/azure-mgmt-batch/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-batch" +package_pprint_name = "Batch Management" +package_doc_id = "batch" +is_stable = true diff --git a/azure-mgmt-batch/setup.cfg b/azure-mgmt-batch/setup.cfg index 0be29eb3bc63..856f4164982c 100644 --- a/azure-mgmt-batch/setup.cfg +++ b/azure-mgmt-batch/setup.cfg @@ -1,3 +1,3 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-mgmt-nspkg +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/azure-mgmt-batch/setup.py b/azure-mgmt-batch/setup.py index a5cd0b216608..3498c2e0f75c 100644 --- a/azure-mgmt-batch/setup.py +++ b/azure-mgmt-batch/setup.py @@ -69,7 +69,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', @@ -78,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-batchai/tests/__init__.py b/azure-mgmt-batchai/tests/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/azure-mgmt-batchai/tests/helpers.py b/azure-mgmt-batchai/tests/helpers.py index a70bce5c5cb6..fd103e64fe43 100644 --- a/azure-mgmt-batchai/tests/helpers.py +++ b/azure-mgmt-batchai/tests/helpers.py @@ -522,10 +522,10 @@ def create_batchai_client(preparer): :returns BatchAIManagementClient: an instance of Batch AI management client """ try: - from . import custom_client + from custom_client import create as create_custom_client except ImportError: - custom_client = None - if custom_client is not None: - return custom_client.create() + create_custom_client = None + if create_custom_client is not None: + return create_custom_client() else: return preparer.create_mgmt_client(BatchAIManagementClient) diff --git a/azure-mgmt-batchai/tests/test_mgmt_batchai_clusters.py b/azure-mgmt-batchai/tests/test_mgmt_batchai_clusters.py index 2afd734761d8..0e78ab749c9c 100644 --- a/azure-mgmt-batchai/tests/test_mgmt_batchai_clusters.py +++ b/azure-mgmt-batchai/tests/test_mgmt_batchai_clusters.py @@ -12,17 +12,22 @@ from devtools_testutils import ResourceGroupPreparer from devtools_testutils import StorageAccountPreparer -from . import helpers +from helpers import ( + create_batchai_client, create_cluster, assert_existing_clusters_are, wait_for_nodes, + assert_remote_login_info_reported_for_nodes, assert_existing_clusters_are, get_node_ids, assert_file_in_file_share, + create_custom_job,wait_for_job_completion, assert_job_files_are, LOCATION, FAKE_STORAGE, NODE_STARTUP_TIMEOUT_SEC, + AUTO_SCALE_TIMEOUT_SEC, STANDARD_OUTPUT_DIRECTORY_ID, MINUTE +) class ClusterTestCase(AzureMgmtTestCase): def setUp(self): super(ClusterTestCase, self).setUp() - self.client = helpers.create_batchai_client(self) # type: BatchAIManagementClient + self.client = create_batchai_client(self) # type: BatchAIManagementClient self.cluster_name = self.get_resource_name('cluster') - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) def test_creation_and_deletion(self, resource_group, location, storage_account, storage_account_key): """Tests basic use-case scenario. @@ -31,7 +36,7 @@ def test_creation_and_deletion(self, resource_group, location, storage_account, 3. Execute a task in a docker container 4. Delete cluster """ - cluster = helpers.create_cluster( + cluster = create_cluster( self.client, location, resource_group.name, self.cluster_name, 'STANDARD_D1', 1, storage_account.name, storage_account_key) @@ -40,13 +45,13 @@ def test_creation_and_deletion(self, resource_group, location, storage_account, self.assertEqual(cluster.vm_size, 'STANDARD_D1') # Verify that the cluster is reported in the list of clusters - helpers.assert_existing_clusters_are(self, self.client, resource_group.name, [self.cluster_name]) + assert_existing_clusters_are(self, self.client, resource_group.name, [self.cluster_name]) # Verify that one node is allocated and become available self.assertEqual( - helpers.wait_for_nodes(self.is_live, self.client, resource_group.name, self.cluster_name, 1, - helpers.NODE_STARTUP_TIMEOUT_SEC), 1) - helpers.assert_remote_login_info_reported_for_nodes(self, self.client, resource_group.name, + wait_for_nodes(self.is_live, self.client, resource_group.name, self.cluster_name, 1, + NODE_STARTUP_TIMEOUT_SEC), 1) + assert_remote_login_info_reported_for_nodes(self, self.client, resource_group.name, self.cluster_name, 1) # Verify that the cluster able to run tasks. @@ -55,14 +60,14 @@ def test_creation_and_deletion(self, resource_group, location, storage_account, # Test cluster deletion self.client.clusters.delete(resource_group.name, self.cluster_name).result() - helpers.assert_existing_clusters_are(self, self.client, resource_group.name, []) + assert_existing_clusters_are(self, self.client, resource_group.name, []) - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) def test_setup_task_execution(self, resource_group, location, storage_account, storage_account_key): """Tests setup task execution. """ - cluster = helpers.create_cluster( + cluster = create_cluster( self.client, location, resource_group.name, self.cluster_name, 'STANDARD_D1', 1, storage_account.name, storage_account_key, setup_task_cmd='echo $GREETING $SECRET_GREETING', @@ -70,12 +75,12 @@ def test_setup_task_execution(self, resource_group, location, storage_account, s setup_task_secrets={'SECRET_GREETING': 'has a secret'}) # type: models.Cluster # Verify that the cluster is reported in the list of clusters - helpers.assert_existing_clusters_are(self, self.client, resource_group.name, [self.cluster_name]) + assert_existing_clusters_are(self, self.client, resource_group.name, [self.cluster_name]) # Verify that one node is allocated and become available self.assertEqual( - helpers.wait_for_nodes(self.is_live, self.client, resource_group.name, self.cluster_name, 1, - helpers.NODE_STARTUP_TIMEOUT_SEC), 1) + wait_for_nodes(self.is_live, self.client, resource_group.name, self.cluster_name, 1, + NODE_STARTUP_TIMEOUT_SEC), 1) # Check that server doesn't return values for secrets self.assertEqual(len(cluster.node_setup.setup_task.secrets), 1) @@ -84,30 +89,30 @@ def test_setup_task_execution(self, resource_group, location, storage_account, s # Verify that the setup task is completed by checking generated output. BatchAI reports a path which was auto- # generated for storing setup output logs. setup_task_output_path = cluster.node_setup.setup_task.std_out_err_path_suffix - nodes = helpers.get_node_ids(self.client, resource_group.name, self.cluster_name) + nodes = get_node_ids(self.client, resource_group.name, self.cluster_name) self.assertEqual(len(nodes), 1) node_id = nodes[0] - helpers.assert_file_in_file_share(self, storage_account.name, storage_account_key, + assert_file_in_file_share(self, storage_account.name, storage_account_key, setup_task_output_path, 'stdout-{0}.txt'.format(node_id), u'setup task has a secret\n') - helpers.assert_file_in_file_share(self, storage_account.name, storage_account_key, + assert_file_in_file_share(self, storage_account.name, storage_account_key, setup_task_output_path, 'stderr-{0}.txt'.format(node_id), u'') self.client.clusters.delete(resource_group.name, self.cluster_name).result() - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) def test_cluster_resizing(self, resource_group, location, storage_account, storage_account_key): """Tests manual cluster resizing""" - cluster = helpers.create_cluster( + cluster = create_cluster( self.client, location, resource_group.name, self.cluster_name, 'STANDARD_D1', 1, storage_account.name, storage_account_key) # Verify that one node is allocated and become available self.assertEqual( - helpers.wait_for_nodes(self.is_live, self.client, resource_group.name, self.cluster_name, 1, - helpers.NODE_STARTUP_TIMEOUT_SEC), 1) - helpers.assert_remote_login_info_reported_for_nodes(self, self.client, resource_group.name, + wait_for_nodes(self.is_live, self.client, resource_group.name, self.cluster_name, 1, + NODE_STARTUP_TIMEOUT_SEC), 1) + assert_remote_login_info_reported_for_nodes(self, self.client, resource_group.name, self.cluster_name, 1) self.assertCanResizeCluster(resource_group, 0) @@ -117,12 +122,12 @@ def test_cluster_resizing(self, resource_group, location, storage_account, stora self.assertCanRunJobOnHost(resource_group, location, cluster.id) self.client.clusters.delete(resource_group.name, self.cluster_name).result() - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) def test_auto_scaling(self, resource_group, location, storage_account, storage_account_key): """Tests auto-scaling""" # Create the cluster with no nodes. - cluster = helpers.create_cluster( + cluster = create_cluster( self.client, location, resource_group.name, self.cluster_name, 'STANDARD_D1', 0, storage_account.name, storage_account_key) @@ -134,44 +139,44 @@ def test_auto_scaling(self, resource_group, location, storage_account, storage_a maximum_node_count=1))) # Submit a task. BatchAI must increase the number of nodes to execute the task. - self.assertCanRunJobOnHost(resource_group, location, cluster.id, timeout_sec=helpers.AUTO_SCALE_TIMEOUT_SEC) + self.assertCanRunJobOnHost(resource_group, location, cluster.id, timeout_sec=AUTO_SCALE_TIMEOUT_SEC) # Verify that cluster downsized to zero since there are no more jobs for it self.assertEqual( - helpers.wait_for_nodes(self.is_live, self.client, resource_group.name, self.cluster_name, 0, - helpers.NODE_STARTUP_TIMEOUT_SEC), 0) + wait_for_nodes(self.is_live, self.client, resource_group.name, self.cluster_name, 0, + NODE_STARTUP_TIMEOUT_SEC), 0) self.client.clusters.delete(resource_group.name, self.cluster_name).result() - def assertCanRunJobInContainer(self, resource_group, location, cluster_id, timeout_sec=helpers.MINUTE): + def assertCanRunJobInContainer(self, resource_group, location, cluster_id, timeout_sec=MINUTE): self.assertCanRunJob(resource_group, location, cluster_id, 'container_job', models.ContainerSettings(image_source_registry=models.ImageSourceRegistry(image="ubuntu")), timeout_sec) - def assertCanRunJobOnHost(self, resource_group, location, cluster_id, timeout_sec=helpers.MINUTE): + def assertCanRunJobOnHost(self, resource_group, location, cluster_id, timeout_sec=MINUTE): self.assertCanRunJob(resource_group, location, cluster_id, 'host_job', None, timeout_sec) def assertCanRunJob(self, resource_group, location, cluster_id, job_name, container_settings, timeout_sec): - helpers.create_custom_job(self.client, resource_group.name, location, cluster_id, job_name, 1, + create_custom_job(self.client, resource_group.name, location, cluster_id, job_name, 1, 'echo hello | tee $AZ_BATCHAI_OUTPUT_OUTPUTS/hi.txt', container=container_settings) # Verify if the job finishes reasonably fast. self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job_name, timeout_sec), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job_name, timeout_sec), models.ExecutionState.succeeded) # Verify if output files and standard output files are available and contain expected greeting. - helpers.assert_job_files_are(self, self.client, resource_group.name, job_name, 'OUTPUTS', + assert_job_files_are(self, self.client, resource_group.name, job_name, 'OUTPUTS', {u'hi.txt': u'hello\n'}) - helpers.assert_job_files_are(self, self.client, resource_group.name, job_name, - helpers.STANDARD_OUTPUT_DIRECTORY_ID, + assert_job_files_are(self, self.client, resource_group.name, job_name, + STANDARD_OUTPUT_DIRECTORY_ID, {u'stdout.txt': u'hello\n', u'stderr.txt': ''}) def assertCanResizeCluster(self, resource_group, target): self.client.clusters.update(resource_group.name, self.cluster_name, scale_settings=models.ScaleSettings( manual=models.ManualScaleSettings(target_node_count=target))) self.assertEqual( - helpers.wait_for_nodes(self.is_live, self.client, resource_group.name, self.cluster_name, target, - helpers.NODE_STARTUP_TIMEOUT_SEC), + wait_for_nodes(self.is_live, self.client, resource_group.name, self.cluster_name, target, + NODE_STARTUP_TIMEOUT_SEC), target) - helpers.assert_remote_login_info_reported_for_nodes(self, self.client, resource_group.name, + assert_remote_login_info_reported_for_nodes(self, self.client, resource_group.name, self.cluster_name, target) diff --git a/azure-mgmt-batchai/tests/test_mgmt_batchai_file_servers.py b/azure-mgmt-batchai/tests/test_mgmt_batchai_file_servers.py index d504983de4c5..e7876a394d7f 100644 --- a/azure-mgmt-batchai/tests/test_mgmt_batchai_file_servers.py +++ b/azure-mgmt-batchai/tests/test_mgmt_batchai_file_servers.py @@ -11,19 +11,24 @@ from devtools_testutils import AzureMgmtTestCase from devtools_testutils import ResourceGroupPreparer from devtools_testutils import StorageAccountPreparer -from . import helpers - -_FILE_SERVER_CREATION_TIMEOUT_SEC = helpers.MINUTE * 10 +from helpers import ( + create_batchai_client, create_cluster, assert_existing_clusters_are, wait_for_nodes, + assert_remote_login_info_reported_for_nodes, assert_existing_clusters_are, get_node_ids, assert_file_in_file_share, + create_file_server, assert_existing_file_servers_are, wait_for_file_server, + create_custom_job,wait_for_job_completion, assert_job_files_are, LOCATION, FAKE_STORAGE, NODE_STARTUP_TIMEOUT_SEC, + AUTO_SCALE_TIMEOUT_SEC, STANDARD_OUTPUT_DIRECTORY_ID, MINUTE, RE_ID_ADDRESS +) +_FILE_SERVER_CREATION_TIMEOUT_SEC = MINUTE * 10 class FileServerTestCase(AzureMgmtTestCase): def setUp(self): super(FileServerTestCase, self).setUp() - self.client = helpers.create_batchai_client(self) # type: BatchAIManagementClient + self.client = create_batchai_client(self) # type: BatchAIManagementClient self.file_server_name = self.get_resource_name('fileserver') - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) def test_file_server(self, resource_group, location, storage_account, storage_account_key): """Tests file server functionality @@ -33,17 +38,17 @@ def test_file_server(self, resource_group, location, storage_account, storage_ac a. submit tasks (one from host and another from container) on the first cluster to write data to nfs b. submit a task on the second cluster to read the data from nfs """ - server = helpers.create_file_server(self.client, location, resource_group.name, + server = create_file_server(self.client, location, resource_group.name, self.file_server_name) # type: models.FileServer - cluster1 = helpers.create_cluster(self.client, location, resource_group.name, 'cluster1', + cluster1 = create_cluster(self.client, location, resource_group.name, 'cluster1', 'STANDARD_D1', 1, storage_account.name, storage_account_key, file_servers=[models.FileServerReference( file_server=models.ResourceId(id=server.id), relative_mount_path='nfs', mount_options="rw")]) - cluster2 = helpers.create_cluster(self.client, location, resource_group.name, 'cluster2', + cluster2 = create_cluster(self.client, location, resource_group.name, 'cluster2', 'STANDARD_D1', 1, storage_account.name, storage_account_key, file_servers=[models.FileServerReference( @@ -51,53 +56,53 @@ def test_file_server(self, resource_group, location, storage_account, storage_ac relative_mount_path='nfs', mount_options="rw")]) # Verify the file server is reported. - helpers.assert_existing_file_servers_are(self, self.client, resource_group.name, [self.file_server_name]) + assert_existing_file_servers_are(self, self.client, resource_group.name, [self.file_server_name]) # Verify the file server become available in a reasonable time self.assertTrue( - helpers.wait_for_file_server(self.is_live, self.client, resource_group.name, self.file_server_name, + wait_for_file_server(self.is_live, self.client, resource_group.name, self.file_server_name, _FILE_SERVER_CREATION_TIMEOUT_SEC)) # Verify the remote login information and private ip are reported server = self.client.file_servers.get(resource_group.name, self.file_server_name) # type: models.FileServer - self.assertRegexpMatches(server.mount_settings.file_server_public_ip, helpers.RE_ID_ADDRESS) - self.assertRegexpMatches(server.mount_settings.file_server_internal_ip, helpers.RE_ID_ADDRESS) + self.assertRegexpMatches(server.mount_settings.file_server_public_ip, RE_ID_ADDRESS) + self.assertRegexpMatches(server.mount_settings.file_server_internal_ip, RE_ID_ADDRESS) # Verify the clusters allocated nodes successfully self.assertEqual( - helpers.wait_for_nodes(self.is_live, self.client, resource_group.name, 'cluster1', 1, - helpers.NODE_STARTUP_TIMEOUT_SEC), 1) + wait_for_nodes(self.is_live, self.client, resource_group.name, 'cluster1', 1, + NODE_STARTUP_TIMEOUT_SEC), 1) self.assertEqual( - helpers.wait_for_nodes(self.is_live, self.client, resource_group.name, 'cluster2', 1, - helpers.NODE_STARTUP_TIMEOUT_SEC), 1) + wait_for_nodes(self.is_live, self.client, resource_group.name, 'cluster2', 1, + NODE_STARTUP_TIMEOUT_SEC), 1) # Execute publishing tasks on the first cluster - job1 = helpers.create_custom_job(self.client, resource_group.name, location, cluster1.id, + job1 = create_custom_job(self.client, resource_group.name, location, cluster1.id, 'host_publisher', 1, 'echo hi from host > $AZ_BATCHAI_MOUNT_ROOT/nfs/host.txt') self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job1.name, helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job1.name, MINUTE), models.ExecutionState.succeeded) - job2 = helpers.create_custom_job(self.client, resource_group.name, location, cluster1.id, + job2 = create_custom_job(self.client, resource_group.name, location, cluster1.id, 'container_publisher', 1, 'echo hi from container >> $AZ_BATCHAI_MOUNT_ROOT/nfs/container.txt', container=models.ContainerSettings( image_source_registry=models.ImageSourceRegistry(image="ubuntu"))) self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job2.name, helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job2.name, MINUTE), models.ExecutionState.succeeded) # Execute consumer task on the second cluster - job3 = helpers.create_custom_job(self.client, resource_group.name, location, cluster2.id, 'consumer', 1, + job3 = create_custom_job(self.client, resource_group.name, location, cluster2.id, 'consumer', 1, 'cat $AZ_BATCHAI_MOUNT_ROOT/nfs/host.txt; ' 'cat $AZ_BATCHAI_MOUNT_ROOT/nfs/container.txt') self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job3.name, helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job3.name, MINUTE), models.ExecutionState.succeeded) # Verify the data - helpers.assert_job_files_are(self, self.client, resource_group.name, job3.name, - helpers.STANDARD_OUTPUT_DIRECTORY_ID, + assert_job_files_are(self, self.client, resource_group.name, job3.name, + STANDARD_OUTPUT_DIRECTORY_ID, {u'stdout.txt': u'hi from host\nhi from container\n', u'stderr.txt': ''}) # Delete clusters @@ -106,4 +111,4 @@ def test_file_server(self, resource_group, location, storage_account, storage_ac # Test deletion self.client.file_servers.delete(resource_group.name, self.file_server_name).result() - helpers.assert_existing_file_servers_are(self, self.client, resource_group.name, []) + assert_existing_file_servers_are(self, self.client, resource_group.name, []) diff --git a/azure-mgmt-batchai/tests/test_mgmt_batchai_jobs.py b/azure-mgmt-batchai/tests/test_mgmt_batchai_jobs.py index b40b1558a9aa..64df156ca5e3 100644 --- a/azure-mgmt-batchai/tests/test_mgmt_batchai_jobs.py +++ b/azure-mgmt-batchai/tests/test_mgmt_batchai_jobs.py @@ -15,119 +15,127 @@ import azure.mgmt.batchai.models as models from azure.mgmt.batchai import BatchAIManagementClient -from . import helpers +from helpers import ( + create_batchai_client, create_cluster, assert_existing_clusters_are, wait_for_nodes, + assert_remote_login_info_reported_for_nodes, assert_existing_clusters_are, get_node_ids, assert_file_in_file_share, + create_file_server, assert_existing_file_servers_are, wait_for_file_server, wait_for_job_start_running, + create_custom_job,wait_for_job_completion, assert_job_files_are, LOCATION, FAKE_STORAGE, NODE_STARTUP_TIMEOUT_SEC, + AUTO_SCALE_TIMEOUT_SEC, STANDARD_OUTPUT_DIRECTORY_ID, MINUTE, ClusterPreparer, assert_job_files_in_path_are, + JOB_OUTPUT_DIRECTORY_PATH_ENV, STDOUTERR_FOLDER_NAME, AZURE_FILES_MOUNTING_PATH, JOB_OUTPUT_DIRECTORY_ID, + OUTPUT_DIRECTORIES_FOLDER_NAME +) class JobTestCase(AzureMgmtTestCase): def setUp(self): super(JobTestCase, self).setUp() - self.client = helpers.create_batchai_client(self) # type: BatchAIManagementClient + self.client = create_batchai_client(self) # type: BatchAIManagementClient - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) - @helpers.ClusterPreparer() + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) + @ClusterPreparer() def test_job_creation_and_deletion(self, resource_group, location, cluster, storage_account, storage_account_key): """Tests simple scenario for a job - submit, check results, delete.""" - job = helpers.create_custom_job(self.client, resource_group.name, location, cluster.id, 'job', 1, - 'echo hi | tee {0}/hi.txt'.format(helpers.JOB_OUTPUT_DIRECTORY_PATH_ENV), + job = create_custom_job(self.client, resource_group.name, location, cluster.id, 'job', 1, + 'echo hi | tee {0}/hi.txt'.format(JOB_OUTPUT_DIRECTORY_PATH_ENV), container=models.ContainerSettings( image_source_registry=models.ImageSourceRegistry(image='ubuntu')) ) # type: models.Job self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, MINUTE), models.ExecutionState.succeeded) # Check standard job output - helpers.assert_job_files_are(self, self.client, resource_group.name, job.name, - helpers.STANDARD_OUTPUT_DIRECTORY_ID, + assert_job_files_are(self, self.client, resource_group.name, job.name, + STANDARD_OUTPUT_DIRECTORY_ID, {u'stdout.txt': u'hi\n', u'stderr.txt': u''}) # Check job's output - helpers.assert_job_files_are(self, self.client, resource_group.name, job.name, - helpers.JOB_OUTPUT_DIRECTORY_ID, + assert_job_files_are(self, self.client, resource_group.name, job.name, + JOB_OUTPUT_DIRECTORY_ID, {u'hi.txt': u'hi\n'}) # Check that we can access the output files directly in storage using path segment returned by the server - helpers.assert_file_in_file_share(self, storage_account.name, storage_account_key, - job.job_output_directory_path_segment + '/' + helpers.STDOUTERR_FOLDER_NAME, + assert_file_in_file_share(self, storage_account.name, storage_account_key, + job.job_output_directory_path_segment + '/' + STDOUTERR_FOLDER_NAME, 'stdout.txt', u'hi\n') self.client.jobs.delete(resource_group.name, job.name).result() self.assertRaises(CloudError, lambda: self.client.jobs.get(resource_group.name, job.name)) - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) - @helpers.ClusterPreparer() + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) + @ClusterPreparer() def test_running_job_deletion(self, resource_group, location, cluster): """Tests deletion of a running job.""" - job = helpers.create_custom_job(self.client, resource_group.name, location, cluster.id, 'job', 1, + job = create_custom_job(self.client, resource_group.name, location, cluster.id, 'job', 1, 'sleep 600') self.assertEqual( - helpers.wait_for_job_start_running(self.is_live, self.client, resource_group.name, job.name, - helpers.MINUTE), + wait_for_job_start_running(self.is_live, self.client, resource_group.name, job.name, + MINUTE), models.ExecutionState.running) self.client.jobs.delete(resource_group.name, job.name).result() self.assertRaises(CloudError, lambda: self.client.jobs.get(resource_group.name, job.name)) - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) - @helpers.ClusterPreparer() + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) + @ClusterPreparer() def test_running_job_termination(self, resource_group, location, cluster): """Tests termination of a running job.""" - job = helpers.create_custom_job(self.client, resource_group.name, location, cluster.id, 'longrunning', 1, + job = create_custom_job(self.client, resource_group.name, location, cluster.id, 'longrunning', 1, 'sleep 600') self.assertEqual( - helpers.wait_for_job_start_running(self.is_live, self.client, resource_group.name, job.name, - helpers.MINUTE), + wait_for_job_start_running(self.is_live, self.client, resource_group.name, job.name, + MINUTE), models.ExecutionState.running) self.client.jobs.terminate(resource_group.name, job.name).result() self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, MINUTE), models.ExecutionState.failed) - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) - @helpers.ClusterPreparer(target_nodes=0, wait=False) + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) + @ClusterPreparer(target_nodes=0, wait=False) def test_queued_job_termination(self, resource_group, location, cluster): """Tests termination of a job in queued state.""" # Create a job which will be in queued state because the cluster has no compute nodes. - job = helpers.create_custom_job(self.client, resource_group.name, location, cluster.id, 'job', 1, 'true') + job = create_custom_job(self.client, resource_group.name, location, cluster.id, 'job', 1, 'true') self.client.jobs.terminate(resource_group.name, job.name).result() self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, MINUTE), models.ExecutionState.failed) self.client.jobs.delete(resource_group.name, job.name).result() self.assertRaises(CloudError, lambda: self.client.jobs.get(resource_group.name, job.name)) - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) - @helpers.ClusterPreparer() + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) + @ClusterPreparer() def test_completed_job_termination(self, resource_group, location, cluster): """Tests termination of completed job.""" - job = helpers.create_custom_job(self.client, resource_group.name, location, cluster.id, 'job', 1, 'true') + job = create_custom_job(self.client, resource_group.name, location, cluster.id, 'job', 1, 'true') self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, MINUTE), models.ExecutionState.succeeded) # termination of completed job is NOP and must not change the execution state. self.client.jobs.terminate(resource_group.name, job.name).result() self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, MINUTE), models.ExecutionState.succeeded) self.client.jobs.delete(resource_group.name, job.name).result() self.assertRaises(CloudError, lambda: self.client.jobs.get(resource_group.name, job.name)) - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) - @helpers.ClusterPreparer() + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) + @ClusterPreparer() def test_failed_job_reporting(self, resource_group, location, cluster): """Tests if job failure is reported correctly.""" - job = helpers.create_custom_job(self.client, resource_group.name, location, cluster.id, 'job', 1, + job = create_custom_job(self.client, resource_group.name, location, cluster.id, 'job', 1, 'false') self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, - helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, + MINUTE), models.ExecutionState.failed) job = self.client.jobs.get(resource_group.name, job.name) @@ -137,23 +145,23 @@ def test_failed_job_reporting(self, resource_group, location, cluster): self.client.jobs.delete(resource_group.name, job.name).result() self.assertRaises(CloudError, lambda: self.client.jobs.get(resource_group.name, job.name)) - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) - @helpers.ClusterPreparer() + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) + @ClusterPreparer() def test_job_preparation_host(self, resource_group, location, cluster): """Tests job preparation execution for a job running on a host.""" # create a job with job preparation which populates input data in $AZ_BATCHAI_INPUT_INPUT/hi.txt - job = helpers.create_custom_job( + job = create_custom_job( self.client, resource_group.name, location, cluster.id, 'job', 1, 'cat $AZ_BATCHAI_INPUT_INPUT/hi.txt', 'mkdir -p $AZ_BATCHAI_INPUT_INPUT && echo hello | tee $AZ_BATCHAI_INPUT_INPUT/hi.txt') self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, - helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, + MINUTE), models.ExecutionState.succeeded) - helpers.assert_job_files_are(self, self.client, resource_group.name, job.name, - helpers.STANDARD_OUTPUT_DIRECTORY_ID, + assert_job_files_are(self, self.client, resource_group.name, job.name, + STANDARD_OUTPUT_DIRECTORY_ID, {u'stdout.txt': u'hello\n', u'stderr.txt': u'', u'stdout-job_prep.txt': u'hello\n', @@ -161,25 +169,25 @@ def test_job_preparation_host(self, resource_group, location, cluster): self.client.jobs.delete(resource_group.name, job.name).result() self.assertRaises(CloudError, lambda: self.client.jobs.get(resource_group.name, job.name)) - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) - @helpers.ClusterPreparer() + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) + @ClusterPreparer() def test_job_preparation_container(self, resource_group, location, cluster): """Tests job preparation execution for a job running in a container.""" # create a job with job preparation which populates input data in $AZ_BATCHAI_INPUT_INPUT/hi.txt - job = helpers.create_custom_job( + job = create_custom_job( self.client, resource_group.name, location, cluster.id, 'job', 1, 'cat $AZ_BATCHAI_INPUT_INPUT/hi.txt', 'mkdir -p $AZ_BATCHAI_INPUT_INPUT && echo hello | tee $AZ_BATCHAI_INPUT_INPUT/hi.txt', container=models.ContainerSettings( image_source_registry=models.ImageSourceRegistry(image='ubuntu'))) self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, - helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, + MINUTE), models.ExecutionState.succeeded) - helpers.assert_job_files_are(self, self.client, resource_group.name, job.name, - helpers.STANDARD_OUTPUT_DIRECTORY_ID, + assert_job_files_are(self, self.client, resource_group.name, job.name, + STANDARD_OUTPUT_DIRECTORY_ID, {u'stdout.txt': u'hello\n', u'stderr.txt': u'', u'stdout-job_prep.txt': u'hello\n', @@ -187,17 +195,17 @@ def test_job_preparation_container(self, resource_group, location, cluster): self.client.jobs.delete(resource_group.name, job.name).result() self.assertRaises(CloudError, lambda: self.client.jobs.get(resource_group.name, job.name)) - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) - @helpers.ClusterPreparer() + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) + @ClusterPreparer() def test_job_host_preparation_failure_reporting(self, resource_group, location, cluster): """Tests if job preparation failure is reported correctly.""" # create a job with failing job preparation - job = helpers.create_custom_job( + job = create_custom_job( self.client, resource_group.name, location, cluster.id, 'job', 1, 'true', 'false') self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, - helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, + MINUTE), models.ExecutionState.failed) job = self.client.jobs.get(resource_group.name, job.name) @@ -208,19 +216,19 @@ def test_job_host_preparation_failure_reporting(self, resource_group, location, self.client.jobs.delete(resource_group.name, job.name).result() self.assertRaises(CloudError, lambda: self.client.jobs.get(resource_group.name, job.name)) - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) - @helpers.ClusterPreparer() + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) + @ClusterPreparer() def test_job_container_preparation_failure_reporting(self, resource_group, location, cluster): """Tests if job preparation failure is reported correctly.""" # create a job with failing job preparation - job = helpers.create_custom_job(self.client, resource_group.name, location, cluster.id, 'job', 1, 'true', + job = create_custom_job(self.client, resource_group.name, location, cluster.id, 'job', 1, 'true', 'false', container=models.ContainerSettings( image_source_registry=models.ImageSourceRegistry(image='ubuntu'))) self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, - helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, + MINUTE), models.ExecutionState.failed) job = self.client.jobs.get(resource_group.name, job.name) @@ -230,58 +238,58 @@ def test_job_container_preparation_failure_reporting(self, resource_group, locat self.client.jobs.delete(resource_group.name, job.name).result() self.assertRaises(CloudError, lambda: self.client.jobs.get(resource_group.name, job.name)) - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) - @helpers.ClusterPreparer(target_nodes=2) + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) + @ClusterPreparer(target_nodes=2) def test_password_less_ssh(self, resource_group, location, cluster): """Tests if password-less ssh is configured on hosts.""" - job = helpers.create_custom_job(self.client, resource_group.name, location, cluster.id, 'job', 2, + job = create_custom_job(self.client, resource_group.name, location, cluster.id, 'job', 2, 'ssh 10.0.0.4 echo done && ssh 10.0.0.5 echo done') self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, - helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, + MINUTE), models.ExecutionState.succeeded) job = self.client.jobs.get(resource_group.name, job.name) - helpers.assert_job_files_are(self, self.client, resource_group.name, job.name, - helpers.STANDARD_OUTPUT_DIRECTORY_ID, + assert_job_files_are(self, self.client, resource_group.name, job.name, + STANDARD_OUTPUT_DIRECTORY_ID, {u'stdout.txt': u'done\ndone\n', u'stderr.txt': re.compile('Permanently added.*')}) self.client.jobs.delete(resource_group.name, job.name).result() self.assertRaises(CloudError, lambda: self.client.jobs.get(resource_group.name, job.name)) - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) - @helpers.ClusterPreparer(target_nodes=2) + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) + @ClusterPreparer(target_nodes=2) def test_password_less_ssh_in_container(self, resource_group, location, cluster): """Tests if password-less ssh is configured in containers.""" - job = helpers.create_custom_job(self.client, resource_group.name, location, cluster.id, 'job', 2, + job = create_custom_job(self.client, resource_group.name, location, cluster.id, 'job', 2, 'ssh 10.0.0.5 echo done && ssh 10.0.0.5 echo done', container=models.ContainerSettings( image_source_registry=models.ImageSourceRegistry(image='ubuntu'))) self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, - helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, + MINUTE), models.ExecutionState.succeeded) job = self.client.jobs.get(resource_group.name, job.name) - helpers.assert_job_files_are(self, self.client, resource_group.name, job.name, - helpers.STANDARD_OUTPUT_DIRECTORY_ID, + assert_job_files_are(self, self.client, resource_group.name, job.name, + STANDARD_OUTPUT_DIRECTORY_ID, {u'stdout.txt': u'done\ndone\n', u'stderr.txt': re.compile('Permanently added.*')}) self.client.jobs.delete(resource_group.name, job.name).result() self.assertRaises(CloudError, lambda: self.client.jobs.get(resource_group.name, job.name)) - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) - @helpers.ClusterPreparer(target_nodes=1) + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) + @ClusterPreparer(target_nodes=1) def test_job_level_mounting(self, resource_group, location, cluster, storage_account, storage_account_key): """Tests if it's possible to mount external file systems for a job.""" job_name = 'job' # Create file share and container to mount on the job level - if storage_account.name != helpers.FAKE_STORAGE.name: + if storage_account.name != FAKE_STORAGE.name: files = FileService(storage_account.name, storage_account_key) files.create_share('jobshare', fail_on_exist=False) blobs = BlockBlobService(storage_account.name, storage_account_key) @@ -318,7 +326,7 @@ def test_job_level_mounting(self, resource_group, location, cluster, storage_acc ] ), # Put standard output on cluster level AFS to check that the job has access to it. - std_out_err_path_prefix='$AZ_BATCHAI_MOUNT_ROOT/{0}'.format(helpers.AZURE_FILES_MOUNTING_PATH), + std_out_err_path_prefix='$AZ_BATCHAI_MOUNT_ROOT/{0}'.format(AZURE_FILES_MOUNTING_PATH), # Create two output directories on job level AFS and blobfuse. output_directories=[ models.OutputDirectory(id='OUTPUT1', path_prefix='$AZ_BATCHAI_JOB_MOUNT_ROOT/job_afs'), @@ -343,39 +351,39 @@ def test_job_level_mounting(self, resource_group, location, cluster, storage_acc ) ).result() self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, - helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, + MINUTE), models.ExecutionState.succeeded) job = self.client.jobs.get(resource_group.name, job.name) # Assert job and job prep standard output is populated on cluster level filesystem - helpers.assert_job_files_are(self, self.client, resource_group.name, job.name, - helpers.STANDARD_OUTPUT_DIRECTORY_ID, + assert_job_files_are(self, self.client, resource_group.name, job.name, + STANDARD_OUTPUT_DIRECTORY_ID, {u'stdout.txt': u'done\n', u'stderr.txt': u'', u'stdout-job_prep.txt': u'done\n', u'stderr-job_prep.txt': u''}) # Assert files are generated on job level AFS - helpers.assert_job_files_are(self, self.client, resource_group.name, job.name, 'OUTPUT1', + assert_job_files_are(self, self.client, resource_group.name, job.name, 'OUTPUT1', {u'job_afs.txt': u'afs\n', u'prep_afs.txt': u'afs\n', u'afs': None}) # Assert files are generated on job level blobfuse - helpers.assert_job_files_are(self, self.client, resource_group.name, job.name, 'OUTPUT2', + assert_job_files_are(self, self.client, resource_group.name, job.name, 'OUTPUT2', {u'job_bfs.txt': u'bfs\n', u'prep_bfs.txt': u'bfs\n', u'bfs': None}) # Assert subfolders are available via API - helpers.assert_job_files_in_path_are(self, self.client, resource_group.name, job.name, 'OUTPUT1', + assert_job_files_in_path_are(self, self.client, resource_group.name, job.name, 'OUTPUT1', 'afs', {u'job_afs.txt': u'afs\n'}) - helpers.assert_job_files_in_path_are(self, self.client, resource_group.name, job.name, 'OUTPUT2', + assert_job_files_in_path_are(self, self.client, resource_group.name, job.name, 'OUTPUT2', 'bfs', {u'job_bfs.txt': u'bfs\n'}) # Assert that we can access the output files created on job level mount volumes directly in storage using path # segment returned by the server. - if storage_account.name != helpers.FAKE_STORAGE.name: + if storage_account.name != FAKE_STORAGE.name: files = FileService(storage_account.name, storage_account_key) self.assertTrue( files.exists('jobshare', job.job_output_directory_path_segment + - '/' + helpers.OUTPUT_DIRECTORIES_FOLDER_NAME, 'job_afs.txt')) + '/' + OUTPUT_DIRECTORIES_FOLDER_NAME, 'job_afs.txt')) blobs = BlockBlobService(storage_account.name, storage_account_key) self.assertTrue( blobs.exists('jobcontainer', job.job_output_directory_path_segment + - '/' + helpers.OUTPUT_DIRECTORIES_FOLDER_NAME + '/job_bfs.txt')) + '/' + OUTPUT_DIRECTORIES_FOLDER_NAME + '/job_bfs.txt')) # After the job is done the filesystems should be unmounted automatically, check this by submitting a new job. checker = self.client.jobs.create( resource_group.name, @@ -384,7 +392,7 @@ def test_job_level_mounting(self, resource_group, location, cluster, storage_acc location=location, cluster=models.ResourceId(id=cluster.id), node_count=1, - std_out_err_path_prefix='$AZ_BATCHAI_MOUNT_ROOT/{0}'.format(helpers.AZURE_FILES_MOUNTING_PATH), + std_out_err_path_prefix='$AZ_BATCHAI_MOUNT_ROOT/{0}'.format(AZURE_FILES_MOUNTING_PATH), custom_toolkit_settings=models.CustomToolkitSettings( command_line='echo job; df | grep -E "job_bfs|job_afs"' ) @@ -392,17 +400,17 @@ def test_job_level_mounting(self, resource_group, location, cluster, storage_acc ).result() # Check the job failed because there are not job level mount volumes anymore self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, checker.name, - helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, checker.name, + MINUTE), models.ExecutionState.failed) # Check that the cluster level AFS was still mounted - helpers.assert_job_files_are(self, self.client, resource_group.name, checker.name, - helpers.STANDARD_OUTPUT_DIRECTORY_ID, + assert_job_files_are(self, self.client, resource_group.name, checker.name, + STANDARD_OUTPUT_DIRECTORY_ID, {u'stdout.txt': u'job\n', u'stderr.txt': u''}) - @ResourceGroupPreparer(location=helpers.LOCATION) - @StorageAccountPreparer(name_prefix='psdk', location=helpers.LOCATION, playback_fake_resource=helpers.FAKE_STORAGE) - @helpers.ClusterPreparer(target_nodes=1) + @ResourceGroupPreparer(location=LOCATION) + @StorageAccountPreparer(name_prefix='psdk', location=LOCATION, playback_fake_resource=FAKE_STORAGE) + @ClusterPreparer(target_nodes=1) def test_job_environment_variables_and_secrets(self, resource_group, location, cluster): """Tests if it's possible to mount external file systems for a job.""" job_name = 'job' @@ -413,7 +421,7 @@ def test_job_environment_variables_and_secrets(self, resource_group, location, c location=location, cluster=models.ResourceId(id=cluster.id), node_count=1, - std_out_err_path_prefix='$AZ_BATCHAI_MOUNT_ROOT/{0}'.format(helpers.AZURE_FILES_MOUNTING_PATH), + std_out_err_path_prefix='$AZ_BATCHAI_MOUNT_ROOT/{0}'.format(AZURE_FILES_MOUNTING_PATH), environment_variables=[ models.EnvironmentVariable(name='VARIABLE', value='VALUE') ], @@ -431,8 +439,8 @@ def test_job_environment_variables_and_secrets(self, resource_group, location, c ) ).result() # type: models.Job self.assertEqual( - helpers.wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, - helpers.MINUTE), + wait_for_job_completion(self.is_live, self.client, resource_group.name, job.name, + MINUTE), models.ExecutionState.succeeded) # Check that environment variables are reported by the server. self.assertEqual(len(job.environment_variables), 1) @@ -443,7 +451,7 @@ def test_job_environment_variables_and_secrets(self, resource_group, location, c self.assertEqual(job.secrets[0].name, 'SECRET_VARIABLE') self.assertIsNone(job.secrets[0].value) # Check that job and job prep had access to the env variables and secrets. - helpers.assert_job_files_are(self, self.client, resource_group.name, job.name, - helpers.STANDARD_OUTPUT_DIRECTORY_ID, + assert_job_files_are(self, self.client, resource_group.name, job.name, + STANDARD_OUTPUT_DIRECTORY_ID, {u'stdout.txt': u'VALUE SECRET\n', u'stderr.txt': u'', u'stdout-job_prep.txt': u'VALUE SECRET\n', u'stderr-job_prep.txt': u''}) diff --git a/azure-mgmt-batchai/tests/test_mgmt_batchai_quota_and_usage.py b/azure-mgmt-batchai/tests/test_mgmt_batchai_quota_and_usage.py index 9b5b949585e5..2112f0628d0f 100644 --- a/azure-mgmt-batchai/tests/test_mgmt_batchai_quota_and_usage.py +++ b/azure-mgmt-batchai/tests/test_mgmt_batchai_quota_and_usage.py @@ -9,16 +9,16 @@ from azure.mgmt.batchai import BatchAIManagementClient from devtools_testutils import AzureMgmtTestCase -from . import helpers +from helpers import create_batchai_client, LOCATION class JobTestCase(AzureMgmtTestCase): def setUp(self): super(JobTestCase, self).setUp() - self.client = helpers.create_batchai_client(self) # type: BatchAIManagementClient + self.client = create_batchai_client(self) # type: BatchAIManagementClient def test_quota_and_usage(self): - usages = list(self.client.usage.list(helpers.LOCATION)) + usages = list(self.client.usage.list(LOCATION)) self.assertGreater(len(usages), 0) for u in usages: self.assertIsNotNone(u.name) diff --git a/azure-mgmt-botservice/tests/__init__.py b/azure-mgmt-botservice/tests/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/azure-mgmt-cdn/HISTORY.rst b/azure-mgmt-cdn/HISTORY.rst index e5efca86d3ed..cabe733fd844 100644 --- a/azure-mgmt-cdn/HISTORY.rst +++ b/azure-mgmt-cdn/HISTORY.rst @@ -3,6 +3,46 @@ Release History =============== +3.0.0 (2018-05-25) +++++++++++++++++++ + +**Features** + +- Add client method check_name_availability_with_subscription +- Model EndpointUpdateParameters has a new parameter delivery_policy +- Model Endpoint has a new parameter delivery_policy +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + + 2.0.0 (2017-10-26) ++++++++++++++++++ diff --git a/azure-mgmt-cdn/README.rst b/azure-mgmt-cdn/README.rst index 3fa0733220fa..3943e79785f4 100644 --- a/azure-mgmt-cdn/README.rst +++ b/azure-mgmt-cdn/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure CDN Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -36,9 +36,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `CDN Resource Management -`__ -on readthedocs.org. +For code examples, see `CDN Management +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py b/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py index 31fb6353d261..afba70d709ab 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py @@ -9,12 +9,13 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from msrest.pipeline import ClientRawResponse -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling import uuid from .operations.profiles_operations import ProfilesOperations from .operations.endpoints_operations import EndpointsOperations @@ -58,7 +59,7 @@ def __init__( self.subscription_id = subscription_id -class CdnManagementClient(object): +class CdnManagementClient(SDKClient): """Use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must make sure that requests made to these resources are secure. :ivar config: Configuration for client. @@ -91,10 +92,10 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = CdnManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(CdnManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2017-04-02' + self.api_version = '2017-10-12' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -173,6 +174,70 @@ def check_name_availability( return deserialized check_name_availability.metadata = {'url': '/providers/Microsoft.Cdn/checkNameAvailability'} + def check_name_availability_with_subscription( + self, name, custom_headers=None, raw=False, **operation_config): + """Check the availability of a resource name. This is needed for resources + where name is globally unique, such as a CDN endpoint. + + :param name: The resource name to validate. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CheckNameAvailabilityOutput or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + check_name_availability_input = models.CheckNameAvailabilityInput(name=name) + + # Construct URL + url = self.check_name_availability_with_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(check_name_availability_input, 'CheckNameAvailabilityInput') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CheckNameAvailabilityOutput', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability_with_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkNameAvailability'} + def validate_probe( self, probe_url, custom_headers=None, raw=False, **operation_config): """Check if the probe path is a valid path and the file can be accessed. diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py index 9d21eedae8cb..4c839265f66b 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py @@ -9,37 +9,90 @@ # regenerated. # -------------------------------------------------------------------------- -from .sku import Sku -from .profile import Profile -from .profile_update_parameters import ProfileUpdateParameters -from .sso_uri import SsoUri -from .supported_optimization_types_list_result import SupportedOptimizationTypesListResult -from .deep_created_origin import DeepCreatedOrigin -from .endpoint import Endpoint -from .geo_filter import GeoFilter -from .endpoint_update_parameters import EndpointUpdateParameters -from .purge_parameters import PurgeParameters -from .load_parameters import LoadParameters -from .origin import Origin -from .origin_update_parameters import OriginUpdateParameters -from .custom_domain import CustomDomain -from .custom_domain_parameters import CustomDomainParameters -from .validate_custom_domain_input import ValidateCustomDomainInput -from .validate_custom_domain_output import ValidateCustomDomainOutput -from .check_name_availability_input import CheckNameAvailabilityInput -from .check_name_availability_output import CheckNameAvailabilityOutput -from .validate_probe_input import ValidateProbeInput -from .validate_probe_output import ValidateProbeOutput -from .resource_usage import ResourceUsage -from .operation_display import OperationDisplay -from .operation import Operation -from .cidr_ip_address import CidrIpAddress -from .ip_address_group import IpAddressGroup -from .edge_node import EdgeNode -from .resource import Resource -from .tracked_resource import TrackedResource -from .proxy_resource import ProxyResource -from .error_response import ErrorResponse, ErrorResponseException +try: + from .sku_py3 import Sku + from .profile_py3 import Profile + from .profile_update_parameters_py3 import ProfileUpdateParameters + from .sso_uri_py3 import SsoUri + from .supported_optimization_types_list_result_py3 import SupportedOptimizationTypesListResult + from .deep_created_origin_py3 import DeepCreatedOrigin + from .endpoint_py3 import Endpoint + from .geo_filter_py3 import GeoFilter + from .delivery_rule_action_py3 import DeliveryRuleAction + from .delivery_rule_condition_py3 import DeliveryRuleCondition + from .delivery_rule_py3 import DeliveryRule + from .endpoint_properties_update_parameters_delivery_policy_py3 import EndpointPropertiesUpdateParametersDeliveryPolicy + from .endpoint_update_parameters_py3 import EndpointUpdateParameters + from .url_path_condition_parameters_py3 import UrlPathConditionParameters + from .delivery_rule_url_path_condition_py3 import DeliveryRuleUrlPathCondition + from .url_file_extension_condition_parameters_py3 import UrlFileExtensionConditionParameters + from .delivery_rule_url_file_extension_condition_py3 import DeliveryRuleUrlFileExtensionCondition + from .cache_expiration_action_parameters_py3 import CacheExpirationActionParameters + from .delivery_rule_cache_expiration_action_py3 import DeliveryRuleCacheExpirationAction + from .purge_parameters_py3 import PurgeParameters + from .load_parameters_py3 import LoadParameters + from .origin_py3 import Origin + from .origin_update_parameters_py3 import OriginUpdateParameters + from .custom_domain_py3 import CustomDomain + from .custom_domain_parameters_py3 import CustomDomainParameters + from .validate_custom_domain_input_py3 import ValidateCustomDomainInput + from .validate_custom_domain_output_py3 import ValidateCustomDomainOutput + from .check_name_availability_input_py3 import CheckNameAvailabilityInput + from .check_name_availability_output_py3 import CheckNameAvailabilityOutput + from .validate_probe_input_py3 import ValidateProbeInput + from .validate_probe_output_py3 import ValidateProbeOutput + from .resource_usage_py3 import ResourceUsage + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .cidr_ip_address_py3 import CidrIpAddress + from .ip_address_group_py3 import IpAddressGroup + from .edge_node_py3 import EdgeNode + from .resource_py3 import Resource + from .tracked_resource_py3 import TrackedResource + from .proxy_resource_py3 import ProxyResource + from .error_response_py3 import ErrorResponse, ErrorResponseException +except (SyntaxError, ImportError): + from .sku import Sku + from .profile import Profile + from .profile_update_parameters import ProfileUpdateParameters + from .sso_uri import SsoUri + from .supported_optimization_types_list_result import SupportedOptimizationTypesListResult + from .deep_created_origin import DeepCreatedOrigin + from .endpoint import Endpoint + from .geo_filter import GeoFilter + from .delivery_rule_action import DeliveryRuleAction + from .delivery_rule_condition import DeliveryRuleCondition + from .delivery_rule import DeliveryRule + from .endpoint_properties_update_parameters_delivery_policy import EndpointPropertiesUpdateParametersDeliveryPolicy + from .endpoint_update_parameters import EndpointUpdateParameters + from .url_path_condition_parameters import UrlPathConditionParameters + from .delivery_rule_url_path_condition import DeliveryRuleUrlPathCondition + from .url_file_extension_condition_parameters import UrlFileExtensionConditionParameters + from .delivery_rule_url_file_extension_condition import DeliveryRuleUrlFileExtensionCondition + from .cache_expiration_action_parameters import CacheExpirationActionParameters + from .delivery_rule_cache_expiration_action import DeliveryRuleCacheExpirationAction + from .purge_parameters import PurgeParameters + from .load_parameters import LoadParameters + from .origin import Origin + from .origin_update_parameters import OriginUpdateParameters + from .custom_domain import CustomDomain + from .custom_domain_parameters import CustomDomainParameters + from .validate_custom_domain_input import ValidateCustomDomainInput + from .validate_custom_domain_output import ValidateCustomDomainOutput + from .check_name_availability_input import CheckNameAvailabilityInput + from .check_name_availability_output import CheckNameAvailabilityOutput + from .validate_probe_input import ValidateProbeInput + from .validate_probe_output import ValidateProbeOutput + from .resource_usage import ResourceUsage + from .operation_display import OperationDisplay + from .operation import Operation + from .cidr_ip_address import CidrIpAddress + from .ip_address_group import IpAddressGroup + from .edge_node import EdgeNode + from .resource import Resource + from .tracked_resource import TrackedResource + from .proxy_resource import ProxyResource + from .error_response import ErrorResponse, ErrorResponseException from .profile_paged import ProfilePaged from .resource_usage_paged import ResourceUsagePaged from .endpoint_paged import EndpointPaged @@ -70,7 +123,17 @@ 'DeepCreatedOrigin', 'Endpoint', 'GeoFilter', + 'DeliveryRuleAction', + 'DeliveryRuleCondition', + 'DeliveryRule', + 'EndpointPropertiesUpdateParametersDeliveryPolicy', 'EndpointUpdateParameters', + 'UrlPathConditionParameters', + 'DeliveryRuleUrlPathCondition', + 'UrlFileExtensionConditionParameters', + 'DeliveryRuleUrlFileExtensionCondition', + 'CacheExpirationActionParameters', + 'DeliveryRuleCacheExpirationAction', 'PurgeParameters', 'LoadParameters', 'Origin', diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py new file mode 100644 index 000000000000..733f37ee6e40 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CacheExpirationActionParameters(Model): + """Defines the parameters for the cache expiration action. + + 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 odatatype: Required. Default value: + "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" . + :vartype odatatype: str + :param cache_behavior: Required. Caching behavior for the requests that + include query strings. Possible values include: 'BypassCache', 'Override', + 'SetIfMissing' + :type cache_behavior: str or ~azure.mgmt.cdn.models.enum + :ivar cache_type: Required. The level at which the content needs to be + cached. Default value: "All" . + :vartype cache_type: str + :param cache_duration: The duration for which the the content needs to be + cached. Allowed format is [d.]hh:mm:ss + :type cache_duration: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'cache_behavior': {'required': True}, + 'cache_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'cache_behavior': {'key': 'cacheBehavior', 'type': 'str'}, + 'cache_type': {'key': 'cacheType', 'type': 'str'}, + 'cache_duration': {'key': 'cacheDuration', 'type': 'str'}, + } + + odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" + + cache_type = "All" + + def __init__(self, **kwargs): + super(CacheExpirationActionParameters, self).__init__(**kwargs) + self.cache_behavior = kwargs.get('cache_behavior', None) + self.cache_duration = kwargs.get('cache_duration', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py new file mode 100644 index 000000000000..b962f37e0b09 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CacheExpirationActionParameters(Model): + """Defines the parameters for the cache expiration action. + + 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 odatatype: Required. Default value: + "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" . + :vartype odatatype: str + :param cache_behavior: Required. Caching behavior for the requests that + include query strings. Possible values include: 'BypassCache', 'Override', + 'SetIfMissing' + :type cache_behavior: str or ~azure.mgmt.cdn.models.enum + :ivar cache_type: Required. The level at which the content needs to be + cached. Default value: "All" . + :vartype cache_type: str + :param cache_duration: The duration for which the the content needs to be + cached. Allowed format is [d.]hh:mm:ss + :type cache_duration: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'cache_behavior': {'required': True}, + 'cache_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'cache_behavior': {'key': 'cacheBehavior', 'type': 'str'}, + 'cache_type': {'key': 'cacheType', 'type': 'str'}, + 'cache_duration': {'key': 'cacheDuration', 'type': 'str'}, + } + + odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" + + cache_type = "All" + + def __init__(self, *, cache_behavior, cache_duration: str=None, **kwargs) -> None: + super(CacheExpirationActionParameters, self).__init__(**kwargs) + self.cache_behavior = cache_behavior + self.cache_duration = cache_duration diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py index 2f443d08b56e..591e7b58f03e 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py @@ -12,7 +12,7 @@ from enum import Enum -class SkuName(Enum): +class SkuName(str, Enum): standard_verizon = "Standard_Verizon" premium_verizon = "Premium_Verizon" @@ -21,7 +21,7 @@ class SkuName(Enum): standard_china_cdn = "Standard_ChinaCdn" -class ProfileResourceState(Enum): +class ProfileResourceState(str, Enum): creating = "Creating" active = "Active" @@ -29,7 +29,7 @@ class ProfileResourceState(Enum): disabled = "Disabled" -class OptimizationType(Enum): +class OptimizationType(str, Enum): general_web_delivery = "GeneralWebDelivery" general_media_streaming = "GeneralMediaStreaming" @@ -38,7 +38,7 @@ class OptimizationType(Enum): dynamic_site_acceleration = "DynamicSiteAcceleration" -class EndpointResourceState(Enum): +class EndpointResourceState(str, Enum): creating = "Creating" deleting = "Deleting" @@ -48,7 +48,7 @@ class EndpointResourceState(Enum): stopping = "Stopping" -class QueryStringCachingBehavior(Enum): +class QueryStringCachingBehavior(str, Enum): ignore_query_string = "IgnoreQueryString" bypass_caching = "BypassCaching" @@ -56,27 +56,27 @@ class QueryStringCachingBehavior(Enum): not_set = "NotSet" -class GeoFilterActions(Enum): +class GeoFilterActions(str, Enum): block = "Block" allow = "Allow" -class OriginResourceState(Enum): +class OriginResourceState(str, Enum): creating = "Creating" active = "Active" deleting = "Deleting" -class CustomDomainResourceState(Enum): +class CustomDomainResourceState(str, Enum): creating = "Creating" active = "Active" deleting = "Deleting" -class CustomHttpsProvisioningState(Enum): +class CustomHttpsProvisioningState(str, Enum): enabling = "Enabling" enabled = "Enabled" @@ -85,7 +85,7 @@ class CustomHttpsProvisioningState(Enum): failed = "Failed" -class CustomHttpsProvisioningSubstate(Enum): +class CustomHttpsProvisioningSubstate(str, Enum): submitting_domain_control_validation_request = "SubmittingDomainControlValidationRequest" pending_domain_control_validation_request_approval = "PendingDomainControlValidationREquestApproval" @@ -99,6 +99,6 @@ class CustomHttpsProvisioningSubstate(Enum): certificate_deleted = "CertificateDeleted" -class ResourceType(Enum): +class ResourceType(str, Enum): microsoft_cdn_profiles_endpoints = "Microsoft.Cdn/Profiles/Endpoints" diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_input.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_input.py index 5496f2db2544..4a6593482eb8 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_input.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_input.py @@ -18,10 +18,12 @@ class CheckNameAvailabilityInput(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The resource name to validate. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The resource name to validate. :type name: str - :ivar type: The type of the resource whose name is to be validated. - Default value: "Microsoft.Cdn/Profiles/Endpoints" . + :ivar type: Required. The type of the resource whose name is to be + validated. Default value: "Microsoft.Cdn/Profiles/Endpoints" . :vartype type: str """ @@ -37,6 +39,6 @@ class CheckNameAvailabilityInput(Model): type = "Microsoft.Cdn/Profiles/Endpoints" - def __init__(self, name): - super(CheckNameAvailabilityInput, self).__init__() - self.name = name + def __init__(self, **kwargs): + super(CheckNameAvailabilityInput, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_input_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_input_py3.py new file mode 100644 index 000000000000..42eab59591f1 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_input_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityInput(Model): + """Input of CheckNameAvailability API. + + 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 name: Required. The resource name to validate. + :type name: str + :ivar type: Required. The type of the resource whose name is to be + validated. Default value: "Microsoft.Cdn/Profiles/Endpoints" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Cdn/Profiles/Endpoints" + + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityInput, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_output.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_output.py index b24761c2f8e3..7ec032b77912 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_output.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_output.py @@ -39,8 +39,8 @@ class CheckNameAvailabilityOutput(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(CheckNameAvailabilityOutput, self).__init__() + def __init__(self, **kwargs): + super(CheckNameAvailabilityOutput, self).__init__(**kwargs) self.name_available = None self.reason = None self.message = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_output_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_output_py3.py new file mode 100644 index 000000000000..4ed87f02d7d7 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_output_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityOutput(Model): + """Output of check name availability API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: Indicates whether the name is available. + :vartype name_available: bool + :ivar reason: The reason why the name is not available. + :vartype reason: str + :ivar message: The detailed error message describing why the name is not + available. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityOutput, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address.py index 32461c4c9c59..c37e0ac9b254 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address.py @@ -26,7 +26,7 @@ class CidrIpAddress(Model): 'prefix_length': {'key': 'prefixLength', 'type': 'int'}, } - def __init__(self, base_ip_address=None, prefix_length=None): - super(CidrIpAddress, self).__init__() - self.base_ip_address = base_ip_address - self.prefix_length = prefix_length + def __init__(self, **kwargs): + super(CidrIpAddress, self).__init__(**kwargs) + self.base_ip_address = kwargs.get('base_ip_address', None) + self.prefix_length = kwargs.get('prefix_length', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address_py3.py new file mode 100644 index 000000000000..6eba08681803 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CidrIpAddress(Model): + """CIDR Ip address. + + :param base_ip_address: Ip adress itself. + :type base_ip_address: str + :param prefix_length: The length of the prefix of the ip address. + :type prefix_length: int + """ + + _attribute_map = { + 'base_ip_address': {'key': 'baseIpAddress', 'type': 'str'}, + 'prefix_length': {'key': 'prefixLength', 'type': 'int'}, + } + + def __init__(self, *, base_ip_address: str=None, prefix_length: int=None, **kwargs) -> None: + super(CidrIpAddress, self).__init__(**kwargs) + self.base_ip_address = base_ip_address + self.prefix_length = prefix_length diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain.py index ea3df9faa471..06bfef84aca2 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain.py @@ -19,14 +19,16 @@ class CustomDomain(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Resource ID. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str - :param host_name: The host name of the custom domain. Must be a domain - name. + :param host_name: Required. The host name of the custom domain. Must be a + domain name. :type host_name: str :ivar resource_state: Resource status of the custom domain. Possible values include: 'Creating', 'Active', 'Deleting' @@ -79,11 +81,11 @@ class CustomDomain(ProxyResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, host_name, validation_data=None): - super(CustomDomain, self).__init__() - self.host_name = host_name + def __init__(self, **kwargs): + super(CustomDomain, self).__init__(**kwargs) + self.host_name = kwargs.get('host_name', None) self.resource_state = None self.custom_https_provisioning_state = None self.custom_https_provisioning_substate = None - self.validation_data = validation_data + self.validation_data = kwargs.get('validation_data', None) self.provisioning_state = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_parameters.py index 2b21bd7e011c..07ac9c4ea739 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_parameters.py @@ -15,8 +15,10 @@ class CustomDomainParameters(Model): """The customDomain JSON object required for custom domain creation or update. - :param host_name: The host name of the custom domain. Must be a domain - name. + All required parameters must be populated in order to send to Azure. + + :param host_name: Required. The host name of the custom domain. Must be a + domain name. :type host_name: str """ @@ -28,6 +30,6 @@ class CustomDomainParameters(Model): 'host_name': {'key': 'properties.hostName', 'type': 'str'}, } - def __init__(self, host_name): - super(CustomDomainParameters, self).__init__() - self.host_name = host_name + def __init__(self, **kwargs): + super(CustomDomainParameters, self).__init__(**kwargs) + self.host_name = kwargs.get('host_name', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_parameters_py3.py new file mode 100644 index 000000000000..3830c7b64c75 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_parameters_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomDomainParameters(Model): + """The customDomain JSON object required for custom domain creation or update. + + All required parameters must be populated in order to send to Azure. + + :param host_name: Required. The host name of the custom domain. Must be a + domain name. + :type host_name: str + """ + + _validation = { + 'host_name': {'required': True}, + } + + _attribute_map = { + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + } + + def __init__(self, *, host_name: str, **kwargs) -> None: + super(CustomDomainParameters, self).__init__(**kwargs) + self.host_name = host_name diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_py3.py new file mode 100644 index 000000000000..e0679e355d60 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_py3.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class CustomDomain(ProxyResource): + """Friendly domain name mapping to the endpoint hostname that the customer + provides for branding purposes, e.g. www.consoto.com. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param host_name: Required. The host name of the custom domain. Must be a + domain name. + :type host_name: str + :ivar resource_state: Resource status of the custom domain. Possible + values include: 'Creating', 'Active', 'Deleting' + :vartype resource_state: str or + ~azure.mgmt.cdn.models.CustomDomainResourceState + :ivar custom_https_provisioning_state: Provisioning status of Custom Https + of the custom domain. Possible values include: 'Enabling', 'Enabled', + 'Disabling', 'Disabled', 'Failed' + :vartype custom_https_provisioning_state: str or + ~azure.mgmt.cdn.models.CustomHttpsProvisioningState + :ivar custom_https_provisioning_substate: Provisioning substate shows the + progress of custom HTTPS enabling/disabling process step by step. Possible + values include: 'SubmittingDomainControlValidationRequest', + 'PendingDomainControlValidationREquestApproval', + 'DomainControlValidationRequestApproved', + 'DomainControlValidationRequestRejected', + 'DomainControlValidationRequestTimedOut', 'IssuingCertificate', + 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate', + 'CertificateDeleted' + :vartype custom_https_provisioning_substate: str or + ~azure.mgmt.cdn.models.CustomHttpsProvisioningSubstate + :param validation_data: Special validation or data may be required when + delivering CDN to some regions due to local compliance reasons. E.g. ICP + license number of a custom domain is required to deliver content in China. + :type validation_data: str + :ivar provisioning_state: Provisioning status of the custom domain. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'host_name': {'required': True}, + 'resource_state': {'readonly': True}, + 'custom_https_provisioning_state': {'readonly': True}, + 'custom_https_provisioning_substate': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, + 'custom_https_provisioning_state': {'key': 'properties.customHttpsProvisioningState', 'type': 'str'}, + 'custom_https_provisioning_substate': {'key': 'properties.customHttpsProvisioningSubstate', 'type': 'str'}, + 'validation_data': {'key': 'properties.validationData', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, host_name: str, validation_data: str=None, **kwargs) -> None: + super(CustomDomain, self).__init__(**kwargs) + self.host_name = host_name + self.resource_state = None + self.custom_https_provisioning_state = None + self.custom_https_provisioning_substate = None + self.validation_data = validation_data + self.provisioning_state = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin.py index 1320dd04d9ce..16ff46a21a21 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin.py @@ -15,10 +15,12 @@ class DeepCreatedOrigin(Model): """The main origin of CDN content which is added when creating a CDN endpoint. - :param name: Origin name + All required parameters must be populated in order to send to Azure. + + :param name: Required. Origin name :type name: str - :param host_name: The address of the origin. It can be a domain name, IPv4 - address, or IPv6 address. + :param host_name: Required. The address of the origin. It can be a domain + name, IPv4 address, or IPv6 address. :type host_name: str :param http_port: The value of the HTTP port. Must be between 1 and 65535 :type http_port: int @@ -41,9 +43,9 @@ class DeepCreatedOrigin(Model): 'https_port': {'key': 'properties.httpsPort', 'type': 'int'}, } - def __init__(self, name, host_name, http_port=None, https_port=None): - super(DeepCreatedOrigin, self).__init__() - self.name = name - self.host_name = host_name - self.http_port = http_port - self.https_port = https_port + def __init__(self, **kwargs): + super(DeepCreatedOrigin, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.host_name = kwargs.get('host_name', None) + self.http_port = kwargs.get('http_port', None) + self.https_port = kwargs.get('https_port', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin_py3.py new file mode 100644 index 000000000000..1de34bb5580a --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeepCreatedOrigin(Model): + """The main origin of CDN content which is added when creating a CDN endpoint. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Origin name + :type name: str + :param host_name: Required. The address of the origin. It can be a domain + name, IPv4 address, or IPv6 address. + :type host_name: str + :param http_port: The value of the HTTP port. Must be between 1 and 65535 + :type http_port: int + :param https_port: The value of the HTTPS port. Must be between 1 and + 65535 + :type https_port: int + """ + + _validation = { + 'name': {'required': True}, + 'host_name': {'required': True}, + 'http_port': {'maximum': 65535, 'minimum': 1}, + 'https_port': {'maximum': 65535, 'minimum': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'http_port': {'key': 'properties.httpPort', 'type': 'int'}, + 'https_port': {'key': 'properties.httpsPort', 'type': 'int'}, + } + + def __init__(self, *, name: str, host_name: str, http_port: int=None, https_port: int=None, **kwargs) -> None: + super(DeepCreatedOrigin, self).__init__(**kwargs) + self.name = name + self.host_name = host_name + self.http_port = http_port + self.https_port = https_port diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule.py new file mode 100644 index 000000000000..63f57602843d --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeliveryRule(Model): + """A rule that specifies a set of actions and conditions. + + All required parameters must be populated in order to send to Azure. + + :param order: Required. The order in which the rules are applied for the + endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + be applied before a rule with a greater order. Rule with order 0 is a + special rule. It does not require any condition and actions listed in it + will always be applied. + :type order: int + :param actions: Required. A list of actions that are executed when all the + conditions of a rule are satisfied. + :type actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] + :param conditions: A list of conditions that must be matched for the + actions to be executed + :type conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] + """ + + _validation = { + 'order': {'required': True}, + 'actions': {'required': True}, + } + + _attribute_map = { + 'order': {'key': 'order', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[DeliveryRuleAction]'}, + 'conditions': {'key': 'conditions', 'type': '[DeliveryRuleCondition]'}, + } + + def __init__(self, **kwargs): + super(DeliveryRule, self).__init__(**kwargs) + self.order = kwargs.get('order', None) + self.actions = kwargs.get('actions', None) + self.conditions = kwargs.get('conditions', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_input.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action.py similarity index 52% rename from azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_input.py rename to azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action.py index 5c4a175938d9..c3bd94a0ea7e 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_input.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action.py @@ -12,26 +12,30 @@ from msrest.serialization import Model -class ConnectToTargetSqlMITaskInput(Model): - """Input for the task that validates connection to Azure SQL Database Managed - Instance. +class DeliveryRuleAction(Model): + """An action for the delivery rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeliveryRuleCacheExpirationAction All required parameters must be populated in order to send to Azure. - :param target_connection_info: Required. Connection information for target - SQL Server - :type target_connection_info: - ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param name: Required. Constant filled by server. + :type name: str """ _validation = { - 'target_connection_info': {'required': True}, + 'name': {'required': True}, } _attribute_map = { - 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'name': {'CacheExpiration': 'DeliveryRuleCacheExpirationAction'} } def __init__(self, **kwargs): - super(ConnectToTargetSqlMITaskInput, self).__init__(**kwargs) - self.target_connection_info = kwargs.get('target_connection_info', None) + super(DeliveryRuleAction, self).__init__(**kwargs) + self.name = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action_py3.py new file mode 100644 index 000000000000..10d60ce7ce31 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeliveryRuleAction(Model): + """An action for the delivery rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeliveryRuleCacheExpirationAction + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'name': {'CacheExpiration': 'DeliveryRuleCacheExpirationAction'} + } + + def __init__(self, **kwargs) -> None: + super(DeliveryRuleAction, self).__init__(**kwargs) + self.name = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_expiration_action.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_expiration_action.py new file mode 100644 index 000000000000..7a52d1019a6b --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_expiration_action.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .delivery_rule_action import DeliveryRuleAction + + +class DeliveryRuleCacheExpirationAction(DeliveryRuleAction): + """Defines the cache expiration action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.CacheExpirationActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'CacheExpirationActionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleCacheExpirationAction, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'CacheExpiration' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_expiration_action_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_expiration_action_py3.py new file mode 100644 index 000000000000..9074de9c66ad --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_expiration_action_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .delivery_rule_action_py3 import DeliveryRuleAction + + +class DeliveryRuleCacheExpirationAction(DeliveryRuleAction): + """Defines the cache expiration action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.CacheExpirationActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'CacheExpirationActionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleCacheExpirationAction, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'CacheExpiration' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition.py new file mode 100644 index 000000000000..ad81c9f7b533 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeliveryRuleCondition(Model): + """A condition for the delivery rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeliveryRuleUrlPathCondition, + DeliveryRuleUrlFileExtensionCondition + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'name': {'UrlPath': 'DeliveryRuleUrlPathCondition', 'UrlFileExtension': 'DeliveryRuleUrlFileExtensionCondition'} + } + + def __init__(self, **kwargs): + super(DeliveryRuleCondition, self).__init__(**kwargs) + self.name = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition_py3.py new file mode 100644 index 000000000000..e50925b7db4f --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeliveryRuleCondition(Model): + """A condition for the delivery rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeliveryRuleUrlPathCondition, + DeliveryRuleUrlFileExtensionCondition + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'name': {'UrlPath': 'DeliveryRuleUrlPathCondition', 'UrlFileExtension': 'DeliveryRuleUrlFileExtensionCondition'} + } + + def __init__(self, **kwargs) -> None: + super(DeliveryRuleCondition, self).__init__(**kwargs) + self.name = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_py3.py new file mode 100644 index 000000000000..b6f1c33b003e --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeliveryRule(Model): + """A rule that specifies a set of actions and conditions. + + All required parameters must be populated in order to send to Azure. + + :param order: Required. The order in which the rules are applied for the + endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + be applied before a rule with a greater order. Rule with order 0 is a + special rule. It does not require any condition and actions listed in it + will always be applied. + :type order: int + :param actions: Required. A list of actions that are executed when all the + conditions of a rule are satisfied. + :type actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] + :param conditions: A list of conditions that must be matched for the + actions to be executed + :type conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] + """ + + _validation = { + 'order': {'required': True}, + 'actions': {'required': True}, + } + + _attribute_map = { + 'order': {'key': 'order', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[DeliveryRuleAction]'}, + 'conditions': {'key': 'conditions', 'type': '[DeliveryRuleCondition]'}, + } + + def __init__(self, *, order: int, actions, conditions=None, **kwargs) -> None: + super(DeliveryRule, self).__init__(**kwargs) + self.order = order + self.actions = actions + self.conditions = conditions diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition.py new file mode 100644 index 000000000000..d215d3cd4b2d --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): + """Defines the URL file extension condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.UrlFileExtensionConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlFileExtensionConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleUrlFileExtensionCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'UrlFileExtension' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition_py3.py new file mode 100644 index 000000000000..f97f2cac2d0f --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): + """Defines the URL file extension condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.UrlFileExtensionConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlFileExtensionConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleUrlFileExtensionCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'UrlFileExtension' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition.py new file mode 100644 index 000000000000..b3eb2578b72e --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleUrlPathCondition(DeliveryRuleCondition): + """Defines the URL path condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: ~azure.mgmt.cdn.models.UrlPathConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlPathConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleUrlPathCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'UrlPath' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition_py3.py new file mode 100644 index 000000000000..730fdcaec98a --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleUrlPathCondition(DeliveryRuleCondition): + """Defines the URL path condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: ~azure.mgmt.cdn.models.UrlPathConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlPathConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleUrlPathCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'UrlPath' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/edge_node.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/edge_node.py index 591913291670..bd3e8b15c596 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/edge_node.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/edge_node.py @@ -19,13 +19,15 @@ class EdgeNode(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Resource ID. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str - :param ip_address_groups: List of ip address groups. + :param ip_address_groups: Required. List of ip address groups. :type ip_address_groups: list[~azure.mgmt.cdn.models.IpAddressGroup] """ @@ -43,6 +45,6 @@ class EdgeNode(ProxyResource): 'ip_address_groups': {'key': 'properties.ipAddressGroups', 'type': '[IpAddressGroup]'}, } - def __init__(self, ip_address_groups): - super(EdgeNode, self).__init__() - self.ip_address_groups = ip_address_groups + def __init__(self, **kwargs): + super(EdgeNode, self).__init__(**kwargs) + self.ip_address_groups = kwargs.get('ip_address_groups', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/edge_node_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/edge_node_py3.py new file mode 100644 index 000000000000..8c0f7f60121a --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/edge_node_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class EdgeNode(ProxyResource): + """Edgenode is a global Point of Presence (POP) location used to deliver CDN + content to end users. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param ip_address_groups: Required. List of ip address groups. + :type ip_address_groups: list[~azure.mgmt.cdn.models.IpAddressGroup] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'ip_address_groups': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ip_address_groups': {'key': 'properties.ipAddressGroups', 'type': '[IpAddressGroup]'}, + } + + def __init__(self, *, ip_address_groups, **kwargs) -> None: + super(EdgeNode, self).__init__(**kwargs) + self.ip_address_groups = ip_address_groups diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py index 254a295a45a8..ae5f039a3f00 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py @@ -21,13 +21,15 @@ class Endpoint(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Resource ID. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str - :param location: Resource location. + :param location: Required. Resource location. :type location: str :param tags: Resource tags. :type tags: dict[str, str] @@ -79,10 +81,15 @@ class Endpoint(TrackedResource): CDN endpoint. Each geo filter defines an acess rule to a specified path or content, e.g. block APAC for path /pictures/ :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] + :param delivery_policy: A policy that specifies the delivery rules to be + used for an endpoint. + :type delivery_policy: + ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy :ivar host_name: The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. consoto.azureedge.net :vartype host_name: str - :param origins: The source of the content being delivered via CDN. + :param origins: Required. The source of the content being delivered via + CDN. :type origins: list[~azure.mgmt.cdn.models.DeepCreatedOrigin] :ivar resource_state: Resource status of the endpoint. Possible values include: 'Creating', 'Deleting', 'Running', 'Starting', 'Stopped', @@ -120,25 +127,27 @@ class Endpoint(TrackedResource): 'optimization_type': {'key': 'properties.optimizationType', 'type': 'str'}, 'probe_path': {'key': 'properties.probePath', 'type': 'str'}, 'geo_filters': {'key': 'properties.geoFilters', 'type': '[GeoFilter]'}, + 'delivery_policy': {'key': 'properties.deliveryPolicy', 'type': 'EndpointPropertiesUpdateParametersDeliveryPolicy'}, 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'origins': {'key': 'properties.origins', 'type': '[DeepCreatedOrigin]'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, location, origins, tags=None, origin_host_header=None, origin_path=None, content_types_to_compress=None, is_compression_enabled=None, is_http_allowed=None, is_https_allowed=None, query_string_caching_behavior=None, optimization_type=None, probe_path=None, geo_filters=None): - super(Endpoint, self).__init__(location=location, tags=tags) - self.origin_host_header = origin_host_header - self.origin_path = origin_path - self.content_types_to_compress = content_types_to_compress - self.is_compression_enabled = is_compression_enabled - self.is_http_allowed = is_http_allowed - self.is_https_allowed = is_https_allowed - self.query_string_caching_behavior = query_string_caching_behavior - self.optimization_type = optimization_type - self.probe_path = probe_path - self.geo_filters = geo_filters + def __init__(self, **kwargs): + super(Endpoint, self).__init__(**kwargs) + self.origin_host_header = kwargs.get('origin_host_header', None) + self.origin_path = kwargs.get('origin_path', None) + self.content_types_to_compress = kwargs.get('content_types_to_compress', None) + self.is_compression_enabled = kwargs.get('is_compression_enabled', None) + self.is_http_allowed = kwargs.get('is_http_allowed', None) + self.is_https_allowed = kwargs.get('is_https_allowed', None) + self.query_string_caching_behavior = kwargs.get('query_string_caching_behavior', None) + self.optimization_type = kwargs.get('optimization_type', None) + self.probe_path = kwargs.get('probe_path', None) + self.geo_filters = kwargs.get('geo_filters', None) + self.delivery_policy = kwargs.get('delivery_policy', None) self.host_name = None - self.origins = origins + self.origins = kwargs.get('origins', None) self.resource_state = None self.provisioning_state = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_properties_update_parameters_delivery_policy.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_properties_update_parameters_delivery_policy.py new file mode 100644 index 000000000000..aa35c0e0c09d --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_properties_update_parameters_delivery_policy.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EndpointPropertiesUpdateParametersDeliveryPolicy(Model): + """A policy that specifies the delivery rules to be used for an endpoint. + + All required parameters must be populated in order to send to Azure. + + :param description: User-friendly description of the policy. + :type description: str + :param rules: Required. A list of the delivery rules. + :type rules: list[~azure.mgmt.cdn.models.DeliveryRule] + """ + + _validation = { + 'rules': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[DeliveryRule]'}, + } + + def __init__(self, **kwargs): + super(EndpointPropertiesUpdateParametersDeliveryPolicy, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.rules = kwargs.get('rules', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_properties_update_parameters_delivery_policy_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_properties_update_parameters_delivery_policy_py3.py new file mode 100644 index 000000000000..efd432c3fc53 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_properties_update_parameters_delivery_policy_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EndpointPropertiesUpdateParametersDeliveryPolicy(Model): + """A policy that specifies the delivery rules to be used for an endpoint. + + All required parameters must be populated in order to send to Azure. + + :param description: User-friendly description of the policy. + :type description: str + :param rules: Required. A list of the delivery rules. + :type rules: list[~azure.mgmt.cdn.models.DeliveryRule] + """ + + _validation = { + 'rules': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[DeliveryRule]'}, + } + + def __init__(self, *, rules, description: str=None, **kwargs) -> None: + super(EndpointPropertiesUpdateParametersDeliveryPolicy, self).__init__(**kwargs) + self.description = description + self.rules = rules diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py new file mode 100644 index 000000000000..2f44460c0f4b --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py @@ -0,0 +1,153 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource_py3 import TrackedResource + + +class Endpoint(TrackedResource): + """CDN endpoint is the entity within a CDN profile containing configuration + information such as origin, protocol, content caching and delivery + behavior. The CDN endpoint uses the URL format + .azureedge.net. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param origin_host_header: The host header value sent to the origin with + each request. If you leave this blank, the request hostname determines + this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud + Services require this host header value to match the origin hostname by + default. + :type origin_host_header: str + :param origin_path: A directory path on the origin that CDN can use to + retreive content from, e.g. contoso.cloudapp.net/originpath. + :type origin_path: str + :param content_types_to_compress: List of content types on which + compression applies. The value should be a valid MIME type. + :type content_types_to_compress: list[str] + :param is_compression_enabled: Indicates whether content compression is + enabled on CDN. Default value is false. If compression is enabled, content + will be served as compressed if user requests for a compressed version. + Content won't be compressed on CDN when requested content is smaller than + 1 byte or larger than 1 MB. + :type is_compression_enabled: bool + :param is_http_allowed: Indicates whether HTTP traffic is allowed on the + endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + must be allowed. + :type is_http_allowed: bool + :param is_https_allowed: Indicates whether HTTPS traffic is allowed on the + endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + must be allowed. + :type is_https_allowed: bool + :param query_string_caching_behavior: Defines how CDN caches requests that + include query strings. You can ignore any query strings when caching, + bypass caching to prevent requests that contain query strings from being + cached, or cache every request with a unique URL. Possible values include: + 'IgnoreQueryString', 'BypassCaching', 'UseQueryString', 'NotSet' + :type query_string_caching_behavior: str or + ~azure.mgmt.cdn.models.QueryStringCachingBehavior + :param optimization_type: Specifies what scenario the customer wants this + CDN endpoint to optimize for, e.g. Download, Media services. With this + information, CDN can apply scenario driven optimization. Possible values + include: 'GeneralWebDelivery', 'GeneralMediaStreaming', + 'VideoOnDemandMediaStreaming', 'LargeFileDownload', + 'DynamicSiteAcceleration' + :type optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType + :param probe_path: Path to a file hosted on the origin which helps + accelerate delivery of the dynamic content and calculate the most optimal + routes for the CDN. This is relative to the origin path. + :type probe_path: str + :param geo_filters: List of rules defining the user's geo access within a + CDN endpoint. Each geo filter defines an acess rule to a specified path or + content, e.g. block APAC for path /pictures/ + :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] + :param delivery_policy: A policy that specifies the delivery rules to be + used for an endpoint. + :type delivery_policy: + ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy + :ivar host_name: The host name of the endpoint structured as + {endpointName}.{DNSZone}, e.g. consoto.azureedge.net + :vartype host_name: str + :param origins: Required. The source of the content being delivered via + CDN. + :type origins: list[~azure.mgmt.cdn.models.DeepCreatedOrigin] + :ivar resource_state: Resource status of the endpoint. Possible values + include: 'Creating', 'Deleting', 'Running', 'Starting', 'Stopped', + 'Stopping' + :vartype resource_state: str or + ~azure.mgmt.cdn.models.EndpointResourceState + :ivar provisioning_state: Provisioning status of the endpoint. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'host_name': {'readonly': True}, + 'origins': {'required': True}, + 'resource_state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, + 'origin_path': {'key': 'properties.originPath', 'type': 'str'}, + 'content_types_to_compress': {'key': 'properties.contentTypesToCompress', 'type': '[str]'}, + 'is_compression_enabled': {'key': 'properties.isCompressionEnabled', 'type': 'bool'}, + 'is_http_allowed': {'key': 'properties.isHttpAllowed', 'type': 'bool'}, + 'is_https_allowed': {'key': 'properties.isHttpsAllowed', 'type': 'bool'}, + 'query_string_caching_behavior': {'key': 'properties.queryStringCachingBehavior', 'type': 'QueryStringCachingBehavior'}, + 'optimization_type': {'key': 'properties.optimizationType', 'type': 'str'}, + 'probe_path': {'key': 'properties.probePath', 'type': 'str'}, + 'geo_filters': {'key': 'properties.geoFilters', 'type': '[GeoFilter]'}, + 'delivery_policy': {'key': 'properties.deliveryPolicy', 'type': 'EndpointPropertiesUpdateParametersDeliveryPolicy'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'origins': {'key': 'properties.origins', 'type': '[DeepCreatedOrigin]'}, + 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, origins, tags=None, origin_host_header: str=None, origin_path: str=None, content_types_to_compress=None, is_compression_enabled: bool=None, is_http_allowed: bool=None, is_https_allowed: bool=None, query_string_caching_behavior=None, optimization_type=None, probe_path: str=None, geo_filters=None, delivery_policy=None, **kwargs) -> None: + super(Endpoint, self).__init__(location=location, tags=tags, **kwargs) + self.origin_host_header = origin_host_header + self.origin_path = origin_path + self.content_types_to_compress = content_types_to_compress + self.is_compression_enabled = is_compression_enabled + self.is_http_allowed = is_http_allowed + self.is_https_allowed = is_https_allowed + self.query_string_caching_behavior = query_string_caching_behavior + self.optimization_type = optimization_type + self.probe_path = probe_path + self.geo_filters = geo_filters + self.delivery_policy = delivery_policy + self.host_name = None + self.origins = origins + self.resource_state = None + self.provisioning_state = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py index d4002dc577d3..36ec115ceb78 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py @@ -65,6 +65,10 @@ class EndpointUpdateParameters(Model): CDN endpoint. Each geo filter defines an acess rule to a specified path or content, e.g. block APAC for path /pictures/ :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] + :param delivery_policy: A policy that specifies the delivery rules to be + used for an endpoint. + :type delivery_policy: + ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy """ _attribute_map = { @@ -79,18 +83,20 @@ class EndpointUpdateParameters(Model): 'optimization_type': {'key': 'properties.optimizationType', 'type': 'str'}, 'probe_path': {'key': 'properties.probePath', 'type': 'str'}, 'geo_filters': {'key': 'properties.geoFilters', 'type': '[GeoFilter]'}, + 'delivery_policy': {'key': 'properties.deliveryPolicy', 'type': 'EndpointPropertiesUpdateParametersDeliveryPolicy'}, } - def __init__(self, tags=None, origin_host_header=None, origin_path=None, content_types_to_compress=None, is_compression_enabled=None, is_http_allowed=None, is_https_allowed=None, query_string_caching_behavior=None, optimization_type=None, probe_path=None, geo_filters=None): - super(EndpointUpdateParameters, self).__init__() - self.tags = tags - self.origin_host_header = origin_host_header - self.origin_path = origin_path - self.content_types_to_compress = content_types_to_compress - self.is_compression_enabled = is_compression_enabled - self.is_http_allowed = is_http_allowed - self.is_https_allowed = is_https_allowed - self.query_string_caching_behavior = query_string_caching_behavior - self.optimization_type = optimization_type - self.probe_path = probe_path - self.geo_filters = geo_filters + def __init__(self, **kwargs): + super(EndpointUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.origin_host_header = kwargs.get('origin_host_header', None) + self.origin_path = kwargs.get('origin_path', None) + self.content_types_to_compress = kwargs.get('content_types_to_compress', None) + self.is_compression_enabled = kwargs.get('is_compression_enabled', None) + self.is_http_allowed = kwargs.get('is_http_allowed', None) + self.is_https_allowed = kwargs.get('is_https_allowed', None) + self.query_string_caching_behavior = kwargs.get('query_string_caching_behavior', None) + self.optimization_type = kwargs.get('optimization_type', None) + self.probe_path = kwargs.get('probe_path', None) + self.geo_filters = kwargs.get('geo_filters', None) + self.delivery_policy = kwargs.get('delivery_policy', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py new file mode 100644 index 000000000000..ed4a7fdd9d60 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EndpointUpdateParameters(Model): + """Properties required to create or update an endpoint. + + :param tags: Endpoint tags. + :type tags: dict[str, str] + :param origin_host_header: The host header value sent to the origin with + each request. If you leave this blank, the request hostname determines + this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud + Services require this host header value to match the origin hostname by + default. + :type origin_host_header: str + :param origin_path: A directory path on the origin that CDN can use to + retreive content from, e.g. contoso.cloudapp.net/originpath. + :type origin_path: str + :param content_types_to_compress: List of content types on which + compression applies. The value should be a valid MIME type. + :type content_types_to_compress: list[str] + :param is_compression_enabled: Indicates whether content compression is + enabled on CDN. Default value is false. If compression is enabled, content + will be served as compressed if user requests for a compressed version. + Content won't be compressed on CDN when requested content is smaller than + 1 byte or larger than 1 MB. + :type is_compression_enabled: bool + :param is_http_allowed: Indicates whether HTTP traffic is allowed on the + endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + must be allowed. + :type is_http_allowed: bool + :param is_https_allowed: Indicates whether HTTPS traffic is allowed on the + endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + must be allowed. + :type is_https_allowed: bool + :param query_string_caching_behavior: Defines how CDN caches requests that + include query strings. You can ignore any query strings when caching, + bypass caching to prevent requests that contain query strings from being + cached, or cache every request with a unique URL. Possible values include: + 'IgnoreQueryString', 'BypassCaching', 'UseQueryString', 'NotSet' + :type query_string_caching_behavior: str or + ~azure.mgmt.cdn.models.QueryStringCachingBehavior + :param optimization_type: Specifies what scenario the customer wants this + CDN endpoint to optimize for, e.g. Download, Media services. With this + information, CDN can apply scenario driven optimization. Possible values + include: 'GeneralWebDelivery', 'GeneralMediaStreaming', + 'VideoOnDemandMediaStreaming', 'LargeFileDownload', + 'DynamicSiteAcceleration' + :type optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType + :param probe_path: Path to a file hosted on the origin which helps + accelerate delivery of the dynamic content and calculate the most optimal + routes for the CDN. This is relative to the origin path. + :type probe_path: str + :param geo_filters: List of rules defining the user's geo access within a + CDN endpoint. Each geo filter defines an acess rule to a specified path or + content, e.g. block APAC for path /pictures/ + :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] + :param delivery_policy: A policy that specifies the delivery rules to be + used for an endpoint. + :type delivery_policy: + ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, + 'origin_path': {'key': 'properties.originPath', 'type': 'str'}, + 'content_types_to_compress': {'key': 'properties.contentTypesToCompress', 'type': '[str]'}, + 'is_compression_enabled': {'key': 'properties.isCompressionEnabled', 'type': 'bool'}, + 'is_http_allowed': {'key': 'properties.isHttpAllowed', 'type': 'bool'}, + 'is_https_allowed': {'key': 'properties.isHttpsAllowed', 'type': 'bool'}, + 'query_string_caching_behavior': {'key': 'properties.queryStringCachingBehavior', 'type': 'QueryStringCachingBehavior'}, + 'optimization_type': {'key': 'properties.optimizationType', 'type': 'str'}, + 'probe_path': {'key': 'properties.probePath', 'type': 'str'}, + 'geo_filters': {'key': 'properties.geoFilters', 'type': '[GeoFilter]'}, + 'delivery_policy': {'key': 'properties.deliveryPolicy', 'type': 'EndpointPropertiesUpdateParametersDeliveryPolicy'}, + } + + def __init__(self, *, tags=None, origin_host_header: str=None, origin_path: str=None, content_types_to_compress=None, is_compression_enabled: bool=None, is_http_allowed: bool=None, is_https_allowed: bool=None, query_string_caching_behavior=None, optimization_type=None, probe_path: str=None, geo_filters=None, delivery_policy=None, **kwargs) -> None: + super(EndpointUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.origin_host_header = origin_host_header + self.origin_path = origin_path + self.content_types_to_compress = content_types_to_compress + self.is_compression_enabled = is_compression_enabled + self.is_http_allowed = is_http_allowed + self.is_https_allowed = is_https_allowed + self.query_string_caching_behavior = query_string_caching_behavior + self.optimization_type = optimization_type + self.probe_path = probe_path + self.geo_filters = geo_filters + self.delivery_policy = delivery_policy diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response.py index 9148d5b7d058..2e1c74ac09c5 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response.py @@ -36,8 +36,8 @@ class ErrorResponse(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(ErrorResponse, self).__init__() + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) self.code = None self.message = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response_py3.py new file mode 100644 index 000000000000..89e755f309dc --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error reponse indicates CDN service is not able to process the incoming + request. The reason is provided in the error message. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message indicating why the operation failed. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = None + self.message = None + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/geo_filter.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/geo_filter.py index 563f16a6cd1d..414d0579d275 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/geo_filter.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/geo_filter.py @@ -15,14 +15,16 @@ class GeoFilter(Model): """Rules defining user's geo access within a CDN endpoint. - :param relative_path: Relative path applicable to geo filter. (e.g. - '/mypictures', '/mypicture/kitty.jpg', and etc.) + All required parameters must be populated in order to send to Azure. + + :param relative_path: Required. Relative path applicable to geo filter. + (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) :type relative_path: str - :param action: Action of the geo filter, i.e. allow or block access. - Possible values include: 'Block', 'Allow' + :param action: Required. Action of the geo filter, i.e. allow or block + access. Possible values include: 'Block', 'Allow' :type action: str or ~azure.mgmt.cdn.models.GeoFilterActions - :param country_codes: Two letter country codes defining user country - access in a geo filter, e.g. AU, MX, US. + :param country_codes: Required. Two letter country codes defining user + country access in a geo filter, e.g. AU, MX, US. :type country_codes: list[str] """ @@ -38,8 +40,8 @@ class GeoFilter(Model): 'country_codes': {'key': 'countryCodes', 'type': '[str]'}, } - def __init__(self, relative_path, action, country_codes): - super(GeoFilter, self).__init__() - self.relative_path = relative_path - self.action = action - self.country_codes = country_codes + def __init__(self, **kwargs): + super(GeoFilter, self).__init__(**kwargs) + self.relative_path = kwargs.get('relative_path', None) + self.action = kwargs.get('action', None) + self.country_codes = kwargs.get('country_codes', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/geo_filter_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/geo_filter_py3.py new file mode 100644 index 000000000000..43449273efa5 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/geo_filter_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GeoFilter(Model): + """Rules defining user's geo access within a CDN endpoint. + + All required parameters must be populated in order to send to Azure. + + :param relative_path: Required. Relative path applicable to geo filter. + (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) + :type relative_path: str + :param action: Required. Action of the geo filter, i.e. allow or block + access. Possible values include: 'Block', 'Allow' + :type action: str or ~azure.mgmt.cdn.models.GeoFilterActions + :param country_codes: Required. Two letter country codes defining user + country access in a geo filter, e.g. AU, MX, US. + :type country_codes: list[str] + """ + + _validation = { + 'relative_path': {'required': True}, + 'action': {'required': True}, + 'country_codes': {'required': True}, + } + + _attribute_map = { + 'relative_path': {'key': 'relativePath', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'GeoFilterActions'}, + 'country_codes': {'key': 'countryCodes', 'type': '[str]'}, + } + + def __init__(self, *, relative_path: str, action, country_codes, **kwargs) -> None: + super(GeoFilter, self).__init__(**kwargs) + self.relative_path = relative_path + self.action = action + self.country_codes = country_codes diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/ip_address_group.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/ip_address_group.py index 0cfa23c22699..3c376a9670cc 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/ip_address_group.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/ip_address_group.py @@ -29,8 +29,8 @@ class IpAddressGroup(Model): 'ipv6_addresses': {'key': 'ipv6Addresses', 'type': '[CidrIpAddress]'}, } - def __init__(self, delivery_region=None, ipv4_addresses=None, ipv6_addresses=None): - super(IpAddressGroup, self).__init__() - self.delivery_region = delivery_region - self.ipv4_addresses = ipv4_addresses - self.ipv6_addresses = ipv6_addresses + def __init__(self, **kwargs): + super(IpAddressGroup, self).__init__(**kwargs) + self.delivery_region = kwargs.get('delivery_region', None) + self.ipv4_addresses = kwargs.get('ipv4_addresses', None) + self.ipv6_addresses = kwargs.get('ipv6_addresses', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/ip_address_group_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/ip_address_group_py3.py new file mode 100644 index 000000000000..9f9e71f411ea --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/ip_address_group_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IpAddressGroup(Model): + """CDN Ip address group. + + :param delivery_region: The delivery region of the ip address group + :type delivery_region: str + :param ipv4_addresses: The list of ip v4 addresses. + :type ipv4_addresses: list[~azure.mgmt.cdn.models.CidrIpAddress] + :param ipv6_addresses: The list of ip v6 addresses. + :type ipv6_addresses: list[~azure.mgmt.cdn.models.CidrIpAddress] + """ + + _attribute_map = { + 'delivery_region': {'key': 'deliveryRegion', 'type': 'str'}, + 'ipv4_addresses': {'key': 'ipv4Addresses', 'type': '[CidrIpAddress]'}, + 'ipv6_addresses': {'key': 'ipv6Addresses', 'type': '[CidrIpAddress]'}, + } + + def __init__(self, *, delivery_region: str=None, ipv4_addresses=None, ipv6_addresses=None, **kwargs) -> None: + super(IpAddressGroup, self).__init__(**kwargs) + self.delivery_region = delivery_region + self.ipv4_addresses = ipv4_addresses + self.ipv6_addresses = ipv6_addresses diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/load_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/load_parameters.py index c4a0f2bd97a8..d265e3eec5ec 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/load_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/load_parameters.py @@ -15,8 +15,10 @@ class LoadParameters(Model): """Parameters required for content load. - :param content_paths: The path to the content to be loaded. Path should be - a relative file URL of the origin. + All required parameters must be populated in order to send to Azure. + + :param content_paths: Required. The path to the content to be loaded. Path + should be a relative file URL of the origin. :type content_paths: list[str] """ @@ -28,6 +30,6 @@ class LoadParameters(Model): 'content_paths': {'key': 'contentPaths', 'type': '[str]'}, } - def __init__(self, content_paths): - super(LoadParameters, self).__init__() - self.content_paths = content_paths + def __init__(self, **kwargs): + super(LoadParameters, self).__init__(**kwargs) + self.content_paths = kwargs.get('content_paths', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/load_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/load_parameters_py3.py new file mode 100644 index 000000000000..78ba0d9e5e19 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/load_parameters_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LoadParameters(Model): + """Parameters required for content load. + + All required parameters must be populated in order to send to Azure. + + :param content_paths: Required. The path to the content to be loaded. Path + should be a relative file URL of the origin. + :type content_paths: list[str] + """ + + _validation = { + 'content_paths': {'required': True}, + } + + _attribute_map = { + 'content_paths': {'key': 'contentPaths', 'type': '[str]'}, + } + + def __init__(self, *, content_paths, **kwargs) -> None: + super(LoadParameters, self).__init__(**kwargs) + self.content_paths = content_paths diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/operation.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/operation.py index 71f7a8be9ac6..1c874210ed7f 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/operation.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/operation.py @@ -33,7 +33,7 @@ class Operation(Model): 'display': {'key': 'display', 'type': 'OperationDisplay'}, } - def __init__(self, display=None): - super(Operation, self).__init__() + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) self.name = None - self.display = display + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_display.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_display.py index 687c9f952b18..581b161945af 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_display.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_display.py @@ -39,8 +39,8 @@ class OperationDisplay(Model): 'operation': {'key': 'operation', 'type': 'str'}, } - def __init__(self): - super(OperationDisplay, self).__init__() + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) self.provider = None self.resource = None self.operation = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_display_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_display_py3.py new file mode 100644 index 000000000000..b36de399b412 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_display_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.Cdn + :vartype provider: str + :ivar resource: Resource on which the operation is performed: Profile, + endpoint, etc. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_py3.py new file mode 100644 index 000000000000..b061aa952e3b --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """CDN REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation} + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.cdn.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/origin.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/origin.py index 57ccdc35e7a4..c8d08d32e39c 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/origin.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/origin.py @@ -21,18 +21,20 @@ class Origin(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Resource ID. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str - :param location: Resource location. + :param location: Required. Resource location. :type location: str :param tags: Resource tags. :type tags: dict[str, str] - :param host_name: The address of the origin. Domain names, IPv4 addresses, - and IPv6 addresses are supported. + :param host_name: Required. The address of the origin. Domain names, IPv4 + addresses, and IPv6 addresses are supported. :type host_name: str :param http_port: The value of the HTTP port. Must be between 1 and 65535. :type http_port: int @@ -71,10 +73,10 @@ class Origin(TrackedResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, location, host_name, tags=None, http_port=None, https_port=None): - super(Origin, self).__init__(location=location, tags=tags) - self.host_name = host_name - self.http_port = http_port - self.https_port = https_port + def __init__(self, **kwargs): + super(Origin, self).__init__(**kwargs) + self.host_name = kwargs.get('host_name', None) + self.http_port = kwargs.get('http_port', None) + self.https_port = kwargs.get('https_port', None) self.resource_state = None self.provisioning_state = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_py3.py new file mode 100644 index 000000000000..11d56f13d920 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_py3.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource_py3 import TrackedResource + + +class Origin(TrackedResource): + """CDN origin is the source of the content being delivered via CDN. When the + edge nodes represented by an endpoint do not have the requested content + cached, they attempt to fetch it from one or more of the configured + origins. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param host_name: Required. The address of the origin. Domain names, IPv4 + addresses, and IPv6 addresses are supported. + :type host_name: str + :param http_port: The value of the HTTP port. Must be between 1 and 65535. + :type http_port: int + :param https_port: The value of the https port. Must be between 1 and + 65535. + :type https_port: int + :ivar resource_state: Resource status of the origin. Possible values + include: 'Creating', 'Active', 'Deleting' + :vartype resource_state: str or ~azure.mgmt.cdn.models.OriginResourceState + :ivar provisioning_state: Provisioning status of the origin. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'host_name': {'required': True}, + 'http_port': {'maximum': 65535, 'minimum': 1}, + 'https_port': {'maximum': 65535, 'minimum': 1}, + 'resource_state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'http_port': {'key': 'properties.httpPort', 'type': 'int'}, + 'https_port': {'key': 'properties.httpsPort', 'type': 'int'}, + 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, host_name: str, tags=None, http_port: int=None, https_port: int=None, **kwargs) -> None: + super(Origin, self).__init__(location=location, tags=tags, **kwargs) + self.host_name = host_name + self.http_port = http_port + self.https_port = https_port + self.resource_state = None + self.provisioning_state = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters.py index c850ee4a2116..605a78e80f8b 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters.py @@ -36,8 +36,8 @@ class OriginUpdateParameters(Model): 'https_port': {'key': 'properties.httpsPort', 'type': 'int'}, } - def __init__(self, host_name=None, http_port=None, https_port=None): - super(OriginUpdateParameters, self).__init__() - self.host_name = host_name - self.http_port = http_port - self.https_port = https_port + def __init__(self, **kwargs): + super(OriginUpdateParameters, self).__init__(**kwargs) + self.host_name = kwargs.get('host_name', None) + self.http_port = kwargs.get('http_port', None) + self.https_port = kwargs.get('https_port', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters_py3.py new file mode 100644 index 000000000000..29be582b9a42 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OriginUpdateParameters(Model): + """Origin properties needed for origin creation or update. + + :param host_name: The address of the origin. Domain names, IPv4 addresses, + and IPv6 addresses are supported. + :type host_name: str + :param http_port: The value of the HTTP port. Must be between 1 and 65535. + :type http_port: int + :param https_port: The value of the HTTPS port. Must be between 1 and + 65535. + :type https_port: int + """ + + _validation = { + 'http_port': {'maximum': 65535, 'minimum': 1}, + 'https_port': {'maximum': 65535, 'minimum': 1}, + } + + _attribute_map = { + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'http_port': {'key': 'properties.httpPort', 'type': 'int'}, + 'https_port': {'key': 'properties.httpsPort', 'type': 'int'}, + } + + def __init__(self, *, host_name: str=None, http_port: int=None, https_port: int=None, **kwargs) -> None: + super(OriginUpdateParameters, self).__init__(**kwargs) + self.host_name = host_name + self.http_port = http_port + self.https_port = https_port diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/profile.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/profile.py index 410b143880ac..1f9b83f67bae 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/profile.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/profile.py @@ -19,18 +19,20 @@ class Profile(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Resource ID. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str - :param location: Resource location. + :param location: Required. Resource location. :type location: str :param tags: Resource tags. :type tags: dict[str, str] - :param sku: The pricing tier (defines a CDN provider, feature list and - rate) of the CDN profile. + :param sku: Required. The pricing tier (defines a CDN provider, feature + list and rate) of the CDN profile. :type sku: ~azure.mgmt.cdn.models.Sku :ivar resource_state: Resource status of the profile. Possible values include: 'Creating', 'Active', 'Deleting', 'Disabled' @@ -61,8 +63,8 @@ class Profile(TrackedResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, location, sku, tags=None): - super(Profile, self).__init__(location=location, tags=tags) - self.sku = sku + def __init__(self, **kwargs): + super(Profile, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) self.resource_state = None self.provisioning_state = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_py3.py new file mode 100644 index 000000000000..189f3d9cb4cc --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource_py3 import TrackedResource + + +class Profile(TrackedResource): + """CDN profile is a logical grouping of endpoints that share the same + settings, such as CDN provider and pricing tier. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: Required. The pricing tier (defines a CDN provider, feature + list and rate) of the CDN profile. + :type sku: ~azure.mgmt.cdn.models.Sku + :ivar resource_state: Resource status of the profile. Possible values + include: 'Creating', 'Active', 'Deleting', 'Disabled' + :vartype resource_state: str or + ~azure.mgmt.cdn.models.ProfileResourceState + :ivar provisioning_state: Provisioning status of the profile. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'required': True}, + 'resource_state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, sku, tags=None, **kwargs) -> None: + super(Profile, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.resource_state = None + self.provisioning_state = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_update_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_update_parameters.py index fd0ef7f2c4c7..914f51eb2dff 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_update_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_update_parameters.py @@ -23,6 +23,6 @@ class ProfileUpdateParameters(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, tags=None): - super(ProfileUpdateParameters, self).__init__() - self.tags = tags + def __init__(self, **kwargs): + super(ProfileUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_update_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_update_parameters_py3.py new file mode 100644 index 000000000000..fbf2f8090603 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_update_parameters_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProfileUpdateParameters(Model): + """Properties required to update a profile. + + :param tags: Profile tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(ProfileUpdateParameters, self).__init__(**kwargs) + self.tags = tags diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/proxy_resource.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/proxy_resource.py index 867983bc956d..012ff087a08b 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/proxy_resource.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/proxy_resource.py @@ -33,5 +33,11 @@ class ProxyResource(Resource): 'type': {'readonly': True}, } - def __init__(self): - super(ProxyResource, self).__init__() + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/proxy_resource_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/proxy_resource_py3.py new file mode 100644 index 000000000000..63938413f36c --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/proxy_resource_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/purge_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/purge_parameters.py index 824a1909a4f4..4731664fed6a 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/purge_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/purge_parameters.py @@ -15,8 +15,10 @@ class PurgeParameters(Model): """Parameters required for content purge. - :param content_paths: The path to the content to be purged. Can describe a - file path or a wild card directory. + All required parameters must be populated in order to send to Azure. + + :param content_paths: Required. The path to the content to be purged. Can + describe a file path or a wild card directory. :type content_paths: list[str] """ @@ -28,6 +30,6 @@ class PurgeParameters(Model): 'content_paths': {'key': 'contentPaths', 'type': '[str]'}, } - def __init__(self, content_paths): - super(PurgeParameters, self).__init__() - self.content_paths = content_paths + def __init__(self, **kwargs): + super(PurgeParameters, self).__init__(**kwargs) + self.content_paths = kwargs.get('content_paths', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/purge_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/purge_parameters_py3.py new file mode 100644 index 000000000000..31cdefb06e5b --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/purge_parameters_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PurgeParameters(Model): + """Parameters required for content purge. + + All required parameters must be populated in order to send to Azure. + + :param content_paths: Required. The path to the content to be purged. Can + describe a file path or a wild card directory. + :type content_paths: list[str] + """ + + _validation = { + 'content_paths': {'required': True}, + } + + _attribute_map = { + 'content_paths': {'key': 'contentPaths', 'type': '[str]'}, + } + + def __init__(self, *, content_paths, **kwargs) -> None: + super(PurgeParameters, self).__init__(**kwargs) + self.content_paths = content_paths diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/resource.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/resource.py index d4619be996a7..67c78c7fb464 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/resource.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/resource.py @@ -38,8 +38,8 @@ class Resource(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self): - super(Resource, self).__init__() + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_name_availability_request_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_py3.py similarity index 58% rename from azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_name_availability_request_parameters.py rename to azure-mgmt-cdn/azure/mgmt/cdn/models/resource_py3.py index da9ddbfb0370..ee416b984937 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_name_availability_request_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_py3.py @@ -12,29 +12,34 @@ from msrest.serialization import Model -class CheckNameAvailabilityRequestParameters(Model): - """Parameters supplied to the Check Name Availability for Namespace and - NotificationHubs. +class Resource(Model): + """The core properties of ARM resources. Variables are only populated by the server, and will be ignored when sending a request. - :param name: Resource name - :type name: str - :ivar type: Resource type + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. :vartype type: str """ _validation = { - 'name': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, name): - self.name = name + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None self.type = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_usage.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_usage.py index 2fa7f31f4971..ba216e259427 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_usage.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_usage.py @@ -42,8 +42,8 @@ class ResourceUsage(Model): 'limit': {'key': 'limit', 'type': 'int'}, } - def __init__(self): - super(ResourceUsage, self).__init__() + def __init__(self, **kwargs): + super(ResourceUsage, self).__init__(**kwargs) self.resource_type = None self.unit = None self.current_value = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_usage_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_usage_py3.py new file mode 100644 index 000000000000..a7f557b5ecae --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_usage_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceUsage(Model): + """Output of check resource usage API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: Resource type for which the usage is provided. + :vartype resource_type: str + :ivar unit: Unit of the usage. e.g. Count. + :vartype unit: str + :ivar current_value: Actual value of usage on the specified resource type. + :vartype current_value: int + :ivar limit: Quota of the specified resource type. + :vartype limit: int + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceUsage, self).__init__(**kwargs) + self.resource_type = None + self.unit = None + self.current_value = None + self.limit = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py index b6c090159405..88b809ac026f 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py @@ -26,6 +26,6 @@ class Sku(Model): 'name': {'key': 'name', 'type': 'str'}, } - def __init__(self, name=None): - super(Sku, self).__init__() - self.name = name + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py new file mode 100644 index 000000000000..d4471b8a4dd4 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """The pricing tier (defines a CDN provider, feature list and rate) of the CDN + profile. + + :param name: Name of the pricing tier. Possible values include: + 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', + 'Standard_Akamai', 'Standard_ChinaCdn' + :type name: str or ~azure.mgmt.cdn.models.SkuName + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/sso_uri.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/sso_uri.py index f27d2e633ba4..1a2f7c408e19 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/sso_uri.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/sso_uri.py @@ -30,6 +30,6 @@ class SsoUri(Model): 'sso_uri_value': {'key': 'ssoUriValue', 'type': 'str'}, } - def __init__(self): - super(SsoUri, self).__init__() + def __init__(self, **kwargs): + super(SsoUri, self).__init__(**kwargs) self.sso_uri_value = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/sso_uri_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/sso_uri_py3.py new file mode 100644 index 000000000000..269f00d84d24 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/sso_uri_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SsoUri(Model): + """The URI required to login to the supplemental portal from the Azure portal. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar sso_uri_value: The URI used to login to the supplemental portal. + :vartype sso_uri_value: str + """ + + _validation = { + 'sso_uri_value': {'readonly': True}, + } + + _attribute_map = { + 'sso_uri_value': {'key': 'ssoUriValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SsoUri, self).__init__(**kwargs) + self.sso_uri_value = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/supported_optimization_types_list_result.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/supported_optimization_types_list_result.py index 4bc86dc0282c..cfe69fb01272 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/supported_optimization_types_list_result.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/supported_optimization_types_list_result.py @@ -32,6 +32,6 @@ class SupportedOptimizationTypesListResult(Model): 'supported_optimization_types': {'key': 'supportedOptimizationTypes', 'type': '[str]'}, } - def __init__(self): - super(SupportedOptimizationTypesListResult, self).__init__() + def __init__(self, **kwargs): + super(SupportedOptimizationTypesListResult, self).__init__(**kwargs) self.supported_optimization_types = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/supported_optimization_types_list_result_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/supported_optimization_types_list_result_py3.py new file mode 100644 index 000000000000..e8056adcb936 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/supported_optimization_types_list_result_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SupportedOptimizationTypesListResult(Model): + """The result of the GetSupportedOptimizationTypes API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar supported_optimization_types: Supported optimization types for a + profile. + :vartype supported_optimization_types: list[str or + ~azure.mgmt.cdn.models.OptimizationType] + """ + + _validation = { + 'supported_optimization_types': {'readonly': True}, + } + + _attribute_map = { + 'supported_optimization_types': {'key': 'supportedOptimizationTypes', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(SupportedOptimizationTypesListResult, self).__init__(**kwargs) + self.supported_optimization_types = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/tracked_resource.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/tracked_resource.py index 89da055e8f69..0cc6df63f05b 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/tracked_resource.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/tracked_resource.py @@ -18,13 +18,15 @@ class TrackedResource(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 id: Resource ID. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str - :param location: Resource location. + :param location: Required. Resource location. :type location: str :param tags: Resource tags. :type tags: dict[str, str] @@ -45,7 +47,7 @@ class TrackedResource(Resource): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, location, tags=None): - super(TrackedResource, self).__init__() - self.location = location - self.tags = tags + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/tracked_resource_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/tracked_resource_py3.py new file mode 100644 index 000000000000..32b78c0d83f2 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/tracked_resource_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level 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 id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters.py new file mode 100644 index 000000000000..d94baf881a31 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UrlFileExtensionConditionParameters(Model): + """Defines the parameters for the URL file extension condition. + + 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 odatatype: Required. Default value: + "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters" + . + :vartype odatatype: str + :param extensions: Required. A list of extensions for the condition of the + delivery rule. + :type extensions: list[str] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'extensions': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'extensions': {'key': 'extensions', 'type': '[str]'}, + } + + odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters" + + def __init__(self, **kwargs): + super(UrlFileExtensionConditionParameters, self).__init__(**kwargs) + self.extensions = kwargs.get('extensions', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters_py3.py new file mode 100644 index 000000000000..450c880794ce --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UrlFileExtensionConditionParameters(Model): + """Defines the parameters for the URL file extension condition. + + 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 odatatype: Required. Default value: + "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters" + . + :vartype odatatype: str + :param extensions: Required. A list of extensions for the condition of the + delivery rule. + :type extensions: list[str] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'extensions': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'extensions': {'key': 'extensions', 'type': '[str]'}, + } + + odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters" + + def __init__(self, *, extensions, **kwargs) -> None: + super(UrlFileExtensionConditionParameters, self).__init__(**kwargs) + self.extensions = extensions diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters.py new file mode 100644 index 000000000000..06b005be5c26 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UrlPathConditionParameters(Model): + """Defines the parameters for the URL path condition. + + 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 odatatype: Required. Default value: + "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters" . + :vartype odatatype: str + :param path: Required. A URL path for the condition of the delivery rule + :type path: str + :param match_type: Required. The match type for the condition of the + delivery rule. Possible values include: 'Literal', 'Wildcard' + :type match_type: str or ~azure.mgmt.cdn.models.enum + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'path': {'required': True}, + 'match_type': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'match_type': {'key': 'matchType', 'type': 'str'}, + } + + odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters" + + def __init__(self, **kwargs): + super(UrlPathConditionParameters, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.match_type = kwargs.get('match_type', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters_py3.py new file mode 100644 index 000000000000..c1049a0260d9 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UrlPathConditionParameters(Model): + """Defines the parameters for the URL path condition. + + 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 odatatype: Required. Default value: + "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters" . + :vartype odatatype: str + :param path: Required. A URL path for the condition of the delivery rule + :type path: str + :param match_type: Required. The match type for the condition of the + delivery rule. Possible values include: 'Literal', 'Wildcard' + :type match_type: str or ~azure.mgmt.cdn.models.enum + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'path': {'required': True}, + 'match_type': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'match_type': {'key': 'matchType', 'type': 'str'}, + } + + odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters" + + def __init__(self, *, path: str, match_type, **kwargs) -> None: + super(UrlPathConditionParameters, self).__init__(**kwargs) + self.path = path + self.match_type = match_type diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_input.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_input.py index 86eadac85045..5ccf7293966d 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_input.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_input.py @@ -15,8 +15,10 @@ class ValidateCustomDomainInput(Model): """Input of the custom domain to be validated for DNS mapping. - :param host_name: The host name of the custom domain. Must be a domain - name. + All required parameters must be populated in order to send to Azure. + + :param host_name: Required. The host name of the custom domain. Must be a + domain name. :type host_name: str """ @@ -28,6 +30,6 @@ class ValidateCustomDomainInput(Model): 'host_name': {'key': 'hostName', 'type': 'str'}, } - def __init__(self, host_name): - super(ValidateCustomDomainInput, self).__init__() - self.host_name = host_name + def __init__(self, **kwargs): + super(ValidateCustomDomainInput, self).__init__(**kwargs) + self.host_name = kwargs.get('host_name', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_input_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_input_py3.py new file mode 100644 index 000000000000..ad915548dba8 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_input_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateCustomDomainInput(Model): + """Input of the custom domain to be validated for DNS mapping. + + All required parameters must be populated in order to send to Azure. + + :param host_name: Required. The host name of the custom domain. Must be a + domain name. + :type host_name: str + """ + + _validation = { + 'host_name': {'required': True}, + } + + _attribute_map = { + 'host_name': {'key': 'hostName', 'type': 'str'}, + } + + def __init__(self, *, host_name: str, **kwargs) -> None: + super(ValidateCustomDomainInput, self).__init__(**kwargs) + self.host_name = host_name diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_output.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_output.py index 82c6a949d99a..d330e0f93521 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_output.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_output.py @@ -40,8 +40,8 @@ class ValidateCustomDomainOutput(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(ValidateCustomDomainOutput, self).__init__() + def __init__(self, **kwargs): + super(ValidateCustomDomainOutput, self).__init__(**kwargs) self.custom_domain_validated = None self.reason = None self.message = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_output_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_output_py3.py new file mode 100644 index 000000000000..a3d2b9339b9b --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_output_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateCustomDomainOutput(Model): + """Output of custom domain validation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar custom_domain_validated: Indicates whether the custom domain is + valid or not. + :vartype custom_domain_validated: bool + :ivar reason: The reason why the custom domain is not valid. + :vartype reason: str + :ivar message: Error message describing why the custom domain is not + valid. + :vartype message: str + """ + + _validation = { + 'custom_domain_validated': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'custom_domain_validated': {'key': 'customDomainValidated', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ValidateCustomDomainOutput, self).__init__(**kwargs) + self.custom_domain_validated = None + self.reason = None + self.message = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_input.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_input.py index b3b7818b02d4..4df6dc0ae167 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_input.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_input.py @@ -15,7 +15,9 @@ class ValidateProbeInput(Model): """Input of the validate probe API. - :param probe_url: The probe URL to validate. + All required parameters must be populated in order to send to Azure. + + :param probe_url: Required. The probe URL to validate. :type probe_url: str """ @@ -27,6 +29,6 @@ class ValidateProbeInput(Model): 'probe_url': {'key': 'probeURL', 'type': 'str'}, } - def __init__(self, probe_url): - super(ValidateProbeInput, self).__init__() - self.probe_url = probe_url + def __init__(self, **kwargs): + super(ValidateProbeInput, self).__init__(**kwargs) + self.probe_url = kwargs.get('probe_url', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_input_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_input_py3.py new file mode 100644 index 000000000000..c82e5af3927c --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_input_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateProbeInput(Model): + """Input of the validate probe API. + + All required parameters must be populated in order to send to Azure. + + :param probe_url: Required. The probe URL to validate. + :type probe_url: str + """ + + _validation = { + 'probe_url': {'required': True}, + } + + _attribute_map = { + 'probe_url': {'key': 'probeURL', 'type': 'str'}, + } + + def __init__(self, *, probe_url: str, **kwargs) -> None: + super(ValidateProbeInput, self).__init__(**kwargs) + self.probe_url = probe_url diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_output.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_output.py index dcbc8b9a6228..8bf0b4d5a9b1 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_output.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_output.py @@ -40,8 +40,8 @@ class ValidateProbeOutput(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(ValidateProbeOutput, self).__init__() + def __init__(self, **kwargs): + super(ValidateProbeOutput, self).__init__(**kwargs) self.is_valid = None self.error_code = None self.message = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_output_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_output_py3.py new file mode 100644 index 000000000000..b865a3a978b5 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_output_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateProbeOutput(Model): + """Output of the validate probe API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar is_valid: Indicates whether the probe URL is accepted or not. + :vartype is_valid: bool + :ivar error_code: Specifies the error code when the probe url is not + accepted. + :vartype error_code: str + :ivar message: The detailed error message describing why the probe URL is + not accepted. + :vartype message: str + """ + + _validation = { + 'is_valid': {'readonly': True}, + 'error_code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ValidateProbeOutput, self).__init__(**kwargs) + self.is_valid = None + self.error_code = None + self.message = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py index b94b84441fdf..581915ce50cf 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py @@ -11,8 +11,8 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -24,7 +24,7 @@ class CustomDomainsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config @@ -242,7 +242,7 @@ def _create_initial( return deserialized def create( - self, resource_group_name, profile_name, endpoint_name, custom_domain_name, host_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, custom_domain_name, host_name, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new custom domain within an endpoint. :param resource_group_name: Name of the Resource group within the @@ -261,13 +261,16 @@ def create( name. :type host_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns CustomDomain - or ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns CustomDomain or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.CustomDomain] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.CustomDomain]] :raises: :class:`ErrorResponseException` """ @@ -281,28 +284,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201, 202]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('CustomDomain', response) if raw: @@ -311,12 +294,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}'} @@ -366,7 +350,7 @@ def _delete_initial( return deserialized def delete( - self, resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes an existing custom domain within an endpoint. :param resource_group_name: Name of the Resource group within the @@ -382,13 +366,16 @@ def delete( endpoint. :type custom_domain_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns CustomDomain - or ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns CustomDomain or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.CustomDomain] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.CustomDomain]] :raises: :class:`ErrorResponseException` """ @@ -401,28 +388,8 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202, 204]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('CustomDomain', response) if raw: @@ -431,12 +398,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}'} def disable_custom_https( diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py index f700d35286f0..3d788cd2ce9f 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py @@ -22,7 +22,7 @@ class EdgeNodesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py index 906aace111dd..a363d2214d40 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py @@ -11,8 +11,8 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -24,7 +24,7 @@ class EndpointsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config @@ -232,7 +232,7 @@ def _create_initial( return deserialized def create( - self, resource_group_name, profile_name, endpoint_name, endpoint, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, endpoint, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. @@ -248,13 +248,16 @@ def create( :param endpoint: Endpoint properties :type endpoint: ~azure.mgmt.cdn.models.Endpoint :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Endpoint or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Endpoint or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.Endpoint] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.Endpoint]] :raises: :class:`ErrorResponseException` """ @@ -267,28 +270,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201, 202]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('Endpoint', response) if raw: @@ -297,12 +280,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'} @@ -357,7 +341,7 @@ def _update_initial( return deserialized def update( - self, resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers=None, raw=False, polling=True, **operation_config): """Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags and Origin HostHeader can be updated after creating an endpoint. To update @@ -377,13 +361,16 @@ def update( :type endpoint_update_properties: ~azure.mgmt.cdn.models.EndpointUpdateParameters :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Endpoint or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Endpoint or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.Endpoint] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.Endpoint]] :raises: :class:`ErrorResponseException` """ @@ -396,28 +383,8 @@ def update( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('Endpoint', response) if raw: @@ -426,12 +393,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'} @@ -473,7 +441,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. @@ -487,12 +455,14 @@ def delete( unique globally. :type endpoint_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`ErrorResponseException` """ @@ -504,38 +474,19 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [202, 204]: - raise models.ErrorResponseException(self._deserialize, response) - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'} @@ -586,7 +537,7 @@ def _start_initial( return deserialized def start( - self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, polling=True, **operation_config): """Starts an existing CDN endpoint that is on a stopped state. :param resource_group_name: Name of the Resource group within the @@ -599,13 +550,16 @@ def start( unique globally. :type endpoint_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Endpoint or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Endpoint or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.Endpoint] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.Endpoint]] :raises: :class:`ErrorResponseException` """ @@ -617,28 +571,8 @@ def start( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('Endpoint', response) if raw: @@ -647,12 +581,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/start'} @@ -703,7 +638,7 @@ def _stop_initial( return deserialized def stop( - self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, polling=True, **operation_config): """Stops an existing running CDN endpoint. :param resource_group_name: Name of the Resource group within the @@ -716,13 +651,16 @@ def stop( unique globally. :type endpoint_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Endpoint or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Endpoint or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.Endpoint] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.Endpoint]] :raises: :class:`ErrorResponseException` """ @@ -734,28 +672,8 @@ def stop( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('Endpoint', response) if raw: @@ -764,12 +682,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop'} @@ -817,7 +736,7 @@ def _purge_content_initial( return client_raw_response def purge_content( - self, resource_group_name, profile_name, endpoint_name, content_paths, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, content_paths, custom_headers=None, raw=False, polling=True, **operation_config): """Removes a content from CDN. :param resource_group_name: Name of the Resource group within the @@ -833,12 +752,14 @@ def purge_content( describe a file path or a wild card directory. :type content_paths: list[str] :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`ErrorResponseException` """ @@ -851,38 +772,19 @@ def purge_content( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) purge_content.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge'} @@ -930,7 +832,7 @@ def _load_content_initial( return client_raw_response def load_content( - self, resource_group_name, profile_name, endpoint_name, content_paths, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, content_paths, custom_headers=None, raw=False, polling=True, **operation_config): """Pre-loads a content to CDN. Available for Verizon Profiles. :param resource_group_name: Name of the Resource group within the @@ -946,12 +848,14 @@ def load_content( should be a relative file URL of the origin. :type content_paths: list[str] :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`ErrorResponseException` """ @@ -964,38 +868,19 @@ def load_content( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) load_content.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load'} def validate_custom_domain( diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py index bee028226c2b..07eb4c2795ff 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py @@ -22,7 +22,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py index ab9ae02090af..e5a715ddacb5 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py @@ -11,8 +11,8 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -24,7 +24,7 @@ class OriginsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config @@ -238,7 +238,7 @@ def _update_initial( return deserialized def update( - self, resource_group_name, profile_name, endpoint_name, origin_name, origin_update_properties, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, origin_name, origin_update_properties, custom_headers=None, raw=False, polling=True, **operation_config): """Updates an existing origin within an endpoint. :param resource_group_name: Name of the Resource group within the @@ -257,13 +257,16 @@ def update( :type origin_update_properties: ~azure.mgmt.cdn.models.OriginUpdateParameters :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Origin or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Origin or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.Origin] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.Origin]] :raises: :class:`ErrorResponseException` """ @@ -277,28 +280,8 @@ def update( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('Origin', response) if raw: @@ -307,10 +290,11 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}'} diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py index af12860c9eb5..438a69a9347d 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py @@ -11,8 +11,8 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -24,7 +24,7 @@ class ProfilesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config @@ -287,7 +287,7 @@ def _create_initial( return deserialized def create( - self, resource_group_name, profile_name, profile, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, profile, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new CDN profile with a profile name under the specified subscription and resource group. @@ -300,13 +300,16 @@ def create( :param profile: Profile properties needed to create a new profile. :type profile: ~azure.mgmt.cdn.models.Profile :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Profile or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Profile or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.Profile] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.Profile]] :raises: :class:`ErrorResponseException` """ @@ -318,28 +321,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201, 202]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('Profile', response) if raw: @@ -348,12 +331,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}'} @@ -409,7 +393,7 @@ def _update_initial( return deserialized def update( - self, resource_group_name, profile_name, tags=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates an existing CDN profile with the specified profile name under the specified subscription and resource group. @@ -422,13 +406,16 @@ def update( :param tags: Profile tags :type tags: dict[str, str] :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Profile or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Profile or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.Profile] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.Profile]] :raises: :class:`ErrorResponseException` """ @@ -440,28 +427,8 @@ def update( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('Profile', response) if raw: @@ -470,12 +437,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}'} @@ -516,7 +484,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains. @@ -528,12 +496,14 @@ def delete( the resource group. :type profile_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`ErrorResponseException` """ @@ -544,38 +514,19 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [202, 204]: - raise models.ErrorResponseException(self._deserialize, response) - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}'} def generate_sso_uri( diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py index 707e5e31e414..57aaa52c4506 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py @@ -22,7 +22,7 @@ class ResourceUsageOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/version.py b/azure-mgmt-cdn/azure/mgmt/cdn/version.py index 53c4c7ea05e8..7f225c6aab41 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/version.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.0" +VERSION = "3.0.0" diff --git a/azure-mgmt-cdn/sdk_packaging.toml b/azure-mgmt-cdn/sdk_packaging.toml new file mode 100644 index 000000000000..224bd7591a1c --- /dev/null +++ b/azure-mgmt-cdn/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-cdn" +package_pprint_name = "CDN Management" +package_doc_id = "cdn" +is_stable = true diff --git a/azure-mgmt-cdn/setup.py b/azure-mgmt-cdn/setup.py index 4deb2392c9d2..e2b7e3b2b712 100644 --- a/azure-mgmt-cdn/setup.py +++ b/azure-mgmt-cdn/setup.py @@ -64,12 +64,11 @@ author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', @@ -78,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-cdn/tests/recordings/test_mgmt_cdn.test_cdn.yaml b/azure-mgmt-cdn/tests/recordings/test_mgmt_cdn.test_cdn.yaml index f782fe48b0f7..4f63a59df587 100644 --- a/azure-mgmt-cdn/tests/recordings/test_mgmt_cdn.test_cdn.yaml +++ b/azure-mgmt-cdn/tests/recordings/test_mgmt_cdn.test_cdn.yaml @@ -7,11 +7,11 @@ interactions: Connection: [keep-alive] Content-Length: ['72'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.17 - msrest_azure/0.4.15 cdnmanagementclient/2.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.17134-SP0) requests/2.18.4 msrest/0.4.28 + msrest_azure/0.4.31 azure-mgmt-cdn/3.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/providers/Microsoft.Cdn/checkNameAvailability?api-version=2017-04-02 + uri: https://management.azure.com/providers/Microsoft.Cdn/checkNameAvailability?api-version=2017-10-12 response: body: {string: "{\r\n \"nameAvailable\":true,\"reason\":null,\"message\":null\r\ \n}"} @@ -19,7 +19,7 @@ interactions: cache-control: [no-cache] content-length: ['57'] content-type: [application/json; odata.metadata=minimal] - date: ['Thu, 26 Oct 2017 16:58:01 GMT'] + date: ['Fri, 25 May 2018 19:24:53 GMT'] expires: ['-1'] odata-version: ['4.0'] pragma: [no-cache] @@ -28,6 +28,7 @@ interactions: transfer-encoding: [chunked] vary: [Accept-Encoding] x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] x-ms-ratelimit-remaining-tenant-writes: ['1199'] x-powered-by: [ASP.NET] status: {code: 200, message: OK} diff --git a/azure-mgmt-cognitiveservices/HISTORY.rst b/azure-mgmt-cognitiveservices/HISTORY.rst index 6cd5432eb409..35db6bd3e84b 100644 --- a/azure-mgmt-cognitiveservices/HISTORY.rst +++ b/azure-mgmt-cognitiveservices/HISTORY.rst @@ -3,6 +3,45 @@ Release History =============== +3.0.0 (2018-05-21) +++++++++++++++++++ + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Features** + +- Add "resource_skus" operation group +- Update SKU list +- Add "accounts.get_usages" operation +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + 2.0.0 (2017-10-26) ++++++++++++++++++ diff --git a/azure-mgmt-cognitiveservices/README.rst b/azure-mgmt-cognitiveservices/README.rst index b1a303e28a96..0ea301b72b84 100644 --- a/azure-mgmt-cognitiveservices/README.rst +++ b/azure-mgmt-cognitiveservices/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Cognitive Services Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `Cognitive Services Management -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/cognitive_services_management_client.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/cognitive_services_management_client.py index 4b2c6a87d068..e2c25cc61bb5 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/cognitive_services_management_client.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/cognitive_services_management_client.py @@ -9,11 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from .operations.accounts_operations import AccountsOperations +from .operations.resource_skus_operations import ResourceSkusOperations from .operations.operations import Operations from .operations.check_sku_availability_operations import CheckSkuAvailabilityOperations from . import models @@ -44,14 +45,14 @@ def __init__( super(CognitiveServicesManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('cognitiveservicesmanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-cognitiveservices/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class CognitiveServicesManagementClient(object): +class CognitiveServicesManagementClient(SDKClient): """Cognitive Services Management Client :ivar config: Configuration for client. @@ -59,6 +60,8 @@ class CognitiveServicesManagementClient(object): :ivar accounts: Accounts operations :vartype accounts: azure.mgmt.cognitiveservices.operations.AccountsOperations + :ivar resource_skus: ResourceSkus operations + :vartype resource_skus: azure.mgmt.cognitiveservices.operations.ResourceSkusOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.cognitiveservices.operations.Operations :ivar check_sku_availability: CheckSkuAvailability operations @@ -76,7 +79,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = CognitiveServicesManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(CognitiveServicesManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '2017-04-18' @@ -85,6 +88,8 @@ def __init__( self.accounts = AccountsOperations( self._client, self.config, self._serialize, self._deserialize) + self.resource_skus = ResourceSkusOperations( + self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) self.check_sku_availability = CheckSkuAvailabilityOperations( diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/__init__.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/__init__.py index 7cf6378c4341..4ae2382d277f 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/__init__.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/__init__.py @@ -9,22 +9,52 @@ # regenerated. # -------------------------------------------------------------------------- -from .sku import Sku -from .cognitive_services_account_create_parameters import CognitiveServicesAccountCreateParameters -from .cognitive_services_account_update_parameters import CognitiveServicesAccountUpdateParameters -from .cognitive_services_account import CognitiveServicesAccount -from .cognitive_services_account_keys import CognitiveServicesAccountKeys -from .regenerate_key_parameters import RegenerateKeyParameters -from .cognitive_services_resource_and_sku import CognitiveServicesResourceAndSku -from .cognitive_services_account_enumerate_skus_result import CognitiveServicesAccountEnumerateSkusResult -from .error_body import ErrorBody -from .error import Error, ErrorException -from .operation_display_info import OperationDisplayInfo -from .operation_entity import OperationEntity -from .check_sku_availability_parameter import CheckSkuAvailabilityParameter -from .check_sku_availability_result import CheckSkuAvailabilityResult -from .check_sku_availability_result_list import CheckSkuAvailabilityResultList +try: + from .sku_py3 import Sku + from .cognitive_services_account_create_parameters_py3 import CognitiveServicesAccountCreateParameters + from .cognitive_services_account_update_parameters_py3 import CognitiveServicesAccountUpdateParameters + from .cognitive_services_account_py3 import CognitiveServicesAccount + from .cognitive_services_account_keys_py3 import CognitiveServicesAccountKeys + from .regenerate_key_parameters_py3 import RegenerateKeyParameters + from .cognitive_services_resource_and_sku_py3 import CognitiveServicesResourceAndSku + from .cognitive_services_account_enumerate_skus_result_py3 import CognitiveServicesAccountEnumerateSkusResult + from .metric_name_py3 import MetricName + from .usage_py3 import Usage + from .usages_result_py3 import UsagesResult + from .error_body_py3 import ErrorBody + from .error_py3 import Error, ErrorException + from .operation_display_info_py3 import OperationDisplayInfo + from .operation_entity_py3 import OperationEntity + from .check_sku_availability_parameter_py3 import CheckSkuAvailabilityParameter + from .check_sku_availability_result_py3 import CheckSkuAvailabilityResult + from .check_sku_availability_result_list_py3 import CheckSkuAvailabilityResultList + from .resource_sku_restriction_info_py3 import ResourceSkuRestrictionInfo + from .resource_sku_restrictions_py3 import ResourceSkuRestrictions + from .resource_sku_py3 import ResourceSku +except (SyntaxError, ImportError): + from .sku import Sku + from .cognitive_services_account_create_parameters import CognitiveServicesAccountCreateParameters + from .cognitive_services_account_update_parameters import CognitiveServicesAccountUpdateParameters + from .cognitive_services_account import CognitiveServicesAccount + from .cognitive_services_account_keys import CognitiveServicesAccountKeys + from .regenerate_key_parameters import RegenerateKeyParameters + from .cognitive_services_resource_and_sku import CognitiveServicesResourceAndSku + from .cognitive_services_account_enumerate_skus_result import CognitiveServicesAccountEnumerateSkusResult + from .metric_name import MetricName + from .usage import Usage + from .usages_result import UsagesResult + from .error_body import ErrorBody + from .error import Error, ErrorException + from .operation_display_info import OperationDisplayInfo + from .operation_entity import OperationEntity + from .check_sku_availability_parameter import CheckSkuAvailabilityParameter + from .check_sku_availability_result import CheckSkuAvailabilityResult + from .check_sku_availability_result_list import CheckSkuAvailabilityResultList + from .resource_sku_restriction_info import ResourceSkuRestrictionInfo + from .resource_sku_restrictions import ResourceSkuRestrictions + from .resource_sku import ResourceSku from .cognitive_services_account_paged import CognitiveServicesAccountPaged +from .resource_sku_paged import ResourceSkuPaged from .operation_entity_paged import OperationEntityPaged from .cognitive_services_management_client_enums import ( SkuName, @@ -32,6 +62,10 @@ Kind, ProvisioningState, KeyName, + UnitType, + QuotaUsageStatus, + ResourceSkuRestrictionsType, + ResourceSkuRestrictionsReasonCode, ) __all__ = [ @@ -43,6 +77,9 @@ 'RegenerateKeyParameters', 'CognitiveServicesResourceAndSku', 'CognitiveServicesAccountEnumerateSkusResult', + 'MetricName', + 'Usage', + 'UsagesResult', 'ErrorBody', 'Error', 'ErrorException', 'OperationDisplayInfo', @@ -50,11 +87,19 @@ 'CheckSkuAvailabilityParameter', 'CheckSkuAvailabilityResult', 'CheckSkuAvailabilityResultList', + 'ResourceSkuRestrictionInfo', + 'ResourceSkuRestrictions', + 'ResourceSku', 'CognitiveServicesAccountPaged', + 'ResourceSkuPaged', 'OperationEntityPaged', 'SkuName', 'SkuTier', 'Kind', 'ProvisioningState', 'KeyName', + 'UnitType', + 'QuotaUsageStatus', + 'ResourceSkuRestrictionsType', + 'ResourceSkuRestrictionsReasonCode', ] diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_parameter.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_parameter.py index c85269f48567..c476eb892a2b 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_parameter.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_parameter.py @@ -15,15 +15,18 @@ class CheckSkuAvailabilityParameter(Model): """Check SKU availability parameter. - :param skus: The SKU of the resource. + All required parameters must be populated in order to send to Azure. + + :param skus: Required. The SKU of the resource. :type skus: list[str or ~azure.mgmt.cognitiveservices.models.SkuName] - :param kind: The Kind of the resource. Possible values include: - 'Academic', 'Bing.Autosuggest', 'Bing.Search', 'Bing.Speech', - 'Bing.SpellCheck', 'ComputerVision', 'ContentModerator', 'CustomSpeech', - 'Emotion', 'Face', 'LUIS', 'Recommendations', 'SpeakerRecognition', - 'Speech', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' + :param kind: Required. The Kind of the resource. Possible values include: + 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', + 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator', + 'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training', + 'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', + 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' :type kind: str or ~azure.mgmt.cognitiveservices.models.Kind - :param type: The Type of the resource. + :param type: Required. The Type of the resource. :type type: str """ @@ -39,7 +42,8 @@ class CheckSkuAvailabilityParameter(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, skus, kind, type): - self.skus = skus - self.kind = kind - self.type = type + def __init__(self, **kwargs): + super(CheckSkuAvailabilityParameter, self).__init__(**kwargs) + self.skus = kwargs.get('skus', None) + self.kind = kwargs.get('kind', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_parameter_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_parameter_py3.py new file mode 100644 index 000000000000..3deeb3c9c009 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_parameter_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckSkuAvailabilityParameter(Model): + """Check SKU availability parameter. + + All required parameters must be populated in order to send to Azure. + + :param skus: Required. The SKU of the resource. + :type skus: list[str or ~azure.mgmt.cognitiveservices.models.SkuName] + :param kind: Required. The Kind of the resource. Possible values include: + 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', + 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator', + 'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training', + 'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', + 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' + :type kind: str or ~azure.mgmt.cognitiveservices.models.Kind + :param type: Required. The Type of the resource. + :type type: str + """ + + _validation = { + 'skus': {'required': True}, + 'kind': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'skus': {'key': 'skus', 'type': '[str]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, skus, kind, type: str, **kwargs) -> None: + super(CheckSkuAvailabilityParameter, self).__init__(**kwargs) + self.skus = skus + self.kind = kind + self.type = type diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result.py index 76d40c6f9fa7..e2ecedea825c 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result.py @@ -16,10 +16,11 @@ class CheckSkuAvailabilityResult(Model): """Check SKU availability result. :param kind: The Kind of the resource. Possible values include: - 'Academic', 'Bing.Autosuggest', 'Bing.Search', 'Bing.Speech', - 'Bing.SpellCheck', 'ComputerVision', 'ContentModerator', 'CustomSpeech', - 'Emotion', 'Face', 'LUIS', 'Recommendations', 'SpeakerRecognition', - 'Speech', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' + 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', + 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator', + 'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training', + 'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', + 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' :type kind: str or ~azure.mgmt.cognitiveservices.models.Kind :param type: The Type of the resource. :type type: str @@ -43,10 +44,11 @@ class CheckSkuAvailabilityResult(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, kind=None, type=None, sku_name=None, sku_available=None, reason=None, message=None): - self.kind = kind - self.type = type - self.sku_name = sku_name - self.sku_available = sku_available - self.reason = reason - self.message = message + def __init__(self, **kwargs): + super(CheckSkuAvailabilityResult, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.type = kwargs.get('type', None) + self.sku_name = kwargs.get('sku_name', None) + self.sku_available = kwargs.get('sku_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_list.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_list.py index 6fc35cfcb251..bb5d7bdb5aba 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_list.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_list.py @@ -24,5 +24,6 @@ class CheckSkuAvailabilityResultList(Model): 'value': {'key': 'value', 'type': '[CheckSkuAvailabilityResult]'}, } - def __init__(self, value=None): - self.value = value + def __init__(self, **kwargs): + super(CheckSkuAvailabilityResultList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_list_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_list_py3.py new file mode 100644 index 000000000000..e5c1bee9636e --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_list_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckSkuAvailabilityResultList(Model): + """Check SKU availability result list. + + :param value: Check SKU availability result list. + :type value: + list[~azure.mgmt.cognitiveservices.models.CheckSkuAvailabilityResult] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CheckSkuAvailabilityResult]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(CheckSkuAvailabilityResultList, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_py3.py new file mode 100644 index 000000000000..f7700f27a219 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckSkuAvailabilityResult(Model): + """Check SKU availability result. + + :param kind: The Kind of the resource. Possible values include: + 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', + 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator', + 'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training', + 'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', + 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' + :type kind: str or ~azure.mgmt.cognitiveservices.models.Kind + :param type: The Type of the resource. + :type type: str + :param sku_name: The SKU of Cognitive Services account. Possible values + include: 'F0', 'P0', 'P1', 'P2', 'S0', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6' + :type sku_name: str or ~azure.mgmt.cognitiveservices.models.SkuName + :param sku_available: Indicates the given SKU is available or not. + :type sku_available: bool + :param reason: Reason why the SKU is not available. + :type reason: str + :param message: Additional error message. + :type message: str + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'sku_available': {'key': 'skuAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, kind=None, type: str=None, sku_name=None, sku_available: bool=None, reason: str=None, message: str=None, **kwargs) -> None: + super(CheckSkuAvailabilityResult, self).__init__(**kwargs) + self.kind = kind + self.type = type + self.sku_name = sku_name + self.sku_available = sku_available + self.reason = reason + self.message = message diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account.py index 19aeee889ac6..148b30e560b5 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account.py @@ -31,7 +31,7 @@ class CognitiveServicesAccount(Model): :vartype name: str :ivar provisioning_state: Gets the status of the cognitive services account at the time the operation was called. Possible values include: - 'Creating', 'ResolvingDNS', 'Succeeded', 'Failed' + 'Creating', 'ResolvingDNS', 'Moving', 'Deleting', 'Succeeded', 'Failed' :vartype provisioning_state: str or ~azure.mgmt.cognitiveservices.models.ProvisioningState :param endpoint: Endpoint of the created account. @@ -63,7 +63,7 @@ class CognitiveServicesAccount(Model): 'kind': {'key': 'kind', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, 'internal_id': {'key': 'properties.internalId', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'Sku'}, @@ -71,15 +71,16 @@ class CognitiveServicesAccount(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, etag=None, kind=None, location=None, endpoint=None, internal_id=None, sku=None, tags=None): - self.etag = etag + def __init__(self, **kwargs): + super(CognitiveServicesAccount, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) self.id = None - self.kind = kind - self.location = location + self.kind = kwargs.get('kind', None) + self.location = kwargs.get('location', None) self.name = None self.provisioning_state = None - self.endpoint = endpoint - self.internal_id = internal_id - self.sku = sku - self.tags = tags + self.endpoint = kwargs.get('endpoint', None) + self.internal_id = kwargs.get('internal_id', None) + self.sku = kwargs.get('sku', None) + self.tags = kwargs.get('tags', None) self.type = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_create_parameters.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_create_parameters.py index f0c9bcec22d6..c12b8a0eca1e 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_create_parameters.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_create_parameters.py @@ -15,20 +15,23 @@ class CognitiveServicesAccountCreateParameters(Model): """The parameters to provide for the account. - :param sku: Required. Gets or sets the SKU of the resource. + All required parameters must be populated in order to send to Azure. + + :param sku: Required. Required. Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.cognitiveservices.models.Sku - :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'Academic', 'Bing.Autosuggest', 'Bing.Search', - 'Bing.Speech', 'Bing.SpellCheck', 'ComputerVision', 'ContentModerator', - 'CustomSpeech', 'Emotion', 'Face', 'LUIS', 'Recommendations', - 'SpeakerRecognition', 'Speech', 'SpeechTranslation', 'TextAnalytics', + :param kind: Required. Required. Gets or sets the Kind of the resource. + Possible values include: 'Bing.Autosuggest.v7', 'Bing.CustomSearch', + 'Bing.Search.v7', 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', + 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction', + 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker', + 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' :type kind: str or ~azure.mgmt.cognitiveservices.models.Kind - :param location: Required. Gets or sets the location of the resource. This - will be one of the supported and registered Azure Geo Regions (e.g. West - US, East US, Southeast Asia, etc.). The geo region of a resource cannot be - changed once it is created, but if an identical geo region is specified on - update the request will succeed. + :param location: Required. Required. Gets or sets the location of the + resource. This will be one of the supported and registered Azure Geo + Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + resource cannot be changed once it is created, but if an identical geo + region is specified on update the request will succeed. :type location: str :param tags: Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource @@ -36,8 +39,8 @@ class CognitiveServicesAccountCreateParameters(Model): resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. :type tags: dict[str, str] - :param properties: Must exist in the request. Must be an empty object. - Must not be null. + :param properties: Required. Must exist in the request. Must be an empty + object. Must not be null. :type properties: object """ @@ -56,9 +59,10 @@ class CognitiveServicesAccountCreateParameters(Model): 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, sku, kind, location, properties, tags=None): - self.sku = sku - self.kind = kind - self.location = location - self.tags = tags - self.properties = properties + def __init__(self, **kwargs): + super(CognitiveServicesAccountCreateParameters, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.kind = kwargs.get('kind', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_create_parameters_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_create_parameters_py3.py new file mode 100644 index 000000000000..bce9b69e99ed --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_create_parameters_py3.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CognitiveServicesAccountCreateParameters(Model): + """The parameters to provide for the account. + + All required parameters must be populated in order to send to Azure. + + :param sku: Required. Required. Gets or sets the SKU of the resource. + :type sku: ~azure.mgmt.cognitiveservices.models.Sku + :param kind: Required. Required. Gets or sets the Kind of the resource. + Possible values include: 'Bing.Autosuggest.v7', 'Bing.CustomSearch', + 'Bing.Search.v7', 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', + 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction', + 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker', + 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', + 'TextTranslation', 'WebLM' + :type kind: str or ~azure.mgmt.cognitiveservices.models.Kind + :param location: Required. Required. Gets or sets the location of the + resource. This will be one of the supported and registered Azure Geo + Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + resource cannot be changed once it is created, but if an identical geo + region is specified on update the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater than 128 characters and + value no greater than 256 characters. + :type tags: dict[str, str] + :param properties: Required. Must exist in the request. Must be an empty + object. Must not be null. + :type properties: object + """ + + _validation = { + 'sku': {'required': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, sku, kind, location: str, properties, tags=None, **kwargs) -> None: + super(CognitiveServicesAccountCreateParameters, self).__init__(**kwargs) + self.sku = sku + self.kind = kind + self.location = location + self.tags = tags + self.properties = properties diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_enumerate_skus_result.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_enumerate_skus_result.py index 72ba70ee4686..96992c1e071d 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_enumerate_skus_result.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_enumerate_skus_result.py @@ -32,5 +32,6 @@ class CognitiveServicesAccountEnumerateSkusResult(Model): 'value': {'key': 'value', 'type': '[CognitiveServicesResourceAndSku]'}, } - def __init__(self): + def __init__(self, **kwargs): + super(CognitiveServicesAccountEnumerateSkusResult, self).__init__(**kwargs) self.value = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_enumerate_skus_result_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_enumerate_skus_result_py3.py new file mode 100644 index 000000000000..4327cfe5fa1c --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_enumerate_skus_result_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CognitiveServicesAccountEnumerateSkusResult(Model): + """The list of cognitive services accounts operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Gets the list of Cognitive Services accounts and their + properties. + :vartype value: + list[~azure.mgmt.cognitiveservices.models.CognitiveServicesResourceAndSku] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CognitiveServicesResourceAndSku]'}, + } + + def __init__(self, **kwargs) -> None: + super(CognitiveServicesAccountEnumerateSkusResult, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_keys.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_keys.py index 5cf1aaf11fda..14f54a0735b3 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_keys.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_keys.py @@ -26,6 +26,7 @@ class CognitiveServicesAccountKeys(Model): 'key2': {'key': 'key2', 'type': 'str'}, } - def __init__(self, key1=None, key2=None): - self.key1 = key1 - self.key2 = key2 + def __init__(self, **kwargs): + super(CognitiveServicesAccountKeys, self).__init__(**kwargs) + self.key1 = kwargs.get('key1', None) + self.key2 = kwargs.get('key2', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_keys_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_keys_py3.py new file mode 100644 index 000000000000..0407f9a5198b --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_keys_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CognitiveServicesAccountKeys(Model): + """The access keys for the cognitive services account. + + :param key1: Gets the value of key 1. + :type key1: str + :param key2: Gets the value of key 2. + :type key2: str + """ + + _attribute_map = { + 'key1': {'key': 'key1', 'type': 'str'}, + 'key2': {'key': 'key2', 'type': 'str'}, + } + + def __init__(self, *, key1: str=None, key2: str=None, **kwargs) -> None: + super(CognitiveServicesAccountKeys, self).__init__(**kwargs) + self.key1 = key1 + self.key2 = key2 diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_py3.py new file mode 100644 index 000000000000..a249cb7dd2bc --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_py3.py @@ -0,0 +1,86 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CognitiveServicesAccount(Model): + """Cognitive Services Account is an Azure resource representing the + provisioned account, its type, location and SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param etag: Entity Tag + :type etag: str + :ivar id: The id of the created account + :vartype id: str + :param kind: Type of cognitive service account. + :type kind: str + :param location: The location of the resource + :type location: str + :ivar name: The name of the created account + :vartype name: str + :ivar provisioning_state: Gets the status of the cognitive services + account at the time the operation was called. Possible values include: + 'Creating', 'ResolvingDNS', 'Moving', 'Deleting', 'Succeeded', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.cognitiveservices.models.ProvisioningState + :param endpoint: Endpoint of the created account. + :type endpoint: str + :param internal_id: The internal identifier. + :type internal_id: str + :param sku: The SKU of Cognitive Services account. + :type sku: ~azure.mgmt.cognitiveservices.models.Sku + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater than 128 characters and + value no greater than 256 characters. + :type tags: dict[str, str] + :ivar type: Resource type + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, + 'internal_id': {'key': 'properties.internalId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, etag: str=None, kind: str=None, location: str=None, endpoint: str=None, internal_id: str=None, sku=None, tags=None, **kwargs) -> None: + super(CognitiveServicesAccount, self).__init__(**kwargs) + self.etag = etag + self.id = None + self.kind = kind + self.location = location + self.name = None + self.provisioning_state = None + self.endpoint = endpoint + self.internal_id = internal_id + self.sku = sku + self.tags = tags + self.type = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters.py index ccead5d5ee3f..5b78b1a13a91 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters.py @@ -30,6 +30,7 @@ class CognitiveServicesAccountUpdateParameters(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, sku=None, tags=None): - self.sku = sku - self.tags = tags + def __init__(self, **kwargs): + super(CognitiveServicesAccountUpdateParameters, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters_py3.py new file mode 100644 index 000000000000..03cd5ba1328b --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CognitiveServicesAccountUpdateParameters(Model): + """The parameters to provide for the account. + + :param sku: Gets or sets the SKU of the resource. + :type sku: ~azure.mgmt.cognitiveservices.models.Sku + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater than 128 characters and + value no greater than 256 characters. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, tags=None, **kwargs) -> None: + super(CognitiveServicesAccountUpdateParameters, self).__init__(**kwargs) + self.sku = sku + self.tags = tags diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_management_client_enums.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_management_client_enums.py index b7de0c2dd55e..8d8c7ea8feb1 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_management_client_enums.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_management_client_enums.py @@ -12,7 +12,7 @@ from enum import Enum -class SkuName(Enum): +class SkuName(str, Enum): f0 = "F0" p0 = "P0" @@ -27,44 +27,78 @@ class SkuName(Enum): s6 = "S6" -class SkuTier(Enum): +class SkuTier(str, Enum): free = "Free" standard = "Standard" premium = "Premium" -class Kind(Enum): +class Kind(str, Enum): - academic = "Academic" - bing_autosuggest = "Bing.Autosuggest" - bing_search = "Bing.Search" + bing_autosuggestv7 = "Bing.Autosuggest.v7" + bing_custom_search = "Bing.CustomSearch" + bing_searchv7 = "Bing.Search.v7" bing_speech = "Bing.Speech" - bing_spell_check = "Bing.SpellCheck" + bing_spell_checkv7 = "Bing.SpellCheck.v7" computer_vision = "ComputerVision" content_moderator = "ContentModerator" custom_speech = "CustomSpeech" + custom_vision_prediction = "CustomVision.Prediction" + custom_vision_training = "CustomVision.Training" emotion = "Emotion" face = "Face" luis = "LUIS" - recommendations = "Recommendations" + qn_amaker = "QnAMaker" speaker_recognition = "SpeakerRecognition" - speech = "Speech" speech_translation = "SpeechTranslation" text_analytics = "TextAnalytics" text_translation = "TextTranslation" web_lm = "WebLM" -class ProvisioningState(Enum): +class ProvisioningState(str, Enum): creating = "Creating" resolving_dns = "ResolvingDNS" + moving = "Moving" + deleting = "Deleting" succeeded = "Succeeded" failed = "Failed" -class KeyName(Enum): +class KeyName(str, Enum): key1 = "Key1" key2 = "Key2" + + +class UnitType(str, Enum): + + count = "Count" + bytes = "Bytes" + seconds = "Seconds" + percent = "Percent" + count_per_second = "CountPerSecond" + bytes_per_second = "BytesPerSecond" + milliseconds = "Milliseconds" + + +class QuotaUsageStatus(str, Enum): + + included = "Included" + blocked = "Blocked" + in_overage = "InOverage" + unknown = "Unknown" + + +class ResourceSkuRestrictionsType(str, Enum): + + location = "Location" + zone = "Zone" + + +class ResourceSkuRestrictionsReasonCode(str, Enum): + + quota_id = "QuotaId" + not_available_for_subscription = "NotAvailableForSubscription" diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_resource_and_sku.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_resource_and_sku.py index e08584c04ff8..da6668117698 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_resource_and_sku.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_resource_and_sku.py @@ -26,6 +26,7 @@ class CognitiveServicesResourceAndSku(Model): 'sku': {'key': 'sku', 'type': 'Sku'}, } - def __init__(self, resource_type=None, sku=None): - self.resource_type = resource_type - self.sku = sku + def __init__(self, **kwargs): + super(CognitiveServicesResourceAndSku, self).__init__(**kwargs) + self.resource_type = kwargs.get('resource_type', None) + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_resource_and_sku_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_resource_and_sku_py3.py new file mode 100644 index 000000000000..3151afd709e4 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_resource_and_sku_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CognitiveServicesResourceAndSku(Model): + """Cognitive Services resource type and SKU. + + :param resource_type: Resource Namespace and Type + :type resource_type: str + :param sku: The SKU of Cognitive Services account. + :type sku: ~azure.mgmt.cognitiveservices.models.Sku + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, resource_type: str=None, sku=None, **kwargs) -> None: + super(CognitiveServicesResourceAndSku, self).__init__(**kwargs) + self.resource_type = resource_type + self.sku = sku diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error.py index 84da2701249d..8a5104af371a 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error.py @@ -24,8 +24,9 @@ class Error(Model): 'error': {'key': 'error', 'type': 'ErrorBody'}, } - def __init__(self, error=None): - self.error = error + def __init__(self, **kwargs): + super(Error, self).__init__(**kwargs) + self.error = kwargs.get('error', None) class ErrorException(HttpOperationError): diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_body.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_body.py index b32a385e5ca7..4371278624ec 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_body.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_body.py @@ -15,9 +15,11 @@ class ErrorBody(Model): """Cognitive Services error body. - :param code: error code + All required parameters must be populated in order to send to Azure. + + :param code: Required. error code :type code: str - :param message: error message + :param message: Required. error message :type message: str """ @@ -31,6 +33,7 @@ class ErrorBody(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, code, message): - self.code = code - self.message = message + def __init__(self, **kwargs): + super(ErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_body_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_body_py3.py new file mode 100644 index 000000000000..7851e15157c3 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_body_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorBody(Model): + """Cognitive Services error body. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. error code + :type code: str + :param message: Required. error message + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str, message: str, **kwargs) -> None: + super(ErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_py3.py new file mode 100644 index 000000000000..54d832eb4725 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Error(Model): + """Cognitive Services error object. + + :param error: The error body. + :type error: ~azure.mgmt.cognitiveservices.models.ErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(Error, self).__init__(**kwargs) + self.error = error + + +class ErrorException(HttpOperationError): + """Server responsed with exception of type: 'Error'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorException, self).__init__(deserialize, response, 'Error', *args) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/metric_name.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/metric_name.py new file mode 100644 index 000000000000..fd3e3d504c9d --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/metric_name.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricName(Model): + """A metric name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the metric. + :vartype value: str + :ivar localized_value: The friendly name of the metric. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/metric_name_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/metric_name_py3.py new file mode 100644 index 000000000000..811d94729969 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/metric_name_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricName(Model): + """A metric name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the metric. + :vartype value: str + :ivar localized_value: The friendly name of the metric. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_display_info.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_display_info.py index e1fd7132c7f4..612864781d45 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_display_info.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_display_info.py @@ -33,8 +33,9 @@ class OperationDisplayInfo(Model): 'resource': {'key': 'resource', 'type': 'str'}, } - def __init__(self, description=None, operation=None, provider=None, resource=None): - self.description = description - self.operation = operation - self.provider = provider - self.resource = resource + def __init__(self, **kwargs): + super(OperationDisplayInfo, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.operation = kwargs.get('operation', None) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_display_info_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_display_info_py3.py new file mode 100644 index 000000000000..18ea28fc7a43 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_display_info_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplayInfo(Model): + """The operation supported by Cognitive Services. + + :param description: The description of the operation. + :type description: str + :param operation: The action that users can perform, based on their + permission level. + :type operation: str + :param provider: Service provider: Microsoft Cognitive Services. + :type provider: str + :param resource: Resource on which the operation is performed. + :type resource: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, operation: str=None, provider: str=None, resource: str=None, **kwargs) -> None: + super(OperationDisplayInfo, self).__init__(**kwargs) + self.description = description + self.operation = operation + self.provider = provider + self.resource = resource diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_entity.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_entity.py index 7721d2673521..3411ea34f450 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_entity.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_entity.py @@ -32,8 +32,9 @@ class OperationEntity(Model): 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, name=None, display=None, origin=None, properties=None): - self.name = name - self.display = display - self.origin = origin - self.properties = properties + def __init__(self, **kwargs): + super(OperationEntity, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_entity_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_entity_py3.py new file mode 100644 index 000000000000..654a27867bda --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_entity_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationEntity(Model): + """The operation supported by Cognitive Services. + + :param name: Operation name: {provider}/{resource}/{operation}. + :type name: str + :param display: The operation supported by Cognitive Services. + :type display: ~azure.mgmt.cognitiveservices.models.OperationDisplayInfo + :param origin: The origin of the operation. + :type origin: str + :param properties: Additional properties. + :type properties: object + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplayInfo'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(OperationEntity, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/regenerate_key_parameters.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/regenerate_key_parameters.py index b2e27098273f..132a0d8c16cc 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/regenerate_key_parameters.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/regenerate_key_parameters.py @@ -15,8 +15,10 @@ class RegenerateKeyParameters(Model): """Regenerate key parameters. - :param key_name: key name to generate (Key1|Key2). Possible values - include: 'Key1', 'Key2' + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. key name to generate (Key1|Key2). Possible + values include: 'Key1', 'Key2' :type key_name: str or ~azure.mgmt.cognitiveservices.models.KeyName """ @@ -28,5 +30,6 @@ class RegenerateKeyParameters(Model): 'key_name': {'key': 'keyName', 'type': 'KeyName'}, } - def __init__(self, key_name): - self.key_name = key_name + def __init__(self, **kwargs): + super(RegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/regenerate_key_parameters_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/regenerate_key_parameters_py3.py new file mode 100644 index 000000000000..1fd67eabb405 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/regenerate_key_parameters_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RegenerateKeyParameters(Model): + """Regenerate key parameters. + + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. key name to generate (Key1|Key2). Possible + values include: 'Key1', 'Key2' + :type key_name: str or ~azure.mgmt.cognitiveservices.models.KeyName + """ + + _validation = { + 'key_name': {'required': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'KeyName'}, + } + + def __init__(self, *, key_name, **kwargs) -> None: + super(RegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = key_name diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku.py new file mode 100644 index 000000000000..72f1cee9b8e9 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSku(Model): + """Describes an available Cognitive Services SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU. + :vartype name: str + :ivar tier: Specifies the tier of Cognitive Services account. + :vartype tier: str + :ivar kind: The Kind of resources that are supported in this SKU. + :vartype kind: str + :ivar locations: The set of locations that the SKU is available. + :vartype locations: list[str] + :ivar restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :vartype restrictions: + list[~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictions] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'kind': {'readonly': True}, + 'locations': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__(self, **kwargs): + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.kind = None + self.locations = None + self.restrictions = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_paged.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_paged.py new file mode 100644 index 000000000000..fb650eef27f1 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ResourceSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceSku]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceSkuPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_py3.py new file mode 100644 index 000000000000..3aa9b8470364 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSku(Model): + """Describes an available Cognitive Services SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU. + :vartype name: str + :ivar tier: Specifies the tier of Cognitive Services account. + :vartype tier: str + :ivar kind: The Kind of resources that are supported in this SKU. + :vartype kind: str + :ivar locations: The set of locations that the SKU is available. + :vartype locations: list[str] + :ivar restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :vartype restrictions: + list[~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictions] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'kind': {'readonly': True}, + 'locations': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.kind = None + self.locations = None + self.restrictions = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restriction_info.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restriction_info.py new file mode 100644 index 000000000000..677e93463d58 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restriction_info.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuRestrictionInfo(Model): + """ResourceSkuRestrictionInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar locations: Locations where the SKU is restricted + :vartype locations: list[str] + :ivar zones: List of availability zones where the SKU is restricted. + :vartype zones: list[str] + """ + + _validation = { + 'locations': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) + self.locations = None + self.zones = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restriction_info_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restriction_info_py3.py new file mode 100644 index 000000000000..008cf8d4c5fa --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restriction_info_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuRestrictionInfo(Model): + """ResourceSkuRestrictionInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar locations: Locations where the SKU is restricted + :vartype locations: list[str] + :ivar zones: List of availability zones where the SKU is restricted. + :vartype zones: list[str] + """ + + _validation = { + 'locations': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) + self.locations = None + self.zones = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restrictions.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restrictions.py new file mode 100644 index 000000000000..5c1ae1141f3d --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restrictions.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuRestrictions(Model): + """Describes restrictions of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. Possible values include: 'Location', + 'Zone' + :vartype type: str or + ~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionsType + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :ivar restriction_info: The information about the restriction where the + SKU cannot be used. + :vartype restriction_info: + ~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionInfo + :ivar reason_code: The reason for restriction. Possible values include: + 'QuotaId', 'NotAvailableForSubscription' + :vartype reason_code: str or + ~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionsReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + 'restriction_info': {'readonly': True}, + 'reason_code': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = None + self.values = None + self.restriction_info = None + self.reason_code = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restrictions_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restrictions_py3.py new file mode 100644 index 000000000000..62dee12bb165 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restrictions_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuRestrictions(Model): + """Describes restrictions of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. Possible values include: 'Location', + 'Zone' + :vartype type: str or + ~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionsType + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :ivar restriction_info: The information about the restriction where the + SKU cannot be used. + :vartype restriction_info: + ~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionInfo + :ivar reason_code: The reason for restriction. Possible values include: + 'QuotaId', 'NotAvailableForSubscription' + :vartype reason_code: str or + ~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionsReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + 'restriction_info': {'readonly': True}, + 'reason_code': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = None + self.values = None + self.restriction_info = None + self.reason_code = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/sku.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/sku.py index b19731f46e6b..4a70094c16e5 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/sku.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/sku.py @@ -18,9 +18,11 @@ class Sku(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: Gets or sets the sku name. Required for account creation, - optional for update. Possible values include: 'F0', 'P0', 'P1', 'P2', - 'S0', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6' + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the sku name. Required for account + creation, optional for update. Possible values include: 'F0', 'P0', 'P1', + 'P2', 'S0', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6' :type name: str or ~azure.mgmt.cognitiveservices.models.SkuName :ivar tier: Gets the sku tier. This is based on the SKU name. Possible values include: 'Free', 'Standard', 'Premium' @@ -37,6 +39,7 @@ class Sku(Model): 'tier': {'key': 'tier', 'type': 'SkuTier'}, } - def __init__(self, name): - self.name = name + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) self.tier = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/sku_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/sku_py3.py new file mode 100644 index 000000000000..c0ffedc39c29 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/sku_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """The SKU of the cognitive services account. + + 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 name: Required. Gets or sets the sku name. Required for account + creation, optional for update. Possible values include: 'F0', 'P0', 'P1', + 'P2', 'S0', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6' + :type name: str or ~azure.mgmt.cognitiveservices.models.SkuName + :ivar tier: Gets the sku tier. This is based on the SKU name. Possible + values include: 'Free', 'Standard', 'Premium' + :vartype tier: str or ~azure.mgmt.cognitiveservices.models.SkuTier + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'SkuTier'}, + } + + def __init__(self, *, name, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usage.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usage.py new file mode 100644 index 000000000000..6911376e0206 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usage.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Usage(Model): + """The usage data for a usage request. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', + 'Milliseconds' + :type unit: str or ~azure.mgmt.cognitiveservices.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.cognitiveservices.models.MetricName + :ivar quota_period: The quota period used to summarize the usage values. + :vartype quota_period: str + :ivar limit: Maximum value for this metric. + :vartype limit: float + :ivar current_value: Current value for this metric. + :vartype current_value: float + :ivar next_reset_time: Next reset time for current quota. + :vartype next_reset_time: str + :param status: Cognitive Services account quota usage status. Possible + values include: 'Included', 'Blocked', 'InOverage', 'Unknown' + :type status: str or ~azure.mgmt.cognitiveservices.models.QuotaUsageStatus + """ + + _validation = { + 'name': {'readonly': True}, + 'quota_period': {'readonly': True}, + 'limit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.unit = kwargs.get('unit', None) + self.name = None + self.quota_period = None + self.limit = None + self.current_value = None + self.next_reset_time = None + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usage_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usage_py3.py new file mode 100644 index 000000000000..b053f5be1790 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usage_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Usage(Model): + """The usage data for a usage request. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', + 'Milliseconds' + :type unit: str or ~azure.mgmt.cognitiveservices.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.cognitiveservices.models.MetricName + :ivar quota_period: The quota period used to summarize the usage values. + :vartype quota_period: str + :ivar limit: Maximum value for this metric. + :vartype limit: float + :ivar current_value: Current value for this metric. + :vartype current_value: float + :ivar next_reset_time: Next reset time for current quota. + :vartype next_reset_time: str + :param status: Cognitive Services account quota usage status. Possible + values include: 'Included', 'Blocked', 'InOverage', 'Unknown' + :type status: str or ~azure.mgmt.cognitiveservices.models.QuotaUsageStatus + """ + + _validation = { + 'name': {'readonly': True}, + 'quota_period': {'readonly': True}, + 'limit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, unit=None, status=None, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.unit = unit + self.name = None + self.quota_period = None + self.limit = None + self.current_value = None + self.next_reset_time = None + self.status = status diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usages_result.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usages_result.py new file mode 100644 index 000000000000..67ece7d4e243 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usages_result.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UsagesResult(Model): + """The response to a list usage request. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of usages for Cognitive Service account. + :vartype value: list[~azure.mgmt.cognitiveservices.models.Usage] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Usage]'}, + } + + def __init__(self, **kwargs): + super(UsagesResult, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usages_result_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usages_result_py3.py new file mode 100644 index 000000000000..880dd7fd58e3 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usages_result_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UsagesResult(Model): + """The response to a list usage request. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of usages for Cognitive Service account. + :vartype value: list[~azure.mgmt.cognitiveservices.models.Usage] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Usage]'}, + } + + def __init__(self, **kwargs) -> None: + super(UsagesResult, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/__init__.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/__init__.py index 5c91cb9c82ca..3596470cf0ad 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/__init__.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/__init__.py @@ -10,11 +10,13 @@ # -------------------------------------------------------------------------- from .accounts_operations import AccountsOperations +from .resource_skus_operations import ResourceSkusOperations from .operations import Operations from .check_sku_availability_operations import CheckSkuAvailabilityOperations __all__ = [ 'AccountsOperations', + 'ResourceSkusOperations', 'Operations', 'CheckSkuAvailabilityOperations', ] diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/accounts_operations.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/accounts_operations.py index 3bedeb581323..3c940500295a 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/accounts_operations.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/accounts_operations.py @@ -21,10 +21,12 @@ class AccountsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-18. Constant value: "2017-04-18". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -60,7 +62,7 @@ def create( :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}' + url = self.create.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), @@ -88,7 +90,7 @@ def create( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ErrorException(self._deserialize, response) @@ -105,6 +107,7 @@ def create( return client_raw_response return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}'} def update( self, resource_group_name, account_name, sku=None, tags=None, custom_headers=None, raw=False, **operation_config): @@ -137,7 +140,7 @@ def update( parameters = models.CognitiveServicesAccountUpdateParameters(sku=sku, tags=tags) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), @@ -165,7 +168,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -180,6 +183,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}'} def delete( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): @@ -201,7 +205,7 @@ def delete( :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), @@ -225,7 +229,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.ErrorException(self._deserialize, response) @@ -233,6 +237,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}'} def get_properties( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): @@ -255,7 +260,7 @@ def get_properties( :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}' + url = self.get_properties.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), @@ -279,7 +284,7 @@ def get_properties( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -294,6 +299,7 @@ def get_properties( return client_raw_response return deserialized + get_properties.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -318,7 +324,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -346,7 +352,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -362,6 +368,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts'} def list( self, custom_headers=None, raw=False, **operation_config): @@ -383,7 +390,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/accounts' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -410,7 +417,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -426,6 +433,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/accounts'} def list_keys( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): @@ -449,7 +457,7 @@ def list_keys( :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/listKeys' + url = self.list_keys.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), @@ -473,7 +481,7 @@ def list_keys( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -488,6 +496,7 @@ def list_keys( return client_raw_response return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/listKeys'} def regenerate_key( self, resource_group_name, account_name, key_name, custom_headers=None, raw=False, **operation_config): @@ -517,7 +526,7 @@ def regenerate_key( parameters = models.RegenerateKeyParameters(key_name=key_name) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/regenerateKey' + url = self.regenerate_key.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), @@ -545,7 +554,7 @@ def regenerate_key( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -560,6 +569,7 @@ def regenerate_key( return client_raw_response return deserialized + regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/regenerateKey'} def list_skus( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): @@ -584,7 +594,7 @@ def list_skus( :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/skus' + url = self.list_skus.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), @@ -608,7 +618,7 @@ def list_skus( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -623,3 +633,72 @@ def list_skus( return client_raw_response return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/skus'} + + def get_usages( + self, resource_group_name, account_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Get usages for the requested Cognitive Services account. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :param filter: An OData filter expression that describes a subset of + usages to return. The supported parameter is name.value (name of the + metric, can have an or of multiple names). + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: UsagesResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cognitiveservices.models.UsagesResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.get_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('UsagesResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/usages'} diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/check_sku_availability_operations.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/check_sku_availability_operations.py index d53105ddb252..d0e6a5631ad0 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/check_sku_availability_operations.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/check_sku_availability_operations.py @@ -22,10 +22,12 @@ class CheckSkuAvailabilityOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-18. Constant value: "2017-04-18". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -44,10 +46,11 @@ def list( :param skus: The SKU of the resource. :type skus: list[str or ~azure.mgmt.cognitiveservices.models.SkuName] :param kind: The Kind of the resource. Possible values include: - 'Academic', 'Bing.Autosuggest', 'Bing.Search', 'Bing.Speech', - 'Bing.SpellCheck', 'ComputerVision', 'ContentModerator', - 'CustomSpeech', 'Emotion', 'Face', 'LUIS', 'Recommendations', - 'SpeakerRecognition', 'Speech', 'SpeechTranslation', 'TextAnalytics', + 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', + 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', + 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction', + 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker', + 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' :type kind: str or ~azure.mgmt.cognitiveservices.models.Kind :param type: The Type of the resource. @@ -67,7 +70,7 @@ def list( parameters = models.CheckSkuAvailabilityParameter(skus=skus, kind=kind, type=type) # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/checkSkuAvailability' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'location': self._serialize.url("location", location, 'str') @@ -94,7 +97,7 @@ def list( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,3 +114,4 @@ def list( return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/checkSkuAvailability'} diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/operations.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/operations.py index 240faac63efb..37bc3bc1163b 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/operations.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/operations.py @@ -22,10 +22,12 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-18. Constant value: "2017-04-18". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -53,7 +55,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.CognitiveServices/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -76,7 +78,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -94,3 +96,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.CognitiveServices/operations'} diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/resource_skus_operations.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/resource_skus_operations.py new file mode 100644 index 000000000000..b719f342c8be --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/resource_skus_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ResourceSkusOperations(object): + """ResourceSkusOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-18. Constant value: "2017-04-18". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-04-18" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets the list of Microsoft.CognitiveServices SKUs available for your + Subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceSku + :rtype: + ~azure.mgmt.cognitiveservices.models.ResourceSkuPaged[~azure.mgmt.cognitiveservices.models.ResourceSku] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ResourceSkuPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ResourceSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/skus'} diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/version.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/version.py index 53c4c7ea05e8..7f225c6aab41 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/version.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.0" +VERSION = "3.0.0" diff --git a/azure-mgmt-cognitiveservices/build.json b/azure-mgmt-cognitiveservices/build.json deleted file mode 100644 index d5356f60b700..000000000000 --- a/azure-mgmt-cognitiveservices/build.json +++ /dev/null @@ -1,225 +0,0 @@ -{ - "autorest": [ - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest-core", - "version": "2.0.4168", - "engines": { - "node": ">=7.10.0" - }, - "dependencies": {}, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/async-io": "~1.0.22", - "@microsoft.azure/extension": "~1.2.12", - "@types/commonmark": "^0.27.0", - "@types/jsonpath": "^0.1.29", - "@types/node": "^8.0.28", - "@types/pify": "0.0.28", - "@types/source-map": "^0.5.0", - "@types/yargs": "^8.0.2", - "commonmark": "^0.27.0", - "file-url": "^2.0.2", - "get-uri": "^2.0.0", - "jsonpath": "^0.2.11", - "linq-es2015": "^2.4.25", - "mocha": "3.4.2", - "mocha-typescript": "1.1.5", - "pify": "^3.0.0", - "safe-eval": "^0.3.0", - "shx": "^0.2.2", - "source-map": "^0.5.6", - "source-map-support": "^0.4.15", - "strip-bom": "^3.0.0", - "typescript": "2.5.3", - "untildify": "^3.0.2", - "urijs": "^1.18.10", - "vscode-jsonrpc": "^3.3.1", - "yaml-ast-parser": "https://github.com/olydis/yaml-ast-parser/releases/download/0.0.34/yaml-ast-parser-0.0.34.tgz", - "yargs": "^8.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_shasum": "33813111fc9bfa488bd600fbba48bc53cc9182c7", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest-core@2.0.4168", - "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.0.21", - "dependencies": { - "dotnet-2.0.0": "^1.3.2" - }, - "optionalDependencies": {}, - "devDependencies": { - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.1.1", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.0.21", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.1.22", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "ca425289fa38a210d279729048a4a91673f09c67", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.1.22", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.python", - "version": "2.0.19", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/autorest.testserver": "^1.9.0", - "autorest": "^2.0.0", - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "_shasum": "e069166c16fd903c8e1fdf9395b433f3043cb6e3", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.python@2.0.19", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - } - ], - "autorest_bootstrap": {} -} \ No newline at end of file diff --git a/azure-mgmt-cognitiveservices/setup.py b/azure-mgmt-cognitiveservices/setup.py index 9e284f3fdb07..f6e9b649508b 100644 --- a/azure-mgmt-cognitiveservices/setup.py +++ b/azure-mgmt-cognitiveservices/setup.py @@ -69,7 +69,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', @@ -78,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-compute/README.rst b/azure-mgmt-compute/README.rst index 69f82209c777..cc57dfa74240 100644 --- a/azure-mgmt-compute/README.rst +++ b/azure-mgmt-compute/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Compute Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -36,7 +36,7 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `Compute and Network Resource Management +For code examples, see `Compute Management `__ on docs.microsoft.com. diff --git a/azure-mgmt-compute/sdk_packaging.toml b/azure-mgmt-compute/sdk_packaging.toml new file mode 100644 index 000000000000..447ccf936dbe --- /dev/null +++ b/azure-mgmt-compute/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-compute" +package_pprint_name = "Compute Management" +package_doc_id = "virtualmachines" +is_stable = true diff --git a/azure-mgmt-compute/setup.py b/azure-mgmt-compute/setup.py index 4f04a54f68ff..d74bbb645ef3 100644 --- a/azure-mgmt-compute/setup.py +++ b/azure-mgmt-compute/setup.py @@ -77,8 +77,8 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure>=0.4.20,<2.0.0', - 'azure-common~=1.1', + 'msrestazure>=0.4.27,<2.0.0', + 'azure-common~=1.1,>=1.1.9', ], cmdclass=cmdclass ) diff --git a/azure-mgmt-compute/tests/__init__.py b/azure-mgmt-compute/tests/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/azure-mgmt-compute/tests/test_mgmt_msi.py b/azure-mgmt-compute/tests/test_mgmt_msi.py index 0fcbcf57e954..97e866184296 100644 --- a/azure-mgmt-compute/tests/test_mgmt_msi.py +++ b/azure-mgmt-compute/tests/test_mgmt_msi.py @@ -19,7 +19,7 @@ ResourceGroupPreparer, ) -from .test_mgmt_compute import ComputeResourceNames +from test_mgmt_compute import ComputeResourceNames class MgmtMSIComputeTest(AzureMgmtTestCase): diff --git a/azure-mgmt-containerinstance/tests/__init__.py b/azure-mgmt-containerinstance/tests/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/azure-mgmt-containerservice/HISTORY.rst b/azure-mgmt-containerservice/HISTORY.rst index 4f2f9af4c99a..13f074e54861 100644 --- a/azure-mgmt-containerservice/HISTORY.rst +++ b/azure-mgmt-containerservice/HISTORY.rst @@ -3,6 +3,44 @@ Release History =============== +4.0.0 (2018-05-25) +++++++++++++++++++ + +**Features** + +- Added operation ManagedClustersOperations.get_access_profile +- Updated VM sizes +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + 3.0.1 (2018-01-25) ++++++++++++++++++ diff --git a/azure-mgmt-containerservice/README.rst b/azure-mgmt-containerservice/README.rst index bca5d290b793..4b0ff63c695d 100644 --- a/azure-mgmt-containerservice/README.rst +++ b/azure-mgmt-containerservice/README.rst @@ -1,12 +1,12 @@ Microsoft Azure SDK for Python ============================== -This is the Microsoft Azure Container Service Client Library. +This is the Microsoft Azure Container Service Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -36,9 +36,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `Container Service -`__ -on readthedocs.org. +For code examples, see `Container Service Management +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/container_service_client.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/container_service_client.py index a1c73e58daf5..a5d7eb651da6 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/container_service_client.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/container_service_client.py @@ -9,11 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from .operations.container_services_operations import ContainerServicesOperations +from .operations.operations import Operations from .operations.managed_clusters_operations import ManagedClustersOperations from . import models @@ -52,7 +53,7 @@ def __init__( self.subscription_id = subscription_id -class ContainerServiceClient(object): +class ContainerServiceClient(SDKClient): """The Container Service Client. :ivar config: Configuration for client. @@ -60,6 +61,8 @@ class ContainerServiceClient(object): :ivar container_services: ContainerServices operations :vartype container_services: azure.mgmt.containerservice.operations.ContainerServicesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerservice.operations.Operations :ivar managed_clusters: ManagedClusters operations :vartype managed_clusters: azure.mgmt.containerservice.operations.ManagedClustersOperations @@ -77,7 +80,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) @@ -85,5 +88,7 @@ def __init__( self.container_services = ContainerServicesOperations( self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) self.managed_clusters = ManagedClustersOperations( self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py index 3006d62b21d8..e1ca23bdfc11 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py @@ -9,34 +9,70 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource -from .container_service_custom_profile import ContainerServiceCustomProfile -from .key_vault_secret_ref import KeyVaultSecretRef -from .container_service_service_principal_profile import ContainerServiceServicePrincipalProfile -from .container_service_orchestrator_profile import ContainerServiceOrchestratorProfile -from .container_service_master_profile import ContainerServiceMasterProfile -from .container_service_agent_pool_profile import ContainerServiceAgentPoolProfile -from .container_service_windows_profile import ContainerServiceWindowsProfile -from .container_service_ssh_public_key import ContainerServiceSshPublicKey -from .container_service_ssh_configuration import ContainerServiceSshConfiguration -from .container_service_linux_profile import ContainerServiceLinuxProfile -from .container_service_vm_diagnostics import ContainerServiceVMDiagnostics -from .container_service_diagnostics_profile import ContainerServiceDiagnosticsProfile -from .container_service import ContainerService -from .managed_cluster import ManagedCluster -from .orchestrator_profile import OrchestratorProfile -from .managed_cluster_access_profile import ManagedClusterAccessProfile -from .managed_cluster_pool_upgrade_profile import ManagedClusterPoolUpgradeProfile -from .managed_cluster_upgrade_profile import ManagedClusterUpgradeProfile -from .orchestrator_version_profile import OrchestratorVersionProfile -from .orchestrator_version_profile_list_result import OrchestratorVersionProfileListResult +try: + from .resource_py3 import Resource + from .container_service_custom_profile_py3 import ContainerServiceCustomProfile + from .key_vault_secret_ref_py3 import KeyVaultSecretRef + from .container_service_service_principal_profile_py3 import ContainerServiceServicePrincipalProfile + from .container_service_orchestrator_profile_py3 import ContainerServiceOrchestratorProfile + from .container_service_master_profile_py3 import ContainerServiceMasterProfile + from .container_service_agent_pool_profile_py3 import ContainerServiceAgentPoolProfile + from .container_service_windows_profile_py3 import ContainerServiceWindowsProfile + from .container_service_ssh_public_key_py3 import ContainerServiceSshPublicKey + from .container_service_ssh_configuration_py3 import ContainerServiceSshConfiguration + from .container_service_linux_profile_py3 import ContainerServiceLinuxProfile + from .container_service_vm_diagnostics_py3 import ContainerServiceVMDiagnostics + from .container_service_diagnostics_profile_py3 import ContainerServiceDiagnosticsProfile + from .container_service_py3 import ContainerService + from .operation_value_py3 import OperationValue + from .managed_cluster_agent_pool_profile_py3 import ManagedClusterAgentPoolProfile + from .container_service_network_profile_py3 import ContainerServiceNetworkProfile + from .managed_cluster_addon_profile_py3 import ManagedClusterAddonProfile + from .managed_cluster_aad_profile_py3 import ManagedClusterAADProfile + from .managed_cluster_py3 import ManagedCluster + from .orchestrator_profile_py3 import OrchestratorProfile + from .managed_cluster_access_profile_py3 import ManagedClusterAccessProfile + from .managed_cluster_pool_upgrade_profile_py3 import ManagedClusterPoolUpgradeProfile + from .managed_cluster_upgrade_profile_py3 import ManagedClusterUpgradeProfile + from .orchestrator_version_profile_py3 import OrchestratorVersionProfile + from .orchestrator_version_profile_list_result_py3 import OrchestratorVersionProfileListResult +except (SyntaxError, ImportError): + from .resource import Resource + from .container_service_custom_profile import ContainerServiceCustomProfile + from .key_vault_secret_ref import KeyVaultSecretRef + from .container_service_service_principal_profile import ContainerServiceServicePrincipalProfile + from .container_service_orchestrator_profile import ContainerServiceOrchestratorProfile + from .container_service_master_profile import ContainerServiceMasterProfile + from .container_service_agent_pool_profile import ContainerServiceAgentPoolProfile + from .container_service_windows_profile import ContainerServiceWindowsProfile + from .container_service_ssh_public_key import ContainerServiceSshPublicKey + from .container_service_ssh_configuration import ContainerServiceSshConfiguration + from .container_service_linux_profile import ContainerServiceLinuxProfile + from .container_service_vm_diagnostics import ContainerServiceVMDiagnostics + from .container_service_diagnostics_profile import ContainerServiceDiagnosticsProfile + from .container_service import ContainerService + from .operation_value import OperationValue + from .managed_cluster_agent_pool_profile import ManagedClusterAgentPoolProfile + from .container_service_network_profile import ContainerServiceNetworkProfile + from .managed_cluster_addon_profile import ManagedClusterAddonProfile + from .managed_cluster_aad_profile import ManagedClusterAADProfile + from .managed_cluster import ManagedCluster + from .orchestrator_profile import OrchestratorProfile + from .managed_cluster_access_profile import ManagedClusterAccessProfile + from .managed_cluster_pool_upgrade_profile import ManagedClusterPoolUpgradeProfile + from .managed_cluster_upgrade_profile import ManagedClusterUpgradeProfile + from .orchestrator_version_profile import OrchestratorVersionProfile + from .orchestrator_version_profile_list_result import OrchestratorVersionProfileListResult from .container_service_paged import ContainerServicePaged +from .operation_value_paged import OperationValuePaged from .managed_cluster_paged import ManagedClusterPaged from .container_service_client_enums import ( ContainerServiceStorageProfileTypes, ContainerServiceVMSizeTypes, ContainerServiceOrchestratorTypes, OSType, + NetworkPlugin, + NetworkPolicy, ) __all__ = [ @@ -54,6 +90,11 @@ 'ContainerServiceVMDiagnostics', 'ContainerServiceDiagnosticsProfile', 'ContainerService', + 'OperationValue', + 'ManagedClusterAgentPoolProfile', + 'ContainerServiceNetworkProfile', + 'ManagedClusterAddonProfile', + 'ManagedClusterAADProfile', 'ManagedCluster', 'OrchestratorProfile', 'ManagedClusterAccessProfile', @@ -62,9 +103,12 @@ 'OrchestratorVersionProfile', 'OrchestratorVersionProfileListResult', 'ContainerServicePaged', + 'OperationValuePaged', 'ManagedClusterPaged', 'ContainerServiceStorageProfileTypes', 'ContainerServiceVMSizeTypes', 'ContainerServiceOrchestratorTypes', 'OSType', + 'NetworkPlugin', + 'NetworkPolicy', ] diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service.py index 2f2591e396b1..ffc12f82ffbe 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service.py @@ -18,20 +18,22 @@ class ContainerService(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 id: Resource Id :vartype id: str :ivar name: Resource name :vartype name: str :ivar type: Resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags :type tags: dict[str, str] :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response. :vartype provisioning_state: str - :param orchestrator_profile: Profile for the container service + :param orchestrator_profile: Required. Profile for the container service orchestrator. :type orchestrator_profile: ~azure.mgmt.containerservice.models.ContainerServiceOrchestratorProfile @@ -44,7 +46,7 @@ class ContainerService(Resource): secret or keyVaultSecretRef need to be specified. :type service_principal_profile: ~azure.mgmt.containerservice.models.ContainerServiceServicePrincipalProfile - :param master_profile: Profile for the container service master. + :param master_profile: Required. Profile for the container service master. :type master_profile: ~azure.mgmt.containerservice.models.ContainerServiceMasterProfile :param agent_pool_profiles: Properties of the agent pool. @@ -54,8 +56,8 @@ class ContainerService(Resource): cluster. :type windows_profile: ~azure.mgmt.containerservice.models.ContainerServiceWindowsProfile - :param linux_profile: Profile for Linux VMs in the container service - cluster. + :param linux_profile: Required. Profile for Linux VMs in the container + service cluster. :type linux_profile: ~azure.mgmt.containerservice.models.ContainerServiceLinuxProfile :param diagnostics_profile: Profile for diagnostics in the container @@ -92,14 +94,14 @@ class ContainerService(Resource): 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'ContainerServiceDiagnosticsProfile'}, } - def __init__(self, location, orchestrator_profile, master_profile, linux_profile, tags=None, custom_profile=None, service_principal_profile=None, agent_pool_profiles=None, windows_profile=None, diagnostics_profile=None): - super(ContainerService, self).__init__(location=location, tags=tags) + def __init__(self, **kwargs): + super(ContainerService, self).__init__(**kwargs) self.provisioning_state = None - self.orchestrator_profile = orchestrator_profile - self.custom_profile = custom_profile - self.service_principal_profile = service_principal_profile - self.master_profile = master_profile - self.agent_pool_profiles = agent_pool_profiles - self.windows_profile = windows_profile - self.linux_profile = linux_profile - self.diagnostics_profile = diagnostics_profile + self.orchestrator_profile = kwargs.get('orchestrator_profile', None) + self.custom_profile = kwargs.get('custom_profile', None) + self.service_principal_profile = kwargs.get('service_principal_profile', None) + self.master_profile = kwargs.get('master_profile', None) + self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) + self.windows_profile = kwargs.get('windows_profile', None) + self.linux_profile = kwargs.get('linux_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_agent_pool_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_agent_pool_profile.py index 21c339c3d421..e0d5dd777aaa 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_agent_pool_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_agent_pool_profile.py @@ -18,51 +18,66 @@ class ContainerServiceAgentPoolProfile(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: Unique name of the agent pool profile in the context of the - subscription and resource group. + All required parameters must be populated in order to send to Azure. + + :param name: Required. Unique name of the agent pool profile in the + context of the subscription and resource group. :type name: str :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. . Default value: 1 . :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A0', + :param vm_size: Required. Size of agent VMs. Possible values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_D1', 'Standard_D11', + 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', + 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', + 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', + 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D8_v3', - 'Standard_D8s_v3', 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', - 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', - 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13_v2', - 'Standard_DS13_v2_Promo', 'Standard_DS14', 'Standard_DS14_v2', + 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', + 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', + 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', + 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', + 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', + 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', + 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32_v3', 'Standard_E32s_v3', 'Standard_E4_v3', - 'Standard_E4s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', - 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', - 'Standard_F16s', 'Standard_F1s', 'Standard_F2', 'Standard_F2s', - 'Standard_F4', 'Standard_F4s', 'Standard_F8', 'Standard_F8s', + 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', + 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', + 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', + 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', + 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', + 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', + 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', + 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS5', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', + 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', + 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128s', - 'Standard_M64ms', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC6', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', + 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', + 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', + 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', + 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', + 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', + 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', + 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' :type vm_size: str or ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk @@ -84,8 +99,7 @@ class ContainerServiceAgentPoolProfile(Model): :type storage_profile: str or ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. If you specify either master VNet Subnet, or agent VNet - Subnet, you need to specify both. And they have to be in the same VNet. + identifier. :type vnet_subnet_id: str :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', @@ -113,15 +127,15 @@ class ContainerServiceAgentPoolProfile(Model): 'os_type': {'key': 'osType', 'type': 'str'}, } - def __init__(self, name, vm_size, count=1, os_disk_size_gb=None, dns_prefix=None, ports=None, storage_profile=None, vnet_subnet_id=None, os_type="Linux"): - super(ContainerServiceAgentPoolProfile, self).__init__() - self.name = name - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.dns_prefix = dns_prefix + def __init__(self, **kwargs): + super(ContainerServiceAgentPoolProfile, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', 1) + self.vm_size = kwargs.get('vm_size', None) + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.dns_prefix = kwargs.get('dns_prefix', None) self.fqdn = None - self.ports = ports - self.storage_profile = storage_profile - self.vnet_subnet_id = vnet_subnet_id - self.os_type = os_type + self.ports = kwargs.get('ports', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.os_type = kwargs.get('os_type', "Linux") diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_agent_pool_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_agent_pool_profile_py3.py new file mode 100644 index 000000000000..dcb5bd830a96 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_agent_pool_profile_py3.py @@ -0,0 +1,141 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerServiceAgentPoolProfile(Model): + """Profile for the container service agent pool. + + 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 name: Required. Unique name of the agent pool profile in the + context of the subscription and resource group. + :type name: str + :param count: Number of agents (VMs) to host docker containers. Allowed + values must be in the range of 1 to 100 (inclusive). The default value is + 1. . Default value: 1 . + :type count: int + :param vm_size: Required. Size of agent VMs. Possible values include: + 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', + 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', + 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', + 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', + 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', + 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', + 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', + 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', + 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', + 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', + 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', + 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', + 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', + 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', + 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', + 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', + 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', + 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', + 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', + 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', + 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', + 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', + 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', + 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', + 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', + 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', + 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', + 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', + 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', + 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', + 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', + 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', + 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', + 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', + 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', + 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', + 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', + 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', + 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', + 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', + 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', + 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', + 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', + 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', + 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', + 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', + 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', + 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :type vm_size: str or + ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk + size for every machine in this master/agent pool. If you specify 0, it + will apply the default osDisk size according to the vmSize specified. + :type os_disk_size_gb: int + :param dns_prefix: DNS prefix to be used to create the FQDN for the agent + pool. + :type dns_prefix: str + :ivar fqdn: FDQN for the agent pool. + :vartype fqdn: str + :param ports: Ports number array used to expose on this agent pool. The + default opened ports are different based on your choice of orchestrator. + :type ports: list[int] + :param storage_profile: Storage profile specifies what kind of storage + used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will + choose for you based on the orchestrator choice. Possible values include: + 'StorageAccount', 'ManagedDisks' + :type storage_profile: str or + ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes + :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet + identifier. + :type vnet_subnet_id: str + :param os_type: OsType to be used to specify os type. Choose from Linux + and Windows. Default to Linux. Possible values include: 'Linux', + 'Windows'. Default value: "Linux" . + :type os_type: str or ~azure.mgmt.containerservice.models.OSType + """ + + _validation = { + 'name': {'required': True}, + 'count': {'maximum': 100, 'minimum': 1}, + 'vm_size': {'required': True}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[int]'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, *, name: str, vm_size, count: int=1, os_disk_size_gb: int=None, dns_prefix: str=None, ports=None, storage_profile=None, vnet_subnet_id: str=None, os_type="Linux", **kwargs) -> None: + super(ContainerServiceAgentPoolProfile, self).__init__(**kwargs) + self.name = name + self.count = count + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.dns_prefix = dns_prefix + self.fqdn = None + self.ports = ports + self.storage_profile = storage_profile + self.vnet_subnet_id = vnet_subnet_id + self.os_type = os_type diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py index 65ededb5f445..4fe56768c577 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py @@ -12,15 +12,14 @@ from enum import Enum -class ContainerServiceStorageProfileTypes(Enum): +class ContainerServiceStorageProfileTypes(str, Enum): storage_account = "StorageAccount" managed_disks = "ManagedDisks" -class ContainerServiceVMSizeTypes(Enum): +class ContainerServiceVMSizeTypes(str, Enum): - standard_a0 = "Standard_A0" standard_a1 = "Standard_A1" standard_a10 = "Standard_A10" standard_a11 = "Standard_A11" @@ -39,6 +38,10 @@ class ContainerServiceVMSizeTypes(Enum): standard_a8_v2 = "Standard_A8_v2" standard_a8m_v2 = "Standard_A8m_v2" standard_a9 = "Standard_A9" + standard_b2ms = "Standard_B2ms" + standard_b2s = "Standard_B2s" + standard_b4ms = "Standard_B4ms" + standard_b8ms = "Standard_B8ms" standard_d1 = "Standard_D1" standard_d11 = "Standard_D11" standard_d11_v2 = "Standard_D11_v2" @@ -62,6 +65,8 @@ class ContainerServiceVMSizeTypes(Enum): standard_d2_v3 = "Standard_D2_v3" standard_d2s_v3 = "Standard_D2s_v3" standard_d3 = "Standard_D3" + standard_d32_v3 = "Standard_D32_v3" + standard_d32s_v3 = "Standard_D32s_v3" standard_d3_v2 = "Standard_D3_v2" standard_d3_v2_promo = "Standard_D3_v2_Promo" standard_d4 = "Standard_D4" @@ -71,6 +76,8 @@ class ContainerServiceVMSizeTypes(Enum): standard_d4s_v3 = "Standard_D4s_v3" standard_d5_v2 = "Standard_D5_v2" standard_d5_v2_promo = "Standard_D5_v2_Promo" + standard_d64_v3 = "Standard_D64_v3" + standard_d64s_v3 = "Standard_D64s_v3" standard_d8_v3 = "Standard_D8_v3" standard_d8s_v3 = "Standard_D8s_v3" standard_ds1 = "Standard_DS1" @@ -81,9 +88,13 @@ class ContainerServiceVMSizeTypes(Enum): standard_ds12_v2 = "Standard_DS12_v2" standard_ds12_v2_promo = "Standard_DS12_v2_Promo" standard_ds13 = "Standard_DS13" + standard_ds13_2_v2 = "Standard_DS13-2_v2" + standard_ds13_4_v2 = "Standard_DS13-4_v2" standard_ds13_v2 = "Standard_DS13_v2" standard_ds13_v2_promo = "Standard_DS13_v2_Promo" standard_ds14 = "Standard_DS14" + standard_ds14_4_v2 = "Standard_DS14-4_v2" + standard_ds14_8_v2 = "Standard_DS14-8_v2" standard_ds14_v2 = "Standard_DS14_v2" standard_ds14_v2_promo = "Standard_DS14_v2_Promo" standard_ds15_v2 = "Standard_DS15_v2" @@ -103,10 +114,14 @@ class ContainerServiceVMSizeTypes(Enum): standard_e16s_v3 = "Standard_E16s_v3" standard_e2_v3 = "Standard_E2_v3" standard_e2s_v3 = "Standard_E2s_v3" + standard_e32_16s_v3 = "Standard_E32-16s_v3" + standard_e32_8s_v3 = "Standard_E32-8s_v3" standard_e32_v3 = "Standard_E32_v3" standard_e32s_v3 = "Standard_E32s_v3" standard_e4_v3 = "Standard_E4_v3" standard_e4s_v3 = "Standard_E4s_v3" + standard_e64_16s_v3 = "Standard_E64-16s_v3" + standard_e64_32s_v3 = "Standard_E64-32s_v3" standard_e64_v3 = "Standard_E64_v3" standard_e64s_v3 = "Standard_E64s_v3" standard_e8_v3 = "Standard_E8_v3" @@ -114,13 +129,20 @@ class ContainerServiceVMSizeTypes(Enum): standard_f1 = "Standard_F1" standard_f16 = "Standard_F16" standard_f16s = "Standard_F16s" + standard_f16s_v2 = "Standard_F16s_v2" standard_f1s = "Standard_F1s" standard_f2 = "Standard_F2" standard_f2s = "Standard_F2s" + standard_f2s_v2 = "Standard_F2s_v2" + standard_f32s_v2 = "Standard_F32s_v2" standard_f4 = "Standard_F4" standard_f4s = "Standard_F4s" + standard_f4s_v2 = "Standard_F4s_v2" + standard_f64s_v2 = "Standard_F64s_v2" + standard_f72s_v2 = "Standard_F72s_v2" standard_f8 = "Standard_F8" standard_f8s = "Standard_F8s" + standard_f8s_v2 = "Standard_F8s_v2" standard_g1 = "Standard_G1" standard_g2 = "Standard_G2" standard_g3 = "Standard_G3" @@ -130,7 +152,11 @@ class ContainerServiceVMSizeTypes(Enum): standard_gs2 = "Standard_GS2" standard_gs3 = "Standard_GS3" standard_gs4 = "Standard_GS4" + standard_gs4_4 = "Standard_GS4-4" + standard_gs4_8 = "Standard_GS4-8" standard_gs5 = "Standard_GS5" + standard_gs5_16 = "Standard_GS5-16" + standard_gs5_8 = "Standard_GS5-8" standard_h16 = "Standard_H16" standard_h16m = "Standard_H16m" standard_h16mr = "Standard_H16mr" @@ -141,18 +167,36 @@ class ContainerServiceVMSizeTypes(Enum): standard_l32s = "Standard_L32s" standard_l4s = "Standard_L4s" standard_l8s = "Standard_L8s" + standard_m128_32ms = "Standard_M128-32ms" + standard_m128_64ms = "Standard_M128-64ms" + standard_m128ms = "Standard_M128ms" standard_m128s = "Standard_M128s" + standard_m64_16ms = "Standard_M64-16ms" + standard_m64_32ms = "Standard_M64-32ms" standard_m64ms = "Standard_M64ms" + standard_m64s = "Standard_M64s" standard_nc12 = "Standard_NC12" + standard_nc12s_v2 = "Standard_NC12s_v2" + standard_nc12s_v3 = "Standard_NC12s_v3" standard_nc24 = "Standard_NC24" standard_nc24r = "Standard_NC24r" + standard_nc24rs_v2 = "Standard_NC24rs_v2" + standard_nc24rs_v3 = "Standard_NC24rs_v3" + standard_nc24s_v2 = "Standard_NC24s_v2" + standard_nc24s_v3 = "Standard_NC24s_v3" standard_nc6 = "Standard_NC6" + standard_nc6s_v2 = "Standard_NC6s_v2" + standard_nc6s_v3 = "Standard_NC6s_v3" + standard_nd12s = "Standard_ND12s" + standard_nd24rs = "Standard_ND24rs" + standard_nd24s = "Standard_ND24s" + standard_nd6s = "Standard_ND6s" standard_nv12 = "Standard_NV12" standard_nv24 = "Standard_NV24" standard_nv6 = "Standard_NV6" -class ContainerServiceOrchestratorTypes(Enum): +class ContainerServiceOrchestratorTypes(str, Enum): kubernetes = "Kubernetes" swarm = "Swarm" @@ -161,7 +205,18 @@ class ContainerServiceOrchestratorTypes(Enum): custom = "Custom" -class OSType(Enum): +class OSType(str, Enum): linux = "Linux" windows = "Windows" + + +class NetworkPlugin(str, Enum): + + azure = "azure" + kubenet = "kubenet" + + +class NetworkPolicy(str, Enum): + + calico = "calico" diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_custom_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_custom_profile.py index b487fb7875be..99a65ee25050 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_custom_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_custom_profile.py @@ -15,7 +15,9 @@ class ContainerServiceCustomProfile(Model): """Properties to configure a custom container service cluster. - :param orchestrator: The name of the custom orchestrator to use. + All required parameters must be populated in order to send to Azure. + + :param orchestrator: Required. The name of the custom orchestrator to use. :type orchestrator: str """ @@ -27,6 +29,6 @@ class ContainerServiceCustomProfile(Model): 'orchestrator': {'key': 'orchestrator', 'type': 'str'}, } - def __init__(self, orchestrator): - super(ContainerServiceCustomProfile, self).__init__() - self.orchestrator = orchestrator + def __init__(self, **kwargs): + super(ContainerServiceCustomProfile, self).__init__(**kwargs) + self.orchestrator = kwargs.get('orchestrator', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_custom_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_custom_profile_py3.py new file mode 100644 index 000000000000..de010d977de8 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_custom_profile_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerServiceCustomProfile(Model): + """Properties to configure a custom container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator: Required. The name of the custom orchestrator to use. + :type orchestrator: str + """ + + _validation = { + 'orchestrator': {'required': True}, + } + + _attribute_map = { + 'orchestrator': {'key': 'orchestrator', 'type': 'str'}, + } + + def __init__(self, *, orchestrator: str, **kwargs) -> None: + super(ContainerServiceCustomProfile, self).__init__(**kwargs) + self.orchestrator = orchestrator diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_diagnostics_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_diagnostics_profile.py index b763f2d42a78..8cee39284dc2 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_diagnostics_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_diagnostics_profile.py @@ -15,8 +15,10 @@ class ContainerServiceDiagnosticsProfile(Model): """Profile for diagnostics on the container service cluster. - :param vm_diagnostics: Profile for diagnostics on the container service - VMs. + All required parameters must be populated in order to send to Azure. + + :param vm_diagnostics: Required. Profile for diagnostics on the container + service VMs. :type vm_diagnostics: ~azure.mgmt.containerservice.models.ContainerServiceVMDiagnostics """ @@ -29,6 +31,6 @@ class ContainerServiceDiagnosticsProfile(Model): 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, } - def __init__(self, vm_diagnostics): - super(ContainerServiceDiagnosticsProfile, self).__init__() - self.vm_diagnostics = vm_diagnostics + def __init__(self, **kwargs): + super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) + self.vm_diagnostics = kwargs.get('vm_diagnostics', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_diagnostics_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_diagnostics_profile_py3.py new file mode 100644 index 000000000000..e444694e8a95 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_diagnostics_profile_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerServiceDiagnosticsProfile(Model): + """Profile for diagnostics on the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param vm_diagnostics: Required. Profile for diagnostics on the container + service VMs. + :type vm_diagnostics: + ~azure.mgmt.containerservice.models.ContainerServiceVMDiagnostics + """ + + _validation = { + 'vm_diagnostics': {'required': True}, + } + + _attribute_map = { + 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, + } + + def __init__(self, *, vm_diagnostics, **kwargs) -> None: + super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) + self.vm_diagnostics = vm_diagnostics diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_linux_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_linux_profile.py index 898923273aff..d9e79e2d2eeb 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_linux_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_linux_profile.py @@ -15,9 +15,13 @@ class ContainerServiceLinuxProfile(Model): """Profile for Linux VMs in the container service cluster. - :param admin_username: The administrator username to use for Linux VMs. + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for + Linux VMs. :type admin_username: str - :param ssh: SSH configuration for Linux-based VMs running on Azure. + :param ssh: Required. SSH configuration for Linux-based VMs running on + Azure. :type ssh: ~azure.mgmt.containerservice.models.ContainerServiceSshConfiguration """ @@ -32,7 +36,7 @@ class ContainerServiceLinuxProfile(Model): 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, } - def __init__(self, admin_username, ssh): - super(ContainerServiceLinuxProfile, self).__init__() - self.admin_username = admin_username - self.ssh = ssh + def __init__(self, **kwargs): + super(ContainerServiceLinuxProfile, self).__init__(**kwargs) + self.admin_username = kwargs.get('admin_username', None) + self.ssh = kwargs.get('ssh', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_linux_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_linux_profile_py3.py new file mode 100644 index 000000000000..824f20d0da8b --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_linux_profile_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerServiceLinuxProfile(Model): + """Profile for Linux VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for + Linux VMs. + :type admin_username: str + :param ssh: Required. SSH configuration for Linux-based VMs running on + Azure. + :type ssh: + ~azure.mgmt.containerservice.models.ContainerServiceSshConfiguration + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[a-z][a-z0-9_-]*$'}, + 'ssh': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, + } + + def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: + super(ContainerServiceLinuxProfile, self).__init__(**kwargs) + self.admin_username = admin_username + self.ssh = ssh diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_master_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_master_profile.py index 7fb728a9b270..07a8ce1266ea 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_master_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_master_profile.py @@ -18,50 +18,65 @@ class ContainerServiceMasterProfile(Model): 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 count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . :type count: int - :param dns_prefix: DNS prefix to be used to create the FQDN for the master - pool. + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for + the master pool. :type dns_prefix: str - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A0', + :param vm_size: Required. Size of agent VMs. Possible values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_D1', 'Standard_D11', + 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', + 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', + 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', + 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D8_v3', - 'Standard_D8s_v3', 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', - 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', - 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13_v2', - 'Standard_DS13_v2_Promo', 'Standard_DS14', 'Standard_DS14_v2', + 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', + 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', + 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', + 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', + 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', + 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', + 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32_v3', 'Standard_E32s_v3', 'Standard_E4_v3', - 'Standard_E4s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', - 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', - 'Standard_F16s', 'Standard_F1s', 'Standard_F2', 'Standard_F2s', - 'Standard_F4', 'Standard_F4s', 'Standard_F8', 'Standard_F8s', + 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', + 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', + 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', + 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', + 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', + 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', + 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', + 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS5', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', + 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', + 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128s', - 'Standard_M64ms', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC6', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', + 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', + 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', + 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', + 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', + 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', + 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', + 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' :type vm_size: str or ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk @@ -69,8 +84,7 @@ class ContainerServiceMasterProfile(Model): will apply the default osDisk size according to the vmSize specified. :type os_disk_size_gb: int :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. If you specify either master VNet Subnet, or agent VNet - Subnet, you need to specify both. And they have to be in the same VNet. + identifier. :type vnet_subnet_id: str :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static ip of masters. Default value: "10.240.255.5" . @@ -102,13 +116,13 @@ class ContainerServiceMasterProfile(Model): 'fqdn': {'key': 'fqdn', 'type': 'str'}, } - def __init__(self, dns_prefix, vm_size, count=1, os_disk_size_gb=None, vnet_subnet_id=None, first_consecutive_static_ip="10.240.255.5", storage_profile=None): - super(ContainerServiceMasterProfile, self).__init__() - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile + def __init__(self, **kwargs): + super(ContainerServiceMasterProfile, self).__init__(**kwargs) + self.count = kwargs.get('count', 1) + self.dns_prefix = kwargs.get('dns_prefix', None) + self.vm_size = kwargs.get('vm_size', None) + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") + self.storage_profile = kwargs.get('storage_profile', None) self.fqdn = None diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_master_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_master_profile_py3.py new file mode 100644 index 000000000000..15457f5e44dc --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_master_profile_py3.py @@ -0,0 +1,128 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerServiceMasterProfile(Model): + """Profile for the container service master. + + 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 count: Number of masters (VMs) in the container service cluster. + Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . + :type count: int + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for + the master pool. + :type dns_prefix: str + :param vm_size: Required. Size of agent VMs. Possible values include: + 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', + 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', + 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', + 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', + 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', + 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', + 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', + 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', + 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', + 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', + 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', + 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', + 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', + 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', + 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', + 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', + 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', + 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', + 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', + 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', + 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', + 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', + 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', + 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', + 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', + 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', + 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', + 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', + 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', + 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', + 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', + 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', + 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', + 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', + 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', + 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', + 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', + 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', + 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', + 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', + 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', + 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', + 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', + 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', + 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', + 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', + 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', + 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :type vm_size: str or + ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk + size for every machine in this master/agent pool. If you specify 0, it + will apply the default osDisk size according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet + identifier. + :type vnet_subnet_id: str + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to + specify the first static ip of masters. Default value: "10.240.255.5" . + :type first_consecutive_static_ip: str + :param storage_profile: Storage profile specifies what kind of storage + used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will + choose for you based on the orchestrator choice. Possible values include: + 'StorageAccount', 'ManagedDisks' + :type storage_profile: str or + ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes + :ivar fqdn: FDQN for the master pool. + :vartype fqdn: str + """ + + _validation = { + 'dns_prefix': {'required': True}, + 'vm_size': {'required': True}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + } + + def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: + super(ContainerServiceMasterProfile, self).__init__(**kwargs) + self.count = count + self.dns_prefix = dns_prefix + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.vnet_subnet_id = vnet_subnet_id + self.first_consecutive_static_ip = first_consecutive_static_ip + self.storage_profile = storage_profile + self.fqdn = None diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_network_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_network_profile.py new file mode 100644 index 000000000000..45d3bb48aec7 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_network_profile.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerServiceNetworkProfile(Model): + """Profile of network configuration. + + :param network_plugin: Network plugin used for building Kubernetes + network. Possible values include: 'azure', 'kubenet'. Default value: + "kubenet" . + :type network_plugin: str or + ~azure.mgmt.containerservice.models.NetworkPlugin + :param network_policy: Network policy used for building Kubernetes + network. Possible values include: 'calico' + :type network_policy: str or + ~azure.mgmt.containerservice.models.NetworkPolicy + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs + when kubenet is used. Default value: "10.244.0.0/16" . + :type pod_cidr: str + :param service_cidr: A CIDR notation IP range from which to assign service + cluster IPs. It must not overlap with any Subnet IP ranges. Default value: + "10.0.0.0/16" . + :type service_cidr: str + :param dns_service_ip: An IP address assigned to the Kubernetes DNS + service. It must be within the Kubernetes service address range specified + in serviceCidr. Default value: "10.0.0.10" . + :type dns_service_ip: str + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker + bridge network. It must not overlap with any Subnet IP ranges or the + Kubernetes service address range. Default value: "172.17.0.1/16" . + :type docker_bridge_cidr: str + """ + + _validation = { + 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, + 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + } + + _attribute_map = { + 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, + 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, + 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, + 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerServiceNetworkProfile, self).__init__(**kwargs) + self.network_plugin = kwargs.get('network_plugin', "kubenet") + self.network_policy = kwargs.get('network_policy', None) + self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") + self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") + self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") + self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_network_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_network_profile_py3.py new file mode 100644 index 000000000000..ec728075a040 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_network_profile_py3.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerServiceNetworkProfile(Model): + """Profile of network configuration. + + :param network_plugin: Network plugin used for building Kubernetes + network. Possible values include: 'azure', 'kubenet'. Default value: + "kubenet" . + :type network_plugin: str or + ~azure.mgmt.containerservice.models.NetworkPlugin + :param network_policy: Network policy used for building Kubernetes + network. Possible values include: 'calico' + :type network_policy: str or + ~azure.mgmt.containerservice.models.NetworkPolicy + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs + when kubenet is used. Default value: "10.244.0.0/16" . + :type pod_cidr: str + :param service_cidr: A CIDR notation IP range from which to assign service + cluster IPs. It must not overlap with any Subnet IP ranges. Default value: + "10.0.0.0/16" . + :type service_cidr: str + :param dns_service_ip: An IP address assigned to the Kubernetes DNS + service. It must be within the Kubernetes service address range specified + in serviceCidr. Default value: "10.0.0.10" . + :type dns_service_ip: str + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker + bridge network. It must not overlap with any Subnet IP ranges or the + Kubernetes service address range. Default value: "172.17.0.1/16" . + :type docker_bridge_cidr: str + """ + + _validation = { + 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, + 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + } + + _attribute_map = { + 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, + 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, + 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, + 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, + } + + def __init__(self, *, network_plugin="kubenet", network_policy=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", **kwargs) -> None: + super(ContainerServiceNetworkProfile, self).__init__(**kwargs) + self.network_plugin = network_plugin + self.network_policy = network_policy + self.pod_cidr = pod_cidr + self.service_cidr = service_cidr + self.dns_service_ip = dns_service_ip + self.docker_bridge_cidr = docker_bridge_cidr diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_orchestrator_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_orchestrator_profile.py index e79a5db11399..8f1edad11b9d 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_orchestrator_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_orchestrator_profile.py @@ -15,9 +15,11 @@ class ContainerServiceOrchestratorProfile(Model): """Profile for the container service orchestrator. - :param orchestrator_type: The orchestrator to use to manage container - service cluster resources. Valid values are Kubernetes, Swarm, DCOS, - DockerCE and Custom. Possible values include: 'Kubernetes', 'Swarm', + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Required. The orchestrator to use to manage + container service cluster resources. Valid values are Kubernetes, Swarm, + DCOS, DockerCE and Custom. Possible values include: 'Kubernetes', 'Swarm', 'DCOS', 'DockerCE', 'Custom' :type orchestrator_type: str or ~azure.mgmt.containerservice.models.ContainerServiceOrchestratorTypes @@ -36,7 +38,7 @@ class ContainerServiceOrchestratorProfile(Model): 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, } - def __init__(self, orchestrator_type, orchestrator_version=None): - super(ContainerServiceOrchestratorProfile, self).__init__() - self.orchestrator_type = orchestrator_type - self.orchestrator_version = orchestrator_version + def __init__(self, **kwargs): + super(ContainerServiceOrchestratorProfile, self).__init__(**kwargs) + self.orchestrator_type = kwargs.get('orchestrator_type', None) + self.orchestrator_version = kwargs.get('orchestrator_version', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_orchestrator_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_orchestrator_profile_py3.py new file mode 100644 index 000000000000..54d8bc6aa86a --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_orchestrator_profile_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerServiceOrchestratorProfile(Model): + """Profile for the container service orchestrator. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Required. The orchestrator to use to manage + container service cluster resources. Valid values are Kubernetes, Swarm, + DCOS, DockerCE and Custom. Possible values include: 'Kubernetes', 'Swarm', + 'DCOS', 'DockerCE', 'Custom' + :type orchestrator_type: str or + ~azure.mgmt.containerservice.models.ContainerServiceOrchestratorTypes + :param orchestrator_version: The version of the orchestrator to use. You + can specify the major.minor.patch part of the actual version.For example, + you can specify version as "1.6.11". + :type orchestrator_version: str + """ + + _validation = { + 'orchestrator_type': {'required': True}, + } + + _attribute_map = { + 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + } + + def __init__(self, *, orchestrator_type, orchestrator_version: str=None, **kwargs) -> None: + super(ContainerServiceOrchestratorProfile, self).__init__(**kwargs) + self.orchestrator_type = orchestrator_type + self.orchestrator_version = orchestrator_version diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_py3.py new file mode 100644 index 000000000000..ddec4057c76f --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_py3.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ContainerService(Resource): + """Container service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar provisioning_state: The current deployment or provisioning state, + which only appears in the response. + :vartype provisioning_state: str + :param orchestrator_profile: Required. Profile for the container service + orchestrator. + :type orchestrator_profile: + ~azure.mgmt.containerservice.models.ContainerServiceOrchestratorProfile + :param custom_profile: Properties to configure a custom container service + cluster. + :type custom_profile: + ~azure.mgmt.containerservice.models.ContainerServiceCustomProfile + :param service_principal_profile: Information about a service principal + identity for the cluster to use for manipulating Azure APIs. Exact one of + secret or keyVaultSecretRef need to be specified. + :type service_principal_profile: + ~azure.mgmt.containerservice.models.ContainerServiceServicePrincipalProfile + :param master_profile: Required. Profile for the container service master. + :type master_profile: + ~azure.mgmt.containerservice.models.ContainerServiceMasterProfile + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.models.ContainerServiceAgentPoolProfile] + :param windows_profile: Profile for Windows VMs in the container service + cluster. + :type windows_profile: + ~azure.mgmt.containerservice.models.ContainerServiceWindowsProfile + :param linux_profile: Required. Profile for Linux VMs in the container + service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.models.ContainerServiceLinuxProfile + :param diagnostics_profile: Profile for diagnostics in the container + service cluster. + :type diagnostics_profile: + ~azure.mgmt.containerservice.models.ContainerServiceDiagnosticsProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'orchestrator_profile': {'required': True}, + 'master_profile': {'required': True}, + 'linux_profile': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'orchestrator_profile': {'key': 'properties.orchestratorProfile', 'type': 'ContainerServiceOrchestratorProfile'}, + 'custom_profile': {'key': 'properties.customProfile', 'type': 'ContainerServiceCustomProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ContainerServiceServicePrincipalProfile'}, + 'master_profile': {'key': 'properties.masterProfile', 'type': 'ContainerServiceMasterProfile'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ContainerServiceAgentPoolProfile]'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ContainerServiceWindowsProfile'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'ContainerServiceDiagnosticsProfile'}, + } + + def __init__(self, *, location: str, orchestrator_profile, master_profile, linux_profile, tags=None, custom_profile=None, service_principal_profile=None, agent_pool_profiles=None, windows_profile=None, diagnostics_profile=None, **kwargs) -> None: + super(ContainerService, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.orchestrator_profile = orchestrator_profile + self.custom_profile = custom_profile + self.service_principal_profile = service_principal_profile + self.master_profile = master_profile + self.agent_pool_profiles = agent_pool_profiles + self.windows_profile = windows_profile + self.linux_profile = linux_profile + self.diagnostics_profile = diagnostics_profile diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_service_principal_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_service_principal_profile.py index 38c0c60a18db..acef0ac89b5a 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_service_principal_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_service_principal_profile.py @@ -17,7 +17,9 @@ class ContainerServiceServicePrincipalProfile(Model): manipulating Azure APIs. Either secret or keyVaultSecretRef must be specified. - :param client_id: The ID for the service principal. + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The ID for the service principal. :type client_id: str :param secret: The secret password associated with the service principal in plain text. @@ -38,8 +40,8 @@ class ContainerServiceServicePrincipalProfile(Model): 'key_vault_secret_ref': {'key': 'keyVaultSecretRef', 'type': 'KeyVaultSecretRef'}, } - def __init__(self, client_id, secret=None, key_vault_secret_ref=None): - super(ContainerServiceServicePrincipalProfile, self).__init__() - self.client_id = client_id - self.secret = secret - self.key_vault_secret_ref = key_vault_secret_ref + def __init__(self, **kwargs): + super(ContainerServiceServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.secret = kwargs.get('secret', None) + self.key_vault_secret_ref = kwargs.get('key_vault_secret_ref', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_service_principal_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_service_principal_profile_py3.py new file mode 100644 index 000000000000..f08ef052ac13 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_service_principal_profile_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerServiceServicePrincipalProfile(Model): + """Information about a service principal identity for the cluster to use for + manipulating Azure APIs. Either secret or keyVaultSecretRef must be + specified. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The ID for the service principal. + :type client_id: str + :param secret: The secret password associated with the service principal + in plain text. + :type secret: str + :param key_vault_secret_ref: Reference to a secret stored in Azure Key + Vault. + :type key_vault_secret_ref: + ~azure.mgmt.containerservice.models.KeyVaultSecretRef + """ + + _validation = { + 'client_id': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + 'key_vault_secret_ref': {'key': 'keyVaultSecretRef', 'type': 'KeyVaultSecretRef'}, + } + + def __init__(self, *, client_id: str, secret: str=None, key_vault_secret_ref=None, **kwargs) -> None: + super(ContainerServiceServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = client_id + self.secret = secret + self.key_vault_secret_ref = key_vault_secret_ref diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_ssh_configuration.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_ssh_configuration.py index b4840c5d020d..cce2acd87900 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_ssh_configuration.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_ssh_configuration.py @@ -15,8 +15,10 @@ class ContainerServiceSshConfiguration(Model): """SSH configuration for Linux-based VMs running on Azure. - :param public_keys: The list of SSH public keys used to authenticate with - Linux-based VMs. Only expect one key specified. + All required parameters must be populated in order to send to Azure. + + :param public_keys: Required. The list of SSH public keys used to + authenticate with Linux-based VMs. Only expect one key specified. :type public_keys: list[~azure.mgmt.containerservice.models.ContainerServiceSshPublicKey] """ @@ -29,6 +31,6 @@ class ContainerServiceSshConfiguration(Model): 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, } - def __init__(self, public_keys): - super(ContainerServiceSshConfiguration, self).__init__() - self.public_keys = public_keys + def __init__(self, **kwargs): + super(ContainerServiceSshConfiguration, self).__init__(**kwargs) + self.public_keys = kwargs.get('public_keys', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_ssh_configuration_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_ssh_configuration_py3.py new file mode 100644 index 000000000000..f11d2b896abf --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_ssh_configuration_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerServiceSshConfiguration(Model): + """SSH configuration for Linux-based VMs running on Azure. + + All required parameters must be populated in order to send to Azure. + + :param public_keys: Required. The list of SSH public keys used to + authenticate with Linux-based VMs. Only expect one key specified. + :type public_keys: + list[~azure.mgmt.containerservice.models.ContainerServiceSshPublicKey] + """ + + _validation = { + 'public_keys': {'required': True}, + } + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, + } + + def __init__(self, *, public_keys, **kwargs) -> None: + super(ContainerServiceSshConfiguration, self).__init__(**kwargs) + self.public_keys = public_keys diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_ssh_public_key.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_ssh_public_key.py index 68595fb1f6fc..da7609ba2226 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_ssh_public_key.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_ssh_public_key.py @@ -15,9 +15,11 @@ class ContainerServiceSshPublicKey(Model): """Contains information about SSH certificate public key data. - :param key_data: Certificate public key used to authenticate with VMs - through SSH. The certificate must be in PEM format with or without - headers. + All required parameters must be populated in order to send to Azure. + + :param key_data: Required. Certificate public key used to authenticate + with VMs through SSH. The certificate must be in PEM format with or + without headers. :type key_data: str """ @@ -29,6 +31,6 @@ class ContainerServiceSshPublicKey(Model): 'key_data': {'key': 'keyData', 'type': 'str'}, } - def __init__(self, key_data): - super(ContainerServiceSshPublicKey, self).__init__() - self.key_data = key_data + def __init__(self, **kwargs): + super(ContainerServiceSshPublicKey, self).__init__(**kwargs) + self.key_data = kwargs.get('key_data', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_ssh_public_key_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_ssh_public_key_py3.py new file mode 100644 index 000000000000..8e8c10544ef4 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_ssh_public_key_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerServiceSshPublicKey(Model): + """Contains information about SSH certificate public key data. + + All required parameters must be populated in order to send to Azure. + + :param key_data: Required. Certificate public key used to authenticate + with VMs through SSH. The certificate must be in PEM format with or + without headers. + :type key_data: str + """ + + _validation = { + 'key_data': {'required': True}, + } + + _attribute_map = { + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, *, key_data: str, **kwargs) -> None: + super(ContainerServiceSshPublicKey, self).__init__(**kwargs) + self.key_data = key_data diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_vm_diagnostics.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_vm_diagnostics.py index 1571d9a71f3a..f1804c66b683 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_vm_diagnostics.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_vm_diagnostics.py @@ -18,7 +18,10 @@ class ContainerServiceVMDiagnostics(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param enabled: Whether the VM diagnostic agent is provisioned on the VM. + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the VM diagnostic agent is provisioned + on the VM. :type enabled: bool :ivar storage_uri: The URI of the storage account where diagnostics are stored. @@ -35,7 +38,7 @@ class ContainerServiceVMDiagnostics(Model): 'storage_uri': {'key': 'storageUri', 'type': 'str'}, } - def __init__(self, enabled): - super(ContainerServiceVMDiagnostics, self).__init__() - self.enabled = enabled + def __init__(self, **kwargs): + super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) self.storage_uri = None diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_vm_diagnostics_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_vm_diagnostics_py3.py new file mode 100644 index 000000000000..a716fc269548 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_vm_diagnostics_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerServiceVMDiagnostics(Model): + """Profile for diagnostics on the container service VMs. + + 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 enabled: Required. Whether the VM diagnostic agent is provisioned + on the VM. + :type enabled: bool + :ivar storage_uri: The URI of the storage account where diagnostics are + stored. + :vartype storage_uri: str + """ + + _validation = { + 'enabled': {'required': True}, + 'storage_uri': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, *, enabled: bool, **kwargs) -> None: + super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) + self.enabled = enabled + self.storage_uri = None diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_windows_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_windows_profile.py index 24b4fe49d2b1..463253c6d6a9 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_windows_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_windows_profile.py @@ -15,9 +15,13 @@ class ContainerServiceWindowsProfile(Model): """Profile for Windows VMs in the container service cluster. - :param admin_username: The administrator username to use for Windows VMs. + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for + Windows VMs. :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. + :param admin_password: Required. The administrator password to use for + Windows VMs. :type admin_password: str """ @@ -31,7 +35,7 @@ class ContainerServiceWindowsProfile(Model): 'admin_password': {'key': 'adminPassword', 'type': 'str'}, } - def __init__(self, admin_username, admin_password): - super(ContainerServiceWindowsProfile, self).__init__() - self.admin_username = admin_username - self.admin_password = admin_password + def __init__(self, **kwargs): + super(ContainerServiceWindowsProfile, self).__init__(**kwargs) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_windows_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_windows_profile_py3.py new file mode 100644 index 000000000000..667c96367aa9 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_windows_profile_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerServiceWindowsProfile(Model): + """Profile for Windows VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for + Windows VMs. + :type admin_username: str + :param admin_password: Required. The administrator password to use for + Windows VMs. + :type admin_password: str + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$'}, + 'admin_password': {'required': True, 'pattern': r'^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$'}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + } + + def __init__(self, *, admin_username: str, admin_password: str, **kwargs) -> None: + super(ContainerServiceWindowsProfile, self).__init__(**kwargs) + self.admin_username = admin_username + self.admin_password = admin_password diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/key_vault_secret_ref.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/key_vault_secret_ref.py index 273fcb22e925..5e3c44cac596 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/key_vault_secret_ref.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/key_vault_secret_ref.py @@ -15,9 +15,11 @@ class KeyVaultSecretRef(Model): """Reference to a secret stored in Azure Key Vault. - :param vault_id: Key vault identifier. + All required parameters must be populated in order to send to Azure. + + :param vault_id: Required. Key vault identifier. :type vault_id: str - :param secret_name: The secret name. + :param secret_name: Required. The secret name. :type secret_name: str :param version: The secret version. :type version: str @@ -34,8 +36,8 @@ class KeyVaultSecretRef(Model): 'version': {'key': 'version', 'type': 'str'}, } - def __init__(self, vault_id, secret_name, version=None): - super(KeyVaultSecretRef, self).__init__() - self.vault_id = vault_id - self.secret_name = secret_name - self.version = version + def __init__(self, **kwargs): + super(KeyVaultSecretRef, self).__init__(**kwargs) + self.vault_id = kwargs.get('vault_id', None) + self.secret_name = kwargs.get('secret_name', None) + self.version = kwargs.get('version', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/key_vault_secret_ref_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/key_vault_secret_ref_py3.py new file mode 100644 index 000000000000..be0824abfa9a --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/key_vault_secret_ref_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyVaultSecretRef(Model): + """Reference to a secret stored in Azure Key Vault. + + All required parameters must be populated in order to send to Azure. + + :param vault_id: Required. Key vault identifier. + :type vault_id: str + :param secret_name: Required. The secret name. + :type secret_name: str + :param version: The secret version. + :type version: str + """ + + _validation = { + 'vault_id': {'required': True}, + 'secret_name': {'required': True}, + } + + _attribute_map = { + 'vault_id': {'key': 'vaultID', 'type': 'str'}, + 'secret_name': {'key': 'secretName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, vault_id: str, secret_name: str, version: str=None, **kwargs) -> None: + super(KeyVaultSecretRef, self).__init__(**kwargs) + self.vault_id = vault_id + self.secret_name = secret_name + self.version = version diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py index fd9be4d2ba10..3dbfcf996b0e 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py @@ -18,29 +18,31 @@ class ManagedCluster(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 id: Resource Id :vartype id: str :ivar name: Resource name :vartype name: str :ivar type: Resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags :type tags: dict[str, str] :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response. :vartype provisioning_state: str + :param kubernetes_version: Version of Kubernetes specified when creating + the managed cluster. + :type kubernetes_version: str :param dns_prefix: DNS prefix specified when creating the managed cluster. :type dns_prefix: str :ivar fqdn: FDQN for the master pool. :vartype fqdn: str - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str :param agent_pool_profiles: Properties of the agent pool. :type agent_pool_profiles: - list[~azure.mgmt.containerservice.models.ContainerServiceAgentPoolProfile] + list[~azure.mgmt.containerservice.models.ManagedClusterAgentPoolProfile] :param linux_profile: Profile for Linux VMs in the container service cluster. :type linux_profile: @@ -50,6 +52,18 @@ class ManagedCluster(Resource): or keyVaultSecretRef must be specified. :type service_principal_profile: ~azure.mgmt.containerservice.models.ContainerServiceServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.models.ManagedClusterAddonProfile] + :param enable_rbac: Whether to enable Kubernetes Role-Based Access + Control. + :type enable_rbac: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: + ~azure.mgmt.containerservice.models.ManagedClusterAADProfile """ _validation = { @@ -68,20 +82,28 @@ class ManagedCluster(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ContainerServiceAgentPoolProfile]'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ContainerServiceServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, } - def __init__(self, location, tags=None, dns_prefix=None, kubernetes_version=None, agent_pool_profiles=None, linux_profile=None, service_principal_profile=None): - super(ManagedCluster, self).__init__(location=location, tags=tags) + def __init__(self, **kwargs): + super(ManagedCluster, self).__init__(**kwargs) self.provisioning_state = None - self.dns_prefix = dns_prefix + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.dns_prefix = kwargs.get('dns_prefix', None) self.fqdn = None - self.kubernetes_version = kubernetes_version - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.service_principal_profile = service_principal_profile + self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) + self.linux_profile = kwargs.get('linux_profile', None) + self.service_principal_profile = kwargs.get('service_principal_profile', None) + self.addon_profiles = kwargs.get('addon_profiles', None) + self.enable_rbac = kwargs.get('enable_rbac', None) + self.network_profile = kwargs.get('network_profile', None) + self.aad_profile = kwargs.get('aad_profile', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile.py new file mode 100644 index 000000000000..50e3acd14b60 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedClusterAADProfile(Model): + """AADProfile specifies attributes for Azure Active Directory integration. + + All required parameters must be populated in order to send to Azure. + + :param client_app_id: Required. The client AAD application ID. + :type client_app_id: str + :param server_app_id: Required. The server AAD application ID. + :type server_app_id: str + :param server_app_secret: Required. The server AAD application secret. + :type server_app_secret: str + :param tenant_id: The AAD tenant ID to use for authentication. If not + specified, will use the tenant of the deployment subscription. + :type tenant_id: str + """ + + _validation = { + 'client_app_id': {'required': True}, + 'server_app_id': {'required': True}, + 'server_app_secret': {'required': True}, + } + + _attribute_map = { + 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, + 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, + 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, + 'tenant_id': {'key': 'tenantID', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedClusterAADProfile, self).__init__(**kwargs) + self.client_app_id = kwargs.get('client_app_id', None) + self.server_app_id = kwargs.get('server_app_id', None) + self.server_app_secret = kwargs.get('server_app_secret', None) + self.tenant_id = kwargs.get('tenant_id', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile_py3.py new file mode 100644 index 000000000000..6db15c1dd6c2 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedClusterAADProfile(Model): + """AADProfile specifies attributes for Azure Active Directory integration. + + All required parameters must be populated in order to send to Azure. + + :param client_app_id: Required. The client AAD application ID. + :type client_app_id: str + :param server_app_id: Required. The server AAD application ID. + :type server_app_id: str + :param server_app_secret: Required. The server AAD application secret. + :type server_app_secret: str + :param tenant_id: The AAD tenant ID to use for authentication. If not + specified, will use the tenant of the deployment subscription. + :type tenant_id: str + """ + + _validation = { + 'client_app_id': {'required': True}, + 'server_app_id': {'required': True}, + 'server_app_secret': {'required': True}, + } + + _attribute_map = { + 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, + 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, + 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, + 'tenant_id': {'key': 'tenantID', 'type': 'str'}, + } + + def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str, tenant_id: str=None, **kwargs) -> None: + super(ManagedClusterAADProfile, self).__init__(**kwargs) + self.client_app_id = client_app_id + self.server_app_id = server_app_id + self.server_app_secret = server_app_secret + self.tenant_id = tenant_id diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile.py index 9af40f21fe47..6dc2a4ec23be 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile.py @@ -18,18 +18,20 @@ class ManagedClusterAccessProfile(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 id: Resource Id :vartype id: str :ivar name: Resource name :vartype name: str :ivar type: Resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags :type tags: dict[str, str] :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: str + :type kube_config: bytearray """ _validation = { @@ -45,9 +47,9 @@ class ManagedClusterAccessProfile(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'str'}, + 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, } - def __init__(self, location, tags=None, kube_config=None): - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags) - self.kube_config = kube_config + def __init__(self, **kwargs): + super(ManagedClusterAccessProfile, self).__init__(**kwargs) + self.kube_config = kwargs.get('kube_config', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile_py3.py new file mode 100644 index 000000000000..0d3fb998e970 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ManagedClusterAccessProfile(Resource): + """Managed cluster Access Profile. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param kube_config: Base64-encoded Kubernetes configuration file. + :type kube_config: bytearray + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, + } + + def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: + super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) + self.kube_config = kube_config diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_addon_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_addon_profile.py new file mode 100644 index 000000000000..796f9246a686 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_addon_profile.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedClusterAddonProfile(Model): + """A Kubernetes add-on profile for a managed cluster. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the add-on is enabled or not. + :type enabled: bool + :param config: Key-value pairs for configuring an add-on. + :type config: dict[str, str] + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'config': {'key': 'config', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedClusterAddonProfile, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.config = kwargs.get('config', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_addon_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_addon_profile_py3.py new file mode 100644 index 000000000000..71e05cd14c0e --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_addon_profile_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedClusterAddonProfile(Model): + """A Kubernetes add-on profile for a managed cluster. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the add-on is enabled or not. + :type enabled: bool + :param config: Key-value pairs for configuring an add-on. + :type config: dict[str, str] + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'config': {'key': 'config', 'type': '{str}'}, + } + + def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: + super(ManagedClusterAddonProfile, self).__init__(**kwargs) + self.enabled = enabled + self.config = config diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py new file mode 100644 index 000000000000..3684c29a65e3 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py @@ -0,0 +1,145 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedClusterAgentPoolProfile(Model): + """Profile for the container service agent pool. + + 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 name: Required. Unique name of the agent pool profile in the + context of the subscription and resource group. + :type name: str + :param count: Number of agents (VMs) to host docker containers. Allowed + values must be in the range of 1 to 100 (inclusive). The default value is + 1. . Default value: 1 . + :type count: int + :param vm_size: Required. Size of agent VMs. Possible values include: + 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', + 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', + 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', + 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', + 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', + 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', + 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', + 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', + 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', + 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', + 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', + 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', + 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', + 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', + 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', + 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', + 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', + 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', + 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', + 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', + 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', + 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', + 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', + 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', + 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', + 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', + 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', + 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', + 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', + 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', + 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', + 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', + 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', + 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', + 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', + 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', + 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', + 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', + 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', + 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', + 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', + 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', + 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', + 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', + 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', + 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', + 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', + 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :type vm_size: str or + ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk + size for every machine in this master/agent pool. If you specify 0, it + will apply the default osDisk size according to the vmSize specified. + :type os_disk_size_gb: int + :param dns_prefix: DNS prefix to be used to create the FQDN for the agent + pool. + :type dns_prefix: str + :ivar fqdn: FDQN for the agent pool. + :vartype fqdn: str + :param ports: Ports number array used to expose on this agent pool. The + default opened ports are different based on your choice of orchestrator. + :type ports: list[int] + :param storage_profile: Storage profile specifies what kind of storage + used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will + choose for you based on the orchestrator choice. Possible values include: + 'StorageAccount', 'ManagedDisks' + :type storage_profile: str or + ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes + :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet + identifier. + :type vnet_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux + and Windows. Default to Linux. Possible values include: 'Linux', + 'Windows'. Default value: "Linux" . + :type os_type: str or ~azure.mgmt.containerservice.models.OSType + """ + + _validation = { + 'name': {'required': True}, + 'count': {'maximum': 100, 'minimum': 1}, + 'vm_size': {'required': True}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[int]'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', 1) + self.vm_size = kwargs.get('vm_size', None) + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.dns_prefix = kwargs.get('dns_prefix', None) + self.fqdn = None + self.ports = kwargs.get('ports', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.max_pods = kwargs.get('max_pods', None) + self.os_type = kwargs.get('os_type', "Linux") diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py new file mode 100644 index 000000000000..7434429facd8 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py @@ -0,0 +1,145 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedClusterAgentPoolProfile(Model): + """Profile for the container service agent pool. + + 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 name: Required. Unique name of the agent pool profile in the + context of the subscription and resource group. + :type name: str + :param count: Number of agents (VMs) to host docker containers. Allowed + values must be in the range of 1 to 100 (inclusive). The default value is + 1. . Default value: 1 . + :type count: int + :param vm_size: Required. Size of agent VMs. Possible values include: + 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', + 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', + 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', + 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', + 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', + 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', + 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', + 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', + 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', + 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', + 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', + 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', + 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', + 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', + 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', + 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', + 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', + 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', + 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', + 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', + 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', + 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', + 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', + 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', + 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', + 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', + 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', + 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', + 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', + 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', + 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', + 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', + 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', + 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', + 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', + 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', + 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', + 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', + 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', + 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', + 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', + 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', + 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', + 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', + 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', + 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', + 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', + 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :type vm_size: str or + ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk + size for every machine in this master/agent pool. If you specify 0, it + will apply the default osDisk size according to the vmSize specified. + :type os_disk_size_gb: int + :param dns_prefix: DNS prefix to be used to create the FQDN for the agent + pool. + :type dns_prefix: str + :ivar fqdn: FDQN for the agent pool. + :vartype fqdn: str + :param ports: Ports number array used to expose on this agent pool. The + default opened ports are different based on your choice of orchestrator. + :type ports: list[int] + :param storage_profile: Storage profile specifies what kind of storage + used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will + choose for you based on the orchestrator choice. Possible values include: + 'StorageAccount', 'ManagedDisks' + :type storage_profile: str or + ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes + :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet + identifier. + :type vnet_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux + and Windows. Default to Linux. Possible values include: 'Linux', + 'Windows'. Default value: "Linux" . + :type os_type: str or ~azure.mgmt.containerservice.models.OSType + """ + + _validation = { + 'name': {'required': True}, + 'count': {'maximum': 100, 'minimum': 1}, + 'vm_size': {'required': True}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[int]'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, *, name: str, vm_size, count: int=1, os_disk_size_gb: int=None, dns_prefix: str=None, ports=None, storage_profile=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", **kwargs) -> None: + super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) + self.name = name + self.count = count + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.dns_prefix = dns_prefix + self.fqdn = None + self.ports = ports + self.storage_profile = storage_profile + self.vnet_subnet_id = vnet_subnet_id + self.max_pods = max_pods + self.os_type = os_type diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_pool_upgrade_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_pool_upgrade_profile.py index a3edf16e46de..b6967a4a13e7 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_pool_upgrade_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_pool_upgrade_profile.py @@ -15,13 +15,16 @@ class ManagedClusterPoolUpgradeProfile(Model): """The list of available upgrade versions. - :param kubernetes_version: Kubernetes version (major, minor, patch). + All required parameters must be populated in order to send to Azure. + + :param kubernetes_version: Required. Kubernetes version (major, minor, + patch). :type kubernetes_version: str :param name: Pool name. :type name: str - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . + :param os_type: Required. OsType to be used to specify os type. Choose + from Linux and Windows. Default to Linux. Possible values include: + 'Linux', 'Windows'. Default value: "Linux" . :type os_type: str or ~azure.mgmt.containerservice.models.OSType :param upgrades: List of orchestrator types and versions available for upgrade. @@ -40,9 +43,9 @@ class ManagedClusterPoolUpgradeProfile(Model): 'upgrades': {'key': 'upgrades', 'type': '[str]'}, } - def __init__(self, kubernetes_version, name=None, os_type="Linux", upgrades=None): - super(ManagedClusterPoolUpgradeProfile, self).__init__() - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades + def __init__(self, **kwargs): + super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.name = kwargs.get('name', None) + self.os_type = kwargs.get('os_type', "Linux") + self.upgrades = kwargs.get('upgrades', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_pool_upgrade_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_pool_upgrade_profile_py3.py new file mode 100644 index 000000000000..a7bc407e58e2 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_pool_upgrade_profile_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedClusterPoolUpgradeProfile(Model): + """The list of available upgrade versions. + + All required parameters must be populated in order to send to Azure. + + :param kubernetes_version: Required. Kubernetes version (major, minor, + patch). + :type kubernetes_version: str + :param name: Pool name. + :type name: str + :param os_type: Required. OsType to be used to specify os type. Choose + from Linux and Windows. Default to Linux. Possible values include: + 'Linux', 'Windows'. Default value: "Linux" . + :type os_type: str or ~azure.mgmt.containerservice.models.OSType + :param upgrades: List of orchestrator types and versions available for + upgrade. + :type upgrades: list[str] + """ + + _validation = { + 'kubernetes_version': {'required': True}, + 'os_type': {'required': True}, + } + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'upgrades': {'key': 'upgrades', 'type': '[str]'}, + } + + def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: + super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.name = name + self.os_type = os_type + self.upgrades = upgrades diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py new file mode 100644 index 000000000000..2bd2f52cb5e4 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ManagedCluster(Resource): + """Managed cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar provisioning_state: The current deployment or provisioning state, + which only appears in the response. + :vartype provisioning_state: str + :param kubernetes_version: Version of Kubernetes specified when creating + the managed cluster. + :type kubernetes_version: str + :param dns_prefix: DNS prefix specified when creating the managed cluster. + :type dns_prefix: str + :ivar fqdn: FDQN for the master pool. + :vartype fqdn: str + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.models.ManagedClusterAgentPoolProfile] + :param linux_profile: Profile for Linux VMs in the container service + cluster. + :type linux_profile: + ~azure.mgmt.containerservice.models.ContainerServiceLinuxProfile + :param service_principal_profile: Information about a service principal + identity for the cluster to use for manipulating Azure APIs. Either secret + or keyVaultSecretRef must be specified. + :type service_principal_profile: + ~azure.mgmt.containerservice.models.ContainerServiceServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.models.ManagedClusterAddonProfile] + :param enable_rbac: Whether to enable Kubernetes Role-Based Access + Control. + :type enable_rbac: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: + ~azure.mgmt.containerservice.models.ManagedClusterAADProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ContainerServiceServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + } + + def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, service_principal_profile=None, addon_profiles=None, enable_rbac: bool=None, network_profile=None, aad_profile=None, **kwargs) -> None: + super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.kubernetes_version = kubernetes_version + self.dns_prefix = dns_prefix + self.fqdn = None + self.agent_pool_profiles = agent_pool_profiles + self.linux_profile = linux_profile + self.service_principal_profile = service_principal_profile + self.addon_profiles = addon_profiles + self.enable_rbac = enable_rbac + self.network_profile = network_profile + self.aad_profile = aad_profile diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_upgrade_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_upgrade_profile.py index 203713521738..11825a0b7392 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_upgrade_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_upgrade_profile.py @@ -18,18 +18,20 @@ class ManagedClusterUpgradeProfile(Model): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Id of upgrade profile. :vartype id: str :ivar name: Name of upgrade profile. :vartype name: str :ivar type: Type of upgrade profile. :vartype type: str - :param control_plane_profile: The list of available upgrade versions for - the control plane. + :param control_plane_profile: Required. The list of available upgrade + versions for the control plane. :type control_plane_profile: ~azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: The list of available upgrade versions for - agent pools. + :param agent_pool_profiles: Required. The list of available upgrade + versions for agent pools. :type agent_pool_profiles: list[~azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfile] """ @@ -50,10 +52,10 @@ class ManagedClusterUpgradeProfile(Model): 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, } - def __init__(self, control_plane_profile, agent_pool_profiles): - super(ManagedClusterUpgradeProfile, self).__init__() + def __init__(self, **kwargs): + super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles + self.control_plane_profile = kwargs.get('control_plane_profile', None) + self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_upgrade_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_upgrade_profile_py3.py new file mode 100644 index 000000000000..ff69e11fb1bc --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_upgrade_profile_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedClusterUpgradeProfile(Model): + """The list of available upgrades for compute pools. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Id of upgrade profile. + :vartype id: str + :ivar name: Name of upgrade profile. + :vartype name: str + :ivar type: Type of upgrade profile. + :vartype type: str + :param control_plane_profile: Required. The list of available upgrade + versions for the control plane. + :type control_plane_profile: + ~azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfile + :param agent_pool_profiles: Required. The list of available upgrade + versions for agent pools. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfile] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'control_plane_profile': {'required': True}, + 'agent_pool_profiles': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, + } + + def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: + super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.control_plane_profile = control_plane_profile + self.agent_pool_profiles = agent_pool_profiles diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/operation_value.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/operation_value.py new file mode 100644 index 000000000000..911f9fc80881 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/operation_value.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationValue(Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/operation_value_paged.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/operation_value_paged.py new file mode 100644 index 000000000000..ac39a71819ae --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/operation_value_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationValuePaged(Paged): + """ + A paging container for iterating over a list of :class:`OperationValue ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OperationValue]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationValuePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/operation_value_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/operation_value_py3.py new file mode 100644 index 000000000000..55bceaa75439 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/operation_value_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationValue(Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_profile.py index e905f193466c..d5560a1f8799 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_profile.py @@ -15,9 +15,12 @@ class OrchestratorProfile(Model): """Contains information about orchestrator. - :param orchestrator_type: Orchestrator type. + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Required. Orchestrator type. :type orchestrator_type: str - :param orchestrator_version: Orchestrator version (major, minor, patch). + :param orchestrator_version: Required. Orchestrator version (major, minor, + patch). :type orchestrator_version: str """ @@ -31,7 +34,7 @@ class OrchestratorProfile(Model): 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, } - def __init__(self, orchestrator_type, orchestrator_version): - super(OrchestratorProfile, self).__init__() - self.orchestrator_type = orchestrator_type - self.orchestrator_version = orchestrator_version + def __init__(self, **kwargs): + super(OrchestratorProfile, self).__init__(**kwargs) + self.orchestrator_type = kwargs.get('orchestrator_type', None) + self.orchestrator_version = kwargs.get('orchestrator_version', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_profile_py3.py new file mode 100644 index 000000000000..f16e84a1fe3c --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_profile_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OrchestratorProfile(Model): + """Contains information about orchestrator. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Required. Orchestrator type. + :type orchestrator_type: str + :param orchestrator_version: Required. Orchestrator version (major, minor, + patch). + :type orchestrator_version: str + """ + + _validation = { + 'orchestrator_type': {'required': True}, + 'orchestrator_version': {'required': True}, + } + + _attribute_map = { + 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + } + + def __init__(self, *, orchestrator_type: str, orchestrator_version: str, **kwargs) -> None: + super(OrchestratorProfile, self).__init__(**kwargs) + self.orchestrator_type = orchestrator_type + self.orchestrator_version = orchestrator_version diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_version_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_version_profile.py index b3ccf20bebd1..a906f913f69f 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_version_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_version_profile.py @@ -15,13 +15,17 @@ class OrchestratorVersionProfile(Model): """The profile of an orchestrator and its available versions. - :param orchestrator_type: Orchestrator type. + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Required. Orchestrator type. :type orchestrator_type: str - :param orchestrator_version: Orchestrator version (major, minor, patch). + :param orchestrator_version: Required. Orchestrator version (major, minor, + patch). :type orchestrator_version: str - :param default: Installed by default if version is not specified. + :param default: Required. Installed by default if version is not + specified. :type default: bool - :param upgrades: The list of available upgrade versions. + :param upgrades: Required. The list of available upgrade versions. :type upgrades: list[~azure.mgmt.containerservice.models.OrchestratorProfile] """ @@ -40,9 +44,9 @@ class OrchestratorVersionProfile(Model): 'upgrades': {'key': 'upgrades', 'type': '[OrchestratorProfile]'}, } - def __init__(self, orchestrator_type, orchestrator_version, default, upgrades): - super(OrchestratorVersionProfile, self).__init__() - self.orchestrator_type = orchestrator_type - self.orchestrator_version = orchestrator_version - self.default = default - self.upgrades = upgrades + def __init__(self, **kwargs): + super(OrchestratorVersionProfile, self).__init__(**kwargs) + self.orchestrator_type = kwargs.get('orchestrator_type', None) + self.orchestrator_version = kwargs.get('orchestrator_version', None) + self.default = kwargs.get('default', None) + self.upgrades = kwargs.get('upgrades', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_version_profile_list_result.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_version_profile_list_result.py index 4e7f4b44ea61..27c2a65798ae 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_version_profile_list_result.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_version_profile_list_result.py @@ -18,13 +18,15 @@ class OrchestratorVersionProfileListResult(Model): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Id of the orchestrator version profile list result. :vartype id: str :ivar name: Name of the orchestrator version profile list result. :vartype name: str :ivar type: Type of the orchestrator version profile list result. :vartype type: str - :param orchestrators: List of orchestrator version profiles. + :param orchestrators: Required. List of orchestrator version profiles. :type orchestrators: list[~azure.mgmt.containerservice.models.OrchestratorVersionProfile] """ @@ -43,9 +45,9 @@ class OrchestratorVersionProfileListResult(Model): 'orchestrators': {'key': 'properties.orchestrators', 'type': '[OrchestratorVersionProfile]'}, } - def __init__(self, orchestrators): - super(OrchestratorVersionProfileListResult, self).__init__() + def __init__(self, **kwargs): + super(OrchestratorVersionProfileListResult, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.orchestrators = orchestrators + self.orchestrators = kwargs.get('orchestrators', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_version_profile_list_result_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_version_profile_list_result_py3.py new file mode 100644 index 000000000000..b5bd30a5f546 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_version_profile_list_result_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OrchestratorVersionProfileListResult(Model): + """The list of versions for supported orchestrators. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Id of the orchestrator version profile list result. + :vartype id: str + :ivar name: Name of the orchestrator version profile list result. + :vartype name: str + :ivar type: Type of the orchestrator version profile list result. + :vartype type: str + :param orchestrators: Required. List of orchestrator version profiles. + :type orchestrators: + list[~azure.mgmt.containerservice.models.OrchestratorVersionProfile] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'orchestrators': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'orchestrators': {'key': 'properties.orchestrators', 'type': '[OrchestratorVersionProfile]'}, + } + + def __init__(self, *, orchestrators, **kwargs) -> None: + super(OrchestratorVersionProfileListResult, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.orchestrators = orchestrators diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_version_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_version_profile_py3.py new file mode 100644 index 000000000000..c7bf212170a8 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/orchestrator_version_profile_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OrchestratorVersionProfile(Model): + """The profile of an orchestrator and its available versions. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Required. Orchestrator type. + :type orchestrator_type: str + :param orchestrator_version: Required. Orchestrator version (major, minor, + patch). + :type orchestrator_version: str + :param default: Required. Installed by default if version is not + specified. + :type default: bool + :param upgrades: Required. The list of available upgrade versions. + :type upgrades: + list[~azure.mgmt.containerservice.models.OrchestratorProfile] + """ + + _validation = { + 'orchestrator_type': {'required': True}, + 'orchestrator_version': {'required': True}, + 'default': {'required': True}, + 'upgrades': {'required': True}, + } + + _attribute_map = { + 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'default': {'key': 'default', 'type': 'bool'}, + 'upgrades': {'key': 'upgrades', 'type': '[OrchestratorProfile]'}, + } + + def __init__(self, *, orchestrator_type: str, orchestrator_version: str, default: bool, upgrades, **kwargs) -> None: + super(OrchestratorVersionProfile, self).__init__(**kwargs) + self.orchestrator_type = orchestrator_type + self.orchestrator_version = orchestrator_version + self.default = default + self.upgrades = upgrades diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/resource.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/resource.py index 10269b591c68..5dd7d481c685 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/resource.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/resource.py @@ -18,13 +18,15 @@ class Resource(Model): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Resource Id :vartype id: str :ivar name: Resource name :vartype name: str :ivar type: Resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags :type tags: dict[str, str] @@ -45,10 +47,10 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, location, tags=None): - super(Resource, self).__init__() + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = location - self.tags = tags + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/resource_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/resource_py3.py new file mode 100644 index 000000000000..2f3702caf609 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/resource_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/__init__.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/__init__.py index 597836f668a8..551547c5317b 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/__init__.py @@ -10,9 +10,11 @@ # -------------------------------------------------------------------------- from .container_services_operations import ContainerServicesOperations +from .operations import Operations from .managed_clusters_operations import ManagedClustersOperations __all__ = [ 'ContainerServicesOperations', + 'Operations', 'ManagedClustersOperations', ] diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/container_services_operations.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/container_services_operations.py index 890c01a19637..9901518494b7 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/container_services_operations.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/container_services_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -24,7 +24,7 @@ class ContainerServicesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. """ models = models @@ -62,7 +62,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -107,6 +107,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices'} def _create_or_update_initial( @@ -114,7 +115,7 @@ def _create_or_update_initial( api_version = "2017-07-01" # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), @@ -165,7 +166,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, container_service_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, container_service_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a container service. Creates or updates a container service with the specified configuration @@ -180,13 +181,16 @@ def create_or_update( Container Service operation. :type parameters: ~azure.mgmt.containerservice.models.ContainerService :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns - ContainerService or ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ContainerService or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.models.ContainerService] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.models.ContainerService]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( @@ -197,30 +201,8 @@ def create_or_update( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - deserialized = self._deserialize('ContainerService', response) if raw: @@ -229,12 +211,14 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} def get( self, resource_group_name, container_service_name, custom_headers=None, raw=False, **operation_config): @@ -263,7 +247,7 @@ def get( api_version = "2017-07-01" # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), @@ -304,6 +288,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} def _delete_initial( @@ -311,7 +296,7 @@ def _delete_initial( api_version = "2017-07-01" # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), @@ -347,7 +332,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, container_service_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, container_service_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes the specified container service. Deletes the specified container service in the specified subscription @@ -363,12 +348,14 @@ def delete( the specified subscription and resource group. :type container_service_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -378,40 +365,20 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -440,7 +407,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -486,6 +453,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices'} def list_orchestrators( self, location, resource_type=None, custom_headers=None, raw=False, **operation_config): @@ -515,7 +483,7 @@ def list_orchestrators( api_version = "2017-09-30" # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators' + url = self.list_orchestrators.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'location': self._serialize.url("location", location, 'str') @@ -557,3 +525,4 @@ def list_orchestrators( return client_raw_response return deserialized + list_orchestrators.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators'} diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py index 867de535c22a..d7b2d3213a34 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -24,8 +24,8 @@ class ManagedClustersOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-08-31". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-03-31". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-08-31" + self.api_version = "2018-03-31" self.config = config @@ -60,7 +60,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -105,6 +105,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -130,7 +131,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -176,6 +177,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} def get_upgrade_profile( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): @@ -200,7 +202,7 @@ def get_upgrade_profile( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default' + url = self.get_upgrade_profile.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -241,10 +243,11 @@ def get_upgrade_profile( return client_raw_response return deserialized + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - def get_access_profiles( + def get_access_profile( self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets access profile of a managed cluster. + """Gets an access profile of a managed cluster. Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and name. @@ -268,7 +271,7 @@ def get_access_profiles( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}' + url = self.get_access_profile.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -292,7 +295,7 @@ def get_access_profiles( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) + request = self._client.post(url, query_parameters) response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: @@ -310,6 +313,7 @@ def get_access_profiles( return client_raw_response return deserialized + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} def get( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): @@ -333,7 +337,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -374,12 +378,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} def _create_or_update_initial( self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -428,7 +433,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a managed cluster. Creates or updates a managed cluster with the specified configuration @@ -442,13 +447,16 @@ def create_or_update( Managed Cluster operation. :type parameters: ~azure.mgmt.containerservice.models.ManagedCluster :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns - ManagedCluster or ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ManagedCluster or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.models.ManagedCluster] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.models.ManagedCluster]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( @@ -459,30 +467,8 @@ def create_or_update( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - deserialized = self._deserialize('ManagedCluster', response) if raw: @@ -491,18 +477,20 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} def _delete_initial( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -538,7 +526,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes a managed cluster. Deletes the managed cluster with a specified resource group and name. @@ -548,12 +536,14 @@ def delete( :param resource_name: The name of the managed cluster resource. :type resource_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -563,37 +553,17 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/operations.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/operations.py new file mode 100644 index 000000000000..83337ae0311b --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/operations.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-03-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-03-31" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of compute operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of OperationValue + :rtype: + ~azure.mgmt.containerservice.models.OperationValuePaged[~azure.mgmt.containerservice.models.OperationValue] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/version.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/version.py index fc4db3937e08..20cee28211d4 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/version.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "3.0.1" +VERSION = "4.0.0" diff --git a/azure-mgmt-containerservice/build.json b/azure-mgmt-containerservice/build.json deleted file mode 100644 index 4bac75b7e46d..000000000000 --- a/azure-mgmt-containerservice/build.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "autorest": [ - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest-core", - "version": "2.0.4168", - "engines": { - "node": ">=7.10.0" - }, - "dependencies": {}, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/async-io": "~1.0.22", - "@microsoft.azure/extension": "~1.2.12", - "@types/commonmark": "^0.27.0", - "@types/jsonpath": "^0.1.29", - "@types/node": "^8.0.28", - "@types/pify": "0.0.28", - "@types/source-map": "^0.5.0", - "@types/yargs": "^8.0.2", - "commonmark": "^0.27.0", - "file-url": "^2.0.2", - "get-uri": "^2.0.0", - "jsonpath": "^0.2.11", - "linq-es2015": "^2.4.25", - "mocha": "3.4.2", - "mocha-typescript": "1.1.5", - "pify": "^3.0.0", - "safe-eval": "^0.3.0", - "shx": "^0.2.2", - "source-map": "^0.5.6", - "source-map-support": "^0.4.15", - "strip-bom": "^3.0.0", - "typescript": "2.5.3", - "untildify": "^3.0.2", - "urijs": "^1.18.10", - "vscode-jsonrpc": "^3.3.1", - "yaml-ast-parser": "https://github.com/olydis/yaml-ast-parser/releases/download/0.0.34/yaml-ast-parser-0.0.34.tgz", - "yargs": "^8.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_shasum": "33813111fc9bfa488bd600fbba48bc53cc9182c7", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest-core@2.0.4168", - "_from": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_requested": { - "type": "directory", - "where": "D:\\VSProjects\\swagger-to-sdk", - "raw": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest-core@2.0.4168\\node_modules\\@microsoft.azure\\autorest-core", - "rawSpec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest-core@2.0.4168\\node_modules\\@microsoft.azure\\autorest-core", - "saveSpec": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "fetchSpec": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" - }, - "_spec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest-core@2.0.4168\\node_modules\\@microsoft.azure\\autorest-core", - "_where": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest-core@2.0.4168\\node_modules\\@microsoft.azure\\autorest-core" - }, - "extensionManager": { - "installationPath": "C:\\Users\\lmazuel\\.autorest", - "dotnetPath": "C:\\Users\\lmazuel\\.dotnet" - }, - "installationPath": "C:\\Users\\lmazuel\\.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.go", - "version": "2.0.24", - "dependencies": { - "dotnet-2.0.0": "^1.1.0" - }, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/autorest.testserver": "^1.9.0", - "autorest": "^2.0.0", - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.1.1", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.go@2.0.24/node_modules/@microsoft.azure/autorest.go", - "_shasum": "409a4a9a21708a7aea58fadb0b064ea487a90fea", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.go@2.0.24", - "_from": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.go@2.0.24/node_modules/@microsoft.azure/autorest.go", - "_requested": { - "type": "directory", - "where": "D:\\VSProjects\\swagger-to-sdk", - "raw": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.go@2.0.24\\node_modules\\@microsoft.azure\\autorest.go", - "rawSpec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.go@2.0.24\\node_modules\\@microsoft.azure\\autorest.go", - "saveSpec": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.go@2.0.24/node_modules/@microsoft.azure/autorest.go", - "fetchSpec": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.go@2.0.24/node_modules/@microsoft.azure/autorest.go" - }, - "_spec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.go@2.0.24\\node_modules\\@microsoft.azure\\autorest.go", - "_where": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.go@2.0.24\\node_modules\\@microsoft.azure\\autorest.go" - }, - "extensionManager": { - "installationPath": "C:\\Users\\lmazuel\\.autorest", - "dotnetPath": "C:\\Users\\lmazuel\\.dotnet" - }, - "installationPath": "C:\\Users\\lmazuel\\.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.0.18", - "dependencies": { - "dotnet-2.0.0": "^1.1.0" - }, - "optionalDependencies": {}, - "devDependencies": { - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.1.1", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.modeler@2.0.18/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "b8e853f83b99b2a37ad534cb8463da5de4b11418", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.0.18", - "_from": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.modeler@2.0.18/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "D:\\VSProjects\\swagger-to-sdk", - "raw": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.modeler@2.0.18\\node_modules\\@microsoft.azure\\autorest.modeler", - "rawSpec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.modeler@2.0.18\\node_modules\\@microsoft.azure\\autorest.modeler", - "saveSpec": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.modeler@2.0.18/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.modeler@2.0.18/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.modeler@2.0.18\\node_modules\\@microsoft.azure\\autorest.modeler", - "_where": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.modeler@2.0.18\\node_modules\\@microsoft.azure\\autorest.modeler" - }, - "extensionManager": { - "installationPath": "C:\\Users\\lmazuel\\.autorest", - "dotnetPath": "C:\\Users\\lmazuel\\.dotnet" - }, - "installationPath": "C:\\Users\\lmazuel\\.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.python", - "version": "2.0.13", - "dependencies": { - "dotnet-2.0.0": "^1.1.0" - }, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/autorest.testserver": "^1.9.0", - "autorest": "^2.0.0", - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.1.1", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.python@2.0.13/node_modules/@microsoft.azure/autorest.python", - "_shasum": "ddbbf3e3f1f90ae4132b687cfa8450425ab4ffcd", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.python@2.0.13", - "_from": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.python@2.0.13/node_modules/@microsoft.azure/autorest.python", - "_requested": { - "type": "directory", - "where": "D:\\VSProjects\\swagger-to-sdk", - "raw": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.python@2.0.13\\node_modules\\@microsoft.azure\\autorest.python", - "rawSpec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.python@2.0.13\\node_modules\\@microsoft.azure\\autorest.python", - "saveSpec": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.python@2.0.13/node_modules/@microsoft.azure/autorest.python", - "fetchSpec": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.python@2.0.13/node_modules/@microsoft.azure/autorest.python" - }, - "_spec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.python@2.0.13\\node_modules\\@microsoft.azure\\autorest.python", - "_where": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.python@2.0.13\\node_modules\\@microsoft.azure\\autorest.python" - }, - "extensionManager": { - "installationPath": "C:\\Users\\lmazuel\\.autorest", - "dotnetPath": "C:\\Users\\lmazuel\\.dotnet" - }, - "installationPath": "C:\\Users\\lmazuel\\.autorest" - } - ], - "autorest_bootstrap": { - "dependencies": { - "autorest": { - "version": "2.0.4166", - "from": "autorest@latest", - "resolved": "https://registry.npmjs.org/autorest/-/autorest-2.0.4166.tgz" - } - } - } -} diff --git a/azure-mgmt-containerservice/sdk_packaging.toml b/azure-mgmt-containerservice/sdk_packaging.toml new file mode 100644 index 000000000000..d156cea3aafe --- /dev/null +++ b/azure-mgmt-containerservice/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-containerservice" +package_pprint_name = "Container Service Management" +package_doc_id = "containerservice" +is_stable = true diff --git a/azure-mgmt-containerservice/setup.py b/azure-mgmt-containerservice/setup.py index b763953b189a..185d6e666a0e 100644 --- a/azure-mgmt-containerservice/setup.py +++ b/azure-mgmt-containerservice/setup.py @@ -19,7 +19,7 @@ # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-containerservice" -PACKAGE_PPRINT_NAME = "Container Service" +PACKAGE_PPRINT_NAME = "Container Service Management" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') @@ -64,12 +64,11 @@ author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', @@ -78,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/data_lake_analytics_account_management_client.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/data_lake_analytics_account_management_client.py index b83ca7c8a01b..150aa8a9a928 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/data_lake_analytics_account_management_client.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/data_lake_analytics_account_management_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -57,7 +57,7 @@ def __init__( self.subscription_id = subscription_id -class DataLakeAnalyticsAccountManagementClient(object): +class DataLakeAnalyticsAccountManagementClient(SDKClient): """Creates an Azure Data Lake Analytics account management client. :ivar config: Configuration for client. @@ -92,7 +92,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = DataLakeAnalyticsAccountManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(DataLakeAnalyticsAccountManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '2016-11-01' diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/__init__.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/__init__.py index af6d42be3912..3725ed5f39e1 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/__init__.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/__init__.py @@ -9,39 +9,74 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource -from .sub_resource import SubResource -from .data_lake_store_account_information import DataLakeStoreAccountInformation -from .storage_account_information import StorageAccountInformation -from .compute_policy import ComputePolicy -from .firewall_rule import FirewallRule -from .data_lake_analytics_account import DataLakeAnalyticsAccount -from .data_lake_analytics_account_basic import DataLakeAnalyticsAccountBasic -from .storage_container import StorageContainer -from .sas_token_information import SasTokenInformation -from .operation_display import OperationDisplay -from .operation import Operation -from .operation_list_result import OperationListResult -from .capability_information import CapabilityInformation -from .name_availability_information import NameAvailabilityInformation -from .add_data_lake_store_with_account_parameters import AddDataLakeStoreWithAccountParameters -from .add_storage_account_with_account_parameters import AddStorageAccountWithAccountParameters -from .create_compute_policy_with_account_parameters import CreateComputePolicyWithAccountParameters -from .create_firewall_rule_with_account_parameters import CreateFirewallRuleWithAccountParameters -from .create_data_lake_analytics_account_parameters import CreateDataLakeAnalyticsAccountParameters -from .update_data_lake_store_with_account_parameters import UpdateDataLakeStoreWithAccountParameters -from .update_storage_account_with_account_parameters import UpdateStorageAccountWithAccountParameters -from .update_compute_policy_with_account_parameters import UpdateComputePolicyWithAccountParameters -from .update_firewall_rule_with_account_parameters import UpdateFirewallRuleWithAccountParameters -from .update_data_lake_analytics_account_parameters import UpdateDataLakeAnalyticsAccountParameters -from .add_data_lake_store_parameters import AddDataLakeStoreParameters -from .add_storage_account_parameters import AddStorageAccountParameters -from .update_storage_account_parameters import UpdateStorageAccountParameters -from .create_or_update_compute_policy_parameters import CreateOrUpdateComputePolicyParameters -from .update_compute_policy_parameters import UpdateComputePolicyParameters -from .create_or_update_firewall_rule_parameters import CreateOrUpdateFirewallRuleParameters -from .update_firewall_rule_parameters import UpdateFirewallRuleParameters -from .check_name_availability_parameters import CheckNameAvailabilityParameters +try: + from .resource_py3 import Resource + from .sub_resource_py3 import SubResource + from .data_lake_store_account_information_py3 import DataLakeStoreAccountInformation + from .storage_account_information_py3 import StorageAccountInformation + from .compute_policy_py3 import ComputePolicy + from .firewall_rule_py3 import FirewallRule + from .data_lake_analytics_account_py3 import DataLakeAnalyticsAccount + from .data_lake_analytics_account_basic_py3 import DataLakeAnalyticsAccountBasic + from .storage_container_py3 import StorageContainer + from .sas_token_information_py3 import SasTokenInformation + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .operation_list_result_py3 import OperationListResult + from .capability_information_py3 import CapabilityInformation + from .name_availability_information_py3 import NameAvailabilityInformation + from .add_data_lake_store_with_account_parameters_py3 import AddDataLakeStoreWithAccountParameters + from .add_storage_account_with_account_parameters_py3 import AddStorageAccountWithAccountParameters + from .create_compute_policy_with_account_parameters_py3 import CreateComputePolicyWithAccountParameters + from .create_firewall_rule_with_account_parameters_py3 import CreateFirewallRuleWithAccountParameters + from .create_data_lake_analytics_account_parameters_py3 import CreateDataLakeAnalyticsAccountParameters + from .update_data_lake_store_with_account_parameters_py3 import UpdateDataLakeStoreWithAccountParameters + from .update_storage_account_with_account_parameters_py3 import UpdateStorageAccountWithAccountParameters + from .update_compute_policy_with_account_parameters_py3 import UpdateComputePolicyWithAccountParameters + from .update_firewall_rule_with_account_parameters_py3 import UpdateFirewallRuleWithAccountParameters + from .update_data_lake_analytics_account_parameters_py3 import UpdateDataLakeAnalyticsAccountParameters + from .add_data_lake_store_parameters_py3 import AddDataLakeStoreParameters + from .add_storage_account_parameters_py3 import AddStorageAccountParameters + from .update_storage_account_parameters_py3 import UpdateStorageAccountParameters + from .create_or_update_compute_policy_parameters_py3 import CreateOrUpdateComputePolicyParameters + from .update_compute_policy_parameters_py3 import UpdateComputePolicyParameters + from .create_or_update_firewall_rule_parameters_py3 import CreateOrUpdateFirewallRuleParameters + from .update_firewall_rule_parameters_py3 import UpdateFirewallRuleParameters + from .check_name_availability_parameters_py3 import CheckNameAvailabilityParameters +except (SyntaxError, ImportError): + from .resource import Resource + from .sub_resource import SubResource + from .data_lake_store_account_information import DataLakeStoreAccountInformation + from .storage_account_information import StorageAccountInformation + from .compute_policy import ComputePolicy + from .firewall_rule import FirewallRule + from .data_lake_analytics_account import DataLakeAnalyticsAccount + from .data_lake_analytics_account_basic import DataLakeAnalyticsAccountBasic + from .storage_container import StorageContainer + from .sas_token_information import SasTokenInformation + from .operation_display import OperationDisplay + from .operation import Operation + from .operation_list_result import OperationListResult + from .capability_information import CapabilityInformation + from .name_availability_information import NameAvailabilityInformation + from .add_data_lake_store_with_account_parameters import AddDataLakeStoreWithAccountParameters + from .add_storage_account_with_account_parameters import AddStorageAccountWithAccountParameters + from .create_compute_policy_with_account_parameters import CreateComputePolicyWithAccountParameters + from .create_firewall_rule_with_account_parameters import CreateFirewallRuleWithAccountParameters + from .create_data_lake_analytics_account_parameters import CreateDataLakeAnalyticsAccountParameters + from .update_data_lake_store_with_account_parameters import UpdateDataLakeStoreWithAccountParameters + from .update_storage_account_with_account_parameters import UpdateStorageAccountWithAccountParameters + from .update_compute_policy_with_account_parameters import UpdateComputePolicyWithAccountParameters + from .update_firewall_rule_with_account_parameters import UpdateFirewallRuleWithAccountParameters + from .update_data_lake_analytics_account_parameters import UpdateDataLakeAnalyticsAccountParameters + from .add_data_lake_store_parameters import AddDataLakeStoreParameters + from .add_storage_account_parameters import AddStorageAccountParameters + from .update_storage_account_parameters import UpdateStorageAccountParameters + from .create_or_update_compute_policy_parameters import CreateOrUpdateComputePolicyParameters + from .update_compute_policy_parameters import UpdateComputePolicyParameters + from .create_or_update_firewall_rule_parameters import CreateOrUpdateFirewallRuleParameters + from .update_firewall_rule_parameters import UpdateFirewallRuleParameters + from .check_name_availability_parameters import CheckNameAvailabilityParameters from .data_lake_analytics_account_basic_paged import DataLakeAnalyticsAccountBasicPaged from .data_lake_store_account_information_paged import DataLakeStoreAccountInformationPaged from .storage_account_information_paged import StorageAccountInformationPaged diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_data_lake_store_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_data_lake_store_parameters.py index d24e19ef4d44..6882e99a58e5 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_data_lake_store_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_data_lake_store_parameters.py @@ -23,6 +23,6 @@ class AddDataLakeStoreParameters(Model): 'suffix': {'key': 'properties.suffix', 'type': 'str'}, } - def __init__(self, suffix=None): - super(AddDataLakeStoreParameters, self).__init__() - self.suffix = suffix + def __init__(self, **kwargs): + super(AddDataLakeStoreParameters, self).__init__(**kwargs) + self.suffix = kwargs.get('suffix', None) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_data_lake_store_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_data_lake_store_parameters_py3.py new file mode 100644 index 000000000000..c95b45fdbe8d --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_data_lake_store_parameters_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AddDataLakeStoreParameters(Model): + """The parameters used to add a new Data Lake Store account. + + :param suffix: The optional suffix for the Data Lake Store account. + :type suffix: str + """ + + _attribute_map = { + 'suffix': {'key': 'properties.suffix', 'type': 'str'}, + } + + def __init__(self, *, suffix: str=None, **kwargs) -> None: + super(AddDataLakeStoreParameters, self).__init__(**kwargs) + self.suffix = suffix diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_data_lake_store_with_account_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_data_lake_store_with_account_parameters.py index 663c62954217..b8267f53dd68 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_data_lake_store_with_account_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_data_lake_store_with_account_parameters.py @@ -16,7 +16,10 @@ class AddDataLakeStoreWithAccountParameters(Model): """The parameters used to add a new Data Lake Store account while creating a new Data Lake Analytics account. - :param name: The unique name of the Data Lake Store account to add. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the Data Lake Store account to + add. :type name: str :param suffix: The optional suffix for the Data Lake Store account. :type suffix: str @@ -31,7 +34,7 @@ class AddDataLakeStoreWithAccountParameters(Model): 'suffix': {'key': 'properties.suffix', 'type': 'str'}, } - def __init__(self, name, suffix=None): - super(AddDataLakeStoreWithAccountParameters, self).__init__() - self.name = name - self.suffix = suffix + def __init__(self, **kwargs): + super(AddDataLakeStoreWithAccountParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.suffix = kwargs.get('suffix', None) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_data_lake_store_with_account_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_data_lake_store_with_account_parameters_py3.py new file mode 100644 index 000000000000..01b820d399b2 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_data_lake_store_with_account_parameters_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AddDataLakeStoreWithAccountParameters(Model): + """The parameters used to add a new Data Lake Store account while creating a + new Data Lake Analytics account. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the Data Lake Store account to + add. + :type name: str + :param suffix: The optional suffix for the Data Lake Store account. + :type suffix: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'suffix': {'key': 'properties.suffix', 'type': 'str'}, + } + + def __init__(self, *, name: str, suffix: str=None, **kwargs) -> None: + super(AddDataLakeStoreWithAccountParameters, self).__init__(**kwargs) + self.name = name + self.suffix = suffix diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_storage_account_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_storage_account_parameters.py index f661c768e6db..2c8886dbaa1c 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_storage_account_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_storage_account_parameters.py @@ -15,8 +15,10 @@ class AddStorageAccountParameters(Model): """The parameters used to add a new Azure Storage account. - :param access_key: The access key associated with this Azure Storage - account that will be used to connect to it. + All required parameters must be populated in order to send to Azure. + + :param access_key: Required. The access key associated with this Azure + Storage account that will be used to connect to it. :type access_key: str :param suffix: The optional suffix for the storage account. :type suffix: str @@ -31,7 +33,7 @@ class AddStorageAccountParameters(Model): 'suffix': {'key': 'properties.suffix', 'type': 'str'}, } - def __init__(self, access_key, suffix=None): - super(AddStorageAccountParameters, self).__init__() - self.access_key = access_key - self.suffix = suffix + def __init__(self, **kwargs): + super(AddStorageAccountParameters, self).__init__(**kwargs) + self.access_key = kwargs.get('access_key', None) + self.suffix = kwargs.get('suffix', None) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_storage_account_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_storage_account_parameters_py3.py new file mode 100644 index 000000000000..185416e0ceb3 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_storage_account_parameters_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AddStorageAccountParameters(Model): + """The parameters used to add a new Azure Storage account. + + All required parameters must be populated in order to send to Azure. + + :param access_key: Required. The access key associated with this Azure + Storage account that will be used to connect to it. + :type access_key: str + :param suffix: The optional suffix for the storage account. + :type suffix: str + """ + + _validation = { + 'access_key': {'required': True}, + } + + _attribute_map = { + 'access_key': {'key': 'properties.accessKey', 'type': 'str'}, + 'suffix': {'key': 'properties.suffix', 'type': 'str'}, + } + + def __init__(self, *, access_key: str, suffix: str=None, **kwargs) -> None: + super(AddStorageAccountParameters, self).__init__(**kwargs) + self.access_key = access_key + self.suffix = suffix diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_storage_account_with_account_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_storage_account_with_account_parameters.py index f6d8f3f46516..be3defceffb7 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_storage_account_with_account_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_storage_account_with_account_parameters.py @@ -16,10 +16,13 @@ class AddStorageAccountWithAccountParameters(Model): """The parameters used to add a new Azure Storage account while creating a new Data Lake Analytics account. - :param name: The unique name of the Azure Storage account to add. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the Azure Storage account to + add. :type name: str - :param access_key: The access key associated with this Azure Storage - account that will be used to connect to it. + :param access_key: Required. The access key associated with this Azure + Storage account that will be used to connect to it. :type access_key: str :param suffix: The optional suffix for the storage account. :type suffix: str @@ -36,8 +39,8 @@ class AddStorageAccountWithAccountParameters(Model): 'suffix': {'key': 'properties.suffix', 'type': 'str'}, } - def __init__(self, name, access_key, suffix=None): - super(AddStorageAccountWithAccountParameters, self).__init__() - self.name = name - self.access_key = access_key - self.suffix = suffix + def __init__(self, **kwargs): + super(AddStorageAccountWithAccountParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.access_key = kwargs.get('access_key', None) + self.suffix = kwargs.get('suffix', None) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_storage_account_with_account_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_storage_account_with_account_parameters_py3.py new file mode 100644 index 000000000000..508615a27192 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_storage_account_with_account_parameters_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AddStorageAccountWithAccountParameters(Model): + """The parameters used to add a new Azure Storage account while creating a new + Data Lake Analytics account. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the Azure Storage account to + add. + :type name: str + :param access_key: Required. The access key associated with this Azure + Storage account that will be used to connect to it. + :type access_key: str + :param suffix: The optional suffix for the storage account. + :type suffix: str + """ + + _validation = { + 'name': {'required': True}, + 'access_key': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'access_key': {'key': 'properties.accessKey', 'type': 'str'}, + 'suffix': {'key': 'properties.suffix', 'type': 'str'}, + } + + def __init__(self, *, name: str, access_key: str, suffix: str=None, **kwargs) -> None: + super(AddStorageAccountWithAccountParameters, self).__init__(**kwargs) + self.name = name + self.access_key = access_key + self.suffix = suffix diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/capability_information.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/capability_information.py index 5d9aff0c8bd0..a96b40c814cc 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/capability_information.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/capability_information.py @@ -52,8 +52,8 @@ class CapabilityInformation(Model): 'migration_state': {'key': 'migrationState', 'type': 'bool'}, } - def __init__(self): - super(CapabilityInformation, self).__init__() + def __init__(self, **kwargs): + super(CapabilityInformation, self).__init__(**kwargs) self.subscription_id = None self.state = None self.max_account_count = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/capability_information_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/capability_information_py3.py new file mode 100644 index 000000000000..62695339a1d0 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/capability_information_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CapabilityInformation(Model): + """Subscription-level properties and limits for Data Lake Analytics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subscription_id: The subscription credentials that uniquely + identifies the subscription. + :vartype subscription_id: str + :ivar state: The subscription state. Possible values include: + 'Registered', 'Suspended', 'Deleted', 'Unregistered', 'Warned' + :vartype state: str or + ~azure.mgmt.datalake.analytics.account.models.SubscriptionState + :ivar max_account_count: The maximum supported number of accounts under + this subscription. + :vartype max_account_count: int + :ivar account_count: The current number of accounts under this + subscription. + :vartype account_count: int + :ivar migration_state: The Boolean value of true or false to indicate the + maintenance state. + :vartype migration_state: bool + """ + + _validation = { + 'subscription_id': {'readonly': True}, + 'state': {'readonly': True}, + 'max_account_count': {'readonly': True}, + 'account_count': {'readonly': True}, + 'migration_state': {'readonly': True}, + } + + _attribute_map = { + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'max_account_count': {'key': 'maxAccountCount', 'type': 'int'}, + 'account_count': {'key': 'accountCount', 'type': 'int'}, + 'migration_state': {'key': 'migrationState', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(CapabilityInformation, self).__init__(**kwargs) + self.subscription_id = None + self.state = None + self.max_account_count = None + self.account_count = None + self.migration_state = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/check_name_availability_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/check_name_availability_parameters.py index 939a7f6639ad..d7fe292fb2a7 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/check_name_availability_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/check_name_availability_parameters.py @@ -18,11 +18,14 @@ class CheckNameAvailabilityParameters(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The Data Lake Analytics name to check availability for. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The Data Lake Analytics name to check availability + for. :type name: str - :ivar type: The resource type. Note: This should not be set by the user, - as the constant value is Microsoft.DataLakeAnalytics/accounts. Default - value: "Microsoft.DataLakeAnalytics/accounts" . + :ivar type: Required. The resource type. Note: This should not be set by + the user, as the constant value is Microsoft.DataLakeAnalytics/accounts. + Default value: "Microsoft.DataLakeAnalytics/accounts" . :vartype type: str """ @@ -38,6 +41,6 @@ class CheckNameAvailabilityParameters(Model): type = "Microsoft.DataLakeAnalytics/accounts" - def __init__(self, name): - super(CheckNameAvailabilityParameters, self).__init__() - self.name = name + def __init__(self, **kwargs): + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/check_name_availability_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/check_name_availability_parameters_py3.py new file mode 100644 index 000000000000..9e6b1aa362c2 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/check_name_availability_parameters_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityParameters(Model): + """Data Lake Analytics account name availability check parameters. + + 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 name: Required. The Data Lake Analytics name to check availability + for. + :type name: str + :ivar type: Required. The resource type. Note: This should not be set by + the user, as the constant value is Microsoft.DataLakeAnalytics/accounts. + Default value: "Microsoft.DataLakeAnalytics/accounts" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.DataLakeAnalytics/accounts" + + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/compute_policy.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/compute_policy.py index a0eb8e29747b..656dc98a2349 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/compute_policy.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/compute_policy.py @@ -59,8 +59,8 @@ class ComputePolicy(SubResource): 'min_priority_per_job': {'key': 'properties.minPriorityPerJob', 'type': 'int'}, } - def __init__(self): - super(ComputePolicy, self).__init__() + def __init__(self, **kwargs): + super(ComputePolicy, self).__init__(**kwargs) self.object_id = None self.object_type = None self.max_degree_of_parallelism_per_job = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/compute_policy_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/compute_policy_py3.py new file mode 100644 index 000000000000..752f4fa08679 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/compute_policy_py3.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_resource_py3 import SubResource + + +class ComputePolicy(SubResource): + """Data Lake Analytics compute policy information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar object_id: The AAD object identifier for the entity to create a + policy for. + :vartype object_id: str + :ivar object_type: The type of AAD object the object identifier refers to. + Possible values include: 'User', 'Group', 'ServicePrincipal' + :vartype object_type: str or + ~azure.mgmt.datalake.analytics.account.models.AADObjectType + :ivar max_degree_of_parallelism_per_job: The maximum degree of parallelism + per job this user can use to submit jobs. + :vartype max_degree_of_parallelism_per_job: int + :ivar min_priority_per_job: The minimum priority per job this user can use + to submit jobs. + :vartype min_priority_per_job: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'object_id': {'readonly': True}, + 'object_type': {'readonly': True}, + 'max_degree_of_parallelism_per_job': {'readonly': True, 'minimum': 1}, + 'min_priority_per_job': {'readonly': True, 'minimum': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'object_type': {'key': 'properties.objectType', 'type': 'str'}, + 'max_degree_of_parallelism_per_job': {'key': 'properties.maxDegreeOfParallelismPerJob', 'type': 'int'}, + 'min_priority_per_job': {'key': 'properties.minPriorityPerJob', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(ComputePolicy, self).__init__(**kwargs) + self.object_id = None + self.object_type = None + self.max_degree_of_parallelism_per_job = None + self.min_priority_per_job = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_compute_policy_with_account_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_compute_policy_with_account_parameters.py index 1242bda03228..e3e390ceefa6 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_compute_policy_with_account_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_compute_policy_with_account_parameters.py @@ -16,13 +16,15 @@ class CreateComputePolicyWithAccountParameters(Model): """The parameters used to create a new compute policy while creating a new Data Lake Analytics account. - :param name: The unique name of the compute policy to create. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the compute policy to create. :type name: str - :param object_id: The AAD object identifier for the entity to create a - policy for. + :param object_id: Required. The AAD object identifier for the entity to + create a policy for. :type object_id: str - :param object_type: The type of AAD object the object identifier refers - to. Possible values include: 'User', 'Group', 'ServicePrincipal' + :param object_type: Required. The type of AAD object the object identifier + refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' :type object_type: str or ~azure.mgmt.datalake.analytics.account.models.AADObjectType :param max_degree_of_parallelism_per_job: The maximum degree of @@ -51,10 +53,10 @@ class CreateComputePolicyWithAccountParameters(Model): 'min_priority_per_job': {'key': 'properties.minPriorityPerJob', 'type': 'int'}, } - def __init__(self, name, object_id, object_type, max_degree_of_parallelism_per_job=None, min_priority_per_job=None): - super(CreateComputePolicyWithAccountParameters, self).__init__() - self.name = name - self.object_id = object_id - self.object_type = object_type - self.max_degree_of_parallelism_per_job = max_degree_of_parallelism_per_job - self.min_priority_per_job = min_priority_per_job + def __init__(self, **kwargs): + super(CreateComputePolicyWithAccountParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.object_id = kwargs.get('object_id', None) + self.object_type = kwargs.get('object_type', None) + self.max_degree_of_parallelism_per_job = kwargs.get('max_degree_of_parallelism_per_job', None) + self.min_priority_per_job = kwargs.get('min_priority_per_job', None) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_compute_policy_with_account_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_compute_policy_with_account_parameters_py3.py new file mode 100644 index 000000000000..84133d2eadf8 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_compute_policy_with_account_parameters_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateComputePolicyWithAccountParameters(Model): + """The parameters used to create a new compute policy while creating a new + Data Lake Analytics account. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the compute policy to create. + :type name: str + :param object_id: Required. The AAD object identifier for the entity to + create a policy for. + :type object_id: str + :param object_type: Required. The type of AAD object the object identifier + refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' + :type object_type: str or + ~azure.mgmt.datalake.analytics.account.models.AADObjectType + :param max_degree_of_parallelism_per_job: The maximum degree of + parallelism per job this user can use to submit jobs. This property, the + min priority per job property, or both must be passed. + :type max_degree_of_parallelism_per_job: int + :param min_priority_per_job: The minimum priority per job this user can + use to submit jobs. This property, the max degree of parallelism per job + property, or both must be passed. + :type min_priority_per_job: int + """ + + _validation = { + 'name': {'required': True}, + 'object_id': {'required': True}, + 'object_type': {'required': True}, + 'max_degree_of_parallelism_per_job': {'minimum': 1}, + 'min_priority_per_job': {'minimum': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'object_type': {'key': 'properties.objectType', 'type': 'str'}, + 'max_degree_of_parallelism_per_job': {'key': 'properties.maxDegreeOfParallelismPerJob', 'type': 'int'}, + 'min_priority_per_job': {'key': 'properties.minPriorityPerJob', 'type': 'int'}, + } + + def __init__(self, *, name: str, object_id: str, object_type, max_degree_of_parallelism_per_job: int=None, min_priority_per_job: int=None, **kwargs) -> None: + super(CreateComputePolicyWithAccountParameters, self).__init__(**kwargs) + self.name = name + self.object_id = object_id + self.object_type = object_type + self.max_degree_of_parallelism_per_job = max_degree_of_parallelism_per_job + self.min_priority_per_job = min_priority_per_job diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_data_lake_analytics_account_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_data_lake_analytics_account_parameters.py index b9ae98d3ec15..2cad53563ba7 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_data_lake_analytics_account_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_data_lake_analytics_account_parameters.py @@ -15,15 +15,17 @@ class CreateDataLakeAnalyticsAccountParameters(Model): """The parameters to use for creating a Data Lake Analytics account. - :param location: The resource location. + All required parameters must be populated in order to send to Azure. + + :param location: Required. The resource location. :type location: str :param tags: The resource tags. :type tags: dict[str, str] - :param default_data_lake_store_account: The default Data Lake Store - account associated with this account. + :param default_data_lake_store_account: Required. The default Data Lake + Store account associated with this account. :type default_data_lake_store_account: str - :param data_lake_store_accounts: The list of Data Lake Store accounts - associated with this account. + :param data_lake_store_accounts: Required. The list of Data Lake Store + accounts associated with this account. :type data_lake_store_accounts: list[~azure.mgmt.datalake.analytics.account.models.AddDataLakeStoreWithAccountParameters] :param storage_accounts: The list of Azure Blob Storage accounts @@ -101,20 +103,20 @@ class CreateDataLakeAnalyticsAccountParameters(Model): 'query_store_retention': {'key': 'properties.queryStoreRetention', 'type': 'int'}, } - def __init__(self, location, default_data_lake_store_account, data_lake_store_accounts, tags=None, storage_accounts=None, compute_policies=None, firewall_rules=None, firewall_state=None, firewall_allow_azure_ips=None, new_tier=None, max_job_count=3, max_degree_of_parallelism=30, max_degree_of_parallelism_per_job=None, min_priority_per_job=None, query_store_retention=30): - super(CreateDataLakeAnalyticsAccountParameters, self).__init__() - self.location = location - self.tags = tags - self.default_data_lake_store_account = default_data_lake_store_account - self.data_lake_store_accounts = data_lake_store_accounts - self.storage_accounts = storage_accounts - self.compute_policies = compute_policies - self.firewall_rules = firewall_rules - self.firewall_state = firewall_state - self.firewall_allow_azure_ips = firewall_allow_azure_ips - self.new_tier = new_tier - self.max_job_count = max_job_count - self.max_degree_of_parallelism = max_degree_of_parallelism - self.max_degree_of_parallelism_per_job = max_degree_of_parallelism_per_job - self.min_priority_per_job = min_priority_per_job - self.query_store_retention = query_store_retention + def __init__(self, **kwargs): + super(CreateDataLakeAnalyticsAccountParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.default_data_lake_store_account = kwargs.get('default_data_lake_store_account', None) + self.data_lake_store_accounts = kwargs.get('data_lake_store_accounts', None) + self.storage_accounts = kwargs.get('storage_accounts', None) + self.compute_policies = kwargs.get('compute_policies', None) + self.firewall_rules = kwargs.get('firewall_rules', None) + self.firewall_state = kwargs.get('firewall_state', None) + self.firewall_allow_azure_ips = kwargs.get('firewall_allow_azure_ips', None) + self.new_tier = kwargs.get('new_tier', None) + self.max_job_count = kwargs.get('max_job_count', 3) + self.max_degree_of_parallelism = kwargs.get('max_degree_of_parallelism', 30) + self.max_degree_of_parallelism_per_job = kwargs.get('max_degree_of_parallelism_per_job', None) + self.min_priority_per_job = kwargs.get('min_priority_per_job', None) + self.query_store_retention = kwargs.get('query_store_retention', 30) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_data_lake_analytics_account_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_data_lake_analytics_account_parameters_py3.py new file mode 100644 index 000000000000..5fdc9496c4c9 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_data_lake_analytics_account_parameters_py3.py @@ -0,0 +1,122 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateDataLakeAnalyticsAccountParameters(Model): + """The parameters to use for creating a Data Lake Analytics account. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param default_data_lake_store_account: Required. The default Data Lake + Store account associated with this account. + :type default_data_lake_store_account: str + :param data_lake_store_accounts: Required. The list of Data Lake Store + accounts associated with this account. + :type data_lake_store_accounts: + list[~azure.mgmt.datalake.analytics.account.models.AddDataLakeStoreWithAccountParameters] + :param storage_accounts: The list of Azure Blob Storage accounts + associated with this account. + :type storage_accounts: + list[~azure.mgmt.datalake.analytics.account.models.AddStorageAccountWithAccountParameters] + :param compute_policies: The list of compute policies associated with this + account. + :type compute_policies: + list[~azure.mgmt.datalake.analytics.account.models.CreateComputePolicyWithAccountParameters] + :param firewall_rules: The list of firewall rules associated with this + account. + :type firewall_rules: + list[~azure.mgmt.datalake.analytics.account.models.CreateFirewallRuleWithAccountParameters] + :param firewall_state: The current state of the IP address firewall for + this account. Possible values include: 'Enabled', 'Disabled' + :type firewall_state: str or + ~azure.mgmt.datalake.analytics.account.models.FirewallState + :param firewall_allow_azure_ips: The current state of allowing or + disallowing IPs originating within Azure through the firewall. If the + firewall is disabled, this is not enforced. Possible values include: + 'Enabled', 'Disabled' + :type firewall_allow_azure_ips: str or + ~azure.mgmt.datalake.analytics.account.models.FirewallAllowAzureIpsState + :param new_tier: The commitment tier for the next month. Possible values + include: 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours', + 'Commitment_1000AUHours', 'Commitment_5000AUHours', + 'Commitment_10000AUHours', 'Commitment_50000AUHours', + 'Commitment_100000AUHours', 'Commitment_500000AUHours' + :type new_tier: str or + ~azure.mgmt.datalake.analytics.account.models.TierType + :param max_job_count: The maximum supported jobs running under the account + at the same time. Default value: 3 . + :type max_job_count: int + :param max_degree_of_parallelism: The maximum supported degree of + parallelism for this account. Default value: 30 . + :type max_degree_of_parallelism: int + :param max_degree_of_parallelism_per_job: The maximum supported degree of + parallelism per job for this account. + :type max_degree_of_parallelism_per_job: int + :param min_priority_per_job: The minimum supported priority per job for + this account. + :type min_priority_per_job: int + :param query_store_retention: The number of days that job metadata is + retained. Default value: 30 . + :type query_store_retention: int + """ + + _validation = { + 'location': {'required': True}, + 'default_data_lake_store_account': {'required': True}, + 'data_lake_store_accounts': {'required': True}, + 'max_job_count': {'minimum': 1}, + 'max_degree_of_parallelism': {'minimum': 1}, + 'max_degree_of_parallelism_per_job': {'minimum': 1}, + 'min_priority_per_job': {'minimum': 1}, + 'query_store_retention': {'maximum': 180, 'minimum': 1}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'default_data_lake_store_account': {'key': 'properties.defaultDataLakeStoreAccount', 'type': 'str'}, + 'data_lake_store_accounts': {'key': 'properties.dataLakeStoreAccounts', 'type': '[AddDataLakeStoreWithAccountParameters]'}, + 'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[AddStorageAccountWithAccountParameters]'}, + 'compute_policies': {'key': 'properties.computePolicies', 'type': '[CreateComputePolicyWithAccountParameters]'}, + 'firewall_rules': {'key': 'properties.firewallRules', 'type': '[CreateFirewallRuleWithAccountParameters]'}, + 'firewall_state': {'key': 'properties.firewallState', 'type': 'FirewallState'}, + 'firewall_allow_azure_ips': {'key': 'properties.firewallAllowAzureIps', 'type': 'FirewallAllowAzureIpsState'}, + 'new_tier': {'key': 'properties.newTier', 'type': 'TierType'}, + 'max_job_count': {'key': 'properties.maxJobCount', 'type': 'int'}, + 'max_degree_of_parallelism': {'key': 'properties.maxDegreeOfParallelism', 'type': 'int'}, + 'max_degree_of_parallelism_per_job': {'key': 'properties.maxDegreeOfParallelismPerJob', 'type': 'int'}, + 'min_priority_per_job': {'key': 'properties.minPriorityPerJob', 'type': 'int'}, + 'query_store_retention': {'key': 'properties.queryStoreRetention', 'type': 'int'}, + } + + def __init__(self, *, location: str, default_data_lake_store_account: str, data_lake_store_accounts, tags=None, storage_accounts=None, compute_policies=None, firewall_rules=None, firewall_state=None, firewall_allow_azure_ips=None, new_tier=None, max_job_count: int=3, max_degree_of_parallelism: int=30, max_degree_of_parallelism_per_job: int=None, min_priority_per_job: int=None, query_store_retention: int=30, **kwargs) -> None: + super(CreateDataLakeAnalyticsAccountParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.default_data_lake_store_account = default_data_lake_store_account + self.data_lake_store_accounts = data_lake_store_accounts + self.storage_accounts = storage_accounts + self.compute_policies = compute_policies + self.firewall_rules = firewall_rules + self.firewall_state = firewall_state + self.firewall_allow_azure_ips = firewall_allow_azure_ips + self.new_tier = new_tier + self.max_job_count = max_job_count + self.max_degree_of_parallelism = max_degree_of_parallelism + self.max_degree_of_parallelism_per_job = max_degree_of_parallelism_per_job + self.min_priority_per_job = min_priority_per_job + self.query_store_retention = query_store_retention diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_firewall_rule_with_account_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_firewall_rule_with_account_parameters.py index 40a42a4384c6..85d0684f6ee5 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_firewall_rule_with_account_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_firewall_rule_with_account_parameters.py @@ -16,13 +16,17 @@ class CreateFirewallRuleWithAccountParameters(Model): """The parameters used to create a new firewall rule while creating a new Data Lake Analytics account. - :param name: The unique name of the firewall rule to create. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the firewall rule to create. :type name: str - :param start_ip_address: The start IP address for the firewall rule. This - can be either ipv4 or ipv6. Start and End should be in the same protocol. + :param start_ip_address: Required. The start IP address for the firewall + rule. This can be either ipv4 or ipv6. Start and End should be in the same + protocol. :type start_ip_address: str - :param end_ip_address: The end IP address for the firewall rule. This can - be either ipv4 or ipv6. Start and End should be in the same protocol. + :param end_ip_address: Required. The end IP address for the firewall rule. + This can be either ipv4 or ipv6. Start and End should be in the same + protocol. :type end_ip_address: str """ @@ -38,8 +42,8 @@ class CreateFirewallRuleWithAccountParameters(Model): 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, } - def __init__(self, name, start_ip_address, end_ip_address): - super(CreateFirewallRuleWithAccountParameters, self).__init__() - self.name = name - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address + def __init__(self, **kwargs): + super(CreateFirewallRuleWithAccountParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.start_ip_address = kwargs.get('start_ip_address', None) + self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_firewall_rule_with_account_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_firewall_rule_with_account_parameters_py3.py new file mode 100644 index 000000000000..e85bab84d040 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_firewall_rule_with_account_parameters_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateFirewallRuleWithAccountParameters(Model): + """The parameters used to create a new firewall rule while creating a new Data + Lake Analytics account. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the firewall rule to create. + :type name: str + :param start_ip_address: Required. The start IP address for the firewall + rule. This can be either ipv4 or ipv6. Start and End should be in the same + protocol. + :type start_ip_address: str + :param end_ip_address: Required. The end IP address for the firewall rule. + This can be either ipv4 or ipv6. Start and End should be in the same + protocol. + :type end_ip_address: str + """ + + _validation = { + 'name': {'required': True}, + 'start_ip_address': {'required': True}, + 'end_ip_address': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, *, name: str, start_ip_address: str, end_ip_address: str, **kwargs) -> None: + super(CreateFirewallRuleWithAccountParameters, self).__init__(**kwargs) + self.name = name + self.start_ip_address = start_ip_address + self.end_ip_address = end_ip_address diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_or_update_compute_policy_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_or_update_compute_policy_parameters.py index b8d3028d33e8..235892b3a007 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_or_update_compute_policy_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_or_update_compute_policy_parameters.py @@ -15,11 +15,13 @@ class CreateOrUpdateComputePolicyParameters(Model): """The parameters used to create a new compute policy. - :param object_id: The AAD object identifier for the entity to create a - policy for. + All required parameters must be populated in order to send to Azure. + + :param object_id: Required. The AAD object identifier for the entity to + create a policy for. :type object_id: str - :param object_type: The type of AAD object the object identifier refers - to. Possible values include: 'User', 'Group', 'ServicePrincipal' + :param object_type: Required. The type of AAD object the object identifier + refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' :type object_type: str or ~azure.mgmt.datalake.analytics.account.models.AADObjectType :param max_degree_of_parallelism_per_job: The maximum degree of @@ -46,9 +48,9 @@ class CreateOrUpdateComputePolicyParameters(Model): 'min_priority_per_job': {'key': 'properties.minPriorityPerJob', 'type': 'int'}, } - def __init__(self, object_id, object_type, max_degree_of_parallelism_per_job=None, min_priority_per_job=None): - super(CreateOrUpdateComputePolicyParameters, self).__init__() - self.object_id = object_id - self.object_type = object_type - self.max_degree_of_parallelism_per_job = max_degree_of_parallelism_per_job - self.min_priority_per_job = min_priority_per_job + def __init__(self, **kwargs): + super(CreateOrUpdateComputePolicyParameters, self).__init__(**kwargs) + self.object_id = kwargs.get('object_id', None) + self.object_type = kwargs.get('object_type', None) + self.max_degree_of_parallelism_per_job = kwargs.get('max_degree_of_parallelism_per_job', None) + self.min_priority_per_job = kwargs.get('min_priority_per_job', None) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_or_update_compute_policy_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_or_update_compute_policy_parameters_py3.py new file mode 100644 index 000000000000..2f61fb6d9c17 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_or_update_compute_policy_parameters_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateOrUpdateComputePolicyParameters(Model): + """The parameters used to create a new compute policy. + + All required parameters must be populated in order to send to Azure. + + :param object_id: Required. The AAD object identifier for the entity to + create a policy for. + :type object_id: str + :param object_type: Required. The type of AAD object the object identifier + refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' + :type object_type: str or + ~azure.mgmt.datalake.analytics.account.models.AADObjectType + :param max_degree_of_parallelism_per_job: The maximum degree of + parallelism per job this user can use to submit jobs. This property, the + min priority per job property, or both must be passed. + :type max_degree_of_parallelism_per_job: int + :param min_priority_per_job: The minimum priority per job this user can + use to submit jobs. This property, the max degree of parallelism per job + property, or both must be passed. + :type min_priority_per_job: int + """ + + _validation = { + 'object_id': {'required': True}, + 'object_type': {'required': True}, + 'max_degree_of_parallelism_per_job': {'minimum': 1}, + 'min_priority_per_job': {'minimum': 1}, + } + + _attribute_map = { + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'object_type': {'key': 'properties.objectType', 'type': 'str'}, + 'max_degree_of_parallelism_per_job': {'key': 'properties.maxDegreeOfParallelismPerJob', 'type': 'int'}, + 'min_priority_per_job': {'key': 'properties.minPriorityPerJob', 'type': 'int'}, + } + + def __init__(self, *, object_id: str, object_type, max_degree_of_parallelism_per_job: int=None, min_priority_per_job: int=None, **kwargs) -> None: + super(CreateOrUpdateComputePolicyParameters, self).__init__(**kwargs) + self.object_id = object_id + self.object_type = object_type + self.max_degree_of_parallelism_per_job = max_degree_of_parallelism_per_job + self.min_priority_per_job = min_priority_per_job diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_or_update_firewall_rule_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_or_update_firewall_rule_parameters.py index bb0576be0fb4..47cef2ac665a 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_or_update_firewall_rule_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_or_update_firewall_rule_parameters.py @@ -15,11 +15,15 @@ class CreateOrUpdateFirewallRuleParameters(Model): """The parameters used to create a new firewall rule. - :param start_ip_address: The start IP address for the firewall rule. This - can be either ipv4 or ipv6. Start and End should be in the same protocol. + All required parameters must be populated in order to send to Azure. + + :param start_ip_address: Required. The start IP address for the firewall + rule. This can be either ipv4 or ipv6. Start and End should be in the same + protocol. :type start_ip_address: str - :param end_ip_address: The end IP address for the firewall rule. This can - be either ipv4 or ipv6. Start and End should be in the same protocol. + :param end_ip_address: Required. The end IP address for the firewall rule. + This can be either ipv4 or ipv6. Start and End should be in the same + protocol. :type end_ip_address: str """ @@ -33,7 +37,7 @@ class CreateOrUpdateFirewallRuleParameters(Model): 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, } - def __init__(self, start_ip_address, end_ip_address): - super(CreateOrUpdateFirewallRuleParameters, self).__init__() - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address + def __init__(self, **kwargs): + super(CreateOrUpdateFirewallRuleParameters, self).__init__(**kwargs) + self.start_ip_address = kwargs.get('start_ip_address', None) + self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_or_update_firewall_rule_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_or_update_firewall_rule_parameters_py3.py new file mode 100644 index 000000000000..263552b9e691 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_or_update_firewall_rule_parameters_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateOrUpdateFirewallRuleParameters(Model): + """The parameters used to create a new firewall rule. + + All required parameters must be populated in order to send to Azure. + + :param start_ip_address: Required. The start IP address for the firewall + rule. This can be either ipv4 or ipv6. Start and End should be in the same + protocol. + :type start_ip_address: str + :param end_ip_address: Required. The end IP address for the firewall rule. + This can be either ipv4 or ipv6. Start and End should be in the same + protocol. + :type end_ip_address: str + """ + + _validation = { + 'start_ip_address': {'required': True}, + 'end_ip_address': {'required': True}, + } + + _attribute_map = { + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: + super(CreateOrUpdateFirewallRuleParameters, self).__init__(**kwargs) + self.start_ip_address = start_ip_address + self.end_ip_address = end_ip_address diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account.py index d0328b8f76ea..3a0cd6008ef5 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account.py @@ -177,8 +177,8 @@ class DataLakeAnalyticsAccount(Resource): 'query_store_retention': {'key': 'properties.queryStoreRetention', 'type': 'int'}, } - def __init__(self): - super(DataLakeAnalyticsAccount, self).__init__() + def __init__(self, **kwargs): + super(DataLakeAnalyticsAccount, self).__init__(**kwargs) self.account_id = None self.provisioning_state = None self.state = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account_basic.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account_basic.py index 4786a0cf0b73..e07cf3976d4b 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account_basic.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account_basic.py @@ -78,8 +78,8 @@ class DataLakeAnalyticsAccountBasic(Resource): 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, } - def __init__(self): - super(DataLakeAnalyticsAccountBasic, self).__init__() + def __init__(self, **kwargs): + super(DataLakeAnalyticsAccountBasic, self).__init__(**kwargs) self.account_id = None self.provisioning_state = None self.state = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account_basic_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account_basic_py3.py new file mode 100644 index 000000000000..fca835dd76d0 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account_basic_py3.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class DataLakeAnalyticsAccountBasic(Resource): + """A Data Lake Analytics account object, containing all information associated + with the named Data Lake Analytics account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifer. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar location: The resource location. + :vartype location: str + :ivar tags: The resource tags. + :vartype tags: dict[str, str] + :ivar account_id: The unique identifier associated with this Data Lake + Analytics account. + :vartype account_id: str + :ivar provisioning_state: The provisioning status of the Data Lake + Analytics account. Possible values include: 'Failed', 'Creating', + 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', + 'Deleted', 'Undeleting', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.datalake.analytics.account.models.DataLakeAnalyticsAccountStatus + :ivar state: The state of the Data Lake Analytics account. Possible values + include: 'Active', 'Suspended' + :vartype state: str or + ~azure.mgmt.datalake.analytics.account.models.DataLakeAnalyticsAccountState + :ivar creation_time: The account creation time. + :vartype creation_time: datetime + :ivar last_modified_time: The account last modified time. + :vartype last_modified_time: datetime + :ivar endpoint: The full CName endpoint for this account. + :vartype endpoint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'account_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'account_id': {'key': 'properties.accountId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'DataLakeAnalyticsAccountStatus'}, + 'state': {'key': 'properties.state', 'type': 'DataLakeAnalyticsAccountState'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DataLakeAnalyticsAccountBasic, self).__init__(**kwargs) + self.account_id = None + self.provisioning_state = None + self.state = None + self.creation_time = None + self.last_modified_time = None + self.endpoint = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account_management_client_enums.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account_management_client_enums.py index 8656eb027426..357aa7387efb 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account_management_client_enums.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account_management_client_enums.py @@ -12,26 +12,26 @@ from enum import Enum -class AADObjectType(Enum): +class AADObjectType(str, Enum): user = "User" group = "Group" service_principal = "ServicePrincipal" -class FirewallState(Enum): +class FirewallState(str, Enum): enabled = "Enabled" disabled = "Disabled" -class FirewallAllowAzureIpsState(Enum): +class FirewallAllowAzureIpsState(str, Enum): enabled = "Enabled" disabled = "Disabled" -class TierType(Enum): +class TierType(str, Enum): consumption = "Consumption" commitment_100_au_hours = "Commitment_100AUHours" @@ -44,7 +44,7 @@ class TierType(Enum): commitment_500000_au_hours = "Commitment_500000AUHours" -class DataLakeAnalyticsAccountStatus(Enum): +class DataLakeAnalyticsAccountStatus(str, Enum): failed = "Failed" creating = "Creating" @@ -59,20 +59,20 @@ class DataLakeAnalyticsAccountStatus(Enum): canceled = "Canceled" -class DataLakeAnalyticsAccountState(Enum): +class DataLakeAnalyticsAccountState(str, Enum): active = "Active" suspended = "Suspended" -class OperationOrigin(Enum): +class OperationOrigin(str, Enum): user = "user" system = "system" usersystem = "user,system" -class SubscriptionState(Enum): +class SubscriptionState(str, Enum): registered = "Registered" suspended = "Suspended" diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account_py3.py new file mode 100644 index 000000000000..41e28a3413d9 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account_py3.py @@ -0,0 +1,203 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class DataLakeAnalyticsAccount(Resource): + """A Data Lake Analytics account object, containing all information associated + with the named Data Lake Analytics account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifer. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar location: The resource location. + :vartype location: str + :ivar tags: The resource tags. + :vartype tags: dict[str, str] + :ivar account_id: The unique identifier associated with this Data Lake + Analytics account. + :vartype account_id: str + :ivar provisioning_state: The provisioning status of the Data Lake + Analytics account. Possible values include: 'Failed', 'Creating', + 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', + 'Deleted', 'Undeleting', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.datalake.analytics.account.models.DataLakeAnalyticsAccountStatus + :ivar state: The state of the Data Lake Analytics account. Possible values + include: 'Active', 'Suspended' + :vartype state: str or + ~azure.mgmt.datalake.analytics.account.models.DataLakeAnalyticsAccountState + :ivar creation_time: The account creation time. + :vartype creation_time: datetime + :ivar last_modified_time: The account last modified time. + :vartype last_modified_time: datetime + :ivar endpoint: The full CName endpoint for this account. + :vartype endpoint: str + :ivar default_data_lake_store_account: The default Data Lake Store account + associated with this account. + :vartype default_data_lake_store_account: str + :ivar data_lake_store_accounts: The list of Data Lake Store accounts + associated with this account. + :vartype data_lake_store_accounts: + list[~azure.mgmt.datalake.analytics.account.models.DataLakeStoreAccountInformation] + :ivar storage_accounts: The list of Azure Blob Storage accounts associated + with this account. + :vartype storage_accounts: + list[~azure.mgmt.datalake.analytics.account.models.StorageAccountInformation] + :ivar compute_policies: The list of compute policies associated with this + account. + :vartype compute_policies: + list[~azure.mgmt.datalake.analytics.account.models.ComputePolicy] + :ivar firewall_rules: The list of firewall rules associated with this + account. + :vartype firewall_rules: + list[~azure.mgmt.datalake.analytics.account.models.FirewallRule] + :ivar firewall_state: The current state of the IP address firewall for + this account. Possible values include: 'Enabled', 'Disabled' + :vartype firewall_state: str or + ~azure.mgmt.datalake.analytics.account.models.FirewallState + :ivar firewall_allow_azure_ips: The current state of allowing or + disallowing IPs originating within Azure through the firewall. If the + firewall is disabled, this is not enforced. Possible values include: + 'Enabled', 'Disabled' + :vartype firewall_allow_azure_ips: str or + ~azure.mgmt.datalake.analytics.account.models.FirewallAllowAzureIpsState + :ivar new_tier: The commitment tier for the next month. Possible values + include: 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours', + 'Commitment_1000AUHours', 'Commitment_5000AUHours', + 'Commitment_10000AUHours', 'Commitment_50000AUHours', + 'Commitment_100000AUHours', 'Commitment_500000AUHours' + :vartype new_tier: str or + ~azure.mgmt.datalake.analytics.account.models.TierType + :ivar current_tier: The commitment tier in use for the current month. + Possible values include: 'Consumption', 'Commitment_100AUHours', + 'Commitment_500AUHours', 'Commitment_1000AUHours', + 'Commitment_5000AUHours', 'Commitment_10000AUHours', + 'Commitment_50000AUHours', 'Commitment_100000AUHours', + 'Commitment_500000AUHours' + :vartype current_tier: str or + ~azure.mgmt.datalake.analytics.account.models.TierType + :ivar max_job_count: The maximum supported jobs running under the account + at the same time. Default value: 3 . + :vartype max_job_count: int + :ivar system_max_job_count: The system defined maximum supported jobs + running under the account at the same time, which restricts the maximum + number of running jobs the user can set for the account. + :vartype system_max_job_count: int + :ivar max_degree_of_parallelism: The maximum supported degree of + parallelism for this account. Default value: 30 . + :vartype max_degree_of_parallelism: int + :ivar system_max_degree_of_parallelism: The system defined maximum + supported degree of parallelism for this account, which restricts the + maximum value of parallelism the user can set for the account. + :vartype system_max_degree_of_parallelism: int + :ivar max_degree_of_parallelism_per_job: The maximum supported degree of + parallelism per job for this account. + :vartype max_degree_of_parallelism_per_job: int + :ivar min_priority_per_job: The minimum supported priority per job for + this account. + :vartype min_priority_per_job: int + :ivar query_store_retention: The number of days that job metadata is + retained. Default value: 30 . + :vartype query_store_retention: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'account_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'endpoint': {'readonly': True}, + 'default_data_lake_store_account': {'readonly': True}, + 'data_lake_store_accounts': {'readonly': True}, + 'storage_accounts': {'readonly': True}, + 'compute_policies': {'readonly': True}, + 'firewall_rules': {'readonly': True}, + 'firewall_state': {'readonly': True}, + 'firewall_allow_azure_ips': {'readonly': True}, + 'new_tier': {'readonly': True}, + 'current_tier': {'readonly': True}, + 'max_job_count': {'readonly': True, 'minimum': 1}, + 'system_max_job_count': {'readonly': True}, + 'max_degree_of_parallelism': {'readonly': True, 'minimum': 1}, + 'system_max_degree_of_parallelism': {'readonly': True}, + 'max_degree_of_parallelism_per_job': {'readonly': True, 'minimum': 1}, + 'min_priority_per_job': {'readonly': True, 'minimum': 1}, + 'query_store_retention': {'readonly': True, 'maximum': 180, 'minimum': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'account_id': {'key': 'properties.accountId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'DataLakeAnalyticsAccountStatus'}, + 'state': {'key': 'properties.state', 'type': 'DataLakeAnalyticsAccountState'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, + 'default_data_lake_store_account': {'key': 'properties.defaultDataLakeStoreAccount', 'type': 'str'}, + 'data_lake_store_accounts': {'key': 'properties.dataLakeStoreAccounts', 'type': '[DataLakeStoreAccountInformation]'}, + 'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[StorageAccountInformation]'}, + 'compute_policies': {'key': 'properties.computePolicies', 'type': '[ComputePolicy]'}, + 'firewall_rules': {'key': 'properties.firewallRules', 'type': '[FirewallRule]'}, + 'firewall_state': {'key': 'properties.firewallState', 'type': 'FirewallState'}, + 'firewall_allow_azure_ips': {'key': 'properties.firewallAllowAzureIps', 'type': 'FirewallAllowAzureIpsState'}, + 'new_tier': {'key': 'properties.newTier', 'type': 'TierType'}, + 'current_tier': {'key': 'properties.currentTier', 'type': 'TierType'}, + 'max_job_count': {'key': 'properties.maxJobCount', 'type': 'int'}, + 'system_max_job_count': {'key': 'properties.systemMaxJobCount', 'type': 'int'}, + 'max_degree_of_parallelism': {'key': 'properties.maxDegreeOfParallelism', 'type': 'int'}, + 'system_max_degree_of_parallelism': {'key': 'properties.systemMaxDegreeOfParallelism', 'type': 'int'}, + 'max_degree_of_parallelism_per_job': {'key': 'properties.maxDegreeOfParallelismPerJob', 'type': 'int'}, + 'min_priority_per_job': {'key': 'properties.minPriorityPerJob', 'type': 'int'}, + 'query_store_retention': {'key': 'properties.queryStoreRetention', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(DataLakeAnalyticsAccount, self).__init__(**kwargs) + self.account_id = None + self.provisioning_state = None + self.state = None + self.creation_time = None + self.last_modified_time = None + self.endpoint = None + self.default_data_lake_store_account = None + self.data_lake_store_accounts = None + self.storage_accounts = None + self.compute_policies = None + self.firewall_rules = None + self.firewall_state = None + self.firewall_allow_azure_ips = None + self.new_tier = None + self.current_tier = None + self.max_job_count = None + self.system_max_job_count = None + self.max_degree_of_parallelism = None + self.system_max_degree_of_parallelism = None + self.max_degree_of_parallelism_per_job = None + self.min_priority_per_job = None + self.query_store_retention = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_store_account_information.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_store_account_information.py index 3f1df840409b..265232dfacf3 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_store_account_information.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_store_account_information.py @@ -42,6 +42,6 @@ class DataLakeStoreAccountInformation(SubResource): 'suffix': {'key': 'properties.suffix', 'type': 'str'}, } - def __init__(self): - super(DataLakeStoreAccountInformation, self).__init__() + def __init__(self, **kwargs): + super(DataLakeStoreAccountInformation, self).__init__(**kwargs) self.suffix = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_store_account_information_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_store_account_information_py3.py new file mode 100644 index 000000000000..12283ff4e9b0 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_store_account_information_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_resource_py3 import SubResource + + +class DataLakeStoreAccountInformation(SubResource): + """Data Lake Store account information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar suffix: The optional suffix for the Data Lake Store account. + :vartype suffix: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'suffix': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suffix': {'key': 'properties.suffix', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DataLakeStoreAccountInformation, self).__init__(**kwargs) + self.suffix = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/firewall_rule.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/firewall_rule.py index 479e6643b129..11a128edd890 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/firewall_rule.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/firewall_rule.py @@ -48,7 +48,7 @@ class FirewallRule(SubResource): 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, } - def __init__(self): - super(FirewallRule, self).__init__() + def __init__(self, **kwargs): + super(FirewallRule, self).__init__(**kwargs) self.start_ip_address = None self.end_ip_address = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/firewall_rule_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/firewall_rule_py3.py new file mode 100644 index 000000000000..202e9916242f --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/firewall_rule_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_resource_py3 import SubResource + + +class FirewallRule(SubResource): + """Data Lake Analytics firewall rule information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar start_ip_address: The start IP address for the firewall rule. This + can be either ipv4 or ipv6. Start and End should be in the same protocol. + :vartype start_ip_address: str + :ivar end_ip_address: The end IP address for the firewall rule. This can + be either ipv4 or ipv6. Start and End should be in the same protocol. + :vartype end_ip_address: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'start_ip_address': {'readonly': True}, + 'end_ip_address': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(FirewallRule, self).__init__(**kwargs) + self.start_ip_address = None + self.end_ip_address = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/name_availability_information.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/name_availability_information.py index 882f4c20cb3f..041270b61967 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/name_availability_information.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/name_availability_information.py @@ -41,8 +41,8 @@ class NameAvailabilityInformation(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(NameAvailabilityInformation, self).__init__() + def __init__(self, **kwargs): + super(NameAvailabilityInformation, self).__init__(**kwargs) self.name_available = None self.reason = None self.message = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/name_availability_information_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/name_availability_information_py3.py new file mode 100644 index 000000000000..0c10dc784a3d --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/name_availability_information_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NameAvailabilityInformation(Model): + """Data Lake Analytics account name availability result information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: The Boolean value of true or false to indicate + whether the Data Lake Analytics account name is available or not. + :vartype name_available: bool + :ivar reason: The reason why the Data Lake Analytics account name is not + available, if nameAvailable is false. + :vartype reason: str + :ivar message: The message describing why the Data Lake Analytics account + name is not available, if nameAvailable is false. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(NameAvailabilityInformation, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation.py index 54d2bd1a64a1..515e17676d7f 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation.py @@ -41,8 +41,8 @@ class Operation(Model): 'origin': {'key': 'origin', 'type': 'str'}, } - def __init__(self): - super(Operation, self).__init__() + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) self.name = None self.display = None self.origin = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation_display.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation_display.py index 3e84d2b05a79..06d6c6925b99 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation_display.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation_display.py @@ -42,8 +42,8 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self): - super(OperationDisplay, self).__init__() + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) self.provider = None self.resource = None self.operation = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation_display_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation_display_py3.py new file mode 100644 index 000000000000..c2452ff41dcb --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation_display_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """The display information for a particular operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The resource provider of the operation. + :vartype provider: str + :ivar resource: The resource type of the operation. + :vartype resource: str + :ivar operation: A friendly name of the operation. + :vartype operation: str + :ivar description: A friendly description of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation_list_result.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation_list_result.py index c684c04f73b4..65fff5b9dd35 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation_list_result.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation_list_result.py @@ -35,7 +35,7 @@ class OperationListResult(Model): 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self): - super(OperationListResult, self).__init__() + def __init__(self, **kwargs): + super(OperationListResult, self).__init__(**kwargs) self.value = None self.next_link = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation_list_result_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation_list_result_py3.py new file mode 100644 index 000000000000..ae8d580c8d9f --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation_list_result_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationListResult(Model): + """The list of available operations for Data Lake Analytics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The results of the list operation. + :vartype value: + list[~azure.mgmt.datalake.analytics.account.models.Operation] + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation_py3.py new file mode 100644 index 000000000000..e19ecb0dbfa9 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/operation_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """An available operation for Data Lake Analytics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation. + :vartype name: str + :ivar display: The display information for the operation. + :vartype display: + ~azure.mgmt.datalake.analytics.account.models.OperationDisplay + :ivar origin: The intended executor of the operation. Possible values + include: 'user', 'system', 'user,system' + :vartype origin: str or + ~azure.mgmt.datalake.analytics.account.models.OperationOrigin + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.origin = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/resource.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/resource.py index 3dd72d02c199..510912ad4fe4 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/resource.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/resource.py @@ -46,8 +46,8 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self): - super(Resource, self).__init__() + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/resource_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/resource_py3.py new file mode 100644 index 000000000000..09804482c294 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/resource_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """The resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifer. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar location: The resource location. + :vartype location: str + :ivar tags: The resource tags. + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.tags = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/sas_token_information.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/sas_token_information.py index ea34adc67c14..368a80e7fa4b 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/sas_token_information.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/sas_token_information.py @@ -31,6 +31,6 @@ class SasTokenInformation(Model): 'access_token': {'key': 'accessToken', 'type': 'str'}, } - def __init__(self): - super(SasTokenInformation, self).__init__() + def __init__(self, **kwargs): + super(SasTokenInformation, self).__init__(**kwargs) self.access_token = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/sas_token_information_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/sas_token_information_py3.py new file mode 100644 index 000000000000..8343e1541167 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/sas_token_information_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SasTokenInformation(Model): + """SAS token information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar access_token: The access token for the associated Azure Storage + Container. + :vartype access_token: str + """ + + _validation = { + 'access_token': {'readonly': True}, + } + + _attribute_map = { + 'access_token': {'key': 'accessToken', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasTokenInformation, self).__init__(**kwargs) + self.access_token = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/storage_account_information.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/storage_account_information.py index e19eb56da835..12362cc1f87a 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/storage_account_information.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/storage_account_information.py @@ -42,6 +42,6 @@ class StorageAccountInformation(SubResource): 'suffix': {'key': 'properties.suffix', 'type': 'str'}, } - def __init__(self): - super(StorageAccountInformation, self).__init__() + def __init__(self, **kwargs): + super(StorageAccountInformation, self).__init__(**kwargs) self.suffix = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/storage_account_information_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/storage_account_information_py3.py new file mode 100644 index 000000000000..ad1063cbf56c --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/storage_account_information_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_resource_py3 import SubResource + + +class StorageAccountInformation(SubResource): + """Azure Storage account information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar suffix: The optional suffix for the storage account. + :vartype suffix: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'suffix': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suffix': {'key': 'properties.suffix', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageAccountInformation, self).__init__(**kwargs) + self.suffix = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/storage_container.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/storage_container.py index f7ed074cf720..4c16f0b3d5ef 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/storage_container.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/storage_container.py @@ -42,6 +42,6 @@ class StorageContainer(SubResource): 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, } - def __init__(self): - super(StorageContainer, self).__init__() + def __init__(self, **kwargs): + super(StorageContainer, self).__init__(**kwargs) self.last_modified_time = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/storage_container_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/storage_container_py3.py new file mode 100644 index 000000000000..4da44660ed37 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/storage_container_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_resource_py3 import SubResource + + +class StorageContainer(SubResource): + """Azure Storage blob container information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar last_modified_time: The last modified time of the blob container. + :vartype last_modified_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageContainer, self).__init__(**kwargs) + self.last_modified_time = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/sub_resource.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/sub_resource.py index 1fc11b1ca913..d8797b92b154 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/sub_resource.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/sub_resource.py @@ -38,8 +38,8 @@ class SubResource(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self): - super(SubResource, self).__init__() + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) self.id = None self.name = None self.type = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/sub_resource_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/sub_resource_py3.py new file mode 100644 index 000000000000..747861d8e182 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/sub_resource_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubResource(Model): + """The resource model definition for a nested resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_compute_policy_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_compute_policy_parameters.py index 3aff061d8a0f..047a417c5ddb 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_compute_policy_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_compute_policy_parameters.py @@ -44,9 +44,9 @@ class UpdateComputePolicyParameters(Model): 'min_priority_per_job': {'key': 'properties.minPriorityPerJob', 'type': 'int'}, } - def __init__(self, object_id=None, object_type=None, max_degree_of_parallelism_per_job=None, min_priority_per_job=None): - super(UpdateComputePolicyParameters, self).__init__() - self.object_id = object_id - self.object_type = object_type - self.max_degree_of_parallelism_per_job = max_degree_of_parallelism_per_job - self.min_priority_per_job = min_priority_per_job + def __init__(self, **kwargs): + super(UpdateComputePolicyParameters, self).__init__(**kwargs) + self.object_id = kwargs.get('object_id', None) + self.object_type = kwargs.get('object_type', None) + self.max_degree_of_parallelism_per_job = kwargs.get('max_degree_of_parallelism_per_job', None) + self.min_priority_per_job = kwargs.get('min_priority_per_job', None) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_compute_policy_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_compute_policy_parameters_py3.py new file mode 100644 index 000000000000..a2570cc8e131 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_compute_policy_parameters_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateComputePolicyParameters(Model): + """The parameters used to update a compute policy. + + :param object_id: The AAD object identifier for the entity to create a + policy for. + :type object_id: str + :param object_type: The type of AAD object the object identifier refers + to. Possible values include: 'User', 'Group', 'ServicePrincipal' + :type object_type: str or + ~azure.mgmt.datalake.analytics.account.models.AADObjectType + :param max_degree_of_parallelism_per_job: The maximum degree of + parallelism per job this user can use to submit jobs. This property, the + min priority per job property, or both must be passed. + :type max_degree_of_parallelism_per_job: int + :param min_priority_per_job: The minimum priority per job this user can + use to submit jobs. This property, the max degree of parallelism per job + property, or both must be passed. + :type min_priority_per_job: int + """ + + _validation = { + 'max_degree_of_parallelism_per_job': {'minimum': 1}, + 'min_priority_per_job': {'minimum': 1}, + } + + _attribute_map = { + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'object_type': {'key': 'properties.objectType', 'type': 'str'}, + 'max_degree_of_parallelism_per_job': {'key': 'properties.maxDegreeOfParallelismPerJob', 'type': 'int'}, + 'min_priority_per_job': {'key': 'properties.minPriorityPerJob', 'type': 'int'}, + } + + def __init__(self, *, object_id: str=None, object_type=None, max_degree_of_parallelism_per_job: int=None, min_priority_per_job: int=None, **kwargs) -> None: + super(UpdateComputePolicyParameters, self).__init__(**kwargs) + self.object_id = object_id + self.object_type = object_type + self.max_degree_of_parallelism_per_job = max_degree_of_parallelism_per_job + self.min_priority_per_job = min_priority_per_job diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_compute_policy_with_account_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_compute_policy_with_account_parameters.py index a770c46273a0..8fc4c11768ac 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_compute_policy_with_account_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_compute_policy_with_account_parameters.py @@ -16,7 +16,9 @@ class UpdateComputePolicyWithAccountParameters(Model): """The parameters used to update a compute policy while updating a Data Lake Analytics account. - :param name: The unique name of the compute policy to update. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the compute policy to update. :type name: str :param object_id: The AAD object identifier for the entity to create a policy for. @@ -49,10 +51,10 @@ class UpdateComputePolicyWithAccountParameters(Model): 'min_priority_per_job': {'key': 'properties.minPriorityPerJob', 'type': 'int'}, } - def __init__(self, name, object_id=None, object_type=None, max_degree_of_parallelism_per_job=None, min_priority_per_job=None): - super(UpdateComputePolicyWithAccountParameters, self).__init__() - self.name = name - self.object_id = object_id - self.object_type = object_type - self.max_degree_of_parallelism_per_job = max_degree_of_parallelism_per_job - self.min_priority_per_job = min_priority_per_job + def __init__(self, **kwargs): + super(UpdateComputePolicyWithAccountParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.object_id = kwargs.get('object_id', None) + self.object_type = kwargs.get('object_type', None) + self.max_degree_of_parallelism_per_job = kwargs.get('max_degree_of_parallelism_per_job', None) + self.min_priority_per_job = kwargs.get('min_priority_per_job', None) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_compute_policy_with_account_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_compute_policy_with_account_parameters_py3.py new file mode 100644 index 000000000000..5d4769fdd64c --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_compute_policy_with_account_parameters_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateComputePolicyWithAccountParameters(Model): + """The parameters used to update a compute policy while updating a Data Lake + Analytics account. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the compute policy to update. + :type name: str + :param object_id: The AAD object identifier for the entity to create a + policy for. + :type object_id: str + :param object_type: The type of AAD object the object identifier refers + to. Possible values include: 'User', 'Group', 'ServicePrincipal' + :type object_type: str or + ~azure.mgmt.datalake.analytics.account.models.AADObjectType + :param max_degree_of_parallelism_per_job: The maximum degree of + parallelism per job this user can use to submit jobs. This property, the + min priority per job property, or both must be passed. + :type max_degree_of_parallelism_per_job: int + :param min_priority_per_job: The minimum priority per job this user can + use to submit jobs. This property, the max degree of parallelism per job + property, or both must be passed. + :type min_priority_per_job: int + """ + + _validation = { + 'name': {'required': True}, + 'max_degree_of_parallelism_per_job': {'minimum': 1}, + 'min_priority_per_job': {'minimum': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'object_type': {'key': 'properties.objectType', 'type': 'str'}, + 'max_degree_of_parallelism_per_job': {'key': 'properties.maxDegreeOfParallelismPerJob', 'type': 'int'}, + 'min_priority_per_job': {'key': 'properties.minPriorityPerJob', 'type': 'int'}, + } + + def __init__(self, *, name: str, object_id: str=None, object_type=None, max_degree_of_parallelism_per_job: int=None, min_priority_per_job: int=None, **kwargs) -> None: + super(UpdateComputePolicyWithAccountParameters, self).__init__(**kwargs) + self.name = name + self.object_id = object_id + self.object_type = object_type + self.max_degree_of_parallelism_per_job = max_degree_of_parallelism_per_job + self.min_priority_per_job = min_priority_per_job diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_data_lake_analytics_account_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_data_lake_analytics_account_parameters.py index 65436a7fdf8b..28f7fa9dcbb0 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_data_lake_analytics_account_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_data_lake_analytics_account_parameters.py @@ -31,12 +31,13 @@ class UpdateDataLakeAnalyticsAccountParameters(Model): :type compute_policies: list[~azure.mgmt.datalake.analytics.account.models.UpdateComputePolicyWithAccountParameters] :param firewall_rules: The list of firewall rules associated with this - Data Lake Analytics account. + account. :type firewall_rules: list[~azure.mgmt.datalake.analytics.account.models.UpdateFirewallRuleWithAccountParameters] :param firewall_state: The current state of the IP address firewall for - this Data Lake Analytics account. Possible values include: 'Enabled', - 'Disabled' + this account. Disabling the firewall does not remove existing rules, they + will just be ignored until the firewall is re-enabled. Possible values + include: 'Enabled', 'Disabled' :type firewall_state: str or ~azure.mgmt.datalake.analytics.account.models.FirewallState :param firewall_allow_azure_ips: The current state of allowing or @@ -94,18 +95,18 @@ class UpdateDataLakeAnalyticsAccountParameters(Model): 'query_store_retention': {'key': 'properties.queryStoreRetention', 'type': 'int'}, } - def __init__(self, tags=None, data_lake_store_accounts=None, storage_accounts=None, compute_policies=None, firewall_rules=None, firewall_state=None, firewall_allow_azure_ips=None, new_tier=None, max_job_count=None, max_degree_of_parallelism=None, max_degree_of_parallelism_per_job=None, min_priority_per_job=None, query_store_retention=None): - super(UpdateDataLakeAnalyticsAccountParameters, self).__init__() - self.tags = tags - self.data_lake_store_accounts = data_lake_store_accounts - self.storage_accounts = storage_accounts - self.compute_policies = compute_policies - self.firewall_rules = firewall_rules - self.firewall_state = firewall_state - self.firewall_allow_azure_ips = firewall_allow_azure_ips - self.new_tier = new_tier - self.max_job_count = max_job_count - self.max_degree_of_parallelism = max_degree_of_parallelism - self.max_degree_of_parallelism_per_job = max_degree_of_parallelism_per_job - self.min_priority_per_job = min_priority_per_job - self.query_store_retention = query_store_retention + def __init__(self, **kwargs): + super(UpdateDataLakeAnalyticsAccountParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.data_lake_store_accounts = kwargs.get('data_lake_store_accounts', None) + self.storage_accounts = kwargs.get('storage_accounts', None) + self.compute_policies = kwargs.get('compute_policies', None) + self.firewall_rules = kwargs.get('firewall_rules', None) + self.firewall_state = kwargs.get('firewall_state', None) + self.firewall_allow_azure_ips = kwargs.get('firewall_allow_azure_ips', None) + self.new_tier = kwargs.get('new_tier', None) + self.max_job_count = kwargs.get('max_job_count', None) + self.max_degree_of_parallelism = kwargs.get('max_degree_of_parallelism', None) + self.max_degree_of_parallelism_per_job = kwargs.get('max_degree_of_parallelism_per_job', None) + self.min_priority_per_job = kwargs.get('min_priority_per_job', None) + self.query_store_retention = kwargs.get('query_store_retention', None) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_data_lake_analytics_account_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_data_lake_analytics_account_parameters_py3.py new file mode 100644 index 000000000000..298fc61ee7e1 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_data_lake_analytics_account_parameters_py3.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateDataLakeAnalyticsAccountParameters(Model): + """The parameters that can be used to update an existing Data Lake Analytics + account. + + :param tags: The resource tags. + :type tags: dict[str, str] + :param data_lake_store_accounts: The list of Data Lake Store accounts + associated with this account. + :type data_lake_store_accounts: + list[~azure.mgmt.datalake.analytics.account.models.UpdateDataLakeStoreWithAccountParameters] + :param storage_accounts: The list of Azure Blob storage accounts + associated with this account. + :type storage_accounts: + list[~azure.mgmt.datalake.analytics.account.models.UpdateStorageAccountWithAccountParameters] + :param compute_policies: The list of compute policies associated with this + account. + :type compute_policies: + list[~azure.mgmt.datalake.analytics.account.models.UpdateComputePolicyWithAccountParameters] + :param firewall_rules: The list of firewall rules associated with this + account. + :type firewall_rules: + list[~azure.mgmt.datalake.analytics.account.models.UpdateFirewallRuleWithAccountParameters] + :param firewall_state: The current state of the IP address firewall for + this account. Disabling the firewall does not remove existing rules, they + will just be ignored until the firewall is re-enabled. Possible values + include: 'Enabled', 'Disabled' + :type firewall_state: str or + ~azure.mgmt.datalake.analytics.account.models.FirewallState + :param firewall_allow_azure_ips: The current state of allowing or + disallowing IPs originating within Azure through the firewall. If the + firewall is disabled, this is not enforced. Possible values include: + 'Enabled', 'Disabled' + :type firewall_allow_azure_ips: str or + ~azure.mgmt.datalake.analytics.account.models.FirewallAllowAzureIpsState + :param new_tier: The commitment tier to use for next month. Possible + values include: 'Consumption', 'Commitment_100AUHours', + 'Commitment_500AUHours', 'Commitment_1000AUHours', + 'Commitment_5000AUHours', 'Commitment_10000AUHours', + 'Commitment_50000AUHours', 'Commitment_100000AUHours', + 'Commitment_500000AUHours' + :type new_tier: str or + ~azure.mgmt.datalake.analytics.account.models.TierType + :param max_job_count: The maximum supported jobs running under the account + at the same time. + :type max_job_count: int + :param max_degree_of_parallelism: The maximum supported degree of + parallelism for this account. + :type max_degree_of_parallelism: int + :param max_degree_of_parallelism_per_job: The maximum supported degree of + parallelism per job for this account. + :type max_degree_of_parallelism_per_job: int + :param min_priority_per_job: The minimum supported priority per job for + this account. + :type min_priority_per_job: int + :param query_store_retention: The number of days that job metadata is + retained. + :type query_store_retention: int + """ + + _validation = { + 'max_job_count': {'minimum': 1}, + 'max_degree_of_parallelism': {'minimum': 1}, + 'max_degree_of_parallelism_per_job': {'minimum': 1}, + 'min_priority_per_job': {'minimum': 1}, + 'query_store_retention': {'maximum': 180, 'minimum': 1}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'data_lake_store_accounts': {'key': 'properties.dataLakeStoreAccounts', 'type': '[UpdateDataLakeStoreWithAccountParameters]'}, + 'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[UpdateStorageAccountWithAccountParameters]'}, + 'compute_policies': {'key': 'properties.computePolicies', 'type': '[UpdateComputePolicyWithAccountParameters]'}, + 'firewall_rules': {'key': 'properties.firewallRules', 'type': '[UpdateFirewallRuleWithAccountParameters]'}, + 'firewall_state': {'key': 'properties.firewallState', 'type': 'FirewallState'}, + 'firewall_allow_azure_ips': {'key': 'properties.firewallAllowAzureIps', 'type': 'FirewallAllowAzureIpsState'}, + 'new_tier': {'key': 'properties.newTier', 'type': 'TierType'}, + 'max_job_count': {'key': 'properties.maxJobCount', 'type': 'int'}, + 'max_degree_of_parallelism': {'key': 'properties.maxDegreeOfParallelism', 'type': 'int'}, + 'max_degree_of_parallelism_per_job': {'key': 'properties.maxDegreeOfParallelismPerJob', 'type': 'int'}, + 'min_priority_per_job': {'key': 'properties.minPriorityPerJob', 'type': 'int'}, + 'query_store_retention': {'key': 'properties.queryStoreRetention', 'type': 'int'}, + } + + def __init__(self, *, tags=None, data_lake_store_accounts=None, storage_accounts=None, compute_policies=None, firewall_rules=None, firewall_state=None, firewall_allow_azure_ips=None, new_tier=None, max_job_count: int=None, max_degree_of_parallelism: int=None, max_degree_of_parallelism_per_job: int=None, min_priority_per_job: int=None, query_store_retention: int=None, **kwargs) -> None: + super(UpdateDataLakeAnalyticsAccountParameters, self).__init__(**kwargs) + self.tags = tags + self.data_lake_store_accounts = data_lake_store_accounts + self.storage_accounts = storage_accounts + self.compute_policies = compute_policies + self.firewall_rules = firewall_rules + self.firewall_state = firewall_state + self.firewall_allow_azure_ips = firewall_allow_azure_ips + self.new_tier = new_tier + self.max_job_count = max_job_count + self.max_degree_of_parallelism = max_degree_of_parallelism + self.max_degree_of_parallelism_per_job = max_degree_of_parallelism_per_job + self.min_priority_per_job = min_priority_per_job + self.query_store_retention = query_store_retention diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_data_lake_store_with_account_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_data_lake_store_with_account_parameters.py index 827ebc05eab0..060a882dbc61 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_data_lake_store_with_account_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_data_lake_store_with_account_parameters.py @@ -16,7 +16,10 @@ class UpdateDataLakeStoreWithAccountParameters(Model): """The parameters used to update a Data Lake Store account while updating a Data Lake Analytics account. - :param name: The unique name of the Data Lake Store account to update. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the Data Lake Store account to + update. :type name: str :param suffix: The optional suffix for the Data Lake Store account. :type suffix: str @@ -31,7 +34,7 @@ class UpdateDataLakeStoreWithAccountParameters(Model): 'suffix': {'key': 'properties.suffix', 'type': 'str'}, } - def __init__(self, name, suffix=None): - super(UpdateDataLakeStoreWithAccountParameters, self).__init__() - self.name = name - self.suffix = suffix + def __init__(self, **kwargs): + super(UpdateDataLakeStoreWithAccountParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.suffix = kwargs.get('suffix', None) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_data_lake_store_with_account_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_data_lake_store_with_account_parameters_py3.py new file mode 100644 index 000000000000..d80292450760 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_data_lake_store_with_account_parameters_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateDataLakeStoreWithAccountParameters(Model): + """The parameters used to update a Data Lake Store account while updating a + Data Lake Analytics account. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the Data Lake Store account to + update. + :type name: str + :param suffix: The optional suffix for the Data Lake Store account. + :type suffix: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'suffix': {'key': 'properties.suffix', 'type': 'str'}, + } + + def __init__(self, *, name: str, suffix: str=None, **kwargs) -> None: + super(UpdateDataLakeStoreWithAccountParameters, self).__init__(**kwargs) + self.name = name + self.suffix = suffix diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_firewall_rule_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_firewall_rule_parameters.py index f48a1cef34cc..1419fff19fd8 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_firewall_rule_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_firewall_rule_parameters.py @@ -28,7 +28,7 @@ class UpdateFirewallRuleParameters(Model): 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, } - def __init__(self, start_ip_address=None, end_ip_address=None): - super(UpdateFirewallRuleParameters, self).__init__() - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address + def __init__(self, **kwargs): + super(UpdateFirewallRuleParameters, self).__init__(**kwargs) + self.start_ip_address = kwargs.get('start_ip_address', None) + self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_firewall_rule_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_firewall_rule_parameters_py3.py new file mode 100644 index 000000000000..1abcaeaa9b11 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_firewall_rule_parameters_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateFirewallRuleParameters(Model): + """The parameters used to update a firewall rule. + + :param start_ip_address: The start IP address for the firewall rule. This + can be either ipv4 or ipv6. Start and End should be in the same protocol. + :type start_ip_address: str + :param end_ip_address: The end IP address for the firewall rule. This can + be either ipv4 or ipv6. Start and End should be in the same protocol. + :type end_ip_address: str + """ + + _attribute_map = { + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, *, start_ip_address: str=None, end_ip_address: str=None, **kwargs) -> None: + super(UpdateFirewallRuleParameters, self).__init__(**kwargs) + self.start_ip_address = start_ip_address + self.end_ip_address = end_ip_address diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_firewall_rule_with_account_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_firewall_rule_with_account_parameters.py index 7c96e7a2c964..3a4375928949 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_firewall_rule_with_account_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_firewall_rule_with_account_parameters.py @@ -16,7 +16,9 @@ class UpdateFirewallRuleWithAccountParameters(Model): """The parameters used to update a firewall rule while updating a Data Lake Analytics account. - :param name: The unique name of the firewall rule to update. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the firewall rule to update. :type name: str :param start_ip_address: The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. @@ -36,8 +38,8 @@ class UpdateFirewallRuleWithAccountParameters(Model): 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, } - def __init__(self, name, start_ip_address=None, end_ip_address=None): - super(UpdateFirewallRuleWithAccountParameters, self).__init__() - self.name = name - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address + def __init__(self, **kwargs): + super(UpdateFirewallRuleWithAccountParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.start_ip_address = kwargs.get('start_ip_address', None) + self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_firewall_rule_with_account_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_firewall_rule_with_account_parameters_py3.py new file mode 100644 index 000000000000..dfe7272b52f1 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_firewall_rule_with_account_parameters_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateFirewallRuleWithAccountParameters(Model): + """The parameters used to update a firewall rule while updating a Data Lake + Analytics account. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the firewall rule to update. + :type name: str + :param start_ip_address: The start IP address for the firewall rule. This + can be either ipv4 or ipv6. Start and End should be in the same protocol. + :type start_ip_address: str + :param end_ip_address: The end IP address for the firewall rule. This can + be either ipv4 or ipv6. Start and End should be in the same protocol. + :type end_ip_address: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, *, name: str, start_ip_address: str=None, end_ip_address: str=None, **kwargs) -> None: + super(UpdateFirewallRuleWithAccountParameters, self).__init__(**kwargs) + self.name = name + self.start_ip_address = start_ip_address + self.end_ip_address = end_ip_address diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_storage_account_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_storage_account_parameters.py index d02e4bf596bd..0681ed48e9c5 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_storage_account_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_storage_account_parameters.py @@ -27,7 +27,7 @@ class UpdateStorageAccountParameters(Model): 'suffix': {'key': 'properties.suffix', 'type': 'str'}, } - def __init__(self, access_key=None, suffix=None): - super(UpdateStorageAccountParameters, self).__init__() - self.access_key = access_key - self.suffix = suffix + def __init__(self, **kwargs): + super(UpdateStorageAccountParameters, self).__init__(**kwargs) + self.access_key = kwargs.get('access_key', None) + self.suffix = kwargs.get('suffix', None) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_storage_account_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_storage_account_parameters_py3.py new file mode 100644 index 000000000000..f9620b50bfa2 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_storage_account_parameters_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateStorageAccountParameters(Model): + """The parameters used to update an Azure Storage account. + + :param access_key: The updated access key associated with this Azure + Storage account that will be used to connect to it. + :type access_key: str + :param suffix: The optional suffix for the storage account. + :type suffix: str + """ + + _attribute_map = { + 'access_key': {'key': 'properties.accessKey', 'type': 'str'}, + 'suffix': {'key': 'properties.suffix', 'type': 'str'}, + } + + def __init__(self, *, access_key: str=None, suffix: str=None, **kwargs) -> None: + super(UpdateStorageAccountParameters, self).__init__(**kwargs) + self.access_key = access_key + self.suffix = suffix diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_storage_account_with_account_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_storage_account_with_account_parameters.py index 1b1d347ed801..05a9fe881cb3 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_storage_account_with_account_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_storage_account_with_account_parameters.py @@ -16,7 +16,10 @@ class UpdateStorageAccountWithAccountParameters(Model): """The parameters used to update an Azure Storage account while updating a Data Lake Analytics account. - :param name: The unique name of the Azure Storage account to update. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the Azure Storage account to + update. :type name: str :param access_key: The updated access key associated with this Azure Storage account that will be used to connect to it. @@ -35,8 +38,8 @@ class UpdateStorageAccountWithAccountParameters(Model): 'suffix': {'key': 'properties.suffix', 'type': 'str'}, } - def __init__(self, name, access_key=None, suffix=None): - super(UpdateStorageAccountWithAccountParameters, self).__init__() - self.name = name - self.access_key = access_key - self.suffix = suffix + def __init__(self, **kwargs): + super(UpdateStorageAccountWithAccountParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.access_key = kwargs.get('access_key', None) + self.suffix = kwargs.get('suffix', None) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_storage_account_with_account_parameters_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_storage_account_with_account_parameters_py3.py new file mode 100644 index 000000000000..ff4d36845d75 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/update_storage_account_with_account_parameters_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateStorageAccountWithAccountParameters(Model): + """The parameters used to update an Azure Storage account while updating a + Data Lake Analytics account. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the Azure Storage account to + update. + :type name: str + :param access_key: The updated access key associated with this Azure + Storage account that will be used to connect to it. + :type access_key: str + :param suffix: The optional suffix for the storage account. + :type suffix: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'access_key': {'key': 'properties.accessKey', 'type': 'str'}, + 'suffix': {'key': 'properties.suffix', 'type': 'str'}, + } + + def __init__(self, *, name: str, access_key: str=None, suffix: str=None, **kwargs) -> None: + super(UpdateStorageAccountWithAccountParameters, self).__init__(**kwargs) + self.name = name + self.access_key = access_key + self.suffix = suffix diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/accounts_operations.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/accounts_operations.py index 5b8625d59275..13788c333704 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/accounts_operations.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/accounts_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -24,7 +24,7 @@ class AccountsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-11-01". """ @@ -78,7 +78,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeAnalytics/accounts' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -135,6 +135,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeAnalytics/accounts'} def list_by_resource_group( self, resource_group_name, filter=None, top=None, skip=None, select=None, orderby=None, count=None, custom_headers=None, raw=False, **operation_config): @@ -177,7 +178,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -235,12 +236,13 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts'} def _create_initial( self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}' + url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -289,7 +291,7 @@ def _create_initial( return deserialized def create( - self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. @@ -302,13 +304,17 @@ def create( :type parameters: ~azure.mgmt.datalake.analytics.account.models.CreateDataLakeAnalyticsAccountParameters :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns - DataLakeAnalyticsAccount or ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + DataLakeAnalyticsAccount or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.datalake.analytics.account.models.DataLakeAnalyticsAccount] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.datalake.analytics.account.models.DataLakeAnalyticsAccount]] :raises: :class:`CloudError` """ raw_result = self._create_initial( @@ -319,30 +325,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - deserialized = self._deserialize('DataLakeAnalyticsAccount', response) if raw: @@ -351,12 +335,14 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}'} def get( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): @@ -378,7 +364,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -419,12 +405,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}'} def _update_initial( self, resource_group_name, account_name, parameters=None, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -478,7 +465,7 @@ def _update_initial( return deserialized def update( - self, resource_group_name, account_name, parameters=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, parameters=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. @@ -491,13 +478,17 @@ def update( :type parameters: ~azure.mgmt.datalake.analytics.account.models.UpdateDataLakeAnalyticsAccountParameters :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns - DataLakeAnalyticsAccount or ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + DataLakeAnalyticsAccount or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.datalake.analytics.account.models.DataLakeAnalyticsAccount] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.datalake.analytics.account.models.DataLakeAnalyticsAccount]] :raises: :class:`CloudError` """ raw_result = self._update_initial( @@ -508,30 +499,8 @@ def update( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - deserialized = self._deserialize('DataLakeAnalyticsAccount', response) if raw: @@ -540,18 +509,20 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}'} def _delete_initial( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -587,7 +558,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, custom_headers=None, raw=False, polling=True, **operation_config): """Begins the delete process for the Data Lake Analytics account object specified by the account name. @@ -596,12 +567,14 @@ def delete( :param account_name: The name of the Data Lake Analytics account. :type account_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -611,40 +584,20 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}'} def check_name_availability( self, location, name, custom_headers=None, raw=False, **operation_config): @@ -668,7 +621,7 @@ def check_name_availability( parameters = models.CheckNameAvailabilityParameters(name=name) # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeAnalytics/locations/{location}/checkNameAvailability' + url = self.check_name_availability.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'location': self._serialize.url("location", location, 'str') @@ -712,3 +665,4 @@ def check_name_availability( return client_raw_response return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeAnalytics/locations/{location}/checkNameAvailability'} diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/compute_policies_operations.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/compute_policies_operations.py index 9bb961108ee4..03ef3deea4f2 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/compute_policies_operations.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/compute_policies_operations.py @@ -22,7 +22,7 @@ class ComputePoliciesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-11-01". """ @@ -60,7 +60,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies' + url = self.list_by_account.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -107,6 +107,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies'} def create_or_update( self, resource_group_name, account_name, compute_policy_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -137,7 +138,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -183,6 +184,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}'} def get( self, resource_group_name, account_name, compute_policy_name, custom_headers=None, raw=False, **operation_config): @@ -206,7 +208,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -248,6 +250,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}'} def update( self, resource_group_name, account_name, compute_policy_name, parameters=None, custom_headers=None, raw=False, **operation_config): @@ -273,7 +276,7 @@ def update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -322,6 +325,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}'} def delete( self, resource_group_name, account_name, compute_policy_name, custom_headers=None, raw=False, **operation_config): @@ -344,7 +348,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -379,3 +383,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}'} diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/data_lake_store_accounts_operations.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/data_lake_store_accounts_operations.py index 41806804be81..f9d69395230c 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/data_lake_store_accounts_operations.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/data_lake_store_accounts_operations.py @@ -22,7 +22,7 @@ class DataLakeStoreAccountsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-11-01". """ @@ -81,7 +81,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts' + url = self.list_by_account.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -140,6 +140,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts'} def add( self, resource_group_name, account_name, data_lake_store_account_name, suffix=None, custom_headers=None, raw=False, **operation_config): @@ -169,7 +170,7 @@ def add( parameters = models.AddDataLakeStoreParameters(suffix=suffix) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts/{dataLakeStoreAccountName}' + url = self.add.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -211,6 +212,7 @@ def add( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + add.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts/{dataLakeStoreAccountName}'} def get( self, resource_group_name, account_name, data_lake_store_account_name, custom_headers=None, raw=False, **operation_config): @@ -237,7 +239,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts/{dataLakeStoreAccountName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -279,6 +281,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts/{dataLakeStoreAccountName}'} def delete( self, resource_group_name, account_name, data_lake_store_account_name, custom_headers=None, raw=False, **operation_config): @@ -302,7 +305,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts/{dataLakeStoreAccountName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -337,3 +340,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts/{dataLakeStoreAccountName}'} diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/firewall_rules_operations.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/firewall_rules_operations.py index d8b1911aa65e..022615c409c2 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/firewall_rules_operations.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/firewall_rules_operations.py @@ -22,7 +22,7 @@ class FirewallRulesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-11-01". """ @@ -60,7 +60,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules' + url = self.list_by_account.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -107,6 +107,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules'} def create_or_update( self, resource_group_name, account_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, **operation_config): @@ -142,7 +143,7 @@ def create_or_update( parameters = models.CreateOrUpdateFirewallRuleParameters(start_ip_address=start_ip_address, end_ip_address=end_ip_address) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -188,6 +189,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}'} def get( self, resource_group_name, account_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): @@ -210,7 +212,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -252,6 +254,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}'} def update( self, resource_group_name, account_name, firewall_rule_name, start_ip_address=None, end_ip_address=None, custom_headers=None, raw=False, **operation_config): @@ -286,7 +289,7 @@ def update( parameters = models.UpdateFirewallRuleParameters(start_ip_address=start_ip_address, end_ip_address=end_ip_address) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -335,6 +338,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}'} def delete( self, resource_group_name, account_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): @@ -357,7 +361,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -392,3 +396,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}'} diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/locations_operations.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/locations_operations.py index ad946210c006..a1c3c7dad15a 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/locations_operations.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/locations_operations.py @@ -22,7 +22,7 @@ class LocationsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-11-01". """ @@ -56,7 +56,7 @@ def get_capability( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeAnalytics/locations/{location}/capability' + url = self.get_capability.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'location': self._serialize.url("location", location, 'str') @@ -96,3 +96,4 @@ def get_capability( return client_raw_response return deserialized + get_capability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeAnalytics/locations/{location}/capability'} diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/operations.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/operations.py index 6c5dc7f9062d..b64c794c119d 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/operations.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/operations.py @@ -22,7 +22,7 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-11-01". """ @@ -53,7 +53,7 @@ def list( :raises: :class:`CloudError` """ # Construct URL - url = '/providers/Microsoft.DataLakeAnalytics/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -88,3 +88,4 @@ def list( return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.DataLakeAnalytics/operations'} diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/storage_accounts_operations.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/storage_accounts_operations.py index 60477d7ef3dc..36d1afb96e81 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/storage_accounts_operations.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/storage_accounts_operations.py @@ -22,7 +22,7 @@ class StorageAccountsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-11-01". """ @@ -81,7 +81,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts' + url = self.list_by_account.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -140,6 +140,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts'} def add( self, resource_group_name, account_name, storage_account_name, access_key, suffix=None, custom_headers=None, raw=False, **operation_config): @@ -170,7 +171,7 @@ def add( parameters = models.AddStorageAccountParameters(access_key=access_key, suffix=suffix) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}' + url = self.add.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -209,6 +210,7 @@ def add( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + add.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}'} def get( self, resource_group_name, account_name, storage_account_name, custom_headers=None, raw=False, **operation_config): @@ -234,7 +236,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -276,6 +278,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}'} def update( self, resource_group_name, account_name, storage_account_name, access_key=None, suffix=None, custom_headers=None, raw=False, **operation_config): @@ -307,7 +310,7 @@ def update( parameters = models.UpdateStorageAccountParameters(access_key=access_key, suffix=suffix) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -349,6 +352,7 @@ def update( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}'} def delete( self, resource_group_name, account_name, storage_account_name, custom_headers=None, raw=False, **operation_config): @@ -372,7 +376,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -407,6 +411,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}'} def list_storage_containers( self, resource_group_name, account_name, storage_account_name, custom_headers=None, raw=False, **operation_config): @@ -435,7 +440,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers' + url = self.list_storage_containers.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -483,6 +488,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_storage_containers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers'} def get_storage_container( self, resource_group_name, account_name, storage_account_name, container_name, custom_headers=None, raw=False, **operation_config): @@ -510,7 +516,7 @@ def get_storage_container( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers/{containerName}' + url = self.get_storage_container.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -553,6 +559,7 @@ def get_storage_container( return client_raw_response return deserialized + get_storage_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers/{containerName}'} def list_sas_tokens( self, resource_group_name, account_name, storage_account_name, container_name, custom_headers=None, raw=False, **operation_config): @@ -583,7 +590,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers/{containerName}/listSasTokens' + url = self.list_sas_tokens.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -632,3 +639,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_sas_tokens.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers/{containerName}/listSasTokens'} diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/data_lake_store_account_management_client.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/data_lake_store_account_management_client.py index cac24d16994a..dafc1af5ead6 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/data_lake_store_account_management_client.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/data_lake_store_account_management_client.py @@ -9,12 +9,13 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from .operations.accounts_operations import AccountsOperations from .operations.firewall_rules_operations import FirewallRulesOperations +from .operations.virtual_network_rules_operations import VirtualNetworkRulesOperations from .operations.trusted_id_providers_operations import TrustedIdProvidersOperations from .operations.operations import Operations from .operations.locations_operations import LocationsOperations @@ -55,7 +56,7 @@ def __init__( self.subscription_id = subscription_id -class DataLakeStoreAccountManagementClient(object): +class DataLakeStoreAccountManagementClient(SDKClient): """Creates an Azure Data Lake Store account management client. :ivar config: Configuration for client. @@ -65,6 +66,8 @@ class DataLakeStoreAccountManagementClient(object): :vartype accounts: azure.mgmt.datalake.store.operations.AccountsOperations :ivar firewall_rules: FirewallRules operations :vartype firewall_rules: azure.mgmt.datalake.store.operations.FirewallRulesOperations + :ivar virtual_network_rules: VirtualNetworkRules operations + :vartype virtual_network_rules: azure.mgmt.datalake.store.operations.VirtualNetworkRulesOperations :ivar trusted_id_providers: TrustedIdProviders operations :vartype trusted_id_providers: azure.mgmt.datalake.store.operations.TrustedIdProvidersOperations :ivar operations: Operations operations @@ -86,7 +89,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = DataLakeStoreAccountManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(DataLakeStoreAccountManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '2016-11-01' @@ -97,6 +100,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.firewall_rules = FirewallRulesOperations( self._client, self.config, self._serialize, self._deserialize) + self.virtual_network_rules = VirtualNetworkRulesOperations( + self._client, self.config, self._serialize, self._deserialize) self.trusted_id_providers = TrustedIdProvidersOperations( self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/__init__.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/__init__.py index 11f6533394d4..f4b7b68b94e5 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/__init__.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/__init__.py @@ -9,35 +9,75 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource -from .sub_resource import SubResource -from .encryption_identity import EncryptionIdentity -from .key_vault_meta_info import KeyVaultMetaInfo -from .encryption_config import EncryptionConfig -from .firewall_rule import FirewallRule -from .trusted_id_provider import TrustedIdProvider -from .data_lake_store_account import DataLakeStoreAccount -from .data_lake_store_account_basic import DataLakeStoreAccountBasic -from .operation_display import OperationDisplay -from .operation import Operation -from .operation_list_result import OperationListResult -from .capability_information import CapabilityInformation -from .name_availability_information import NameAvailabilityInformation -from .create_firewall_rule_with_account_parameters import CreateFirewallRuleWithAccountParameters -from .create_trusted_id_provider_with_account_parameters import CreateTrustedIdProviderWithAccountParameters -from .create_data_lake_store_account_parameters import CreateDataLakeStoreAccountParameters -from .update_key_vault_meta_info import UpdateKeyVaultMetaInfo -from .update_encryption_config import UpdateEncryptionConfig -from .update_firewall_rule_with_account_parameters import UpdateFirewallRuleWithAccountParameters -from .update_trusted_id_provider_with_account_parameters import UpdateTrustedIdProviderWithAccountParameters -from .update_data_lake_store_account_parameters import UpdateDataLakeStoreAccountParameters -from .create_or_update_firewall_rule_parameters import CreateOrUpdateFirewallRuleParameters -from .update_firewall_rule_parameters import UpdateFirewallRuleParameters -from .create_or_update_trusted_id_provider_parameters import CreateOrUpdateTrustedIdProviderParameters -from .update_trusted_id_provider_parameters import UpdateTrustedIdProviderParameters -from .check_name_availability_parameters import CheckNameAvailabilityParameters +try: + from .resource_py3 import Resource + from .sub_resource_py3 import SubResource + from .encryption_identity_py3 import EncryptionIdentity + from .key_vault_meta_info_py3 import KeyVaultMetaInfo + from .encryption_config_py3 import EncryptionConfig + from .firewall_rule_py3 import FirewallRule + from .virtual_network_rule_py3 import VirtualNetworkRule + from .trusted_id_provider_py3 import TrustedIdProvider + from .data_lake_store_account_py3 import DataLakeStoreAccount + from .data_lake_store_account_basic_py3 import DataLakeStoreAccountBasic + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .operation_list_result_py3 import OperationListResult + from .capability_information_py3 import CapabilityInformation + from .name_availability_information_py3 import NameAvailabilityInformation + from .create_firewall_rule_with_account_parameters_py3 import CreateFirewallRuleWithAccountParameters + from .create_virtual_network_rule_with_account_parameters_py3 import CreateVirtualNetworkRuleWithAccountParameters + from .create_trusted_id_provider_with_account_parameters_py3 import CreateTrustedIdProviderWithAccountParameters + from .create_data_lake_store_account_parameters_py3 import CreateDataLakeStoreAccountParameters + from .update_key_vault_meta_info_py3 import UpdateKeyVaultMetaInfo + from .update_encryption_config_py3 import UpdateEncryptionConfig + from .update_firewall_rule_with_account_parameters_py3 import UpdateFirewallRuleWithAccountParameters + from .update_virtual_network_rule_with_account_parameters_py3 import UpdateVirtualNetworkRuleWithAccountParameters + from .update_trusted_id_provider_with_account_parameters_py3 import UpdateTrustedIdProviderWithAccountParameters + from .update_data_lake_store_account_parameters_py3 import UpdateDataLakeStoreAccountParameters + from .create_or_update_firewall_rule_parameters_py3 import CreateOrUpdateFirewallRuleParameters + from .update_firewall_rule_parameters_py3 import UpdateFirewallRuleParameters + from .create_or_update_virtual_network_rule_parameters_py3 import CreateOrUpdateVirtualNetworkRuleParameters + from .update_virtual_network_rule_parameters_py3 import UpdateVirtualNetworkRuleParameters + from .create_or_update_trusted_id_provider_parameters_py3 import CreateOrUpdateTrustedIdProviderParameters + from .update_trusted_id_provider_parameters_py3 import UpdateTrustedIdProviderParameters + from .check_name_availability_parameters_py3 import CheckNameAvailabilityParameters +except (SyntaxError, ImportError): + from .resource import Resource + from .sub_resource import SubResource + from .encryption_identity import EncryptionIdentity + from .key_vault_meta_info import KeyVaultMetaInfo + from .encryption_config import EncryptionConfig + from .firewall_rule import FirewallRule + from .virtual_network_rule import VirtualNetworkRule + from .trusted_id_provider import TrustedIdProvider + from .data_lake_store_account import DataLakeStoreAccount + from .data_lake_store_account_basic import DataLakeStoreAccountBasic + from .operation_display import OperationDisplay + from .operation import Operation + from .operation_list_result import OperationListResult + from .capability_information import CapabilityInformation + from .name_availability_information import NameAvailabilityInformation + from .create_firewall_rule_with_account_parameters import CreateFirewallRuleWithAccountParameters + from .create_virtual_network_rule_with_account_parameters import CreateVirtualNetworkRuleWithAccountParameters + from .create_trusted_id_provider_with_account_parameters import CreateTrustedIdProviderWithAccountParameters + from .create_data_lake_store_account_parameters import CreateDataLakeStoreAccountParameters + from .update_key_vault_meta_info import UpdateKeyVaultMetaInfo + from .update_encryption_config import UpdateEncryptionConfig + from .update_firewall_rule_with_account_parameters import UpdateFirewallRuleWithAccountParameters + from .update_virtual_network_rule_with_account_parameters import UpdateVirtualNetworkRuleWithAccountParameters + from .update_trusted_id_provider_with_account_parameters import UpdateTrustedIdProviderWithAccountParameters + from .update_data_lake_store_account_parameters import UpdateDataLakeStoreAccountParameters + from .create_or_update_firewall_rule_parameters import CreateOrUpdateFirewallRuleParameters + from .update_firewall_rule_parameters import UpdateFirewallRuleParameters + from .create_or_update_virtual_network_rule_parameters import CreateOrUpdateVirtualNetworkRuleParameters + from .update_virtual_network_rule_parameters import UpdateVirtualNetworkRuleParameters + from .create_or_update_trusted_id_provider_parameters import CreateOrUpdateTrustedIdProviderParameters + from .update_trusted_id_provider_parameters import UpdateTrustedIdProviderParameters + from .check_name_availability_parameters import CheckNameAvailabilityParameters from .data_lake_store_account_basic_paged import DataLakeStoreAccountBasicPaged from .firewall_rule_paged import FirewallRulePaged +from .virtual_network_rule_paged import VirtualNetworkRulePaged from .trusted_id_provider_paged import TrustedIdProviderPaged from .data_lake_store_account_management_client_enums import ( EncryptionConfigType, @@ -60,6 +100,7 @@ 'KeyVaultMetaInfo', 'EncryptionConfig', 'FirewallRule', + 'VirtualNetworkRule', 'TrustedIdProvider', 'DataLakeStoreAccount', 'DataLakeStoreAccountBasic', @@ -69,20 +110,25 @@ 'CapabilityInformation', 'NameAvailabilityInformation', 'CreateFirewallRuleWithAccountParameters', + 'CreateVirtualNetworkRuleWithAccountParameters', 'CreateTrustedIdProviderWithAccountParameters', 'CreateDataLakeStoreAccountParameters', 'UpdateKeyVaultMetaInfo', 'UpdateEncryptionConfig', 'UpdateFirewallRuleWithAccountParameters', + 'UpdateVirtualNetworkRuleWithAccountParameters', 'UpdateTrustedIdProviderWithAccountParameters', 'UpdateDataLakeStoreAccountParameters', 'CreateOrUpdateFirewallRuleParameters', 'UpdateFirewallRuleParameters', + 'CreateOrUpdateVirtualNetworkRuleParameters', + 'UpdateVirtualNetworkRuleParameters', 'CreateOrUpdateTrustedIdProviderParameters', 'UpdateTrustedIdProviderParameters', 'CheckNameAvailabilityParameters', 'DataLakeStoreAccountBasicPaged', 'FirewallRulePaged', + 'VirtualNetworkRulePaged', 'TrustedIdProviderPaged', 'EncryptionConfigType', 'EncryptionState', diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/capability_information.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/capability_information.py index c8a0789e2244..a5e1fdae71e0 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/capability_information.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/capability_information.py @@ -51,8 +51,8 @@ class CapabilityInformation(Model): 'migration_state': {'key': 'migrationState', 'type': 'bool'}, } - def __init__(self): - super(CapabilityInformation, self).__init__() + def __init__(self, **kwargs): + super(CapabilityInformation, self).__init__(**kwargs) self.subscription_id = None self.state = None self.max_account_count = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/capability_information_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/capability_information_py3.py new file mode 100644 index 000000000000..683f9daccb02 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/capability_information_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CapabilityInformation(Model): + """Subscription-level properties and limits for Data Lake Store. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subscription_id: The subscription credentials that uniquely + identifies the subscription. + :vartype subscription_id: str + :ivar state: The subscription state. Possible values include: + 'Registered', 'Suspended', 'Deleted', 'Unregistered', 'Warned' + :vartype state: str or ~azure.mgmt.datalake.store.models.SubscriptionState + :ivar max_account_count: The maximum supported number of accounts under + this subscription. + :vartype max_account_count: int + :ivar account_count: The current number of accounts under this + subscription. + :vartype account_count: int + :ivar migration_state: The Boolean value of true or false to indicate the + maintenance state. + :vartype migration_state: bool + """ + + _validation = { + 'subscription_id': {'readonly': True}, + 'state': {'readonly': True}, + 'max_account_count': {'readonly': True}, + 'account_count': {'readonly': True}, + 'migration_state': {'readonly': True}, + } + + _attribute_map = { + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'max_account_count': {'key': 'maxAccountCount', 'type': 'int'}, + 'account_count': {'key': 'accountCount', 'type': 'int'}, + 'migration_state': {'key': 'migrationState', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(CapabilityInformation, self).__init__(**kwargs) + self.subscription_id = None + self.state = None + self.max_account_count = None + self.account_count = None + self.migration_state = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/check_name_availability_parameters.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/check_name_availability_parameters.py index aef8408f4712..e2428966a4e1 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/check_name_availability_parameters.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/check_name_availability_parameters.py @@ -18,11 +18,13 @@ class CheckNameAvailabilityParameters(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The Data Lake Store name to check availability for. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The Data Lake Store name to check availability for. :type name: str - :ivar type: The resource type. Note: This should not be set by the user, - as the constant value is Microsoft.DataLakeStore/accounts. Default value: - "Microsoft.DataLakeStore/accounts" . + :ivar type: Required. The resource type. Note: This should not be set by + the user, as the constant value is Microsoft.DataLakeStore/accounts. + Default value: "Microsoft.DataLakeStore/accounts" . :vartype type: str """ @@ -38,6 +40,6 @@ class CheckNameAvailabilityParameters(Model): type = "Microsoft.DataLakeStore/accounts" - def __init__(self, name): - super(CheckNameAvailabilityParameters, self).__init__() - self.name = name + def __init__(self, **kwargs): + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/check_name_availability_parameters_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/check_name_availability_parameters_py3.py new file mode 100644 index 000000000000..70886bdd3521 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/check_name_availability_parameters_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityParameters(Model): + """Data Lake Store account name availability check parameters. + + 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 name: Required. The Data Lake Store name to check availability for. + :type name: str + :ivar type: Required. The resource type. Note: This should not be set by + the user, as the constant value is Microsoft.DataLakeStore/accounts. + Default value: "Microsoft.DataLakeStore/accounts" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.DataLakeStore/accounts" + + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_data_lake_store_account_parameters.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_data_lake_store_account_parameters.py index 71cd908ad533..f94222452d42 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_data_lake_store_account_parameters.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_data_lake_store_account_parameters.py @@ -15,7 +15,9 @@ class CreateDataLakeStoreAccountParameters(Model): """CreateDataLakeStoreAccountParameters. - :param location: The resource location. + All required parameters must be populated in order to send to Azure. + + :param location: Required. The resource location. :type location: str :param tags: The resource tags. :type tags: dict[str, str] @@ -35,6 +37,10 @@ class CreateDataLakeStoreAccountParameters(Model): Data Lake Store account. :type firewall_rules: list[~azure.mgmt.datalake.store.models.CreateFirewallRuleWithAccountParameters] + :param virtual_network_rules: The list of virtual network rules associated + with this Data Lake Store account. + :type virtual_network_rules: + list[~azure.mgmt.datalake.store.models.CreateVirtualNetworkRuleWithAccountParameters] :param firewall_state: The current state of the IP address firewall for this Data Lake Store account. Possible values include: 'Enabled', 'Disabled' @@ -73,6 +79,7 @@ class CreateDataLakeStoreAccountParameters(Model): 'encryption_config': {'key': 'properties.encryptionConfig', 'type': 'EncryptionConfig'}, 'encryption_state': {'key': 'properties.encryptionState', 'type': 'EncryptionState'}, 'firewall_rules': {'key': 'properties.firewallRules', 'type': '[CreateFirewallRuleWithAccountParameters]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[CreateVirtualNetworkRuleWithAccountParameters]'}, 'firewall_state': {'key': 'properties.firewallState', 'type': 'FirewallState'}, 'firewall_allow_azure_ips': {'key': 'properties.firewallAllowAzureIps', 'type': 'FirewallAllowAzureIpsState'}, 'trusted_id_providers': {'key': 'properties.trustedIdProviders', 'type': '[CreateTrustedIdProviderWithAccountParameters]'}, @@ -80,17 +87,18 @@ class CreateDataLakeStoreAccountParameters(Model): 'new_tier': {'key': 'properties.newTier', 'type': 'TierType'}, } - def __init__(self, location, tags=None, identity=None, default_group=None, encryption_config=None, encryption_state=None, firewall_rules=None, firewall_state=None, firewall_allow_azure_ips=None, trusted_id_providers=None, trusted_id_provider_state=None, new_tier=None): - super(CreateDataLakeStoreAccountParameters, self).__init__() - self.location = location - self.tags = tags - self.identity = identity - self.default_group = default_group - self.encryption_config = encryption_config - self.encryption_state = encryption_state - self.firewall_rules = firewall_rules - self.firewall_state = firewall_state - self.firewall_allow_azure_ips = firewall_allow_azure_ips - self.trusted_id_providers = trusted_id_providers - self.trusted_id_provider_state = trusted_id_provider_state - self.new_tier = new_tier + def __init__(self, **kwargs): + super(CreateDataLakeStoreAccountParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + self.default_group = kwargs.get('default_group', None) + self.encryption_config = kwargs.get('encryption_config', None) + self.encryption_state = kwargs.get('encryption_state', None) + self.firewall_rules = kwargs.get('firewall_rules', None) + self.virtual_network_rules = kwargs.get('virtual_network_rules', None) + self.firewall_state = kwargs.get('firewall_state', None) + self.firewall_allow_azure_ips = kwargs.get('firewall_allow_azure_ips', None) + self.trusted_id_providers = kwargs.get('trusted_id_providers', None) + self.trusted_id_provider_state = kwargs.get('trusted_id_provider_state', None) + self.new_tier = kwargs.get('new_tier', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_data_lake_store_account_parameters_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_data_lake_store_account_parameters_py3.py new file mode 100644 index 000000000000..1ea6a258b4f3 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_data_lake_store_account_parameters_py3.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateDataLakeStoreAccountParameters(Model): + """CreateDataLakeStoreAccountParameters. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param identity: The Key Vault encryption identity, if any. + :type identity: ~azure.mgmt.datalake.store.models.EncryptionIdentity + :param default_group: The default owner group for all new folders and + files created in the Data Lake Store account. + :type default_group: str + :param encryption_config: The Key Vault encryption configuration. + :type encryption_config: + ~azure.mgmt.datalake.store.models.EncryptionConfig + :param encryption_state: The current state of encryption for this Data + Lake Store account. Possible values include: 'Enabled', 'Disabled' + :type encryption_state: str or + ~azure.mgmt.datalake.store.models.EncryptionState + :param firewall_rules: The list of firewall rules associated with this + Data Lake Store account. + :type firewall_rules: + list[~azure.mgmt.datalake.store.models.CreateFirewallRuleWithAccountParameters] + :param virtual_network_rules: The list of virtual network rules associated + with this Data Lake Store account. + :type virtual_network_rules: + list[~azure.mgmt.datalake.store.models.CreateVirtualNetworkRuleWithAccountParameters] + :param firewall_state: The current state of the IP address firewall for + this Data Lake Store account. Possible values include: 'Enabled', + 'Disabled' + :type firewall_state: str or + ~azure.mgmt.datalake.store.models.FirewallState + :param firewall_allow_azure_ips: The current state of allowing or + disallowing IPs originating within Azure through the firewall. If the + firewall is disabled, this is not enforced. Possible values include: + 'Enabled', 'Disabled' + :type firewall_allow_azure_ips: str or + ~azure.mgmt.datalake.store.models.FirewallAllowAzureIpsState + :param trusted_id_providers: The list of trusted identity providers + associated with this Data Lake Store account. + :type trusted_id_providers: + list[~azure.mgmt.datalake.store.models.CreateTrustedIdProviderWithAccountParameters] + :param trusted_id_provider_state: The current state of the trusted + identity provider feature for this Data Lake Store account. Possible + values include: 'Enabled', 'Disabled' + :type trusted_id_provider_state: str or + ~azure.mgmt.datalake.store.models.TrustedIdProviderState + :param new_tier: The commitment tier to use for next month. Possible + values include: 'Consumption', 'Commitment_1TB', 'Commitment_10TB', + 'Commitment_100TB', 'Commitment_500TB', 'Commitment_1PB', 'Commitment_5PB' + :type new_tier: str or ~azure.mgmt.datalake.store.models.TierType + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'EncryptionIdentity'}, + 'default_group': {'key': 'properties.defaultGroup', 'type': 'str'}, + 'encryption_config': {'key': 'properties.encryptionConfig', 'type': 'EncryptionConfig'}, + 'encryption_state': {'key': 'properties.encryptionState', 'type': 'EncryptionState'}, + 'firewall_rules': {'key': 'properties.firewallRules', 'type': '[CreateFirewallRuleWithAccountParameters]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[CreateVirtualNetworkRuleWithAccountParameters]'}, + 'firewall_state': {'key': 'properties.firewallState', 'type': 'FirewallState'}, + 'firewall_allow_azure_ips': {'key': 'properties.firewallAllowAzureIps', 'type': 'FirewallAllowAzureIpsState'}, + 'trusted_id_providers': {'key': 'properties.trustedIdProviders', 'type': '[CreateTrustedIdProviderWithAccountParameters]'}, + 'trusted_id_provider_state': {'key': 'properties.trustedIdProviderState', 'type': 'TrustedIdProviderState'}, + 'new_tier': {'key': 'properties.newTier', 'type': 'TierType'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, default_group: str=None, encryption_config=None, encryption_state=None, firewall_rules=None, virtual_network_rules=None, firewall_state=None, firewall_allow_azure_ips=None, trusted_id_providers=None, trusted_id_provider_state=None, new_tier=None, **kwargs) -> None: + super(CreateDataLakeStoreAccountParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.identity = identity + self.default_group = default_group + self.encryption_config = encryption_config + self.encryption_state = encryption_state + self.firewall_rules = firewall_rules + self.virtual_network_rules = virtual_network_rules + self.firewall_state = firewall_state + self.firewall_allow_azure_ips = firewall_allow_azure_ips + self.trusted_id_providers = trusted_id_providers + self.trusted_id_provider_state = trusted_id_provider_state + self.new_tier = new_tier diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_firewall_rule_with_account_parameters.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_firewall_rule_with_account_parameters.py index 2a73936e93b8..e916a6fec0cf 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_firewall_rule_with_account_parameters.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_firewall_rule_with_account_parameters.py @@ -16,13 +16,17 @@ class CreateFirewallRuleWithAccountParameters(Model): """The parameters used to create a new firewall rule while creating a new Data Lake Store account. - :param name: The unique name of the firewall rule to create. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the firewall rule to create. :type name: str - :param start_ip_address: The start IP address for the firewall rule. This - can be either ipv4 or ipv6. Start and End should be in the same protocol. + :param start_ip_address: Required. The start IP address for the firewall + rule. This can be either ipv4 or ipv6. Start and End should be in the same + protocol. :type start_ip_address: str - :param end_ip_address: The end IP address for the firewall rule. This can - be either ipv4 or ipv6. Start and End should be in the same protocol. + :param end_ip_address: Required. The end IP address for the firewall rule. + This can be either ipv4 or ipv6. Start and End should be in the same + protocol. :type end_ip_address: str """ @@ -38,8 +42,8 @@ class CreateFirewallRuleWithAccountParameters(Model): 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, } - def __init__(self, name, start_ip_address, end_ip_address): - super(CreateFirewallRuleWithAccountParameters, self).__init__() - self.name = name - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address + def __init__(self, **kwargs): + super(CreateFirewallRuleWithAccountParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.start_ip_address = kwargs.get('start_ip_address', None) + self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_firewall_rule_with_account_parameters_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_firewall_rule_with_account_parameters_py3.py new file mode 100644 index 000000000000..6892ba667a5e --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_firewall_rule_with_account_parameters_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateFirewallRuleWithAccountParameters(Model): + """The parameters used to create a new firewall rule while creating a new Data + Lake Store account. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the firewall rule to create. + :type name: str + :param start_ip_address: Required. The start IP address for the firewall + rule. This can be either ipv4 or ipv6. Start and End should be in the same + protocol. + :type start_ip_address: str + :param end_ip_address: Required. The end IP address for the firewall rule. + This can be either ipv4 or ipv6. Start and End should be in the same + protocol. + :type end_ip_address: str + """ + + _validation = { + 'name': {'required': True}, + 'start_ip_address': {'required': True}, + 'end_ip_address': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, *, name: str, start_ip_address: str, end_ip_address: str, **kwargs) -> None: + super(CreateFirewallRuleWithAccountParameters, self).__init__(**kwargs) + self.name = name + self.start_ip_address = start_ip_address + self.end_ip_address = end_ip_address diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_firewall_rule_parameters.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_firewall_rule_parameters.py index bb0576be0fb4..47cef2ac665a 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_firewall_rule_parameters.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_firewall_rule_parameters.py @@ -15,11 +15,15 @@ class CreateOrUpdateFirewallRuleParameters(Model): """The parameters used to create a new firewall rule. - :param start_ip_address: The start IP address for the firewall rule. This - can be either ipv4 or ipv6. Start and End should be in the same protocol. + All required parameters must be populated in order to send to Azure. + + :param start_ip_address: Required. The start IP address for the firewall + rule. This can be either ipv4 or ipv6. Start and End should be in the same + protocol. :type start_ip_address: str - :param end_ip_address: The end IP address for the firewall rule. This can - be either ipv4 or ipv6. Start and End should be in the same protocol. + :param end_ip_address: Required. The end IP address for the firewall rule. + This can be either ipv4 or ipv6. Start and End should be in the same + protocol. :type end_ip_address: str """ @@ -33,7 +37,7 @@ class CreateOrUpdateFirewallRuleParameters(Model): 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, } - def __init__(self, start_ip_address, end_ip_address): - super(CreateOrUpdateFirewallRuleParameters, self).__init__() - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address + def __init__(self, **kwargs): + super(CreateOrUpdateFirewallRuleParameters, self).__init__(**kwargs) + self.start_ip_address = kwargs.get('start_ip_address', None) + self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_firewall_rule_parameters_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_firewall_rule_parameters_py3.py new file mode 100644 index 000000000000..263552b9e691 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_firewall_rule_parameters_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateOrUpdateFirewallRuleParameters(Model): + """The parameters used to create a new firewall rule. + + All required parameters must be populated in order to send to Azure. + + :param start_ip_address: Required. The start IP address for the firewall + rule. This can be either ipv4 or ipv6. Start and End should be in the same + protocol. + :type start_ip_address: str + :param end_ip_address: Required. The end IP address for the firewall rule. + This can be either ipv4 or ipv6. Start and End should be in the same + protocol. + :type end_ip_address: str + """ + + _validation = { + 'start_ip_address': {'required': True}, + 'end_ip_address': {'required': True}, + } + + _attribute_map = { + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: + super(CreateOrUpdateFirewallRuleParameters, self).__init__(**kwargs) + self.start_ip_address = start_ip_address + self.end_ip_address = end_ip_address diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_trusted_id_provider_parameters.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_trusted_id_provider_parameters.py index 98fc7ecd4e63..9cfa064de872 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_trusted_id_provider_parameters.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_trusted_id_provider_parameters.py @@ -15,7 +15,9 @@ class CreateOrUpdateTrustedIdProviderParameters(Model): """The parameters used to create a new trusted identity provider. - :param id_provider: The URL of this trusted identity provider. + All required parameters must be populated in order to send to Azure. + + :param id_provider: Required. The URL of this trusted identity provider. :type id_provider: str """ @@ -27,6 +29,6 @@ class CreateOrUpdateTrustedIdProviderParameters(Model): 'id_provider': {'key': 'properties.idProvider', 'type': 'str'}, } - def __init__(self, id_provider): - super(CreateOrUpdateTrustedIdProviderParameters, self).__init__() - self.id_provider = id_provider + def __init__(self, **kwargs): + super(CreateOrUpdateTrustedIdProviderParameters, self).__init__(**kwargs) + self.id_provider = kwargs.get('id_provider', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_trusted_id_provider_parameters_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_trusted_id_provider_parameters_py3.py new file mode 100644 index 000000000000..70ca9f133148 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_trusted_id_provider_parameters_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateOrUpdateTrustedIdProviderParameters(Model): + """The parameters used to create a new trusted identity provider. + + All required parameters must be populated in order to send to Azure. + + :param id_provider: Required. The URL of this trusted identity provider. + :type id_provider: str + """ + + _validation = { + 'id_provider': {'required': True}, + } + + _attribute_map = { + 'id_provider': {'key': 'properties.idProvider', 'type': 'str'}, + } + + def __init__(self, *, id_provider: str, **kwargs) -> None: + super(CreateOrUpdateTrustedIdProviderParameters, self).__init__(**kwargs) + self.id_provider = id_provider diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_virtual_network_rule_parameters.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_virtual_network_rule_parameters.py new file mode 100644 index 000000000000..70547f60b8b2 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_virtual_network_rule_parameters.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateOrUpdateVirtualNetworkRuleParameters(Model): + """The parameters used to create a new virtual network rule. + + All required parameters must be populated in order to send to Azure. + + :param subnet_id: Required. The resource identifier for the subnet. + :type subnet_id: str + """ + + _validation = { + 'subnet_id': {'required': True}, + } + + _attribute_map = { + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreateOrUpdateVirtualNetworkRuleParameters, self).__init__(**kwargs) + self.subnet_id = kwargs.get('subnet_id', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_virtual_network_rule_parameters_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_virtual_network_rule_parameters_py3.py new file mode 100644 index 000000000000..fcfb95f07a8d --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_or_update_virtual_network_rule_parameters_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateOrUpdateVirtualNetworkRuleParameters(Model): + """The parameters used to create a new virtual network rule. + + All required parameters must be populated in order to send to Azure. + + :param subnet_id: Required. The resource identifier for the subnet. + :type subnet_id: str + """ + + _validation = { + 'subnet_id': {'required': True}, + } + + _attribute_map = { + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + } + + def __init__(self, *, subnet_id: str, **kwargs) -> None: + super(CreateOrUpdateVirtualNetworkRuleParameters, self).__init__(**kwargs) + self.subnet_id = subnet_id diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_trusted_id_provider_with_account_parameters.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_trusted_id_provider_with_account_parameters.py index a6a138a9809d..4a0e6339dfa0 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_trusted_id_provider_with_account_parameters.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_trusted_id_provider_with_account_parameters.py @@ -16,9 +16,12 @@ class CreateTrustedIdProviderWithAccountParameters(Model): """The parameters used to create a new trusted identity provider while creating a new Data Lake Store account. - :param name: The unique name of the trusted identity provider to create. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the trusted identity provider to + create. :type name: str - :param id_provider: The URL of this trusted identity provider. + :param id_provider: Required. The URL of this trusted identity provider. :type id_provider: str """ @@ -32,7 +35,7 @@ class CreateTrustedIdProviderWithAccountParameters(Model): 'id_provider': {'key': 'properties.idProvider', 'type': 'str'}, } - def __init__(self, name, id_provider): - super(CreateTrustedIdProviderWithAccountParameters, self).__init__() - self.name = name - self.id_provider = id_provider + def __init__(self, **kwargs): + super(CreateTrustedIdProviderWithAccountParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.id_provider = kwargs.get('id_provider', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_trusted_id_provider_with_account_parameters_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_trusted_id_provider_with_account_parameters_py3.py new file mode 100644 index 000000000000..66fc5888e5af --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_trusted_id_provider_with_account_parameters_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateTrustedIdProviderWithAccountParameters(Model): + """The parameters used to create a new trusted identity provider while + creating a new Data Lake Store account. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the trusted identity provider to + create. + :type name: str + :param id_provider: Required. The URL of this trusted identity provider. + :type id_provider: str + """ + + _validation = { + 'name': {'required': True}, + 'id_provider': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id_provider': {'key': 'properties.idProvider', 'type': 'str'}, + } + + def __init__(self, *, name: str, id_provider: str, **kwargs) -> None: + super(CreateTrustedIdProviderWithAccountParameters, self).__init__(**kwargs) + self.name = name + self.id_provider = id_provider diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_virtual_network_rule_with_account_parameters.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_virtual_network_rule_with_account_parameters.py new file mode 100644 index 000000000000..2dc3fdc8b7ad --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_virtual_network_rule_with_account_parameters.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateVirtualNetworkRuleWithAccountParameters(Model): + """The parameters used to create a new virtual network rule while creating a + new Data Lake Store account. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the virtual network rule to + create. + :type name: str + :param subnet_id: Required. The resource identifier for the subnet. + :type subnet_id: str + """ + + _validation = { + 'name': {'required': True}, + 'subnet_id': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreateVirtualNetworkRuleWithAccountParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet_id = kwargs.get('subnet_id', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_virtual_network_rule_with_account_parameters_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_virtual_network_rule_with_account_parameters_py3.py new file mode 100644 index 000000000000..47786a85cd78 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/create_virtual_network_rule_with_account_parameters_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateVirtualNetworkRuleWithAccountParameters(Model): + """The parameters used to create a new virtual network rule while creating a + new Data Lake Store account. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the virtual network rule to + create. + :type name: str + :param subnet_id: Required. The resource identifier for the subnet. + :type subnet_id: str + """ + + _validation = { + 'name': {'required': True}, + 'subnet_id': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + } + + def __init__(self, *, name: str, subnet_id: str, **kwargs) -> None: + super(CreateVirtualNetworkRuleWithAccountParameters, self).__init__(**kwargs) + self.name = name + self.subnet_id = subnet_id diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account.py index 4c5c5f904b06..4df64e5350eb 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account.py @@ -68,6 +68,10 @@ class DataLakeStoreAccount(Resource): Lake Store account. :vartype firewall_rules: list[~azure.mgmt.datalake.store.models.FirewallRule] + :ivar virtual_network_rules: The list of virtual network rules associated + with this Data Lake Store account. + :vartype virtual_network_rules: + list[~azure.mgmt.datalake.store.models.VirtualNetworkRule] :ivar firewall_state: The current state of the IP address firewall for this Data Lake Store account. Possible values include: 'Enabled', 'Disabled' @@ -117,6 +121,7 @@ class DataLakeStoreAccount(Resource): 'encryption_state': {'readonly': True}, 'encryption_provisioning_state': {'readonly': True}, 'firewall_rules': {'readonly': True}, + 'virtual_network_rules': {'readonly': True}, 'firewall_state': {'readonly': True}, 'firewall_allow_azure_ips': {'readonly': True}, 'trusted_id_providers': {'readonly': True}, @@ -143,6 +148,7 @@ class DataLakeStoreAccount(Resource): 'encryption_state': {'key': 'properties.encryptionState', 'type': 'EncryptionState'}, 'encryption_provisioning_state': {'key': 'properties.encryptionProvisioningState', 'type': 'EncryptionProvisioningState'}, 'firewall_rules': {'key': 'properties.firewallRules', 'type': '[FirewallRule]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, 'firewall_state': {'key': 'properties.firewallState', 'type': 'FirewallState'}, 'firewall_allow_azure_ips': {'key': 'properties.firewallAllowAzureIps', 'type': 'FirewallAllowAzureIpsState'}, 'trusted_id_providers': {'key': 'properties.trustedIdProviders', 'type': '[TrustedIdProvider]'}, @@ -151,8 +157,8 @@ class DataLakeStoreAccount(Resource): 'current_tier': {'key': 'properties.currentTier', 'type': 'TierType'}, } - def __init__(self): - super(DataLakeStoreAccount, self).__init__() + def __init__(self, **kwargs): + super(DataLakeStoreAccount, self).__init__(**kwargs) self.identity = None self.account_id = None self.provisioning_state = None @@ -165,6 +171,7 @@ def __init__(self): self.encryption_state = None self.encryption_provisioning_state = None self.firewall_rules = None + self.virtual_network_rules = None self.firewall_state = None self.firewall_allow_azure_ips = None self.trusted_id_providers = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account_basic.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account_basic.py index 427f8ff1d13d..aa7b91f5e581 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account_basic.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account_basic.py @@ -77,8 +77,8 @@ class DataLakeStoreAccountBasic(Resource): 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, } - def __init__(self): - super(DataLakeStoreAccountBasic, self).__init__() + def __init__(self, **kwargs): + super(DataLakeStoreAccountBasic, self).__init__(**kwargs) self.account_id = None self.provisioning_state = None self.state = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account_basic_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account_basic_py3.py new file mode 100644 index 000000000000..e01cf301f3d4 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account_basic_py3.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class DataLakeStoreAccountBasic(Resource): + """Basic Data Lake Store account information, returned on list calls. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar location: The resource location. + :vartype location: str + :ivar tags: The resource tags. + :vartype tags: dict[str, str] + :ivar account_id: The unique identifier associated with this Data Lake + Store account. + :vartype account_id: str + :ivar provisioning_state: The provisioning status of the Data Lake Store + account. Possible values include: 'Failed', 'Creating', 'Running', + 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted', + 'Undeleting', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.datalake.store.models.DataLakeStoreAccountStatus + :ivar state: The state of the Data Lake Store account. Possible values + include: 'Active', 'Suspended' + :vartype state: str or + ~azure.mgmt.datalake.store.models.DataLakeStoreAccountState + :ivar creation_time: The account creation time. + :vartype creation_time: datetime + :ivar last_modified_time: The account last modified time. + :vartype last_modified_time: datetime + :ivar endpoint: The full CName endpoint for this account. + :vartype endpoint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'account_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'account_id': {'key': 'properties.accountId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'DataLakeStoreAccountStatus'}, + 'state': {'key': 'properties.state', 'type': 'DataLakeStoreAccountState'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DataLakeStoreAccountBasic, self).__init__(**kwargs) + self.account_id = None + self.provisioning_state = None + self.state = None + self.creation_time = None + self.last_modified_time = None + self.endpoint = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account_management_client_enums.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account_management_client_enums.py index 539a3cb2893a..26b787263665 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account_management_client_enums.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account_management_client_enums.py @@ -12,43 +12,43 @@ from enum import Enum -class EncryptionConfigType(Enum): +class EncryptionConfigType(str, Enum): user_managed = "UserManaged" service_managed = "ServiceManaged" -class EncryptionState(Enum): +class EncryptionState(str, Enum): enabled = "Enabled" disabled = "Disabled" -class EncryptionProvisioningState(Enum): +class EncryptionProvisioningState(str, Enum): creating = "Creating" succeeded = "Succeeded" -class FirewallState(Enum): +class FirewallState(str, Enum): enabled = "Enabled" disabled = "Disabled" -class FirewallAllowAzureIpsState(Enum): +class FirewallAllowAzureIpsState(str, Enum): enabled = "Enabled" disabled = "Disabled" -class TrustedIdProviderState(Enum): +class TrustedIdProviderState(str, Enum): enabled = "Enabled" disabled = "Disabled" -class TierType(Enum): +class TierType(str, Enum): consumption = "Consumption" commitment_1_tb = "Commitment_1TB" @@ -59,7 +59,7 @@ class TierType(Enum): commitment_5_pb = "Commitment_5PB" -class DataLakeStoreAccountStatus(Enum): +class DataLakeStoreAccountStatus(str, Enum): failed = "Failed" creating = "Creating" @@ -74,20 +74,20 @@ class DataLakeStoreAccountStatus(Enum): canceled = "Canceled" -class DataLakeStoreAccountState(Enum): +class DataLakeStoreAccountState(str, Enum): active = "Active" suspended = "Suspended" -class OperationOrigin(Enum): +class OperationOrigin(str, Enum): user = "user" system = "system" usersystem = "user,system" -class SubscriptionState(Enum): +class SubscriptionState(str, Enum): registered = "Registered" suspended = "Suspended" diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account_py3.py new file mode 100644 index 000000000000..3af1a2211161 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account_py3.py @@ -0,0 +1,180 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class DataLakeStoreAccount(Resource): + """Data Lake Store account information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar location: The resource location. + :vartype location: str + :ivar tags: The resource tags. + :vartype tags: dict[str, str] + :ivar identity: The Key Vault encryption identity, if any. + :vartype identity: ~azure.mgmt.datalake.store.models.EncryptionIdentity + :ivar account_id: The unique identifier associated with this Data Lake + Store account. + :vartype account_id: str + :ivar provisioning_state: The provisioning status of the Data Lake Store + account. Possible values include: 'Failed', 'Creating', 'Running', + 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted', + 'Undeleting', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.datalake.store.models.DataLakeStoreAccountStatus + :ivar state: The state of the Data Lake Store account. Possible values + include: 'Active', 'Suspended' + :vartype state: str or + ~azure.mgmt.datalake.store.models.DataLakeStoreAccountState + :ivar creation_time: The account creation time. + :vartype creation_time: datetime + :ivar last_modified_time: The account last modified time. + :vartype last_modified_time: datetime + :ivar endpoint: The full CName endpoint for this account. + :vartype endpoint: str + :ivar default_group: The default owner group for all new folders and files + created in the Data Lake Store account. + :vartype default_group: str + :ivar encryption_config: The Key Vault encryption configuration. + :vartype encryption_config: + ~azure.mgmt.datalake.store.models.EncryptionConfig + :ivar encryption_state: The current state of encryption for this Data Lake + Store account. Possible values include: 'Enabled', 'Disabled' + :vartype encryption_state: str or + ~azure.mgmt.datalake.store.models.EncryptionState + :ivar encryption_provisioning_state: The current state of encryption + provisioning for this Data Lake Store account. Possible values include: + 'Creating', 'Succeeded' + :vartype encryption_provisioning_state: str or + ~azure.mgmt.datalake.store.models.EncryptionProvisioningState + :ivar firewall_rules: The list of firewall rules associated with this Data + Lake Store account. + :vartype firewall_rules: + list[~azure.mgmt.datalake.store.models.FirewallRule] + :ivar virtual_network_rules: The list of virtual network rules associated + with this Data Lake Store account. + :vartype virtual_network_rules: + list[~azure.mgmt.datalake.store.models.VirtualNetworkRule] + :ivar firewall_state: The current state of the IP address firewall for + this Data Lake Store account. Possible values include: 'Enabled', + 'Disabled' + :vartype firewall_state: str or + ~azure.mgmt.datalake.store.models.FirewallState + :ivar firewall_allow_azure_ips: The current state of allowing or + disallowing IPs originating within Azure through the firewall. If the + firewall is disabled, this is not enforced. Possible values include: + 'Enabled', 'Disabled' + :vartype firewall_allow_azure_ips: str or + ~azure.mgmt.datalake.store.models.FirewallAllowAzureIpsState + :ivar trusted_id_providers: The list of trusted identity providers + associated with this Data Lake Store account. + :vartype trusted_id_providers: + list[~azure.mgmt.datalake.store.models.TrustedIdProvider] + :ivar trusted_id_provider_state: The current state of the trusted identity + provider feature for this Data Lake Store account. Possible values + include: 'Enabled', 'Disabled' + :vartype trusted_id_provider_state: str or + ~azure.mgmt.datalake.store.models.TrustedIdProviderState + :ivar new_tier: The commitment tier to use for next month. Possible values + include: 'Consumption', 'Commitment_1TB', 'Commitment_10TB', + 'Commitment_100TB', 'Commitment_500TB', 'Commitment_1PB', 'Commitment_5PB' + :vartype new_tier: str or ~azure.mgmt.datalake.store.models.TierType + :ivar current_tier: The commitment tier in use for the current month. + Possible values include: 'Consumption', 'Commitment_1TB', + 'Commitment_10TB', 'Commitment_100TB', 'Commitment_500TB', + 'Commitment_1PB', 'Commitment_5PB' + :vartype current_tier: str or ~azure.mgmt.datalake.store.models.TierType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'identity': {'readonly': True}, + 'account_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'endpoint': {'readonly': True}, + 'default_group': {'readonly': True}, + 'encryption_config': {'readonly': True}, + 'encryption_state': {'readonly': True}, + 'encryption_provisioning_state': {'readonly': True}, + 'firewall_rules': {'readonly': True}, + 'virtual_network_rules': {'readonly': True}, + 'firewall_state': {'readonly': True}, + 'firewall_allow_azure_ips': {'readonly': True}, + 'trusted_id_providers': {'readonly': True}, + 'trusted_id_provider_state': {'readonly': True}, + 'new_tier': {'readonly': True}, + 'current_tier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'EncryptionIdentity'}, + 'account_id': {'key': 'properties.accountId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'DataLakeStoreAccountStatus'}, + 'state': {'key': 'properties.state', 'type': 'DataLakeStoreAccountState'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, + 'default_group': {'key': 'properties.defaultGroup', 'type': 'str'}, + 'encryption_config': {'key': 'properties.encryptionConfig', 'type': 'EncryptionConfig'}, + 'encryption_state': {'key': 'properties.encryptionState', 'type': 'EncryptionState'}, + 'encryption_provisioning_state': {'key': 'properties.encryptionProvisioningState', 'type': 'EncryptionProvisioningState'}, + 'firewall_rules': {'key': 'properties.firewallRules', 'type': '[FirewallRule]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'firewall_state': {'key': 'properties.firewallState', 'type': 'FirewallState'}, + 'firewall_allow_azure_ips': {'key': 'properties.firewallAllowAzureIps', 'type': 'FirewallAllowAzureIpsState'}, + 'trusted_id_providers': {'key': 'properties.trustedIdProviders', 'type': '[TrustedIdProvider]'}, + 'trusted_id_provider_state': {'key': 'properties.trustedIdProviderState', 'type': 'TrustedIdProviderState'}, + 'new_tier': {'key': 'properties.newTier', 'type': 'TierType'}, + 'current_tier': {'key': 'properties.currentTier', 'type': 'TierType'}, + } + + def __init__(self, **kwargs) -> None: + super(DataLakeStoreAccount, self).__init__(**kwargs) + self.identity = None + self.account_id = None + self.provisioning_state = None + self.state = None + self.creation_time = None + self.last_modified_time = None + self.endpoint = None + self.default_group = None + self.encryption_config = None + self.encryption_state = None + self.encryption_provisioning_state = None + self.firewall_rules = None + self.virtual_network_rules = None + self.firewall_state = None + self.firewall_allow_azure_ips = None + self.trusted_id_providers = None + self.trusted_id_provider_state = None + self.new_tier = None + self.current_tier = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/encryption_config.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/encryption_config.py index a2b6eed8bf03..b653ef23a596 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/encryption_config.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/encryption_config.py @@ -15,9 +15,11 @@ class EncryptionConfig(Model): """The encryption configuration for the account. - :param type: The type of encryption configuration being used. Currently - the only supported types are 'UserManaged' and 'ServiceManaged'. Possible - values include: 'UserManaged', 'ServiceManaged' + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of encryption configuration being used. + Currently the only supported types are 'UserManaged' and 'ServiceManaged'. + Possible values include: 'UserManaged', 'ServiceManaged' :type type: str or ~azure.mgmt.datalake.store.models.EncryptionConfigType :param key_vault_meta_info: The Key Vault information for connecting to user managed encryption keys. @@ -34,7 +36,7 @@ class EncryptionConfig(Model): 'key_vault_meta_info': {'key': 'keyVaultMetaInfo', 'type': 'KeyVaultMetaInfo'}, } - def __init__(self, type, key_vault_meta_info=None): - super(EncryptionConfig, self).__init__() - self.type = type - self.key_vault_meta_info = key_vault_meta_info + def __init__(self, **kwargs): + super(EncryptionConfig, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.key_vault_meta_info = kwargs.get('key_vault_meta_info', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/encryption_config_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/encryption_config_py3.py new file mode 100644 index 000000000000..cdc4b47e6be2 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/encryption_config_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EncryptionConfig(Model): + """The encryption configuration for the account. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of encryption configuration being used. + Currently the only supported types are 'UserManaged' and 'ServiceManaged'. + Possible values include: 'UserManaged', 'ServiceManaged' + :type type: str or ~azure.mgmt.datalake.store.models.EncryptionConfigType + :param key_vault_meta_info: The Key Vault information for connecting to + user managed encryption keys. + :type key_vault_meta_info: + ~azure.mgmt.datalake.store.models.KeyVaultMetaInfo + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'EncryptionConfigType'}, + 'key_vault_meta_info': {'key': 'keyVaultMetaInfo', 'type': 'KeyVaultMetaInfo'}, + } + + def __init__(self, *, type, key_vault_meta_info=None, **kwargs) -> None: + super(EncryptionConfig, self).__init__(**kwargs) + self.type = type + self.key_vault_meta_info = key_vault_meta_info diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/encryption_identity.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/encryption_identity.py index d53a14925916..ebc74ea333ca 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/encryption_identity.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/encryption_identity.py @@ -18,8 +18,10 @@ class EncryptionIdentity(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The type of encryption being used. Currently the only - supported type is 'SystemAssigned'. Default value: "SystemAssigned" . + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The type of encryption being used. Currently the + only supported type is 'SystemAssigned'. Default value: "SystemAssigned" . :vartype type: str :ivar principal_id: The principal identifier associated with the encryption. @@ -42,7 +44,7 @@ class EncryptionIdentity(Model): type = "SystemAssigned" - def __init__(self): - super(EncryptionIdentity, self).__init__() + def __init__(self, **kwargs): + super(EncryptionIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/encryption_identity_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/encryption_identity_py3.py new file mode 100644 index 000000000000..6dc9b776e72b --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/encryption_identity_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EncryptionIdentity(Model): + """The encryption identity properties. + + 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 type of encryption being used. Currently the + only supported type is 'SystemAssigned'. Default value: "SystemAssigned" . + :vartype type: str + :ivar principal_id: The principal identifier associated with the + encryption. + :vartype principal_id: str + :ivar tenant_id: The tenant identifier associated with the encryption. + :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) -> None: + super(EncryptionIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/firewall_rule.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/firewall_rule.py index b36a96c3eb10..37baa6b6167c 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/firewall_rule.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/firewall_rule.py @@ -48,7 +48,7 @@ class FirewallRule(SubResource): 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, } - def __init__(self): - super(FirewallRule, self).__init__() + def __init__(self, **kwargs): + super(FirewallRule, self).__init__(**kwargs) self.start_ip_address = None self.end_ip_address = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/firewall_rule_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/firewall_rule_py3.py new file mode 100644 index 000000000000..8eb5f6f8084e --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/firewall_rule_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_resource_py3 import SubResource + + +class FirewallRule(SubResource): + """Data Lake Store firewall rule information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar start_ip_address: The start IP address for the firewall rule. This + can be either ipv4 or ipv6. Start and End should be in the same protocol. + :vartype start_ip_address: str + :ivar end_ip_address: The end IP address for the firewall rule. This can + be either ipv4 or ipv6. Start and End should be in the same protocol. + :vartype end_ip_address: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'start_ip_address': {'readonly': True}, + 'end_ip_address': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(FirewallRule, self).__init__(**kwargs) + self.start_ip_address = None + self.end_ip_address = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/key_vault_meta_info.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/key_vault_meta_info.py index c6e86e7b966a..84dc7d694d8d 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/key_vault_meta_info.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/key_vault_meta_info.py @@ -15,13 +15,16 @@ class KeyVaultMetaInfo(Model): """Metadata information used by account encryption. - :param key_vault_resource_id: The resource identifier for the user managed - Key Vault being used to encrypt. + All required parameters must be populated in order to send to Azure. + + :param key_vault_resource_id: Required. The resource identifier for the + user managed Key Vault being used to encrypt. :type key_vault_resource_id: str - :param encryption_key_name: The name of the user managed encryption key. + :param encryption_key_name: Required. The name of the user managed + encryption key. :type encryption_key_name: str - :param encryption_key_version: The version of the user managed encryption - key. + :param encryption_key_version: Required. The version of the user managed + encryption key. :type encryption_key_version: str """ @@ -37,8 +40,8 @@ class KeyVaultMetaInfo(Model): 'encryption_key_version': {'key': 'encryptionKeyVersion', 'type': 'str'}, } - def __init__(self, key_vault_resource_id, encryption_key_name, encryption_key_version): - super(KeyVaultMetaInfo, self).__init__() - self.key_vault_resource_id = key_vault_resource_id - self.encryption_key_name = encryption_key_name - self.encryption_key_version = encryption_key_version + def __init__(self, **kwargs): + super(KeyVaultMetaInfo, self).__init__(**kwargs) + self.key_vault_resource_id = kwargs.get('key_vault_resource_id', None) + self.encryption_key_name = kwargs.get('encryption_key_name', None) + self.encryption_key_version = kwargs.get('encryption_key_version', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/key_vault_meta_info_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/key_vault_meta_info_py3.py new file mode 100644 index 000000000000..9cf21107e30f --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/key_vault_meta_info_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyVaultMetaInfo(Model): + """Metadata information used by account encryption. + + All required parameters must be populated in order to send to Azure. + + :param key_vault_resource_id: Required. The resource identifier for the + user managed Key Vault being used to encrypt. + :type key_vault_resource_id: str + :param encryption_key_name: Required. The name of the user managed + encryption key. + :type encryption_key_name: str + :param encryption_key_version: Required. The version of the user managed + encryption key. + :type encryption_key_version: str + """ + + _validation = { + 'key_vault_resource_id': {'required': True}, + 'encryption_key_name': {'required': True}, + 'encryption_key_version': {'required': True}, + } + + _attribute_map = { + 'key_vault_resource_id': {'key': 'keyVaultResourceId', 'type': 'str'}, + 'encryption_key_name': {'key': 'encryptionKeyName', 'type': 'str'}, + 'encryption_key_version': {'key': 'encryptionKeyVersion', 'type': 'str'}, + } + + def __init__(self, *, key_vault_resource_id: str, encryption_key_name: str, encryption_key_version: str, **kwargs) -> None: + super(KeyVaultMetaInfo, self).__init__(**kwargs) + self.key_vault_resource_id = key_vault_resource_id + self.encryption_key_name = encryption_key_name + self.encryption_key_version = encryption_key_version diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/name_availability_information.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/name_availability_information.py index 0527fbf9b589..1d56253681af 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/name_availability_information.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/name_availability_information.py @@ -41,8 +41,8 @@ class NameAvailabilityInformation(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(NameAvailabilityInformation, self).__init__() + def __init__(self, **kwargs): + super(NameAvailabilityInformation, self).__init__(**kwargs) self.name_available = None self.reason = None self.message = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/name_availability_information_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/name_availability_information_py3.py new file mode 100644 index 000000000000..d6692f54021d --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/name_availability_information_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NameAvailabilityInformation(Model): + """Data Lake Store account name availability result information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: The Boolean value of true or false to indicate + whether the Data Lake Store account name is available or not. + :vartype name_available: bool + :ivar reason: The reason why the Data Lake Store account name is not + available, if nameAvailable is false. + :vartype reason: str + :ivar message: The message describing why the Data Lake Store account name + is not available, if nameAvailable is false. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(NameAvailabilityInformation, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation.py index 23fa1f75ed50..18362f3d0c2c 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation.py @@ -38,8 +38,8 @@ class Operation(Model): 'origin': {'key': 'origin', 'type': 'str'}, } - def __init__(self, display=None): - super(Operation, self).__init__() + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) self.name = None - self.display = display + self.display = kwargs.get('display', None) self.origin = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_display.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_display.py index 3e84d2b05a79..06d6c6925b99 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_display.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_display.py @@ -42,8 +42,8 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self): - super(OperationDisplay, self).__init__() + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) self.provider = None self.resource = None self.operation = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_display_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_display_py3.py new file mode 100644 index 000000000000..c2452ff41dcb --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_display_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """The display information for a particular operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The resource provider of the operation. + :vartype provider: str + :ivar resource: The resource type of the operation. + :vartype resource: str + :ivar operation: A friendly name of the operation. + :vartype operation: str + :ivar description: A friendly description of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_list_result.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_list_result.py index 72923fb44f35..95c17464dfa7 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_list_result.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_list_result.py @@ -34,7 +34,7 @@ class OperationListResult(Model): 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self): - super(OperationListResult, self).__init__() + def __init__(self, **kwargs): + super(OperationListResult, self).__init__(**kwargs) self.value = None self.next_link = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_list_result_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_list_result_py3.py new file mode 100644 index 000000000000..b8349a2c052f --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_list_result_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationListResult(Model): + """The list of available operations for Data Lake Store. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The results of the list operation. + :vartype value: list[~azure.mgmt.datalake.store.models.Operation] + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_py3.py new file mode 100644 index 000000000000..5cf8f222c2ab --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """An available operation for Data Lake Store. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation. + :vartype name: str + :param display: The display information for the operation. + :type display: ~azure.mgmt.datalake.store.models.OperationDisplay + :ivar origin: The intended executor of the operation. Possible values + include: 'user', 'system', 'user,system' + :vartype origin: str or ~azure.mgmt.datalake.store.models.OperationOrigin + """ + + _validation = { + 'name': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display + self.origin = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/resource.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/resource.py index 86063c3c4b67..199fe6c5939d 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/resource.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/resource.py @@ -46,8 +46,8 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self): - super(Resource, self).__init__() + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/resource_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/resource_py3.py new file mode 100644 index 000000000000..0d98701adfeb --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/resource_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """The resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar location: The resource location. + :vartype location: str + :ivar tags: The resource tags. + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.tags = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/sub_resource.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/sub_resource.py index 1fc11b1ca913..d8797b92b154 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/sub_resource.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/sub_resource.py @@ -38,8 +38,8 @@ class SubResource(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self): - super(SubResource, self).__init__() + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) self.id = None self.name = None self.type = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/sub_resource_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/sub_resource_py3.py new file mode 100644 index 000000000000..747861d8e182 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/sub_resource_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubResource(Model): + """The resource model definition for a nested resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/trusted_id_provider.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/trusted_id_provider.py index 26dc5e4acc88..12194150e251 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/trusted_id_provider.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/trusted_id_provider.py @@ -42,6 +42,6 @@ class TrustedIdProvider(SubResource): 'id_provider': {'key': 'properties.idProvider', 'type': 'str'}, } - def __init__(self): - super(TrustedIdProvider, self).__init__() + def __init__(self, **kwargs): + super(TrustedIdProvider, self).__init__(**kwargs) self.id_provider = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/trusted_id_provider_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/trusted_id_provider_py3.py new file mode 100644 index 000000000000..53346f2dc90f --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/trusted_id_provider_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_resource_py3 import SubResource + + +class TrustedIdProvider(SubResource): + """Data Lake Store trusted identity provider information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar id_provider: The URL of this trusted identity provider. + :vartype id_provider: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'id_provider': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'id_provider': {'key': 'properties.idProvider', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(TrustedIdProvider, self).__init__(**kwargs) + self.id_provider = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_data_lake_store_account_parameters.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_data_lake_store_account_parameters.py index a4b9f0d9394a..bdce1b10b51c 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_data_lake_store_account_parameters.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_data_lake_store_account_parameters.py @@ -28,6 +28,10 @@ class UpdateDataLakeStoreAccountParameters(Model): Data Lake Store account. :type firewall_rules: list[~azure.mgmt.datalake.store.models.UpdateFirewallRuleWithAccountParameters] + :param virtual_network_rules: The list of virtual network rules associated + with this Data Lake Store account. + :type virtual_network_rules: + list[~azure.mgmt.datalake.store.models.UpdateVirtualNetworkRuleWithAccountParameters] :param firewall_state: The current state of the IP address firewall for this Data Lake Store account. Disabling the firewall does not remove existing rules, they will just be ignored until the firewall is @@ -62,6 +66,7 @@ class UpdateDataLakeStoreAccountParameters(Model): 'default_group': {'key': 'properties.defaultGroup', 'type': 'str'}, 'encryption_config': {'key': 'properties.encryptionConfig', 'type': 'UpdateEncryptionConfig'}, 'firewall_rules': {'key': 'properties.firewallRules', 'type': '[UpdateFirewallRuleWithAccountParameters]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[UpdateVirtualNetworkRuleWithAccountParameters]'}, 'firewall_state': {'key': 'properties.firewallState', 'type': 'FirewallState'}, 'firewall_allow_azure_ips': {'key': 'properties.firewallAllowAzureIps', 'type': 'FirewallAllowAzureIpsState'}, 'trusted_id_providers': {'key': 'properties.trustedIdProviders', 'type': '[UpdateTrustedIdProviderWithAccountParameters]'}, @@ -69,14 +74,15 @@ class UpdateDataLakeStoreAccountParameters(Model): 'new_tier': {'key': 'properties.newTier', 'type': 'TierType'}, } - def __init__(self, tags=None, default_group=None, encryption_config=None, firewall_rules=None, firewall_state=None, firewall_allow_azure_ips=None, trusted_id_providers=None, trusted_id_provider_state=None, new_tier=None): - super(UpdateDataLakeStoreAccountParameters, self).__init__() - self.tags = tags - self.default_group = default_group - self.encryption_config = encryption_config - self.firewall_rules = firewall_rules - self.firewall_state = firewall_state - self.firewall_allow_azure_ips = firewall_allow_azure_ips - self.trusted_id_providers = trusted_id_providers - self.trusted_id_provider_state = trusted_id_provider_state - self.new_tier = new_tier + def __init__(self, **kwargs): + super(UpdateDataLakeStoreAccountParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.default_group = kwargs.get('default_group', None) + self.encryption_config = kwargs.get('encryption_config', None) + self.firewall_rules = kwargs.get('firewall_rules', None) + self.virtual_network_rules = kwargs.get('virtual_network_rules', None) + self.firewall_state = kwargs.get('firewall_state', None) + self.firewall_allow_azure_ips = kwargs.get('firewall_allow_azure_ips', None) + self.trusted_id_providers = kwargs.get('trusted_id_providers', None) + self.trusted_id_provider_state = kwargs.get('trusted_id_provider_state', None) + self.new_tier = kwargs.get('new_tier', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_data_lake_store_account_parameters_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_data_lake_store_account_parameters_py3.py new file mode 100644 index 000000000000..aa1cc215e4c8 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_data_lake_store_account_parameters_py3.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateDataLakeStoreAccountParameters(Model): + """Data Lake Store account information to update. + + :param tags: Resource tags + :type tags: dict[str, str] + :param default_group: The default owner group for all new folders and + files created in the Data Lake Store account. + :type default_group: str + :param encryption_config: Used for rotation of user managed Key Vault + keys. Can only be used to rotate a user managed encryption Key Vault key. + :type encryption_config: + ~azure.mgmt.datalake.store.models.UpdateEncryptionConfig + :param firewall_rules: The list of firewall rules associated with this + Data Lake Store account. + :type firewall_rules: + list[~azure.mgmt.datalake.store.models.UpdateFirewallRuleWithAccountParameters] + :param virtual_network_rules: The list of virtual network rules associated + with this Data Lake Store account. + :type virtual_network_rules: + list[~azure.mgmt.datalake.store.models.UpdateVirtualNetworkRuleWithAccountParameters] + :param firewall_state: The current state of the IP address firewall for + this Data Lake Store account. Disabling the firewall does not remove + existing rules, they will just be ignored until the firewall is + re-enabled. Possible values include: 'Enabled', 'Disabled' + :type firewall_state: str or + ~azure.mgmt.datalake.store.models.FirewallState + :param firewall_allow_azure_ips: The current state of allowing or + disallowing IPs originating within Azure through the firewall. If the + firewall is disabled, this is not enforced. Possible values include: + 'Enabled', 'Disabled' + :type firewall_allow_azure_ips: str or + ~azure.mgmt.datalake.store.models.FirewallAllowAzureIpsState + :param trusted_id_providers: The list of trusted identity providers + associated with this Data Lake Store account. + :type trusted_id_providers: + list[~azure.mgmt.datalake.store.models.UpdateTrustedIdProviderWithAccountParameters] + :param trusted_id_provider_state: The current state of the trusted + identity provider feature for this Data Lake Store account. Disabling + trusted identity provider functionality does not remove the providers, + they will just be ignored until this feature is re-enabled. Possible + values include: 'Enabled', 'Disabled' + :type trusted_id_provider_state: str or + ~azure.mgmt.datalake.store.models.TrustedIdProviderState + :param new_tier: The commitment tier to use for next month. Possible + values include: 'Consumption', 'Commitment_1TB', 'Commitment_10TB', + 'Commitment_100TB', 'Commitment_500TB', 'Commitment_1PB', 'Commitment_5PB' + :type new_tier: str or ~azure.mgmt.datalake.store.models.TierType + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'default_group': {'key': 'properties.defaultGroup', 'type': 'str'}, + 'encryption_config': {'key': 'properties.encryptionConfig', 'type': 'UpdateEncryptionConfig'}, + 'firewall_rules': {'key': 'properties.firewallRules', 'type': '[UpdateFirewallRuleWithAccountParameters]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[UpdateVirtualNetworkRuleWithAccountParameters]'}, + 'firewall_state': {'key': 'properties.firewallState', 'type': 'FirewallState'}, + 'firewall_allow_azure_ips': {'key': 'properties.firewallAllowAzureIps', 'type': 'FirewallAllowAzureIpsState'}, + 'trusted_id_providers': {'key': 'properties.trustedIdProviders', 'type': '[UpdateTrustedIdProviderWithAccountParameters]'}, + 'trusted_id_provider_state': {'key': 'properties.trustedIdProviderState', 'type': 'TrustedIdProviderState'}, + 'new_tier': {'key': 'properties.newTier', 'type': 'TierType'}, + } + + def __init__(self, *, tags=None, default_group: str=None, encryption_config=None, firewall_rules=None, virtual_network_rules=None, firewall_state=None, firewall_allow_azure_ips=None, trusted_id_providers=None, trusted_id_provider_state=None, new_tier=None, **kwargs) -> None: + super(UpdateDataLakeStoreAccountParameters, self).__init__(**kwargs) + self.tags = tags + self.default_group = default_group + self.encryption_config = encryption_config + self.firewall_rules = firewall_rules + self.virtual_network_rules = virtual_network_rules + self.firewall_state = firewall_state + self.firewall_allow_azure_ips = firewall_allow_azure_ips + self.trusted_id_providers = trusted_id_providers + self.trusted_id_provider_state = trusted_id_provider_state + self.new_tier = new_tier diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_encryption_config.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_encryption_config.py index 36adc320365f..5a52c377f4ea 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_encryption_config.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_encryption_config.py @@ -25,6 +25,6 @@ class UpdateEncryptionConfig(Model): 'key_vault_meta_info': {'key': 'keyVaultMetaInfo', 'type': 'UpdateKeyVaultMetaInfo'}, } - def __init__(self, key_vault_meta_info=None): - super(UpdateEncryptionConfig, self).__init__() - self.key_vault_meta_info = key_vault_meta_info + def __init__(self, **kwargs): + super(UpdateEncryptionConfig, self).__init__(**kwargs) + self.key_vault_meta_info = kwargs.get('key_vault_meta_info', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_encryption_config_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_encryption_config_py3.py new file mode 100644 index 000000000000..cf3c24647805 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_encryption_config_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateEncryptionConfig(Model): + """The encryption configuration used to update a user managed Key Vault key. + + :param key_vault_meta_info: The updated Key Vault key to use in user + managed key rotation. + :type key_vault_meta_info: + ~azure.mgmt.datalake.store.models.UpdateKeyVaultMetaInfo + """ + + _attribute_map = { + 'key_vault_meta_info': {'key': 'keyVaultMetaInfo', 'type': 'UpdateKeyVaultMetaInfo'}, + } + + def __init__(self, *, key_vault_meta_info=None, **kwargs) -> None: + super(UpdateEncryptionConfig, self).__init__(**kwargs) + self.key_vault_meta_info = key_vault_meta_info diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_firewall_rule_parameters.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_firewall_rule_parameters.py index f48a1cef34cc..1419fff19fd8 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_firewall_rule_parameters.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_firewall_rule_parameters.py @@ -28,7 +28,7 @@ class UpdateFirewallRuleParameters(Model): 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, } - def __init__(self, start_ip_address=None, end_ip_address=None): - super(UpdateFirewallRuleParameters, self).__init__() - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address + def __init__(self, **kwargs): + super(UpdateFirewallRuleParameters, self).__init__(**kwargs) + self.start_ip_address = kwargs.get('start_ip_address', None) + self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_firewall_rule_parameters_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_firewall_rule_parameters_py3.py new file mode 100644 index 000000000000..1abcaeaa9b11 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_firewall_rule_parameters_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateFirewallRuleParameters(Model): + """The parameters used to update a firewall rule. + + :param start_ip_address: The start IP address for the firewall rule. This + can be either ipv4 or ipv6. Start and End should be in the same protocol. + :type start_ip_address: str + :param end_ip_address: The end IP address for the firewall rule. This can + be either ipv4 or ipv6. Start and End should be in the same protocol. + :type end_ip_address: str + """ + + _attribute_map = { + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, *, start_ip_address: str=None, end_ip_address: str=None, **kwargs) -> None: + super(UpdateFirewallRuleParameters, self).__init__(**kwargs) + self.start_ip_address = start_ip_address + self.end_ip_address = end_ip_address diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_firewall_rule_with_account_parameters.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_firewall_rule_with_account_parameters.py index 58c64b7f8507..d322b03981e8 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_firewall_rule_with_account_parameters.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_firewall_rule_with_account_parameters.py @@ -16,7 +16,9 @@ class UpdateFirewallRuleWithAccountParameters(Model): """The parameters used to update a firewall rule while updating a Data Lake Store account. - :param name: The unique name of the firewall rule to update. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the firewall rule to update. :type name: str :param start_ip_address: The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. @@ -36,8 +38,8 @@ class UpdateFirewallRuleWithAccountParameters(Model): 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, } - def __init__(self, name, start_ip_address=None, end_ip_address=None): - super(UpdateFirewallRuleWithAccountParameters, self).__init__() - self.name = name - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address + def __init__(self, **kwargs): + super(UpdateFirewallRuleWithAccountParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.start_ip_address = kwargs.get('start_ip_address', None) + self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_firewall_rule_with_account_parameters_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_firewall_rule_with_account_parameters_py3.py new file mode 100644 index 000000000000..c5b95358bfb3 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_firewall_rule_with_account_parameters_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateFirewallRuleWithAccountParameters(Model): + """The parameters used to update a firewall rule while updating a Data Lake + Store account. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the firewall rule to update. + :type name: str + :param start_ip_address: The start IP address for the firewall rule. This + can be either ipv4 or ipv6. Start and End should be in the same protocol. + :type start_ip_address: str + :param end_ip_address: The end IP address for the firewall rule. This can + be either ipv4 or ipv6. Start and End should be in the same protocol. + :type end_ip_address: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, *, name: str, start_ip_address: str=None, end_ip_address: str=None, **kwargs) -> None: + super(UpdateFirewallRuleWithAccountParameters, self).__init__(**kwargs) + self.name = name + self.start_ip_address = start_ip_address + self.end_ip_address = end_ip_address diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_key_vault_meta_info.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_key_vault_meta_info.py index e35e22a1ca6a..3471a458c125 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_key_vault_meta_info.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_key_vault_meta_info.py @@ -24,6 +24,6 @@ class UpdateKeyVaultMetaInfo(Model): 'encryption_key_version': {'key': 'encryptionKeyVersion', 'type': 'str'}, } - def __init__(self, encryption_key_version=None): - super(UpdateKeyVaultMetaInfo, self).__init__() - self.encryption_key_version = encryption_key_version + def __init__(self, **kwargs): + super(UpdateKeyVaultMetaInfo, self).__init__(**kwargs) + self.encryption_key_version = kwargs.get('encryption_key_version', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_key_vault_meta_info_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_key_vault_meta_info_py3.py new file mode 100644 index 000000000000..71b6583901d7 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_key_vault_meta_info_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateKeyVaultMetaInfo(Model): + """The Key Vault update information used for user managed key rotation. + + :param encryption_key_version: The version of the user managed encryption + key to update through a key rotation. + :type encryption_key_version: str + """ + + _attribute_map = { + 'encryption_key_version': {'key': 'encryptionKeyVersion', 'type': 'str'}, + } + + def __init__(self, *, encryption_key_version: str=None, **kwargs) -> None: + super(UpdateKeyVaultMetaInfo, self).__init__(**kwargs) + self.encryption_key_version = encryption_key_version diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_trusted_id_provider_parameters.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_trusted_id_provider_parameters.py index 7d9a13a9c975..53d6f930e12b 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_trusted_id_provider_parameters.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_trusted_id_provider_parameters.py @@ -23,6 +23,6 @@ class UpdateTrustedIdProviderParameters(Model): 'id_provider': {'key': 'properties.idProvider', 'type': 'str'}, } - def __init__(self, id_provider=None): - super(UpdateTrustedIdProviderParameters, self).__init__() - self.id_provider = id_provider + def __init__(self, **kwargs): + super(UpdateTrustedIdProviderParameters, self).__init__(**kwargs) + self.id_provider = kwargs.get('id_provider', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_trusted_id_provider_parameters_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_trusted_id_provider_parameters_py3.py new file mode 100644 index 000000000000..d1911f165041 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_trusted_id_provider_parameters_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateTrustedIdProviderParameters(Model): + """The parameters used to update a trusted identity provider. + + :param id_provider: The URL of this trusted identity provider. + :type id_provider: str + """ + + _attribute_map = { + 'id_provider': {'key': 'properties.idProvider', 'type': 'str'}, + } + + def __init__(self, *, id_provider: str=None, **kwargs) -> None: + super(UpdateTrustedIdProviderParameters, self).__init__(**kwargs) + self.id_provider = id_provider diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_trusted_id_provider_with_account_parameters.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_trusted_id_provider_with_account_parameters.py index 74b74a8cc89d..611d7a2d7321 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_trusted_id_provider_with_account_parameters.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_trusted_id_provider_with_account_parameters.py @@ -16,7 +16,10 @@ class UpdateTrustedIdProviderWithAccountParameters(Model): """The parameters used to update a trusted identity provider while updating a Data Lake Store account. - :param name: The unique name of the trusted identity provider to update. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the trusted identity provider to + update. :type name: str :param id_provider: The URL of this trusted identity provider. :type id_provider: str @@ -31,7 +34,7 @@ class UpdateTrustedIdProviderWithAccountParameters(Model): 'id_provider': {'key': 'properties.idProvider', 'type': 'str'}, } - def __init__(self, name, id_provider=None): - super(UpdateTrustedIdProviderWithAccountParameters, self).__init__() - self.name = name - self.id_provider = id_provider + def __init__(self, **kwargs): + super(UpdateTrustedIdProviderWithAccountParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.id_provider = kwargs.get('id_provider', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_trusted_id_provider_with_account_parameters_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_trusted_id_provider_with_account_parameters_py3.py new file mode 100644 index 000000000000..632d5c28fe81 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_trusted_id_provider_with_account_parameters_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateTrustedIdProviderWithAccountParameters(Model): + """The parameters used to update a trusted identity provider while updating a + Data Lake Store account. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the trusted identity provider to + update. + :type name: str + :param id_provider: The URL of this trusted identity provider. + :type id_provider: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id_provider': {'key': 'properties.idProvider', 'type': 'str'}, + } + + def __init__(self, *, name: str, id_provider: str=None, **kwargs) -> None: + super(UpdateTrustedIdProviderWithAccountParameters, self).__init__(**kwargs) + self.name = name + self.id_provider = id_provider diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_virtual_network_rule_parameters.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_virtual_network_rule_parameters.py new file mode 100644 index 000000000000..1eeae8a9fba6 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_virtual_network_rule_parameters.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateVirtualNetworkRuleParameters(Model): + """The parameters used to update a virtual network rule. + + :param subnet_id: The resource identifier for the subnet. + :type subnet_id: str + """ + + _attribute_map = { + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpdateVirtualNetworkRuleParameters, self).__init__(**kwargs) + self.subnet_id = kwargs.get('subnet_id', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_virtual_network_rule_parameters_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_virtual_network_rule_parameters_py3.py new file mode 100644 index 000000000000..006c50d49b03 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_virtual_network_rule_parameters_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateVirtualNetworkRuleParameters(Model): + """The parameters used to update a virtual network rule. + + :param subnet_id: The resource identifier for the subnet. + :type subnet_id: str + """ + + _attribute_map = { + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + } + + def __init__(self, *, subnet_id: str=None, **kwargs) -> None: + super(UpdateVirtualNetworkRuleParameters, self).__init__(**kwargs) + self.subnet_id = subnet_id diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_virtual_network_rule_with_account_parameters.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_virtual_network_rule_with_account_parameters.py new file mode 100644 index 000000000000..4f4150bb599e --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_virtual_network_rule_with_account_parameters.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateVirtualNetworkRuleWithAccountParameters(Model): + """The parameters used to update a virtual network rule while updating a Data + Lake Store account. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the virtual network rule to + update. + :type name: str + :param subnet_id: The resource identifier for the subnet. + :type subnet_id: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpdateVirtualNetworkRuleWithAccountParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet_id = kwargs.get('subnet_id', None) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_virtual_network_rule_with_account_parameters_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_virtual_network_rule_with_account_parameters_py3.py new file mode 100644 index 000000000000..84fe06269a45 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/update_virtual_network_rule_with_account_parameters_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateVirtualNetworkRuleWithAccountParameters(Model): + """The parameters used to update a virtual network rule while updating a Data + Lake Store account. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name of the virtual network rule to + update. + :type name: str + :param subnet_id: The resource identifier for the subnet. + :type subnet_id: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + } + + def __init__(self, *, name: str, subnet_id: str=None, **kwargs) -> None: + super(UpdateVirtualNetworkRuleWithAccountParameters, self).__init__(**kwargs) + self.name = name + self.subnet_id = subnet_id diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/virtual_network_rule.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/virtual_network_rule.py new file mode 100644 index 000000000000..dab1f4dc32d5 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/virtual_network_rule.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_resource import SubResource + + +class VirtualNetworkRule(SubResource): + """Data Lake Store virtual network rule information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar subnet_id: The resource identifier for the subnet. + :vartype subnet_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'subnet_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.subnet_id = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/virtual_network_rule_paged.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/virtual_network_rule_paged.py new file mode 100644 index 000000000000..02b3439a805f --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/virtual_network_rule_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class VirtualNetworkRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetworkRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/virtual_network_rule_py3.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/virtual_network_rule_py3.py new file mode 100644 index 000000000000..a0d4b638a302 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/virtual_network_rule_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_resource_py3 import SubResource + + +class VirtualNetworkRule(SubResource): + """Data Lake Store virtual network rule information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar subnet_id: The resource identifier for the subnet. + :vartype subnet_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'subnet_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualNetworkRule, self).__init__(**kwargs) + self.subnet_id = None diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/__init__.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/__init__.py index 34d32647d96d..f8ac266b1b20 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/__init__.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/__init__.py @@ -11,6 +11,7 @@ from .accounts_operations import AccountsOperations from .firewall_rules_operations import FirewallRulesOperations +from .virtual_network_rules_operations import VirtualNetworkRulesOperations from .trusted_id_providers_operations import TrustedIdProvidersOperations from .operations import Operations from .locations_operations import LocationsOperations @@ -18,6 +19,7 @@ __all__ = [ 'AccountsOperations', 'FirewallRulesOperations', + 'VirtualNetworkRulesOperations', 'TrustedIdProvidersOperations', 'Operations', 'LocationsOperations', diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/accounts_operations.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/accounts_operations.py index fde5cc991a9c..e6980d7c30b0 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/accounts_operations.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/accounts_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -24,7 +24,7 @@ class AccountsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-11-01". """ @@ -78,7 +78,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/accounts' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -135,6 +135,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/accounts'} def list_by_resource_group( self, resource_group_name, filter=None, top=None, skip=None, select=None, orderby=None, count=None, custom_headers=None, raw=False, **operation_config): @@ -177,7 +178,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -235,12 +236,13 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts'} def _create_initial( self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}' + url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -289,7 +291,7 @@ def _create_initial( return deserialized def create( - self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates the specified Data Lake Store account. :param resource_group_name: The name of the Azure resource group. @@ -301,13 +303,16 @@ def create( :type parameters: ~azure.mgmt.datalake.store.models.CreateDataLakeStoreAccountParameters :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns - DataLakeStoreAccount or ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns DataLakeStoreAccount or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.datalake.store.models.DataLakeStoreAccount] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.datalake.store.models.DataLakeStoreAccount]] :raises: :class:`CloudError` """ raw_result = self._create_initial( @@ -318,30 +323,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - deserialized = self._deserialize('DataLakeStoreAccount', response) if raw: @@ -350,12 +333,14 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}'} def get( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): @@ -376,7 +361,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -417,12 +402,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}'} def _update_initial( self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -473,7 +459,7 @@ def _update_initial( return deserialized def update( - self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Updates the specified Data Lake Store account information. :param resource_group_name: The name of the Azure resource group. @@ -485,13 +471,16 @@ def update( :type parameters: ~azure.mgmt.datalake.store.models.UpdateDataLakeStoreAccountParameters :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns - DataLakeStoreAccount or ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns DataLakeStoreAccount or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.datalake.store.models.DataLakeStoreAccount] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.datalake.store.models.DataLakeStoreAccount]] :raises: :class:`CloudError` """ raw_result = self._update_initial( @@ -502,30 +491,8 @@ def update( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - deserialized = self._deserialize('DataLakeStoreAccount', response) if raw: @@ -534,18 +501,20 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}'} def _delete_initial( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -581,7 +550,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes the specified Data Lake Store account. :param resource_group_name: The name of the Azure resource group. @@ -589,12 +558,14 @@ def delete( :param account_name: The name of the Data Lake Store account. :type account_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -604,40 +575,20 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}'} def enable_key_vault( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): @@ -658,7 +609,7 @@ def enable_key_vault( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/enableKeyVault' + url = self.enable_key_vault.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -692,6 +643,7 @@ def enable_key_vault( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + enable_key_vault.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/enableKeyVault'} def check_name_availability( self, location, name, custom_headers=None, raw=False, **operation_config): @@ -714,7 +666,7 @@ def check_name_availability( parameters = models.CheckNameAvailabilityParameters(name=name) # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/locations/{location}/checkNameAvailability' + url = self.check_name_availability.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'location': self._serialize.url("location", location, 'str') @@ -758,3 +710,4 @@ def check_name_availability( return client_raw_response return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/locations/{location}/checkNameAvailability'} diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/firewall_rules_operations.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/firewall_rules_operations.py index fc6f57e78114..3ec5a5bec789 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/firewall_rules_operations.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/firewall_rules_operations.py @@ -22,7 +22,7 @@ class FirewallRulesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-11-01". """ @@ -60,7 +60,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules' + url = self.list_by_account.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -107,6 +107,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules'} def create_or_update( self, resource_group_name, account_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, **operation_config): @@ -142,7 +143,7 @@ def create_or_update( parameters = models.CreateOrUpdateFirewallRuleParameters(start_ip_address=start_ip_address, end_ip_address=end_ip_address) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -188,6 +189,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}'} def get( self, resource_group_name, account_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): @@ -210,7 +212,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -252,6 +254,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}'} def update( self, resource_group_name, account_name, firewall_rule_name, start_ip_address=None, end_ip_address=None, custom_headers=None, raw=False, **operation_config): @@ -286,7 +289,7 @@ def update( parameters = models.UpdateFirewallRuleParameters(start_ip_address=start_ip_address, end_ip_address=end_ip_address) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -335,6 +338,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}'} def delete( self, resource_group_name, account_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): @@ -357,7 +361,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -392,3 +396,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}'} diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/locations_operations.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/locations_operations.py index ca059281b9b0..38679b7e1d1d 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/locations_operations.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/locations_operations.py @@ -22,7 +22,7 @@ class LocationsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-11-01". """ @@ -55,7 +55,7 @@ def get_capability( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/locations/{location}/capability' + url = self.get_capability.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'location': self._serialize.url("location", location, 'str') @@ -95,3 +95,4 @@ def get_capability( return client_raw_response return deserialized + get_capability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/locations/{location}/capability'} diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/operations.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/operations.py index 98b26272f7d9..7a232b5fd5b0 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/operations.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/operations.py @@ -22,7 +22,7 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-11-01". """ @@ -52,7 +52,7 @@ def list( :raises: :class:`CloudError` """ # Construct URL - url = '/providers/Microsoft.DataLakeStore/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -87,3 +87,4 @@ def list( return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.DataLakeStore/operations'} diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/trusted_id_providers_operations.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/trusted_id_providers_operations.py index dd3c74d753db..ca72701fd040 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/trusted_id_providers_operations.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/trusted_id_providers_operations.py @@ -22,7 +22,7 @@ class TrustedIdProvidersOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-11-01". """ @@ -60,7 +60,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders' + url = self.list_by_account.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -107,6 +107,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders'} def create_or_update( self, resource_group_name, account_name, trusted_id_provider_name, id_provider, custom_headers=None, raw=False, **operation_config): @@ -137,7 +138,7 @@ def create_or_update( parameters = models.CreateOrUpdateTrustedIdProviderParameters(id_provider=id_provider) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -183,6 +184,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}'} def get( self, resource_group_name, account_name, trusted_id_provider_name, custom_headers=None, raw=False, **operation_config): @@ -206,7 +208,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -248,6 +250,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}'} def update( self, resource_group_name, account_name, trusted_id_provider_name, id_provider=None, custom_headers=None, raw=False, **operation_config): @@ -278,7 +281,7 @@ def update( parameters = models.UpdateTrustedIdProviderParameters(id_provider=id_provider) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -327,6 +330,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}'} def delete( self, resource_group_name, account_name, trusted_id_provider_name, custom_headers=None, raw=False, **operation_config): @@ -350,7 +354,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -385,3 +389,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}'} diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/virtual_network_rules_operations.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/virtual_network_rules_operations.py new file mode 100644 index 000000000000..7cff74ae09a9 --- /dev/null +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/virtual_network_rules_operations.py @@ -0,0 +1,390 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualNetworkRulesOperations(object): + """VirtualNetworkRulesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-11-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-11-01" + + self.config = config + + def list_by_account( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the Data Lake Store virtual network rules within the specified + Data Lake Store account. + + :param resource_group_name: The name of the Azure resource group. + :type resource_group_name: str + :param account_name: The name of the Data Lake Store account. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualNetworkRule + :rtype: + ~azure.mgmt.datalake.store.models.VirtualNetworkRulePaged[~azure.mgmt.datalake.store.models.VirtualNetworkRule] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_account.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules'} + + def create_or_update( + self, resource_group_name, account_name, virtual_network_rule_name, subnet_id, custom_headers=None, raw=False, **operation_config): + """Creates or updates the specified virtual network rule. During update, + the virtual network rule with the specified name will be replaced with + this new virtual network rule. + + :param resource_group_name: The name of the Azure resource group. + :type resource_group_name: str + :param account_name: The name of the Data Lake Store account. + :type account_name: str + :param virtual_network_rule_name: The name of the virtual network rule + to create or update. + :type virtual_network_rule_name: str + :param subnet_id: The resource identifier for the subnet. + :type subnet_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualNetworkRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.store.models.VirtualNetworkRule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.CreateOrUpdateVirtualNetworkRuleParameters(subnet_id=subnet_id) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'CreateOrUpdateVirtualNetworkRuleParameters') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}'} + + def get( + self, resource_group_name, account_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): + """Gets the specified Data Lake Store virtual network rule. + + :param resource_group_name: The name of the Azure resource group. + :type resource_group_name: str + :param account_name: The name of the Data Lake Store account. + :type account_name: str + :param virtual_network_rule_name: The name of the virtual network rule + to retrieve. + :type virtual_network_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualNetworkRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.store.models.VirtualNetworkRule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}'} + + def update( + self, resource_group_name, account_name, virtual_network_rule_name, subnet_id=None, custom_headers=None, raw=False, **operation_config): + """Updates the specified virtual network rule. + + :param resource_group_name: The name of the Azure resource group. + :type resource_group_name: str + :param account_name: The name of the Data Lake Store account. + :type account_name: str + :param virtual_network_rule_name: The name of the virtual network rule + to update. + :type virtual_network_rule_name: str + :param subnet_id: The resource identifier for the subnet. + :type subnet_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualNetworkRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.store.models.VirtualNetworkRule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = None + if subnet_id is not None: + parameters = models.UpdateVirtualNetworkRuleParameters(subnet_id=subnet_id) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'UpdateVirtualNetworkRuleParameters') + else: + body_content = None + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}'} + + def delete( + self, resource_group_name, account_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): + """Deletes the specified virtual network rule from the specified Data Lake + Store account. + + :param resource_group_name: The name of the Azure resource group. + :type resource_group_name: str + :param account_name: The name of the Data Lake Store account. + :type account_name: str + :param virtual_network_rule_name: The name of the virtual network rule + to delete. + :type virtual_network_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}'} diff --git a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/version.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/version.py index 7e15bc578c31..3ac449b544e4 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/store/version.py +++ b/azure-mgmt-datalake-store/azure/mgmt/datalake/store/version.py @@ -9,4 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.4.0" +VERSION = "2016-11-01" + diff --git a/azure-mgmt-datalake-store/tests/recordings/test_mgmt_datalake_store.test_adls_accounts.yaml b/azure-mgmt-datalake-store/tests/recordings/test_mgmt_datalake_store.test_adls_accounts.yaml index 012ea2bb7701..88e989337fa5 100644 --- a/azure-mgmt-datalake-store/tests/recordings/test_mgmt_datalake_store.test_adls_accounts.yaml +++ b/azure-mgmt-datalake-store/tests/recordings/test_mgmt_datalake_store.test_adls_accounts.yaml @@ -1,1590 +1,4 @@ interactions: -- request: - body: '{"location": "East US 2", "properties": {"encryptionConfig": {"type": "ServiceManaged"}, - "encryptionState": "Enabled"}, "tags": {"tag1": "value1"}, "identity": {"type": - "SystemAssigned"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['187'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.11.1 msrest/0.4.8 - msrest_azure/0.4.8 datalakestoreaccountmanagementclient/0.1.4 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [d55e5cc6-4655-11e7-b24b-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"provisioningState":"Creating","state":null,"endpoint":null,"accountId":"d099e1fd-3bdc-4017-8cb5-c88a8418b01d","creationTime":null,"lastModifiedTime":null},"location":"East - US 2","tags":{"tag1":"value1"},"identity":{"type":"SystemAssigned","principalId":"00000000-0000-0000-0000-000000000000","tenantId":"00000000-0000-0000-0000-000000000000"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/d099e1fd-3bdc-4017-8cb5-c88a8418b01d0?api-version=2016-11-01&expanded=true'] - Cache-Control: [no-cache] - Connection: [close] - Content-Length: ['688'] - Content-Type: [application/json] - Date: ['Wed, 31 May 2017 23:07:00 GMT'] - Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7/operationresults/0?api-version=2016-11-01'] - Pragma: [no-cache] - Retry-After: ['0'] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - x-ms-correlation-request-id: [385d7581-3bc3-438c-a8a5-c8b83e08c138] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [0b38d80d-c11b-4df4-b5f6-8127ac105033] - x-ms-routing-request-id: ['WESTUS:20170531T230700Z:385d7581-3bc3-438c-a8a5-c8b83e08c138'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.11.1 msrest/0.4.8 - msrest_azure/0.4.8 datalakestoreaccountmanagementclient/0.1.4 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [d55e5cc6-4655-11e7-b24b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/d099e1fd-3bdc-4017-8cb5-c88a8418b01d0?api-version=2016-11-01&expanded=true - response: - body: {string: '{"status":"InProgress"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Wed, 31 May 2017 23:07:10 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['23'] - x-ms-correlation-request-id: [b85922a2-a01b-4a5d-9d15-0ebecafd06f3] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [dc417f91-dc6b-47fa-ba45-bbf7a316d0df] - x-ms-routing-request-id: ['WESTUS:20170531T230710Z:b85922a2-a01b-4a5d-9d15-0ebecafd06f3'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.11.1 msrest/0.4.8 - msrest_azure/0.4.8 datalakestoreaccountmanagementclient/0.1.4 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [d55e5cc6-4655-11e7-b24b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/d099e1fd-3bdc-4017-8cb5-c88a8418b01d0?api-version=2016-11-01&expanded=true - response: - body: {string: '{"status":"Succeeded"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Wed, 31 May 2017 23:07:40 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['22'] - x-ms-correlation-request-id: [8f8a0e87-23f8-4a44-bb3e-97eeefdf1d71] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [6cde8509-aba0-4e09-baff-172aaaef75bf] - x-ms-routing-request-id: ['WESTUS2:20170531T230741Z:8f8a0e87-23f8-4a44-bb3e-97eeefdf1d71'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.11.1 msrest/0.4.8 - msrest_azure/0.4.8 datalakestoreaccountmanagementclient/0.1.4 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [d55e5cc6-4655-11e7-b24b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"d099e1fd-3bdc-4017-8cb5-c88a8418b01d","creationTime":"2017-05-31T23:06:56.7933721Z","lastModifiedTime":"2017-05-31T23:06:56.7933721Z"},"location":"East - US 2","tags":{"tag1":"value1"},"identity":{"type":"SystemAssigned","principalId":"870c9a81-855d-4fe7-80f4-421b5a90de79","tenantId":"d6509e0c-ca64-4e5d-ae24-90a5b7d279e8"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Wed, 31 May 2017 23:07:41 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['976'] - x-ms-correlation-request-id: [85983821-c7b4-479f-9c9f-565a61ba68b2] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [c97f8b76-ef49-4129-a776-45d348c27f48] - x-ms-routing-request-id: ['WESTUS2:20170531T230742Z:85983821-c7b4-479f-9c9f-565a61ba68b2'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.11.1 msrest/0.4.8 - msrest_azure/0.4.8 datalakestoreaccountmanagementclient/0.1.4 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [f337fc50-4655-11e7-b403-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"d099e1fd-3bdc-4017-8cb5-c88a8418b01d","creationTime":"2017-05-31T23:06:56.7933721Z","lastModifiedTime":"2017-05-31T23:06:56.7933721Z"},"location":"East - US 2","tags":{"tag1":"value1"},"identity":{"type":"SystemAssigned","principalId":"870c9a81-855d-4fe7-80f4-421b5a90de79","tenantId":"d6509e0c-ca64-4e5d-ae24-90a5b7d279e8"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Wed, 31 May 2017 23:07:41 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['976'] - x-ms-correlation-request-id: [dd6533ea-c855-4f94-9ea8-95a4c31ff767] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [f33a793f-d0d9-47b5-9c4c-21d319c49afa] - x-ms-routing-request-id: ['WESTUS2:20170531T230742Z:dd6533ea-c855-4f94-9ea8-95a4c31ff767'] - status: {code: 200, message: OK} -- request: - body: '{"location": "East US 2", "tags": {"tag1": "value1"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['53'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.11.1 msrest/0.4.8 - msrest_azure/0.4.8 datalakestoreaccountmanagementclient/0.1.4 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [f394b6de-4655-11e7-9875-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"provisioningState":"Creating","state":null,"endpoint":null,"accountId":"487cca90-5b71-4566-a475-ee77c64a4219","creationTime":null,"lastModifiedTime":null},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/487cca90-5b71-4566-a475-ee77c64a42190?api-version=2016-11-01&expanded=true'] - Cache-Control: [no-cache] - Connection: [close] - Content-Length: ['477'] - Content-Type: [application/json] - Date: ['Wed, 31 May 2017 23:07:44 GMT'] - Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7/operationresults/0?api-version=2016-11-01'] - Pragma: [no-cache] - Retry-After: ['0'] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - x-ms-correlation-request-id: [389fd49c-599d-4f13-9891-8cfcda60a575] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [f24531cc-f41d-4fff-a7fc-c8b951502046] - x-ms-routing-request-id: ['WESTUS2:20170531T230745Z:389fd49c-599d-4f13-9891-8cfcda60a575'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.11.1 msrest/0.4.8 - msrest_azure/0.4.8 datalakestoreaccountmanagementclient/0.1.4 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [f394b6de-4655-11e7-9875-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/487cca90-5b71-4566-a475-ee77c64a42190?api-version=2016-11-01&expanded=true - response: - body: {string: '{"status":"InProgress"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Wed, 31 May 2017 23:07:55 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['23'] - x-ms-correlation-request-id: [8129181c-184e-44ec-9469-576dd4f9cda9] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [dd847d39-a381-4dbf-a0f3-8cdabf483387] - x-ms-routing-request-id: ['WESTUS:20170531T230755Z:8129181c-184e-44ec-9469-576dd4f9cda9'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.11.1 msrest/0.4.8 - msrest_azure/0.4.8 datalakestoreaccountmanagementclient/0.1.4 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [f394b6de-4655-11e7-9875-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/487cca90-5b71-4566-a475-ee77c64a42190?api-version=2016-11-01&expanded=true - response: - body: {string: '{"status":"Succeeded"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Wed, 31 May 2017 23:08:25 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['22'] - x-ms-correlation-request-id: [a756ef00-55bc-4099-a568-0fc8325fae51] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [25e7104c-33aa-43da-bc71-99c08306a9ac] - x-ms-routing-request-id: ['WESTUS2:20170531T230826Z:a756ef00-55bc-4099-a568-0fc8325fae51'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.11.1 msrest/0.4.8 - msrest_azure/0.4.8 datalakestoreaccountmanagementclient/0.1.4 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [f394b6de-4655-11e7-9875-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"487cca90-5b71-4566-a475-ee77c64a4219","creationTime":"2017-05-31T23:07:45.1913679Z","lastModifiedTime":"2017-05-31T23:07:45.1913679Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Wed, 31 May 2017 23:08:26 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['839'] - x-ms-correlation-request-id: [770d8b56-f01d-4d61-8639-a69d23a2fe48] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [c3be58a5-731c-40e0-8ad8-c237a64ead7d] - x-ms-routing-request-id: ['WESTUS2:20170531T230827Z:770d8b56-f01d-4d61-8639-a69d23a2fe48'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.11.1 msrest/0.4.8 - msrest_azure/0.4.8 datalakestoreaccountmanagementclient/0.1.4 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [0df60aec-4656-11e7-888c-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"487cca90-5b71-4566-a475-ee77c64a4219","creationTime":"2017-05-31T23:07:45.1913679Z","lastModifiedTime":"2017-05-31T23:07:45.1913679Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Wed, 31 May 2017 23:08:27 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['839'] - x-ms-correlation-request-id: [2852408b-1e39-432e-8d70-bf73dd95a360] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [28e7dce1-1666-474c-b7a4-49217343b7bb] - x-ms-routing-request-id: ['WESTUS2:20170531T230827Z:2852408b-1e39-432e-8d70-bf73dd95a360'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.11.1 msrest/0.4.8 - msrest_azure/0.4.8 datalakestoreaccountmanagementclient/0.1.4 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [0e5f1a14-4656-11e7-ba52-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts?api-version=2016-11-01 - response: - body: {string: '{"value":[{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"487cca90-5b71-4566-a475-ee77c64a4219","creationTime":"2017-05-31T23:07:45.1913679Z","lastModifiedTime":"2017-05-31T23:07:45.1913679Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"d099e1fd-3bdc-4017-8cb5-c88a8418b01d","creationTime":"2017-05-31T23:06:56.7933721Z","lastModifiedTime":"2017-05-31T23:06:56.7933721Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}]}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Wed, 31 May 2017 23:08:27 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['1156'] - x-ms-correlation-request-id: [6dcfa76b-c3e8-42e2-b041-679dfd8b7a49] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [d0da3bdf-ef10-4fdd-817d-045a2d9ab828] - x-ms-routing-request-id: ['WESTUS2:20170531T230828Z:6dcfa76b-c3e8-42e2-b041-679dfd8b7a49'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.11.1 msrest/0.4.8 - msrest_azure/0.4.8 datalakestoreaccountmanagementclient/0.1.4 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [0ec060d8-4656-11e7-8a5a-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/accounts?api-version=2016-11-01 - response: - body: {string: '{"value":[{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"487cca90-5b71-4566-a475-ee77c64a4219","creationTime":"2017-05-31T23:07:45.1913679Z","lastModifiedTime":"2017-05-31T23:07:45.1913679Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"d099e1fd-3bdc-4017-8cb5-c88a8418b01d","creationTime":"2017-05-31T23:06:56.7933721Z","lastModifiedTime":"2017-05-31T23:06:56.7933721Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}]}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Wed, 31 May 2017 23:08:28 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['1156'] - x-ms-correlation-request-id: [0714d651-5816-4d9d-93b3-7bdf39a7979b] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [8722f187-3a98-4b39-a970-0d83fb13fab1] - x-ms-routing-request-id: ['WESTUS2:20170531T230829Z:0714d651-5816-4d9d-93b3-7bdf39a7979b'] - status: {code: 200, message: OK} -- request: - body: '{"tags": {"tag2": "value2"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['28'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.11.1 msrest/0.4.8 - msrest_azure/0.4.8 datalakestoreaccountmanagementclient/0.1.4 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [0f23836c-4656-11e7-bacb-ecb1d756380e] - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"d099e1fd-3bdc-4017-8cb5-c88a8418b01d","creationTime":"2017-05-31T23:06:56.7933721Z","lastModifiedTime":"2017-05-31T23:08:29.7443851Z"},"location":"East - US 2","tags":{"tag2":"value2"},"identity":{"type":"SystemAssigned","principalId":"870c9a81-855d-4fe7-80f4-421b5a90de79","tenantId":"d6509e0c-ca64-4e5d-ae24-90a5b7d279e8"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Wed, 31 May 2017 23:08:30 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['976'] - x-ms-correlation-request-id: [605765d0-0e58-4382-85c6-c739791fdbad] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [5e7c201e-60eb-455c-8694-e2e434e484bf] - x-ms-routing-request-id: ['WESTUS2:20170531T230831Z:605765d0-0e58-4382-85c6-c739791fdbad'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.11.1 msrest/0.4.8 - msrest_azure/0.4.8 datalakestoreaccountmanagementclient/0.1.4 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [103269b0-4656-11e7-bf11-ecb1d756380e] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 - response: - body: {string: ''} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Length: ['0'] - Date: ['Wed, 31 May 2017 23:08:33 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-AspNet-Version: [4.0.30319] - X-Powered-By: [ASP.NET] - x-ms-correlation-request-id: [11e6e346-a1f1-48a6-9058-9d73e881bf17] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [3b3d8e19-a9af-4f7a-8780-1cd963943f6e] - x-ms-routing-request-id: ['WESTUS2:20170531T230834Z:11e6e346-a1f1-48a6-9058-9d73e881bf17'] - status: {code: 200, message: OK} -- request: - body: '{"name": "pyarmadls847d11a7", "type": "Microsoft.DataLakeStore/accounts"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [1defd892-f595-11e7-b403-705a0f2f3d93] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/checkNameAvailability?api-version=2016-11-01 - response: - body: {string: '{"nameAvailable":true}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Tue, 09 Jan 2018 23:30:46 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['22'] - x-ms-correlation-request-id: [779e67fb-bfba-4306-983e-34ae9e2f7c44] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [af1c5685-dd16-476e-823c-b0e59323033d] - x-ms-routing-request-id: ['WESTUS2:20180109T233046Z:779e67fb-bfba-4306-983e-34ae9e2f7c44'] - status: {code: 200, message: OK} -- request: - body: '{"location": "East US 2", "tags": {"tag1": "value1"}, "identity": {"type": - "SystemAssigned"}, "properties": {"encryptionState": "Enabled", "encryptionConfig": - {"type": "ServiceManaged"}}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['187'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [1e9da246-f595-11e7-95d2-705a0f2f3d93] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"provisioningState":"Creating","state":null,"endpoint":null,"accountId":"f805ee3d-4353-41df-bc45-7b6a7ec9cdb0"},"location":"East - US 2","tags":{"tag1":"value1"},"identity":{"type":"SystemAssigned","principalId":"00000000-0000-0000-0000-000000000000","tenantId":"00000000-0000-0000-0000-000000000000"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/f805ee3d-4353-41df-bc45-7b6a7ec9cdb00?api-version=2016-11-01&expanded=true'] - Cache-Control: [no-cache] - Connection: [close] - Content-Length: ['644'] - Content-Type: [application/json] - Date: ['Tue, 09 Jan 2018 23:30:51 GMT'] - Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7/operationresults/0?api-version=2016-11-01'] - Pragma: [no-cache] - Retry-After: ['0'] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - x-ms-correlation-request-id: [85fbcca2-b942-4cbe-8d6b-c6b34e2ea461] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [a372f662-5017-4f23-9ad3-ab672e50effd] - x-ms-routing-request-id: ['WESTUS2:20180109T233051Z:85fbcca2-b942-4cbe-8d6b-c6b34e2ea461'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [1e9da246-f595-11e7-95d2-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/f805ee3d-4353-41df-bc45-7b6a7ec9cdb00?api-version=2016-11-01&expanded=true - response: - body: {string: '{"status":"InProgress"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Tue, 09 Jan 2018 23:31:02 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['23'] - x-ms-correlation-request-id: [6736d347-ab5b-4c5e-abec-01b6abc06cac] - x-ms-ratelimit-remaining-subscription-reads: ['14993'] - x-ms-request-id: [afe34c78-fe56-40f7-b8b4-377358b04023] - x-ms-routing-request-id: ['WESTUS2:20180109T233102Z:6736d347-ab5b-4c5e-abec-01b6abc06cac'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [1e9da246-f595-11e7-95d2-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/f805ee3d-4353-41df-bc45-7b6a7ec9cdb00?api-version=2016-11-01&expanded=true - response: - body: {string: '{"status":"Succeeded"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Tue, 09 Jan 2018 23:31:33 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['22'] - x-ms-correlation-request-id: [4ef6e1d3-297c-4fbc-b520-782a852e5299] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [442c2ba1-1730-4291-ace6-9b20c38cb5e4] - x-ms-routing-request-id: ['WESTUS2:20180109T233134Z:4ef6e1d3-297c-4fbc-b520-782a852e5299'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [1e9da246-f595-11e7-95d2-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"f805ee3d-4353-41df-bc45-7b6a7ec9cdb0","creationTime":"2018-01-09T23:30:53.716178Z","lastModifiedTime":"2018-01-09T23:30:53.716178Z"},"location":"East - US 2","tags":{"tag1":"value1"},"identity":{"type":"SystemAssigned","principalId":"1df5d804-b9f5-4aef-ac0c-a0306feaf669","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Tue, 09 Jan 2018 23:31:35 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['1043'] - x-ms-correlation-request-id: [46d43ead-2320-41b1-9619-876750749604] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [47b2462c-8054-41af-a5dd-257c042fb847] - x-ms-routing-request-id: ['WESTUS2:20180109T233135Z:46d43ead-2320-41b1-9619-876750749604'] - status: {code: 200, message: OK} -- request: - body: '{"name": "pyarmadls847d11a7", "type": "Microsoft.DataLakeStore/accounts"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [3b5dd29c-f595-11e7-b3de-705a0f2f3d93] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/checkNameAvailability?api-version=2016-11-01 - response: - body: {string: '{"nameAvailable":false,"reason":"AlreadyExists","message":"An - account named ''pyarmadls847d11a7'' already exists."}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Tue, 09 Jan 2018 23:31:37 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['113'] - x-ms-correlation-request-id: [7f77ca89-dabb-4a47-8575-6d5477ff3fb2] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [671456b9-799e-4ce3-8daa-fb97309c93ae] - x-ms-routing-request-id: ['WESTUS2:20180109T233138Z:7f77ca89-dabb-4a47-8575-6d5477ff3fb2'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [3d559a38-f595-11e7-af6a-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"f805ee3d-4353-41df-bc45-7b6a7ec9cdb0","creationTime":"2018-01-09T23:30:53.716178Z","lastModifiedTime":"2018-01-09T23:30:53.716178Z"},"location":"East - US 2","tags":{"tag1":"value1"},"identity":{"type":"SystemAssigned","principalId":"1df5d804-b9f5-4aef-ac0c-a0306feaf669","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Tue, 09 Jan 2018 23:31:39 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['1043'] - x-ms-correlation-request-id: [94e07274-0590-4b85-9047-8733c8f34049] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [f1316769-4f87-4c44-81f6-4463ea2afb83] - x-ms-routing-request-id: ['WESTUS2:20180109T233139Z:94e07274-0590-4b85-9047-8733c8f34049'] - status: {code: 200, message: OK} -- request: - body: '{"location": "East US 2", "tags": {"tag1": "value1"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['53'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [3dfa0b3a-f595-11e7-ac4d-705a0f2f3d93] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"provisioningState":"Creating","state":null,"endpoint":null,"accountId":"9acf215f-1ebb-476c-b66f-fac1f585e0bb"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/9acf215f-1ebb-476c-b66f-fac1f585e0bb0?api-version=2016-11-01&expanded=true'] - Cache-Control: [no-cache] - Connection: [close] - Content-Length: ['433'] - Content-Type: [application/json] - Date: ['Tue, 09 Jan 2018 23:31:41 GMT'] - Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7/operationresults/0?api-version=2016-11-01'] - Pragma: [no-cache] - Retry-After: ['0'] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - x-ms-correlation-request-id: [e4203e93-de23-4f55-aeec-e5ff2613ed46] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [420f7e90-3e60-4acb-8b4e-e7991bc1fdb9] - x-ms-routing-request-id: ['WESTUS2:20180109T233142Z:e4203e93-de23-4f55-aeec-e5ff2613ed46'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [3dfa0b3a-f595-11e7-ac4d-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/9acf215f-1ebb-476c-b66f-fac1f585e0bb0?api-version=2016-11-01&expanded=true - response: - body: {string: '{"status":"InProgress"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Tue, 09 Jan 2018 23:31:53 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['23'] - x-ms-correlation-request-id: [4ebf9058-3c20-478d-8bf8-a34b91f6105a] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [32781c02-b128-4f6c-9de0-a49b24e94035] - x-ms-routing-request-id: ['WESTUS2:20180109T233153Z:4ebf9058-3c20-478d-8bf8-a34b91f6105a'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [3dfa0b3a-f595-11e7-ac4d-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/9acf215f-1ebb-476c-b66f-fac1f585e0bb0?api-version=2016-11-01&expanded=true - response: - body: {string: '{"status":"Succeeded"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Tue, 09 Jan 2018 23:32:24 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['22'] - x-ms-correlation-request-id: [e555cbb6-2238-4885-b705-d6b71c5827b4] - x-ms-ratelimit-remaining-subscription-reads: ['14990'] - x-ms-request-id: [401c8237-1d67-429f-b732-492fc4bf5455] - x-ms-routing-request-id: ['WESTUS2:20180109T233224Z:e555cbb6-2238-4885-b705-d6b71c5827b4'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [3dfa0b3a-f595-11e7-ac4d-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"9acf215f-1ebb-476c-b66f-fac1f585e0bb","creationTime":"2018-01-09T23:31:44.7048019Z","lastModifiedTime":"2018-01-09T23:31:44.7048019Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Tue, 09 Jan 2018 23:32:25 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['908'] - x-ms-correlation-request-id: [c06eaa4d-3ad4-43b7-bf88-20aef92b6839] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [c1be1a62-caab-4007-b5b2-bd2cffa8137a] - x-ms-routing-request-id: ['WESTUS2:20180109T233225Z:c06eaa4d-3ad4-43b7-bf88-20aef92b6839'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [5951f9ba-f595-11e7-9609-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"9acf215f-1ebb-476c-b66f-fac1f585e0bb","creationTime":"2018-01-09T23:31:44.7048019Z","lastModifiedTime":"2018-01-09T23:31:44.7048019Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Tue, 09 Jan 2018 23:32:25 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['908'] - x-ms-correlation-request-id: [bb50a5a8-a213-45f1-9466-73adefd872b0] - x-ms-ratelimit-remaining-subscription-reads: ['14992'] - x-ms-request-id: [0b52a5f0-d2c5-4b79-932c-20023683d950] - x-ms-routing-request-id: ['WESTUS2:20180109T233226Z:bb50a5a8-a213-45f1-9466-73adefd872b0'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [59e9221c-f595-11e7-8d96-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts?api-version=2016-11-01 - response: - body: {string: '{"value":[{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"9acf215f-1ebb-476c-b66f-fac1f585e0bb","creationTime":"2018-01-09T23:31:44.7048019Z","lastModifiedTime":"2018-01-09T23:31:44.7048019Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"f805ee3d-4353-41df-bc45-7b6a7ec9cdb0","creationTime":"2018-01-09T23:30:53.716178Z","lastModifiedTime":"2018-01-09T23:30:53.716178Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}]}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Tue, 09 Jan 2018 23:32:27 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['1154'] - x-ms-correlation-request-id: [bca66acf-a191-48c3-a1f4-8e34c863ed2c] - x-ms-ratelimit-remaining-subscription-reads: ['14995'] - x-ms-request-id: [671c94d2-ffb0-4ab5-aa92-ad4e4e469766] - x-ms-routing-request-id: ['WESTUS2:20180109T233227Z:bca66acf-a191-48c3-a1f4-8e34c863ed2c'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [5a952638-f595-11e7-adc7-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/accounts?api-version=2016-11-01 - response: - body: {string: '{"value":[{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"testadlfs18982.azuredatalakestore.net","accountId":"694d156e-3afa-4e63-b4f7-11e29e8ec40e","creationTime":"2017-12-22T20:15:40.1850371Z","lastModifiedTime":"2017-12-22T20:15:40.1850371Z"},"location":"East - US 2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datalakerg19371/providers/Microsoft.DataLakeStore/accounts/testadlfs18982","name":"testadlfs18982","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"9acf215f-1ebb-476c-b66f-fac1f585e0bb","creationTime":"2018-01-09T23:31:44.7048019Z","lastModifiedTime":"2018-01-09T23:31:44.7048019Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"f805ee3d-4353-41df-bc45-7b6a7ec9cdb0","creationTime":"2018-01-09T23:30:53.716178Z","lastModifiedTime":"2018-01-09T23:30:53.716178Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}]}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Tue, 09 Jan 2018 23:32:27 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['1655'] - x-ms-correlation-request-id: [91cea13a-c9e4-4ee0-91a4-c9f3bb05ce70] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [ae755f6e-04af-4331-a0c4-5889357b02af] - x-ms-routing-request-id: ['WESTUS2:20180109T233228Z:91cea13a-c9e4-4ee0-91a4-c9f3bb05ce70'] - status: {code: 200, message: OK} -- request: - body: '{"tags": {"tag2": "value2"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['28'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [5b1adeca-f595-11e7-b731-705a0f2f3d93] - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"f805ee3d-4353-41df-bc45-7b6a7ec9cdb0","creationTime":"2018-01-09T23:30:53.716178Z","lastModifiedTime":"2018-01-09T23:32:29.9140549Z"},"location":"East - US 2","tags":{"tag2":"value2"},"identity":{"type":"SystemAssigned","principalId":"1df5d804-b9f5-4aef-ac0c-a0306feaf669","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Tue, 09 Jan 2018 23:32:30 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['1044'] - x-ms-correlation-request-id: [a28aa71b-f90d-4d9f-bbdc-db273885f301] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [a43db9b9-1bbb-4e11-955b-331a1c3f6af8] - x-ms-routing-request-id: ['WESTUS2:20180109T233230Z:a28aa71b-f90d-4d9f-bbdc-db273885f301'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [5c5f1a92-f595-11e7-b603-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/capability?api-version=2016-11-01 - response: - body: {string: '{"subscriptionId":"00000000-0000-0000-0000-000000000000","state":"Registered","maxAccountCount":10,"accountCount":3,"migrationState":false}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Tue, 09 Jan 2018 23:32:31 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['139'] - x-ms-correlation-request-id: [8961c236-6582-4254-9c00-e6828faa2e2e] - x-ms-ratelimit-remaining-subscription-reads: ['14991'] - x-ms-request-id: [8feaacf9-826e-4ec0-b978-b70a4d4fd0da] - x-ms-routing-request-id: ['WESTUS2:20180109T233231Z:8961c236-6582-4254-9c00-e6828faa2e2e'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [5cf3dbba-f595-11e7-b514-705a0f2f3d93] - method: GET - uri: https://management.azure.com/providers/Microsoft.DataLakeStore/operations?api-version=2016-11-01 - response: - body: {string: '{"value":[{"name":"Microsoft.DataLakeStore/operations/read","display":{"provider":"Microsoft - DataLakeStore","resource":"Available Operations","operation":"Get Available - Operations","description":"Get available operations of DataLakeStore."}},{"name":"Microsoft.DataLakeStore/register/action","display":{"provider":"Microsoft - DataLakeStore","resource":"Registration","operation":"Register to DataLakeStore","description":"Register - subscription to DataLakeStore."}},{"name":"Microsoft.DataLakeStore/accounts/read","display":{"provider":"Microsoft - DataLakeStore","resource":"Account","operation":"Get DataLakeStore Account","description":"Get - information about an existing DataLakeStore account."}},{"name":"Microsoft.DataLakeStore/accounts/write","display":{"provider":"Microsoft - DataLakeStore","resource":"Account","operation":"Create or Update DataLakeStore - Account","description":"Create or update a DataLakeStore account."}},{"name":"Microsoft.DataLakeStore/accounts/delete","display":{"provider":"Microsoft - DataLakeStore","resource":"Account","operation":"Delete DataLakeStore Account","description":"Delete - a DataLakeStore account."}},{"name":"Microsoft.DataLakeStore/accounts/operationResults/read","display":{"provider":"Microsoft - DataLakeStore","resource":"Operation Result","operation":"Get DataLakeStore - Account OperationResult","description":"Get result of a DataLakeStore account - operation."}},{"name":"Microsoft.DataLakeStore/accounts/enableKeyVault/action","display":{"provider":"Microsoft - DataLakeStore","resource":"Key Vault","operation":"Enable Key Vault for DataLakeStore - Account","description":"Enable KeyVault for a DataLakeStore account."}},{"name":"Microsoft.DataLakeStore/accounts/firewallRules/read","display":{"provider":"Microsoft - DataLakeStore","resource":"Firewall Rule","operation":"Get Firewall Rule","description":"Get - information about a firewall rule."}},{"name":"Microsoft.DataLakeStore/accounts/firewallRules/write","display":{"provider":"Microsoft - DataLakeStore","resource":"Firewall Rule","operation":"Create or Update Firewall - Rule","description":"Create or update a firewall rule."}},{"name":"Microsoft.DataLakeStore/accounts/firewallRules/delete","display":{"provider":"Microsoft - DataLakeStore","resource":"Firewall Rule","operation":"Delete Firewall Rule","description":"Delete - a firewall rule."}},{"name":"Microsoft.DataLakeStore/accounts/trustedIdProviders/read","display":{"provider":"Microsoft - DataLakeStore","resource":"Trusted IdProvider","operation":"Get Trusted Identity - Provider","description":"Get information about a trusted identity provider."}},{"name":"Microsoft.DataLakeStore/accounts/trustedIdProviders/write","display":{"provider":"Microsoft - DataLakeStore","resource":"Trusted IdProvider","operation":"Create or Update - Trusted Identity Provider","description":"Create or update a trusted identity - provider."}},{"name":"Microsoft.DataLakeStore/accounts/trustedIdProviders/delete","display":{"provider":"Microsoft - DataLakeStore","resource":"Trusted IdProvider","operation":"Delete Trusted - Identity Provider","description":"Delete a trusted identity provider."}},{"name":"Microsoft.DataLakeStore/accounts/Superuser/action","display":{"provider":"Microsoft - DataLakeStore","resource":"Superuser","operation":"Grant Superuser","description":"Grant - Superuser on Data Lake Store when granted with Microsoft.Authorization/roleAssignments/write."}},{"name":"Microsoft.DataLakeStore/locations/capability/read","display":{"provider":"Microsoft - DataLakeStore","resource":"Subscription Capability","operation":"Get DataLakeStore - Subscription Capability","description":"Get capability information of a subscription - regarding using DataLakeStore."}},{"name":"Microsoft.DataLakeStore/locations/checkNameAvailability/action","display":{"provider":"Microsoft - DataLakeStore","resource":"Name Availability","operation":"Check DataLakeStore - Account Name Availability","description":"Check availability of a DataLakeStore - account name."}},{"name":"Microsoft.DataLakeStore/locations/operationResults/read","display":{"provider":"Microsoft - DataLakeStore","resource":"Operation Result","operation":"Get DataLakeStore - Account OperationResult","description":"Get result of a DataLakeStore account - operation."}},{"name":"Microsoft.DataLakeStore/accounts/providers/Microsoft.Insights/metricDefinitions/read","display":{"provider":"Microsoft - DataLakeStore","resource":"Metric Definition","operation":"Get DataLakeStore - Account metric definitions","description":"Get the available metrics for the - DataLakeStore account."},"origin":"system","properties":{"serviceSpecification":{"metricSpecifications":[{"name":"TotalStorage","displayName":"Total - Storage","displayDescription":"Total amount of data stored in the account.","unit":"Bytes","aggregationType":"Maximum","availabilities":[{"timeGrain":"PT1M","blobDuration":"PT1H"},{"timeGrain":"PT1H","blobDuration":"P1D"}]},{"name":"DataWritten","displayName":"Data - Written","displayDescription":"Total amount of data written to the account.","unit":"Bytes","aggregationType":"Total","availabilities":[{"timeGrain":"PT1M","blobDuration":"PT1H"},{"timeGrain":"PT1H","blobDuration":"P1D"}]},{"name":"DataRead","displayName":"Data - Read","displayDescription":"Total amount of data read from the account.","unit":"Bytes","aggregationType":"Total","availabilities":[{"timeGrain":"PT1M","blobDuration":"PT1H"},{"timeGrain":"PT1H","blobDuration":"P1D"}]},{"name":"WriteRequests","displayName":"Write - Requests","displayDescription":"Count of data write requests to the account.","unit":"Count","aggregationType":"Total","availabilities":[{"timeGrain":"PT1M","blobDuration":"PT1H"},{"timeGrain":"PT1H","blobDuration":"P1D"}]},{"name":"ReadRequests","displayName":"Read - Requests","displayDescription":"Count of data read requests to the account.","unit":"Count","aggregationType":"Total","availabilities":[{"timeGrain":"PT1M","blobDuration":"PT1H"},{"timeGrain":"PT1H","blobDuration":"P1D"}]}]}}},{"name":"Microsoft.DataLakeStore/accounts/providers/Microsoft.Insights/logDefinitions/read","display":{"provider":"Microsoft - DataLakeStore","resource":"Log Definition","operation":"Get DataLakeStore - Account log definitions","description":"Get the available logs for the DataLakeStore - account."},"origin":"system","properties":{"serviceSpecification":{"logSpecifications":[{"name":"Audit","displayName":"Audit - Logs","blobDuration":"PT1H"},{"name":"Requests","displayName":"Request Logs","blobDuration":"PT1H"}]}}},{"name":"Microsoft.DataLakeStore/accounts/providers/Microsoft.Insights/diagnosticSettings/read","display":{"provider":"Microsoft - DataLakeStore","resource":"Diagnostic Setting","operation":"Get DataLakeStore - Account diagnostic settings","description":"Get the diagnostic settings for - the DataLakeStore account."},"origin":"system"},{"name":"Microsoft.DataLakeStore/accounts/providers/Microsoft.Insights/diagnosticSettings/write","display":{"provider":"Microsoft - DataLakeStore","resource":"Diagnostic Setting","operation":"Create or update - DataLakeStore Account diagnostic settings","description":"Create or update - the diagnostic settings for the DataLakeStore account."},"origin":"system"}]}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Tue, 09 Jan 2018 23:32:32 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['7160'] - x-ms-correlation-request-id: [63ea0470-adae-420d-b373-b63c67e2f99a] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [6af26d12-e4e9-4b9e-8da7-33f72251f1dc] - x-ms-routing-request-id: ['WESTUS2:20180109T233232Z:63ea0470-adae-420d-b373-b63c67e2f99a'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [5d7ce7e2-f595-11e7-b8a6-705a0f2f3d93] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 - response: - body: {string: ''} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Length: ['0'] - Date: ['Tue, 09 Jan 2018 23:32:36 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-AspNet-Version: [4.0.30319] - X-Powered-By: [ASP.NET] - x-ms-correlation-request-id: [2ffcb7d4-519f-4956-80b8-f0620fee4824] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [f354d404-9414-40ab-bd17-0f605eeab5cd] - x-ms-routing-request-id: ['WESTUS2:20180109T233236Z:2ffcb7d4-519f-4956-80b8-f0620fee4824'] - status: {code: 200, message: OK} -- request: - body: '{"name": "pyarmadls847d11a7", "type": "Microsoft.DataLakeStore/accounts"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [73e8dd12-103a-11e8-bb05-705a0f2f3d93] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/checkNameAvailability?api-version=2016-11-01 - response: - body: {string: '{"nameAvailable":true}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:19:48 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['22'] - x-ms-correlation-request-id: [54b50508-0d53-4155-87bc-7c0f149dd5ff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [23438ed7-dbd4-4fb4-b287-3e1b1438f9c8] - x-ms-routing-request-id: ['WESTUS2:20180212T211948Z:54b50508-0d53-4155-87bc-7c0f149dd5ff'] - status: {code: 200, message: OK} -- request: - body: '{"location": "East US 2", "tags": {"tag1": "value1"}, "identity": {"type": - "SystemAssigned"}, "properties": {"encryptionConfig": {"type": "ServiceManaged"}, - "encryptionState": "Enabled"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['187'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [749960f0-103a-11e8-8900-705a0f2f3d93] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"provisioningState":"Creating","state":null,"endpoint":null,"accountId":"51229721-02f8-4329-b8ad-e06ca456b298"},"location":"East - US 2","tags":{"tag1":"value1"},"identity":{"type":"SystemAssigned","principalId":"00000000-0000-0000-0000-000000000000","tenantId":"00000000-0000-0000-0000-000000000000"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/51229721-02f8-4329-b8ad-e06ca456b2980?api-version=2016-11-01&expanded=true'] - Cache-Control: [no-cache] - Connection: [close] - Content-Length: ['644'] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:19:53 GMT'] - Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7/operationresults/0?api-version=2016-11-01'] - Pragma: [no-cache] - Retry-After: ['0'] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - x-ms-correlation-request-id: [d737a1af-6dbd-4395-a7ef-f51f6f57b705] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [efa6f3df-9a89-462a-91c0-5787cf7f2ae3] - x-ms-routing-request-id: ['WESTUS2:20180212T211953Z:d737a1af-6dbd-4395-a7ef-f51f6f57b705'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [749960f0-103a-11e8-8900-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/51229721-02f8-4329-b8ad-e06ca456b2980?api-version=2016-11-01&expanded=true - response: - body: {string: '{"status":"InProgress"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:20:04 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['23'] - x-ms-correlation-request-id: [602c923d-b726-4146-baf7-5750197627fe] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [1b69592c-2c73-4464-bd16-c0919fc5d7a5] - x-ms-routing-request-id: ['WESTUS2:20180212T212004Z:602c923d-b726-4146-baf7-5750197627fe'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [749960f0-103a-11e8-8900-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/51229721-02f8-4329-b8ad-e06ca456b2980?api-version=2016-11-01&expanded=true - response: - body: {string: '{"status":"Succeeded"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:20:34 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['22'] - x-ms-correlation-request-id: [517cf962-d026-4227-9b01-73cc5d08c098] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [a71c9eb4-8c3a-4e37-a0a4-5104f85a97f6] - x-ms-routing-request-id: ['WESTUS2:20180212T212035Z:517cf962-d026-4227-9b01-73cc5d08c098'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [749960f0-103a-11e8-8900-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"51229721-02f8-4329-b8ad-e06ca456b298","creationTime":"2018-02-12T21:19:57.0092266Z","lastModifiedTime":"2018-02-12T21:19:57.0092266Z"},"location":"East - US 2","tags":{"tag1":"value1"},"identity":{"type":"SystemAssigned","principalId":"25e93568-df03-4b15-9311-994e44792cd3","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:20:36 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['1045'] - x-ms-correlation-request-id: [7a0a40f3-b82e-4766-b3b1-54ca68558b75] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [292473b5-d6fc-4a17-8b10-698751134672] - x-ms-routing-request-id: ['WESTUS2:20180212T212037Z:7a0a40f3-b82e-4766-b3b1-54ca68558b75'] - status: {code: 200, message: OK} -- request: - body: '{"name": "pyarmadls847d11a7", "type": "Microsoft.DataLakeStore/accounts"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [91a5999a-103a-11e8-9017-705a0f2f3d93] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/checkNameAvailability?api-version=2016-11-01 - response: - body: {string: '{"nameAvailable":false,"reason":"AlreadyExists","message":"An - account named ''pyarmadls847d11a7'' already exists."}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:20:38 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['113'] - x-ms-correlation-request-id: [08a7a284-0ab2-43a8-9ea7-373ab0c26ae3] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [f29e9dbf-fb05-4b19-8f46-1bb0c6d7ac72] - x-ms-routing-request-id: ['WESTUS2:20180212T212038Z:08a7a284-0ab2-43a8-9ea7-373ab0c26ae3'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [923d748a-103a-11e8-baec-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"51229721-02f8-4329-b8ad-e06ca456b298","creationTime":"2018-02-12T21:19:57.0092266Z","lastModifiedTime":"2018-02-12T21:19:57.0092266Z"},"location":"East - US 2","tags":{"tag1":"value1"},"identity":{"type":"SystemAssigned","principalId":"25e93568-df03-4b15-9311-994e44792cd3","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:20:38 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['1045'] - x-ms-correlation-request-id: [3e5627e1-7745-42f3-a4ec-50d703930a3b] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [3cd9f6d8-3d71-43d3-b804-9c1a4dc2b91f] - x-ms-routing-request-id: ['WESTUS2:20180212T212039Z:3e5627e1-7745-42f3-a4ec-50d703930a3b'] - status: {code: 200, message: OK} -- request: - body: '{"location": "East US 2", "tags": {"tag1": "value1"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['53'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [92e2dd14-103a-11e8-866c-705a0f2f3d93] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"provisioningState":"Creating","state":null,"endpoint":null,"accountId":"429491f3-e383-4d3c-a318-2281f05aacac"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/429491f3-e383-4d3c-a318-2281f05aacac0?api-version=2016-11-01&expanded=true'] - Cache-Control: [no-cache] - Connection: [close] - Content-Length: ['433'] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:20:42 GMT'] - Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7/operationresults/0?api-version=2016-11-01'] - Pragma: [no-cache] - Retry-After: ['0'] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - x-ms-correlation-request-id: [35683a3d-2a2b-4b95-be4c-110a57c2ef24] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [a2bb2adc-0c67-4de3-bda6-2cda26bdb887] - x-ms-routing-request-id: ['WESTUS2:20180212T212042Z:35683a3d-2a2b-4b95-be4c-110a57c2ef24'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [92e2dd14-103a-11e8-866c-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/429491f3-e383-4d3c-a318-2281f05aacac0?api-version=2016-11-01&expanded=true - response: - body: {string: '{"status":"InProgress"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:20:52 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['23'] - x-ms-correlation-request-id: [f796a638-9d70-44b0-b122-e5f3d5a9b8f9] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [0350c07b-67ff-4ad8-ad2a-8961b0b58570] - x-ms-routing-request-id: ['WESTUS2:20180212T212053Z:f796a638-9d70-44b0-b122-e5f3d5a9b8f9'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [92e2dd14-103a-11e8-866c-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/429491f3-e383-4d3c-a318-2281f05aacac0?api-version=2016-11-01&expanded=true - response: - body: {string: '{"status":"Succeeded"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:21:23 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['22'] - x-ms-correlation-request-id: [69eb73f3-5a6a-4fec-87af-1cbd01886e29] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [9eb70242-a028-4ac0-ba4b-6b1c24f1296c] - x-ms-routing-request-id: ['WESTUS2:20180212T212124Z:69eb73f3-5a6a-4fec-87af-1cbd01886e29'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [92e2dd14-103a-11e8-866c-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"429491f3-e383-4d3c-a318-2281f05aacac","creationTime":"2018-02-12T21:20:44.368853Z","lastModifiedTime":"2018-02-12T21:20:44.368853Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:21:24 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['906'] - x-ms-correlation-request-id: [269526ef-ff06-4ede-96a1-e7fa70a52091] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [e28cbeec-5ffe-4c2e-9b5a-d767b55b463f] - x-ms-routing-request-id: ['WESTUS2:20180212T212125Z:269526ef-ff06-4ede-96a1-e7fa70a52091'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ae465e12-103a-11e8-8704-705a0f2f3d93] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7?api-version=2016-11-01 - response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"429491f3-e383-4d3c-a318-2281f05aacac","creationTime":"2018-02-12T21:20:44.368853Z","lastModifiedTime":"2018-02-12T21:20:44.368853Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:21:25 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['906'] - x-ms-correlation-request-id: [81b422f6-8b83-4bcd-a382-c0b9dbc995b2] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [5acfae8a-c110-45c0-bb6b-394e3f8511d1] - x-ms-routing-request-id: ['WESTUS2:20180212T212126Z:81b422f6-8b83-4bcd-a382-c0b9dbc995b2'] - status: {code: 200, message: OK} - request: body: '{"name": "pyarmadls847d11a7", "type": "Microsoft.DataLakeStore/accounts"}' headers: @@ -1593,72 +7,61 @@ interactions: Connection: [keep-alive] Content-Length: ['73'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] accept-language: [en-US] - x-ms-client-request-id: [3016c0f6-103b-11e8-9fe2-705a0f2f3d93] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/checkNameAvailability?api-version=2016-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/eastus2/checkNameAvailability?api-version=2016-11-01 response: body: {string: '{"nameAvailable":true}'} headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:25:03 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] + cache-control: [no-cache] content-length: ['22'] - x-ms-correlation-request-id: [d32650a4-455a-420e-b7d4-a83f5da5af7b] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [9b6dc34d-4ef1-41a3-b73d-93710c76cd5c] - x-ms-routing-request-id: ['WESTUS2:20180212T212504Z:d32650a4-455a-420e-b7d4-a83f5da5af7b'] - status: {code: 200, message: OK} -- request: - body: '{"location": "East US 2", "tags": {"tag1": "value1"}, "identity": {"type": + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:15:40 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-powered-by: [ASP.NET] + status: {code: 200, message: OK} +- request: + body: '{"location": "eastus2", "tags": {"tag1": "value1"}, "identity": {"type": "SystemAssigned"}, "properties": {"encryptionConfig": {"type": "ServiceManaged"}, "encryptionState": "Enabled"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['187'] + Content-Length: ['185'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] accept-language: [en-US] - x-ms-client-request-id: [30d63e3a-103b-11e8-9193-705a0f2f3d93] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 response: - body: {string: '{"properties":{"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"provisioningState":"Creating","state":null,"endpoint":null,"accountId":"d9179e2d-7515-4718-b25e-0432f38cf422"},"location":"East - US 2","tags":{"tag1":"value1"},"identity":{"type":"SystemAssigned","principalId":"00000000-0000-0000-0000-000000000000","tenantId":"00000000-0000-0000-0000-000000000000"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/d9179e2d-7515-4718-b25e-0432f38cf4220?api-version=2016-11-01&expanded=true'] - Cache-Control: [no-cache] - Connection: [close] - Content-Length: ['644'] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:25:08 GMT'] - Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7/operationresults/0?api-version=2016-11-01'] - Pragma: [no-cache] - Retry-After: ['0'] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - x-ms-correlation-request-id: [e6884c22-8ea2-47f5-8518-12b15836926d] + body: {string: '{"properties":{"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"provisioningState":"Creating","state":null,"endpoint":null,"accountId":"50240b99-e52f-413f-bb9e-e82cfc75754d"},"location":"eastus2","tags":{"tag1":"value1"},"identity":{"type":"SystemAssigned","principalId":"00000000-0000-0000-0000-000000000000","tenantId":"00000000-0000-0000-0000-000000000000"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/eastus2/operationResults/50240b99-e52f-413f-bb9e-e82cfc75754d0?api-version=2016-11-01&expanded=true'] + cache-control: [no-cache] + content-length: ['642'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:15:45 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7/operationresults/0?api-version=2016-11-01'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [c0619f22-ad7e-4c11-b0a9-d6ece1822b81] - x-ms-routing-request-id: ['WESTUS2:20180212T212509Z:e6884c22-8ea2-47f5-8518-12b15836926d'] + x-powered-by: [ASP.NET] status: {code: 201, message: Created} - request: body: null @@ -1666,31 +69,26 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [30d63e3a-103b-11e8-9193-705a0f2f3d93] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/d9179e2d-7515-4718-b25e-0432f38cf4220?api-version=2016-11-01&expanded=true + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/eastus2/operationResults/50240b99-e52f-413f-bb9e-e82cfc75754d0?api-version=2016-11-01&expanded=true response: body: {string: '{"status":"InProgress"}'} headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:25:20 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] + cache-control: [no-cache] content-length: ['23'] - x-ms-correlation-request-id: [ef3bad04-7f4a-4a4c-8a58-2c0e0b062e2f] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [cce601b2-a64e-41dd-9df5-a9d91fef20c0] - x-ms-routing-request-id: ['WESTUS2:20180212T212520Z:ef3bad04-7f4a-4a4c-8a58-2c0e0b062e2f'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:15:56 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] status: {code: 200, message: OK} - request: body: null @@ -1698,31 +96,26 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [30d63e3a-103b-11e8-9193-705a0f2f3d93] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/d9179e2d-7515-4718-b25e-0432f38cf4220?api-version=2016-11-01&expanded=true + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/eastus2/operationResults/50240b99-e52f-413f-bb9e-e82cfc75754d0?api-version=2016-11-01&expanded=true response: body: {string: '{"status":"Succeeded"}'} headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:25:50 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] + cache-control: [no-cache] content-length: ['22'] - x-ms-correlation-request-id: [b6a367c9-474d-40df-8d95-7de00bf91ee4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [65798f78-9e09-4609-9745-e4c711badfbf] - x-ms-routing-request-id: ['WESTUS2:20180212T212551Z:b6a367c9-474d-40df-8d95-7de00bf91ee4'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:16:27 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] status: {code: 200, message: OK} - request: body: null @@ -1730,32 +123,26 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [30d63e3a-103b-11e8-9193-705a0f2f3d93] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"d9179e2d-7515-4718-b25e-0432f38cf422","creationTime":"2018-02-12T21:25:09.9513797Z","lastModifiedTime":"2018-02-12T21:25:09.9513797Z"},"location":"East - US 2","tags":{"tag1":"value1"},"identity":{"type":"SystemAssigned","principalId":"cd342977-9584-4834-b311-e869cf6c3201","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} + body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","dataLakePerformanceTierState":"Disabled","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"50240b99-e52f-413f-bb9e-e82cfc75754d","creationTime":"2018-06-11T06:15:46.0137613Z","lastModifiedTime":"2018-06-11T06:15:46.0137613Z"},"location":"eastus2","tags":{"tag1":"value1"},"identity":{"type":"SystemAssigned","principalId":"f84c1c58-5627-4e42-a9ba-0d8b12b53125","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:25:52 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['1045'] - x-ms-correlation-request-id: [3053b384-fa2b-4182-a4a5-7aa937a1ae6d] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [27b95e47-199a-47c5-9c7e-3bfabdbb5ddf] - x-ms-routing-request-id: ['WESTUS2:20180212T212552Z:3053b384-fa2b-4182-a4a5-7aa937a1ae6d'] + cache-control: [no-cache] + content-length: ['1085'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:16:28 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] status: {code: 200, message: OK} - request: body: '{"name": "pyarmadls847d11a7", "type": "Microsoft.DataLakeStore/accounts"}' @@ -1765,33 +152,29 @@ interactions: Connection: [keep-alive] Content-Length: ['73'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] accept-language: [en-US] - x-ms-client-request-id: [4d9d03d0-103b-11e8-9fd7-705a0f2f3d93] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/checkNameAvailability?api-version=2016-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/eastus2/checkNameAvailability?api-version=2016-11-01 response: body: {string: '{"nameAvailable":false,"reason":"AlreadyExists","message":"An account named ''pyarmadls847d11a7'' already exists."}'} headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:25:53 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] + cache-control: [no-cache] content-length: ['113'] - x-ms-correlation-request-id: [cf30fc26-2939-4eaa-affb-e48976a529b9] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [a21fc529-6372-46ba-8c8e-049b43db098e] - x-ms-routing-request-id: ['WESTUS2:20180212T212553Z:cf30fc26-2939-4eaa-affb-e48976a529b9'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:16:29 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-powered-by: [ASP.NET] status: {code: 200, message: OK} - request: body: null @@ -1800,71 +183,58 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] accept-language: [en-US] - x-ms-client-request-id: [4e3c6312-103b-11e8-a797-705a0f2f3d93] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"d9179e2d-7515-4718-b25e-0432f38cf422","creationTime":"2018-02-12T21:25:09.9513797Z","lastModifiedTime":"2018-02-12T21:25:09.9513797Z"},"location":"East - US 2","tags":{"tag1":"value1"},"identity":{"type":"SystemAssigned","principalId":"cd342977-9584-4834-b311-e869cf6c3201","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} + body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","dataLakePerformanceTierState":"Disabled","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"50240b99-e52f-413f-bb9e-e82cfc75754d","creationTime":"2018-06-11T06:15:46.0137613Z","lastModifiedTime":"2018-06-11T06:15:46.0137613Z"},"location":"eastus2","tags":{"tag1":"value1"},"identity":{"type":"SystemAssigned","principalId":"f84c1c58-5627-4e42-a9ba-0d8b12b53125","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:25:54 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['1045'] - x-ms-correlation-request-id: [99194bef-e47f-44b6-b6fc-0c4fbdc2e9e2] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [989d028b-fb7f-4820-8199-868044ee7b20] - x-ms-routing-request-id: ['WESTUS2:20180212T212554Z:99194bef-e47f-44b6-b6fc-0c4fbdc2e9e2'] + cache-control: [no-cache] + content-length: ['1085'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:16:31 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] status: {code: 200, message: OK} - request: - body: '{"location": "East US 2", "tags": {"tag1": "value1"}}' + body: '{"location": "eastus2", "tags": {"tag1": "value1"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['53'] + Content-Length: ['51'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] accept-language: [en-US] - x-ms-client-request-id: [4ee1a3d8-103b-11e8-947e-705a0f2f3d93] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7?api-version=2016-11-01 response: - body: {string: '{"properties":{"provisioningState":"Creating","state":null,"endpoint":null,"accountId":"66fa4816-1a94-4475-ad9a-cdb35dc77ddf"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/66fa4816-1a94-4475-ad9a-cdb35dc77ddf0?api-version=2016-11-01&expanded=true'] - Cache-Control: [no-cache] - Connection: [close] - Content-Length: ['433'] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:25:57 GMT'] - Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7/operationresults/0?api-version=2016-11-01'] - Pragma: [no-cache] - Retry-After: ['0'] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - x-ms-correlation-request-id: [47f75211-d51f-4c2f-9807-017cb4c7d42f] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [0c8164b9-e261-4fb0-8d03-3c49a4cf76e6] - x-ms-routing-request-id: ['WESTUS2:20180212T212557Z:47f75211-d51f-4c2f-9807-017cb4c7d42f'] + body: {string: '{"properties":{"provisioningState":"Creating","state":null,"endpoint":null,"accountId":"48f79b92-f27d-495c-a940-ebc46ee748cc"},"location":"eastus2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/eastus2/operationResults/48f79b92-f27d-495c-a940-ebc46ee748cc0?api-version=2016-11-01&expanded=true'] + cache-control: [no-cache] + content-length: ['431'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:16:33 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7/operationresults/0?api-version=2016-11-01'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-powered-by: [ASP.NET] status: {code: 201, message: Created} - request: body: null @@ -1872,31 +242,26 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [4ee1a3d8-103b-11e8-947e-705a0f2f3d93] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/66fa4816-1a94-4475-ad9a-cdb35dc77ddf0?api-version=2016-11-01&expanded=true + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/eastus2/operationResults/48f79b92-f27d-495c-a940-ebc46ee748cc0?api-version=2016-11-01&expanded=true response: body: {string: '{"status":"InProgress"}'} headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:26:08 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] + cache-control: [no-cache] content-length: ['23'] - x-ms-correlation-request-id: [2ae69d82-b7f5-4299-b07d-f23bbe6ef621] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [ff343b83-70e7-4c17-9415-073f292a5400] - x-ms-routing-request-id: ['WESTUS2:20180212T212608Z:2ae69d82-b7f5-4299-b07d-f23bbe6ef621'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:16:44 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] status: {code: 200, message: OK} - request: body: null @@ -1904,31 +269,26 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [4ee1a3d8-103b-11e8-947e-705a0f2f3d93] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/operationResults/66fa4816-1a94-4475-ad9a-cdb35dc77ddf0?api-version=2016-11-01&expanded=true + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/eastus2/operationResults/48f79b92-f27d-495c-a940-ebc46ee748cc0?api-version=2016-11-01&expanded=true response: body: {string: '{"status":"Succeeded"}'} headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:26:39 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] + cache-control: [no-cache] content-length: ['22'] - x-ms-correlation-request-id: [b67fde2c-bccf-4729-9ee6-cf9a4c15d318] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [fae51914-af29-4c9a-b01e-356ec3a996a0] - x-ms-routing-request-id: ['WESTUS2:20180212T212639Z:b67fde2c-bccf-4729-9ee6-cf9a4c15d318'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:17:15 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] status: {code: 200, message: OK} - request: body: null @@ -1936,32 +296,26 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] - x-ms-client-request-id: [4ee1a3d8-103b-11e8-947e-705a0f2f3d93] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7?api-version=2016-11-01 response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"66fa4816-1a94-4475-ad9a-cdb35dc77ddf","creationTime":"2018-02-12T21:25:56.302289Z","lastModifiedTime":"2018-02-12T21:25:56.302289Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} + body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","dataLakePerformanceTierState":"Disabled","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"48f79b92-f27d-495c-a940-ebc46ee748cc","creationTime":"2018-06-11T06:16:34.6556128Z","lastModifiedTime":"2018-06-11T06:16:34.6556128Z"},"location":"eastus2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:26:40 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['906'] - x-ms-correlation-request-id: [36e8c6c2-ff5c-4301-ab35-613d0dec8e11] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [3d4ab410-d379-4055-9101-f8e80bf9d83e] - x-ms-routing-request-id: ['WESTUS2:20180212T212640Z:36e8c6c2-ff5c-4301-ab35-613d0dec8e11'] + cache-control: [no-cache] + content-length: ['948'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:17:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] status: {code: 200, message: OK} - request: body: null @@ -1970,33 +324,27 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] accept-language: [en-US] - x-ms-client-request-id: [6a686650-103b-11e8-a9d8-705a0f2f3d93] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7?api-version=2016-11-01 response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"66fa4816-1a94-4475-ad9a-cdb35dc77ddf","creationTime":"2018-02-12T21:25:56.302289Z","lastModifiedTime":"2018-02-12T21:25:56.302289Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} + body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","dataLakePerformanceTierState":"Disabled","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"48f79b92-f27d-495c-a940-ebc46ee748cc","creationTime":"2018-06-11T06:16:34.6556128Z","lastModifiedTime":"2018-06-11T06:16:34.6556128Z"},"location":"eastus2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:26:41 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['906'] - x-ms-correlation-request-id: [0e4cd47a-5ede-49c6-a019-c3f52aa85cce] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [59f8588a-cf2b-4788-9ac3-d137d556c85b] - x-ms-routing-request-id: ['WESTUS2:20180212T212642Z:0e4cd47a-5ede-49c6-a019-c3f52aa85cce'] + cache-control: [no-cache] + content-length: ['948'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:17:18 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] status: {code: 200, message: OK} - request: body: null @@ -2005,34 +353,27 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] accept-language: [en-US] - x-ms-client-request-id: [6b1c1418-103b-11e8-be01-705a0f2f3d93] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts?api-version=2016-11-01 response: - body: {string: '{"value":[{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"66fa4816-1a94-4475-ad9a-cdb35dc77ddf","creationTime":"2018-02-12T21:25:56.302289Z","lastModifiedTime":"2018-02-12T21:25:56.302289Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"d9179e2d-7515-4718-b25e-0432f38cf422","creationTime":"2018-02-12T21:25:09.9513797Z","lastModifiedTime":"2018-02-12T21:25:09.9513797Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}]}'} + body: {string: '{"value":[{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"48f79b92-f27d-495c-a940-ebc46ee748cc","creationTime":"2018-06-11T06:16:34.6556128Z","lastModifiedTime":"2018-06-11T06:16:34.6556128Z"},"location":"eastus2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"50240b99-e52f-413f-bb9e-e82cfc75754d","creationTime":"2018-06-11T06:15:46.0137613Z","lastModifiedTime":"2018-06-11T06:15:46.0137613Z"},"location":"eastus2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}]}'} headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:26:42 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['1154'] - x-ms-correlation-request-id: [ffa4214d-688d-46b4-a89a-f0b0e6d67d27] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [0f9c74c0-1b3b-4667-bfda-13b550da364d] - x-ms-routing-request-id: ['WESTUS2:20180212T212643Z:ffa4214d-688d-46b4-a89a-f0b0e6d67d27'] + cache-control: [no-cache] + content-length: ['1152'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:17:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] status: {code: 200, message: OK} - request: body: null @@ -2041,34 +382,122 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] accept-language: [en-US] - x-ms-client-request-id: [6bd17364-103b-11e8-8522-705a0f2f3d93] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/accounts?api-version=2016-11-01 response: - body: {string: '{"value":[{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"66fa4816-1a94-4475-ad9a-cdb35dc77ddf","creationTime":"2018-02-12T21:25:56.302289Z","lastModifiedTime":"2018-02-12T21:25:56.302289Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"d9179e2d-7515-4718-b25e-0432f38cf422","creationTime":"2018-02-12T21:25:09.9513797Z","lastModifiedTime":"2018-02-12T21:25:09.9513797Z"},"location":"East - US 2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}]}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:26:43 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['1154'] - x-ms-correlation-request-id: [e6967e56-0777-4cd6-a502-abee644025b5] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [ac89d21b-878f-4caf-bd3e-6a6fd146f3ed] - x-ms-routing-request-id: ['WESTUS2:20180212T212644Z:e6967e56-0777-4cd6-a502-abee644025b5'] + body: {string: '{"value":[{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlbench.azuredatalakestore.net","accountId":"7e6c2034-f570-46d3-a0f7-074cad4bd21f","creationTime":"2016-06-20T16:43:34.5827392Z","lastModifiedTime":"2018-03-31T01:13:03.158173Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adlbench/providers/Microsoft.DataLakeStore/accounts/adlbench","name":"adlbench","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"azuresmrtestadls.azuredatalakestore.net","accountId":"37547777-2c45-4bbd-bc04-077a7ef6a04f","creationTime":"2017-08-16T17:21:36.0598116Z","lastModifiedTime":"2018-03-31T01:13:19.5466687Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-AZURESMR/providers/Microsoft.DataLakeStore/accounts/azuresmrtestadls","name":"azuresmrtestadls","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsbenchmark.azuredatalakestore.net","accountId":"7a94e450-6269-460c-9ead-a452e9ea4dc5","creationTime":"2017-03-21T17:44:18.21939Z","lastModifiedTime":"2018-03-31T02:11:45.7028683Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adlsbenchmark/providers/Microsoft.DataLakeStore/accounts/adlsbenchmark","name":"adlsbenchmark","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"perfalki.azuredatalakestore.net","accountId":"deb7e24e-079f-450d-afa8-dfb11bfe403b","creationTime":"2016-08-02T18:34:39.522057Z","lastModifiedTime":"2018-03-31T01:14:03.6639597Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-Dan/providers/Microsoft.DataLakeStore/accounts/perfalki","name":"perfalki","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest10.azuredatalakestore.net","accountId":"bf281f85-7644-4903-9fd3-1a8079894f05","creationTime":"2016-08-31T16:16:01.9928323Z","lastModifiedTime":"2018-03-31T01:15:28.6516476Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest10","name":"hdiadlstest10","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest11.azuredatalakestore.net","accountId":"4f9337ac-33c2-491a-a24c-0fcda22a8c31","creationTime":"2016-08-31T16:17:09.3174027Z","lastModifiedTime":"2018-03-31T01:15:50.3853728Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest11","name":"hdiadlstest11","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest11eus2e.azuredatalakestore.net","accountId":"7a3fb8ff-c91b-426f-85d9-7a0c39dd0643","creationTime":"2017-09-06T05:23:10.4119957Z","lastModifiedTime":"2018-03-31T01:16:01.1846506Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest11eus2e","name":"hdiadlstest11eus2e","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest12.azuredatalakestore.net","accountId":"16e42b15-085e-43f5-90d1-5d0a646610c0","creationTime":"2016-08-31T16:17:56.7537438Z","lastModifiedTime":"2018-03-31T01:16:39.5751549Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest12","name":"hdiadlstest12","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"rtest00.azuredatalakestore.net","accountId":"a5e862de-3ca2-4b52-b1be-9d2d1cacadb2","creationTime":"2017-06-20T10:34:06.8813162Z","lastModifiedTime":"2018-03-31T01:20:13.8534744Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-R/providers/Microsoft.DataLakeStore/accounts/rtest00","name":"rtest00","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"rtest99.azuredatalakestore.net","accountId":"a3a7e6c8-174c-404b-8b3e-0c30a8945a36","creationTime":"2017-06-27T08:49:35.2416237Z","lastModifiedTime":"2018-03-31T01:20:16.9824714Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-R/providers/Microsoft.DataLakeStore/accounts/rtest99","name":"rtest99","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlse2eprodtest.azuredatalakestore.net","accountId":"d83ab66b-3207-4dce-a6e4-c2716330e601","creationTime":"2016-07-28T20:09:13.8775412Z","lastModifiedTime":"2018-03-31T01:32:12.8022498Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlse2eprodtest","name":"adlse2eprodtest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsfilefolderaclprodtst.azuredatalakestore.net","accountId":"0acd495d-e2d6-4227-a4fe-da2214f49260","creationTime":"2016-07-28T20:11:00.1862149Z","lastModifiedTime":"2018-03-31T01:32:16.8887506Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlsfilefolderaclprodtst","name":"adlsfilefolderaclprodtst","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsflightm6.azuredatalakestore.net","accountId":"816b8994-db1f-406a-88c2-90e12df0bf55","creationTime":"2017-10-17T23:01:55.9445176Z","lastModifiedTime":"2018-03-31T01:32:19.5885783Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlsflightm6","name":"adlsflightm6","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsflightm62.azuredatalakestore.net","accountId":"f7a50a4d-71c0-40a7-b84d-65d36887fda3","creationTime":"2017-10-21T01:24:54.6415061Z","lastModifiedTime":"2018-03-31T01:32:21.8505171Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlsflightm62","name":"adlsflightm62","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsforsparkcluster01.azuredatalakestore.net","accountId":"7392dab6-92ba-499e-99cd-e02d2b18c959","creationTime":"2017-10-24T23:42:06.1072776Z","lastModifiedTime":"2018-03-31T01:32:24.2806904Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlsforsparkcluster01","name":"adlsforsparkcluster01","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlshiveperfstoreeus01.azuredatalakestore.net","accountId":"34721fae-bbf3-4702-8401-776ed08a3660","creationTime":"2016-08-11T05:22:41.8644444Z","lastModifiedTime":"2018-03-31T01:32:31.115901Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlshiveperfstoreeus01","name":"adlshiveperfstoreeus01","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfhive.azuredatalakestore.net","accountId":"223ea4ef-a34e-4406-8b65-a245c97f0620","creationTime":"2016-06-30T06:54:44.5890836Z","lastModifiedTime":"2018-03-31T01:32:36.9695494Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlsperfhive","name":"adlsperfhive","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hadooptestsuite.azuredatalakestore.net","accountId":"f195b072-3cda-4d4e-8e90-84062a415300","creationTime":"2016-09-04T09:51:28.4566479Z","lastModifiedTime":"2018-03-31T01:33:12.5741232Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/hadooptestsuite","name":"hadooptestsuite","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"helloadl.azuredatalakestore.net","accountId":"fb043c05-4d70-430a-be0e-a02c9fa00f7a","creationTime":"2016-10-30T15:11:19.7298981Z","lastModifiedTime":"2018-03-31T01:33:18.7653754Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/helloadl","name":"helloadl","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlshbase.azuredatalakestore.net","accountId":"6c85576b-1569-4c3e-906c-dd920e49d98c","creationTime":"2017-02-23T18:41:10.4720665Z","lastModifiedTime":"2018-03-31T02:13:28.1922732Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adlshbase/providers/Microsoft.DataLakeStore/accounts/adlshbase","name":"adlshbase","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsinperftestseastus2.azuredatalakestore.net","accountId":"81d716b4-e7fa-4556-ac9c-83a0eb902c97","creationTime":"2016-10-07T01:23:20.1333622Z","lastModifiedTime":"2018-03-31T01:44:19.0286877Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/adlsinperftestseastus2","name":"adlsinperftestseastus2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperf.azuredatalakestore.net","accountId":"464ed521-8aac-4f31-b26b-2463aef6b325","creationTime":"2016-09-13T20:57:04.9257624Z","lastModifiedTime":"2018-03-31T01:44:21.4177319Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/adlsperf","name":"adlsperf","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfadls.azuredatalakestore.net","accountId":"facbd129-e713-4b3e-b7a0-5ef403bf6e97","creationTime":"2016-09-22T00:36:19.5200201Z","lastModifiedTime":"2018-03-31T01:44:24.1796861Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/adlsperfadls","name":"adlsperfadls","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfcompenc.azuredatalakestore.net","accountId":"872fd32e-d0c1-4ee6-8093-9de4dd310cc5","creationTime":"2016-09-15T21:05:45.587234Z","lastModifiedTime":"2018-03-31T01:44:27.1921795Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/adlsperfcompenc","name":"adlsperfcompenc","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfcompenc1.azuredatalakestore.net","accountId":"e62e5ac7-9e05-41ce-bf2e-c6b704b0b728","creationTime":"2016-09-15T21:06:01.5916257Z","lastModifiedTime":"2018-03-31T01:44:29.9098775Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/adlsperfcompenc1","name":"adlsperfcompenc1","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfcompenc2.azuredatalakestore.net","accountId":"fe3dc56b-b62c-4e8d-a401-48ace19878ef","creationTime":"2016-09-15T21:06:19.4351956Z","lastModifiedTime":"2018-03-31T01:44:32.2309937Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/adlsperfcompenc2","name":"adlsperfcompenc2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfcompenc3.azuredatalakestore.net","accountId":"3dd459e3-9036-4bc1-82d1-ccde8f41fe7b","creationTime":"2016-09-20T00:02:32.3343922Z","lastModifiedTime":"2018-03-31T01:44:34.7361207Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/adlsperfcompenc3","name":"adlsperfcompenc3","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfcompnoingest.azuredatalakestore.net","accountId":"adf8323f-c296-4462-b29b-be892974b1f4","creationTime":"2016-09-15T21:06:43.1496848Z","lastModifiedTime":"2018-03-31T01:44:37.4983884Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/adlsperfcompnoingest","name":"adlsperfcompnoingest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfcompnoingest1.azuredatalakestore.net","accountId":"891174e7-dc71-4f5b-8ac9-f1b534fdd78a","creationTime":"2016-09-15T21:07:01.8313527Z","lastModifiedTime":"2018-03-31T01:44:40.2025055Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/adlsperfcompnoingest1","name":"adlsperfcompnoingest1","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfcompnoingest2.azuredatalakestore.net","accountId":"57bbf20f-a23d-445e-8d48-b78a996898a4","creationTime":"2016-09-15T21:07:15.522632Z","lastModifiedTime":"2018-03-31T01:44:44.6570758Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/adlsperfcompnoingest2","name":"adlsperfcompnoingest2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfnocomp.azuredatalakestore.net","accountId":"2690f7be-277e-4467-8bc0-a927769228c6","creationTime":"2016-09-27T22:11:59.9626799Z","lastModifiedTime":"2018-03-31T01:44:47.1340175Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/adlsperfnocomp","name":"adlsperfnocomp","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfspark.azuredatalakestore.net","accountId":"0e07e005-60ed-40ae-b6a2-d133b34cf2a6","creationTime":"2016-06-16T17:44:11.0765771Z","lastModifiedTime":"2018-03-31T01:44:50.0539827Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/adlsperfspark","name":"adlsperfspark","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"anupama.azuredatalakestore.net","accountId":"f7f71122-40d6-4246-bb5d-8d3858e00b1e","creationTime":"2016-12-01T10:53:05.5541426Z","lastModifiedTime":"2018-03-31T02:59:05.1051791Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adlsperf/providers/Microsoft.DataLakeStore/accounts/anupama","name":"anupama","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"perfalki1.azuredatalakestore.net","accountId":"9a903f50-883d-4a86-9e3b-9ec3d6662889","creationTime":"2016-08-02T20:07:56.0629856Z","lastModifiedTime":"2018-03-31T01:44:52.5969153Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/perfalki1","name":"perfalki1","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"perfanalysis.azuredatalakestore.net","accountId":"73603ff3-8867-4bce-a1fa-9d48b5912c64","creationTime":"2016-07-25T23:29:56.6612365Z","lastModifiedTime":"2018-03-31T01:44:55.1811809Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/perfanalysis","name":"perfanalysis","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pkaturidrperf.azuredatalakestore.net","accountId":"6b0bed1f-1ccd-4567-b0e5-9c102c41c0e3","creationTime":"2016-09-12T19:20:48.7101584Z","lastModifiedTime":"2018-03-31T01:45:05.506766Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/pkaturidrperf","name":"pkaturidrperf","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"srevadls.azuredatalakestore.net","accountId":"77bc983b-e299-4f7b-9bd1-343507f121bc","creationTime":"2016-08-04T05:49:51.6950227Z","lastModifiedTime":"2018-03-31T01:45:36.4955524Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/srevadls","name":"srevadls","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"ycsbhbase01adls.azuredatalakestore.net","accountId":"c0dd6922-3aa1-4ee2-aff2-7695b84ea584","creationTime":"2016-05-26T04:12:17.5823171Z","lastModifiedTime":"2018-03-31T01:45:49.4634648Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/ycsbhbase01adls","name":"ycsbhbase01adls","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperftesting.azuredatalakestore.net","accountId":"cb15751f-fb69-4399-ba60-895feb370383","creationTime":"2017-06-08T22:59:48.6704376Z","lastModifiedTime":"2018-03-31T03:07:05.2613451Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adlsperftesting/providers/Microsoft.DataLakeStore/accounts/adlsperftesting","name":"adlsperftesting","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsforpython.azuredatalakestore.net","accountId":"d934d467-9dd5-4f9e-b21d-cb93100bba01","creationTime":"2018-04-03T18:47:20.3088635Z","lastModifiedTime":"2018-04-03T18:48:15.0447218Z"},"location":"eastus2","tags":{"Owner":"v-zhzha2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adlspython/providers/Microsoft.DataLakeStore/accounts/adlsforpython","name":"adlsforpython","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"defaulteastus2benchmark.azuredatalakestore.net","accountId":"7f8a477b-ff7b-4050-b0b9-09fd3cdd236e","creationTime":"2016-10-31T19:07:46.6368573Z","lastModifiedTime":"2018-03-31T01:56:48.3360627Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-Steven/providers/Microsoft.DataLakeStore/accounts/defaulteastus2benchmark","name":"defaulteastus2benchmark","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"perfbenchmarkdatalake.azuredatalakestore.net","accountId":"3312ea15-8f65-4f89-a82c-ef0632be8fbe","creationTime":"2016-07-07T18:24:52.4405318Z","lastModifiedTime":"2018-03-31T01:56:57.6935574Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-Steven/providers/Microsoft.DataLakeStore/accounts/perfbenchmarkdatalake","name":"perfbenchmarkdatalake","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsv2test.azuredatalakestore.net","accountId":"1ce64e6b-c670-4f7d-81b4-497f8f5ca2fc","creationTime":"2016-08-11T07:45:22.8804957Z","lastModifiedTime":"2018-03-31T02:00:52.2082432Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-V2-TEST/providers/Microsoft.DataLakeStore/accounts/adlsv2test","name":"adlsv2test","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlhadoopanalytics.azuredatalakestore.net","accountId":"9934f015-913b-4de3-9135-a7653c423f4a","creationTime":"2016-09-13T11:24:37.1977637Z","lastModifiedTime":"2018-03-31T02:04:29.336243Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-VDUSANE/providers/Microsoft.DataLakeStore/accounts/adlhadoopanalytics","name":"adlhadoopanalytics","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"lteststore005.azuredatalakestore.net","accountId":"c4f94d53-231a-4f6c-953d-cd8874f61a54","creationTime":"2017-07-11T23:11:22.9593204Z","lastModifiedTime":"2018-03-31T03:46:18.4301579Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AdobeIngressEgressTest/providers/Microsoft.DataLakeStore/accounts/lteststore005","name":"lteststore005","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"asikaria1bigtree1bn.azuredatalakestore.net","accountId":"663a31eb-6105-4a55-b7dc-2147c6f1a605","creationTime":"2017-02-01T23:59:51.9916491Z","lastModifiedTime":"2018-04-11T19:32:26.6893766Z"},"location":"eastus2","tags":{"Component":"ADLS-SDK","Project":"ADLS-SDK","Evictable":"06/30/2019","Owner":"asikaria"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asikaria1bigtree1bn-RG/providers/Microsoft.DataLakeStore/accounts/asikaria1bigtree1bn","name":"asikaria1bigtree1bn","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"asikaria1bn4driver.azuredatalakestore.net","accountId":"89cb1b1d-396f-45d8-8858-71c0935e2a4d","creationTime":"2017-03-10T01:57:10.7891489Z","lastModifiedTime":"2018-04-11T19:32:33.8442885Z"},"location":"eastus2","tags":{"Component":"ADLS-SDK","Project":"ADLS-SDK","Evictable":"06/30/2019","Owner":"asikaria"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asikaria1bn4driver-RG/providers/Microsoft.DataLakeStore/accounts/asikaria1bn4driver","name":"asikaria1bn4driver","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"asikaria1temp2.azuredatalakestore.net","accountId":"1bb5e6ad-644f-4852-9e31-024ab20eeb71","creationTime":"2018-01-23T19:54:15.0351773Z","lastModifiedTime":"2018-04-11T19:33:01.7540087Z"},"location":"eastus2","tags":{"Component":"ADLS-SDK","Project":"ADLS-SDK","Evictable":"06/30/2019","Owner":"asikaria"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asikaria1-temp2-RG/providers/Microsoft.DataLakeStore/accounts/asikaria1temp2","name":"asikaria1temp2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"asikaria1bn2driver.azuredatalakestore.net","accountId":"ff659c2e-2884-4177-8d6f-985743340750","creationTime":"2017-01-20T23:19:07.9591518Z","lastModifiedTime":"2018-04-11T19:32:29.0658094Z"},"location":"eastus2","tags":{"Component":"ADLS-SDK","Project":"ADLS-SDK","Evictable":"06/30/2019","Owner":"asikaria"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asikariatest1bnRG/providers/Microsoft.DataLakeStore/accounts/asikaria1bn2driver","name":"asikaria1bn2driver","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"asikaria1bn3client.azuredatalakestore.net","accountId":"4036c06a-20fb-4aec-9f02-0bb0bd2967d4","creationTime":"2017-01-20T23:19:45.4805555Z","lastModifiedTime":"2018-04-11T19:32:31.644728Z"},"location":"eastus2","tags":{"Component":"ADLS-SDK","Project":"ADLS-SDK","Evictable":"06/30/2019","Owner":"asikaria"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asikariatest1bnRG/providers/Microsoft.DataLakeStore/accounts/asikaria1bn3client","name":"asikaria1bn3client","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"asikariatest1bn.azuredatalakestore.net","accountId":"8407eec5-dc43-47dd-92cb-25f05a6b157c","creationTime":"2016-12-19T23:00:45.3174176Z","lastModifiedTime":"2018-04-11T19:33:25.1144931Z"},"location":"eastus2","tags":{"Component":"ADLS-SDK","Project":"ADLS-SDK","Evictable":"06/30/2019","Owner":"asikaria"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asikariatest1bnRG/providers/Microsoft.DataLakeStore/accounts/asikariatest1bn","name":"asikariatest1bn","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"gadlstest.azuredatalakestore.net","accountId":"1aaf5108-070a-463d-a051-d81935601b01","creationTime":"2017-11-22T18:23:18.6653667Z","lastModifiedTime":"2018-04-10T04:19:13.8065676Z"},"location":"eastus2","tags":{"Component":"ADL_Perf","Project":"ADL_CapacityTesting","Evictable":"6/30/2018","Owner":"sumameh"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bn2-cluster-4-rg/providers/Microsoft.DataLakeStore/accounts/gadlstest","name":"gadlstest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"perf01us15ds2.azuredatalakestore.net","accountId":"0693d35b-ab23-4f69-b2f9-6cb483c0e179","creationTime":"2016-11-03T19:16:54.4693645Z","lastModifiedTime":"2018-04-10T05:44:24.7265888Z"},"location":"eastus2","tags":{"Component":"ADL_Perf","Project":"ADL_CapacityTesting","Evictable":"6/30/2018","Owner":"sumameh"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cabosumameh/providers/Microsoft.DataLakeStore/accounts/perf01us15ds2","name":"perf01us15ds2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlclienttest.azuredatalakestore.net","accountId":"ea9cbd74-3d2b-4371-89c4-b02019c048a2","creationTime":"2016-04-01T10:10:19.6755711Z","lastModifiedTime":"2018-03-31T18:44:27.6681779Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Storage-EastUS2/providers/Microsoft.DataLakeStore/accounts/adlclienttest","name":"adlclienttest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"dharmesh100tb.azuredatalakestore.net","accountId":"d5094bec-831b-4529-b8a7-f952fab557db","creationTime":"2016-11-09T00:05:17.7049496Z","lastModifiedTime":"2018-03-31T18:53:45.9061664Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dharmesh100/providers/Microsoft.DataLakeStore/accounts/dharmesh100tb","name":"dharmesh100tb","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"diguptaadlseus.azuredatalakestore.net","accountId":"66305fc1-1963-44a7-91c4-6300a4623c77","creationTime":"2017-08-12T11:30:23.1703798Z","lastModifiedTime":"2018-03-31T18:57:50.6544028Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/digupta/providers/Microsoft.DataLakeStore/accounts/diguptaadlseus","name":"diguptaadlseus","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hbaseadlycsb.azuredatalakestore.net","accountId":"dbbe005f-86d6-4ad7-9be4-b81d0ad58a23","creationTime":"2016-03-21T05:54:07.2667316Z","lastModifiedTime":"2018-03-31T21:30:40.998608Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HBASE_YCSB/providers/Microsoft.DataLakeStore/accounts/hbaseadlycsb","name":"hbaseadlycsb","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"inteladlsgauseast2.azuredatalakestore.net","accountId":"edd995e9-7eab-4178-8b29-c5ee918549dd","creationTime":"2017-10-11T01:26:23.262228Z","lastModifiedTime":"2018-03-31T22:13:01.4035048Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/intel-rg/providers/Microsoft.DataLakeStore/accounts/inteladlsgauseast2","name":"inteladlsgauseast2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"inteladlstshddeastus2.azuredatalakestore.net","accountId":"fe9efa5d-7f64-4cb6-bed8-a29839aea443","creationTime":"2018-04-23T20:19:03.1313849Z","lastModifiedTime":"2018-04-23T20:19:03.1313849Z"},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/intel-rg/providers/Microsoft.DataLakeStore/accounts/inteladlstshddeastus2","name":"inteladlstshddeastus2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"kugupt15.azuredatalakestore.net","accountId":"82b1daff-dfd5-4aad-a231-8ee7ff230596","creationTime":"2016-08-31T05:48:40.9584042Z","lastModifiedTime":"2018-03-31T22:33:40.8661481Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kuguptresource/providers/Microsoft.DataLakeStore/accounts/kugupt15","name":"kugupt15","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"lattedatainsightsadhoc.azuredatalakestore.net","accountId":"dd5b6f40-84e5-4742-890b-77880fa7191b","creationTime":"2017-08-11T12:35:54.3437916Z","lastModifiedTime":"2018-03-31T22:47:05.2338676Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Latte/providers/Microsoft.DataLakeStore/accounts/lattedatainsightsadhoc","name":"lattedatainsightsadhoc","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsacctab2612a4.azuredatalakestore.net","accountId":"4c7674bc-2170-4e62-a6e0-877ffcf5f02f","creationTime":"2018-05-31T00:54:06.7380774Z","lastModifiedTime":"2018-06-11T05:41:00.7839249Z"},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.DataLakeStore/accounts/adlsacctab2612a4","name":"adlsacctab2612a4","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"lewudatalakestore.azuredatalakestore.net","accountId":"be4f19ec-017b-4f97-9d54-86c82176b302","creationTime":"2018-04-12T01:04:47.8918605Z","lastModifiedTime":"2018-05-18T18:02:43.8336934Z"},"location":"eastus2","tags":{"Owner":"lewu","Project":"SDK","Component":"debug","Evictable":"Dec + 31 2018"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.DataLakeStore/accounts/lewudatalakestore","name":"lewudatalakestore","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"michandnmbtperf.azuredatalakestore.net","accountId":"3eb06ae2-432b-4cdb-8728-fcca42ba9193","creationTime":"2017-08-03T09:14:14.9839597Z","lastModifiedTime":"2018-04-01T00:02:32.1909372Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MICHANDN-TEST/providers/Microsoft.DataLakeStore/accounts/michandnmbtperf","name":"michandnmbtperf","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"michandntesteus2e001.azuredatalakestore.net","accountId":"9d3370ea-6873-4990-90aa-13b43e434883","creationTime":"2017-05-30T07:38:14.1665011Z","lastModifiedTime":"2018-04-01T00:02:34.8345253Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MICHANDN-TEST/providers/Microsoft.DataLakeStore/accounts/michandntesteus2e001","name":"michandntesteus2e001","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"sparkadlsdata.azuredatalakestore.net","accountId":"5f34c8d5-53b6-4d47-94a9-bd57f4b6c6c0","creationTime":"2016-10-06T20:07:13.6751662Z","lastModifiedTime":"2018-04-01T00:17:03.8608246Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mohaelrg1/providers/Microsoft.DataLakeStore/accounts/sparkadlsdata","name":"sparkadlsdata","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"nasachintest.azuredatalakestore.net","accountId":"c542f625-50f9-4f0a-8f3e-336c263f18ee","creationTime":"2016-11-29T05:25:20.3188638Z","lastModifiedTime":"2018-04-01T00:20:44.3694113Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nasachin-rg/providers/Microsoft.DataLakeStore/accounts/nasachintest","name":"nasachintest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfstore1.azuredatalakestore.net","accountId":"9bda07e9-9a90-45f1-9e1c-213846845ff4","creationTime":"2016-08-23T23:53:29.5936908Z","lastModifiedTime":"2018-04-01T01:14:50.5778005Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/perfadlsteststorage/providers/Microsoft.DataLakeStore/accounts/adlsperfstore1","name":"adlsperfstore1","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfstore2.azuredatalakestore.net","accountId":"63862970-0382-428b-9288-5b01b421924c","creationTime":"2016-08-28T05:54:06.8149634Z","lastModifiedTime":"2018-04-01T01:14:53.5192455Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/perfadlsteststorage/providers/Microsoft.DataLakeStore/accounts/adlsperfstore2","name":"adlsperfstore2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfstore3.azuredatalakestore.net","accountId":"b408b801-775d-4154-93be-7450e90db7e5","creationTime":"2016-09-15T00:16:38.7879796Z","lastModifiedTime":"2018-04-01T01:14:56.0488967Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/perfadlsteststorage/providers/Microsoft.DataLakeStore/accounts/adlsperfstore3","name":"adlsperfstore3","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"saannamaadls.azuredatalakestore.net","accountId":"a41c6666-725e-4d9f-92ab-ed9724b14e90","creationTime":"2016-08-05T11:06:00.4038339Z","lastModifiedTime":"2018-04-01T02:05:47.6130435Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/saannama/providers/Microsoft.DataLakeStore/accounts/saannamaadls","name":"saannamaadls","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"seandatalakestore.azuredatalakestore.net","accountId":"574314a3-7f83-4e22-b6bf-7d2600ba8a14","creationTime":"2018-02-28T19:59:43.1587852Z","lastModifiedTime":"2018-04-01T02:09:10.7920997Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/seanresourcegroup/providers/Microsoft.DataLakeStore/accounts/seandatalakestore","name":"seandatalakestore","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"gamonitoringencrypted.azuredatalakestore.net","accountId":"0a88cf64-effa-4a91-9931-8871f0541761","creationTime":"2017-12-27T10:13:44.8804575Z","lastModifiedTime":"2018-04-01T02:17:36.345358Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvarmarg/providers/Microsoft.DataLakeStore/accounts/gamonitoringencrypted","name":"gamonitoringencrypted","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"snvarmafortentbtera.azuredatalakestore.net","accountId":"90366951-4e87-49fc-9cf8-50adbdb58f0a","creationTime":"2017-08-31T05:49:40.1256351Z","lastModifiedTime":"2018-04-01T02:23:01.4278567Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvarmargsparkperf/providers/Microsoft.DataLakeStore/accounts/snvarmafortentbtera","name":"snvarmafortentbtera","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"snvarmasparkperf.azuredatalakestore.net","accountId":"7ae0eecc-86f9-4c94-8b55-a33507b6b6ec","creationTime":"2017-08-01T05:00:34.9172951Z","lastModifiedTime":"2018-04-01T02:23:04.0942692Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvarmargsparkperf/providers/Microsoft.DataLakeStore/accounts/snvarmasparkperf","name":"snvarmasparkperf","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"snvarmasparkteraadls.azuredatalakestore.net","accountId":"52f619ff-e79b-4ca3-b747-ddcbcfcdc3e0","creationTime":"2017-08-16T09:58:43.0022723Z","lastModifiedTime":"2018-04-01T02:23:06.7680082Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvarmargsparkperf/providers/Microsoft.DataLakeStore/accounts/snvarmasparkteraadls","name":"snvarmasparkteraadls","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"snvarmasparktest.azuredatalakestore.net","accountId":"137d6000-23a0-4368-9b1e-32b3c25b32ea","creationTime":"2017-08-30T12:56:42.563013Z","lastModifiedTime":"2018-04-01T02:23:09.1516723Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvarmargsparkperf/providers/Microsoft.DataLakeStore/accounts/snvarmasparktest","name":"snvarmasparktest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"snvarmatpchacc.azuredatalakestore.net","accountId":"5bcc29c7-927f-4890-b109-2b151263fd8e","creationTime":"2017-08-31T08:58:30.4347823Z","lastModifiedTime":"2018-04-01T02:23:11.7524566Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvarmargsparkperf/providers/Microsoft.DataLakeStore/accounts/snvarmatpchacc","name":"snvarmatpchacc","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"snvarmasparkterav2.azuredatalakestore.net","accountId":"23ed42d5-9a36-4f83-9b1f-65db1597f453","creationTime":"2017-08-19T18:21:06.006737Z","lastModifiedTime":"2018-04-01T02:26:21.1760382Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvarmasparkterarg/providers/Microsoft.DataLakeStore/accounts/snvarmasparkterav2","name":"snvarmasparkterav2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adltestsn.azuredatalakestore.net","accountId":"5e408009-2bc4-4e08-9d09-d795f6a6e189","creationTime":"2016-12-02T09:01:18.6198664Z","lastModifiedTime":"2018-04-01T02:31:55.4180068Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvijaya/providers/Microsoft.DataLakeStore/accounts/adltestsn","name":"adltestsn","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"cabotestbackup.azuredatalakestore.net","accountId":"2c13bb70-385d-4710-8b73-f3345e0a035b","creationTime":"2017-04-24T07:46:42.3356395Z","lastModifiedTime":"2018-04-01T02:31:59.2056178Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvijaya/providers/Microsoft.DataLakeStore/accounts/cabotestbackup","name":"cabotestbackup","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"spiroperf.azuredatalakestore.net","accountId":"10516912-9e0f-4871-9cc3-bfdb8e3737a8","creationTime":"2017-05-08T14:38:56.5270208Z","lastModifiedTime":"2018-04-01T02:51:23.186358Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/spiroperf/providers/Microsoft.DataLakeStore/accounts/spiroperf","name":"spiroperf","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlseastus2acc.azuredatalakestore.net","accountId":"e3817bf4-aa3a-4a51-b0c9-f2f175ea7995","creationTime":"2018-03-07T11:56:23.8022528Z","lastModifiedTime":"2018-04-17T20:36:29.5535641Z"},"location":"eastus2","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/adlseastus2acc","name":"adlseastus2acc","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"stormadlsaccount.azuredatalakestore.net","accountId":"7df69700-e5fa-4064-872a-25f1df702ef3","creationTime":"2017-04-07T21:53:52.0132497Z","lastModifiedTime":"2018-04-01T03:28:43.2328669Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/stormadlsaccount_rg/providers/Microsoft.DataLakeStore/accounts/stormadlsaccount","name":"stormadlsaccount","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"tempdatalakestore1.azuredatalakestore.net","accountId":"f9390b51-d542-4336-a661-294c1222d0d5","creationTime":"2016-09-07T01:56:33.3703229Z","lastModifiedTime":"2018-04-01T03:58:54.3697493Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TempADLSrg1/providers/Microsoft.DataLakeStore/accounts/tempdatalakestore1","name":"tempdatalakestore1","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls2847d11a7.azuredatalakestore.net","accountId":"48f79b92-f27d-495c-a940-ebc46ee748cc","creationTime":"2018-06-11T06:16:34.6556128Z","lastModifiedTime":"2018-06-11T06:16:34.6556128Z"},"location":"eastus2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls2847d11a7","name":"pyarmadls2847d11a7","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"50240b99-e52f-413f-bb9e-e82cfc75754d","creationTime":"2018-06-11T06:15:46.0137613Z","lastModifiedTime":"2018-06-11T06:15:46.0137613Z"},"location":"eastus2","tags":{"tag1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"testdkakadia.azuredatalakestore.net","accountId":"b9081932-cd99-49fa-b15e-6a5272c06e34","creationTime":"2017-01-23T00:32:41.4882272Z","lastModifiedTime":"2018-04-01T04:01:38.9800828Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testadlsdkakadia/providers/Microsoft.DataLakeStore/accounts/testdkakadia","name":"testdkakadia","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"dkakadiaeastus.azuredatalakestore.net","accountId":"3b0e4277-c557-4e3f-8e05-d2b313465c63","creationTime":"2017-07-28T22:49:45.7766431Z","lastModifiedTime":"2018-04-01T04:07:36.7082587Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testdkakadia/providers/Microsoft.DataLakeStore/accounts/dkakadiaeastus","name":"dkakadiaeastus","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"testhdi003.azuredatalakestore.net","accountId":"11b98d5e-2515-4b9e-ad47-fa374c3a7639","creationTime":"2018-03-02T20:32:41.1077508Z","lastModifiedTime":"2018-04-01T04:17:19.4021277Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testhdi/providers/Microsoft.DataLakeStore/accounts/testhdi003","name":"testhdi003","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"testaccount.azuredatalakestore.net","accountId":"8931a6b9-377a-4e70-8e81-bdd5ff5139a0","creationTime":"2017-03-25T22:55:05.1939505Z","lastModifiedTime":"2018-04-01T04:32:43.7715432Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TIEREDSTORE-PERF/providers/Microsoft.DataLakeStore/accounts/testaccount","name":"testaccount","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"toyotametricsdata.azuredatalakestore.net","accountId":"439b477e-8888-4ed9-b0c4-9f628e52743b","creationTime":"2017-12-20T08:52:59.9101921Z","lastModifiedTime":"2018-04-01T04:36:19.1349404Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/toyota-perf/providers/Microsoft.DataLakeStore/accounts/toyotametricsdata","name":"toyotametricsdata","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"prodadlperf.azuredatalakestore.net","accountId":"f6b5dc78-40e6-4a33-96ef-9e23df319c19","creationTime":"2016-03-15T22:44:23.5519877Z","lastModifiedTime":"2018-04-01T04:52:33.2473067Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/USEAST2-ADL-PERF/providers/Microsoft.DataLakeStore/accounts/prodadlperf","name":"prodadlperf","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"vitalsignscounterdata.azuredatalakestore.net","accountId":"f885f724-ad46-4fe0-827c-7a36138ee298","creationTime":"2018-05-18T22:11:31.5662119Z","lastModifiedTime":"2018-05-18T22:11:31.5662119Z"},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/vitalsigns/providers/Microsoft.DataLakeStore/accounts/vitalsignscounterdata","name":"vitalsignscounterdata","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlnewsdk35.azuredatalakestore.net","accountId":"72c8345d-87fb-42f2-8925-7f191b9cba6c","creationTime":"2016-09-15T08:55:21.1092818Z","lastModifiedTime":"2018-04-01T05:42:36.5887994Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/adlnewsdk35","name":"adlnewsdk35","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlnoingestion.azuredatalakestore.net","accountId":"24752e11-3bea-44d2-a4db-d4de002a26e4","creationTime":"2016-08-25T08:39:47.2880297Z","lastModifiedTime":"2018-04-01T05:42:39.3084493Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/adlnoingestion","name":"adlnoingestion","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlperfeastus2.azuredatalakestore.net","accountId":"91652aff-b72b-4fb9-92b2-f894d8f42f13","creationTime":"2016-04-14T11:34:57.0454655Z","lastModifiedTime":"2018-04-01T05:42:41.9299828Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/adlperfeastus2","name":"adlperfeastus2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hivedata.azuredatalakestore.net","accountId":"c69782cc-b173-4344-b783-0093ae27b2ce","creationTime":"2016-04-19T11:21:12.5612Z","lastModifiedTime":"2018-04-01T05:43:13.5509777Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/hivedata","name":"hivedata","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"sparkdata.azuredatalakestore.net","accountId":"028a3ffd-0a62-4e7e-aa14-46bdb69509cc","creationTime":"2016-06-16T06:47:19.1283975Z","lastModifiedTime":"2018-04-01T05:43:20.0997435Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/sparkdata","name":"sparkdata","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"sparktestadhoc.azuredatalakestore.net","accountId":"0f0f6f55-dc7d-41e9-bfd0-f45433175b7e","creationTime":"2017-05-16T06:16:55.9288753Z","lastModifiedTime":"2018-04-01T05:43:29.5181036Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/sparktestadhoc","name":"sparktestadhoc","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"sparktestadhoc1.azuredatalakestore.net","accountId":"aec6375c-d632-4166-a328-aa8d9cd11432","creationTime":"2017-05-16T06:17:43.0963855Z","lastModifiedTime":"2018-04-01T05:43:32.2822187Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/sparktestadhoc1","name":"sparktestadhoc1","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"stormeastus2.azuredatalakestore.net","accountId":"70c23b57-102b-45ae-bcb7-173a64dde735","creationTime":"2016-03-17T10:33:38.4656431Z","lastModifiedTime":"2018-04-01T05:43:40.8703654Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/stormeastus2","name":"stormeastus2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"stormtopology.azuredatalakestore.net","accountId":"c8106d1b-23a8-4c1f-a558-178febbad1b8","creationTime":"2017-04-07T08:50:13.2635362Z","lastModifiedTime":"2018-04-01T05:43:43.7500826Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/stormtopology","name":"stormtopology","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"usqlbigbench.azuredatalakestore.net","accountId":"18c25230-91e4-4be0-a664-82a46f808f7d","creationTime":"2017-03-24T09:36:09.551662Z","lastModifiedTime":"2018-04-01T05:43:50.2060895Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/usqlbigbench","name":"usqlbigbench","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"usqloutput.azuredatalakestore.net","accountId":"1b1414e8-dc09-4198-a890-7cc6a56ae381","creationTime":"2017-02-15T07:52:32.6521284Z","lastModifiedTime":"2018-04-01T05:43:52.7450067Z"},"location":"eastus2","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/usqloutput","name":"usqloutput","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest10nene.azuredatalakestore.net","accountId":"1000a635-d14b-4be1-a85c-7d3f7fc40922","creationTime":"2017-02-24T20:16:19.8370548Z","lastModifiedTime":"2018-03-31T01:15:40.7395619Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest10nene","name":"hdiadlstest10nene","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest11nee.azuredatalakestore.net","accountId":"d5903042-d462-45b7-8fed-3e0e90a3124e","creationTime":"2017-12-13T05:12:54.6155286Z","lastModifiedTime":"2018-03-31T01:16:07.8742357Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest11nee","name":"hdiadlstest11nee","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest11nene.azuredatalakestore.net","accountId":"af572986-d856-4fec-8b2e-2ad61f1f04ea","creationTime":"2017-02-23T16:45:29.8305591Z","lastModifiedTime":"2018-03-31T01:16:10.9325984Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest11nene","name":"hdiadlstest11nene","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest12nee.azuredatalakestore.net","accountId":"3946ec91-0f80-4db2-8f97-c59909815608","creationTime":"2017-12-08T06:53:06.0982926Z","lastModifiedTime":"2018-03-31T01:16:47.40244Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest12nee","name":"hdiadlstest12nee","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest12neetsp1.azuredatalakestore.net","accountId":"dd11e8f8-b1fd-4f23-8683-5cf08f3d6a76","creationTime":"2017-12-08T06:36:55.0659084Z","lastModifiedTime":"2018-03-31T01:16:50.7198774Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest12neetsp1","name":"hdiadlstest12neetsp1","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlie11debugtest.azuredatalakestore.net","accountId":"084e2284-42ec-4fa9-acf9-078e99fa340e","creationTime":"2017-07-20T13:58:38.8182429Z","lastModifiedTime":"2018-03-31T01:31:55.5509328Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlie11debugtest","name":"adlie11debugtest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"triggertest.azuredatalakestore.net","accountId":"6ae118b4-3963-4d0f-ae1e-1b9f806f47f0","creationTime":"2017-08-30T08:32:14.3935155Z","lastModifiedTime":"2018-03-31T01:33:27.2054444Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/triggertest","name":"triggertest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"srevane.azuredatalakestore.net","accountId":"143d5b66-1c73-42a0-9683-34b49c9ef644","creationTime":"2017-07-20T10:43:51.4830513Z","lastModifiedTime":"2018-03-31T01:45:39.8359397Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/srevane","name":"srevane","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"perfanalyticstestadls.azuredatalakestore.net","accountId":"21e52b22-d117-4748-a755-13af1fc8b9ad","creationTime":"2017-03-21T18:06:26.1083237Z","lastModifiedTime":"2018-03-31T01:56:54.4751608Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-Steven/providers/Microsoft.DataLakeStore/accounts/perfanalyticstestadls","name":"perfanalyticstestadls","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"perfbenchmarkneurope.azuredatalakestore.net","accountId":"610a39a7-41db-44e6-aaf0-daea8029cff9","creationTime":"2017-02-15T20:39:36.7519427Z","lastModifiedTime":"2018-03-31T01:57:01.2815776Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-Steven/providers/Microsoft.DataLakeStore/accounts/perfbenchmarkneurope","name":"perfbenchmarkneurope","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"perfneuropenoencrypt.azuredatalakestore.net","accountId":"7c98d099-2e82-4cae-a1ef-37611324b728","creationTime":"2017-02-14T20:32:04.0368359Z","lastModifiedTime":"2018-03-31T01:57:04.4951963Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-Steven/providers/Microsoft.DataLakeStore/accounts/perfneuropenoencrypt","name":"perfneuropenoencrypt","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"zhawa1.azuredatalakestore.net","accountId":"b212f080-cc3e-4ea5-82e4-47c0cad29104","creationTime":"2017-07-06T20:04:03.4954865Z","lastModifiedTime":"2018-03-31T02:00:20.8323202Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-TS-WD/providers/Microsoft.DataLakeStore/accounts/zhawa1","name":"zhawa1","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"teststore004ne.azuredatalakestore.net","accountId":"3b74243d-bdad-4d3b-ad5e-ad39ca4b87d3","creationTime":"2017-07-07T00:49:22.8196285Z","lastModifiedTime":"2018-03-31T03:46:24.1692913Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adobeingressegresstest/providers/Microsoft.DataLakeStore/accounts/teststore004ne","name":"teststore004ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"db3pperf01.azuredatalakestore.net","accountId":"0d0753d3-0fda-4a4f-9917-6109e3df220f","creationTime":"2018-01-29T23:40:03.1215144Z","lastModifiedTime":"2018-04-10T05:44:45.3602148Z"},"location":"northeurope","tags":{"Component":"ADL_Perf","Project":"ADL_CapacityTesting","Evictable":"6/30/2018","Owner":"sumameh"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/db3pperf01/providers/Microsoft.DataLakeStore/accounts/db3pperf01","name":"db3pperf01","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"apiperfinvestigation.azuredatalakestore.net","accountId":"13569c55-9e6a-496a-ad13-fdbe9272be0c","creationTime":"2017-06-28T19:33:22.7629733Z","lastModifiedTime":"2018-03-31T21:01:47.7561185Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/EndToEnd_PerfTest/providers/Microsoft.DataLakeStore/accounts/apiperfinvestigation","name":"apiperfinvestigation","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"inteladls1ga.azuredatalakestore.net","accountId":"d20ac59b-e9ce-42ac-b1de-a07bcc3604f9","creationTime":"2017-07-21T00:41:17.667818Z","lastModifiedTime":"2018-03-31T22:12:49.7301245Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/intel-rg/providers/Microsoft.DataLakeStore/accounts/inteladls1ga","name":"inteladls1ga","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"jooyoung.azuredatalakestore.net","accountId":"821218a4-070a-465d-92b4-0775e339e1bc","creationTime":"2017-11-29T21:23:45.5519457Z","lastModifiedTime":"2018-03-31T22:31:11.589687Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jooyoung-rg/providers/Microsoft.DataLakeStore/accounts/jooyoung","name":"jooyoung","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"lattedatainsightsdb3.azuredatalakestore.net","accountId":"09ae111c-e87e-4fa3-aa56-0baa020b20f1","creationTime":"2017-08-11T12:44:07.2514718Z","lastModifiedTime":"2018-03-31T22:47:12.8191512Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Latte/providers/Microsoft.DataLakeStore/accounts/lattedatainsightsdb3","name":"lattedatainsightsdb3","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"michandnneuropeadlie11.azuredatalakestore.net","accountId":"5c2e2a16-9315-4734-91c1-ef1bdd3c8c39","creationTime":"2017-10-05T07:51:04.7676486Z","lastModifiedTime":"2018-04-01T00:10:53.3637873Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/michandnneuropeadlie11rg/providers/Microsoft.DataLakeStore/accounts/michandnneuropeadlie11","name":"michandnneuropeadlie11","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsroyne.azuredatalakestore.net","accountId":"38e8100c-f6d5-4e1f-afd2-9cf8ec45e1a8","creationTime":"2017-02-14T23:38:03.1584151Z","lastModifiedTime":"2018-04-01T01:58:05.7973134Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgroyne/providers/Microsoft.DataLakeStore/accounts/adlsroyne","name":"adlsroyne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlie11wasbtest.azuredatalakestore.net","accountId":"a03e3b06-6e4c-4798-a15f-79afaeee40b3","creationTime":"2018-02-20T06:47:46.7615406Z","lastModifiedTime":"2018-04-01T02:17:19.1070324Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvarmarg/providers/Microsoft.DataLakeStore/accounts/adlie11wasbtest","name":"adlie11wasbtest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlshivedb3p.azuredatalakestore.net","accountId":"beb0a6f9-eed7-4ad9-85bd-31c53c69553f","creationTime":"2017-01-24T01:28:57.8970498Z","lastModifiedTime":"2018-04-01T02:58:03.5717454Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sssperf/providers/Microsoft.DataLakeStore/accounts/adlshivedb3p","name":"adlshivedb3p","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"db3adlswas.azuredatalakestore.net","accountId":"c29467ad-2763-43dd-87a8-e85d3302fbcf","creationTime":"2017-12-01T20:37:53.5158522Z","lastModifiedTime":"2018-04-17T20:37:09.0357342Z"},"location":"northeurope","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/db3adlswas","name":"db3adlswas","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"testaccountne.azuredatalakestore.net","accountId":"c2691b41-4a7f-4883-8f1e-1854da4794d0","creationTime":"2017-05-19T20:20:50.8462371Z","lastModifiedTime":"2018-04-01T04:32:48.3305389Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TIEREDSTORE-PERF/providers/Microsoft.DataLakeStore/accounts/testaccountne","name":"testaccountne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"perfexitdefault.azuredatalakestore.net","accountId":"bc6762d3-ffd4-4456-a74c-fdaf528e6d8d","creationTime":"2017-02-02T05:48:02.3703098Z","lastModifiedTime":"2018-04-01T05:43:16.871118Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/perfexitdefault","name":"perfexitdefault","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"sparkperfexitne.azuredatalakestore.net","accountId":"bf6e1522-f65a-4838-a02d-584da0e0677c","creationTime":"2017-02-02T06:33:10.814551Z","lastModifiedTime":"2018-04-01T05:43:26.8657367Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/sparkperfexitne","name":"sparkperfexitne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlie11acltest.azuredatalakestore.net","accountId":"ce5ba7ed-3aad-43ff-be2f-9a634a75b235","creationTime":"2017-01-24T07:44:52.2647746Z","lastModifiedTime":"2018-04-01T05:54:43.3050693Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfstest/providers/Microsoft.DataLakeStore/accounts/adlie11acltest","name":"adlie11acltest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlie11e2etest.azuredatalakestore.net","accountId":"08b5c210-7af9-41e3-8cb0-cab3832e726b","creationTime":"2017-01-24T07:42:39.1953149Z","lastModifiedTime":"2018-04-01T05:54:47.6308465Z"},"location":"northeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfstest/providers/Microsoft.DataLakeStore/accounts/adlie11e2etest","name":"adlie11e2etest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest10cus.azuredatalakestore.net","accountId":"de857636-d8f4-4426-b2ba-38ef857b9af1","creationTime":"2017-03-09T09:11:56.2278773Z","lastModifiedTime":"2018-03-31T01:15:31.2402202Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest10cus","name":"hdiadlstest10cus","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest11cus.azuredatalakestore.net","accountId":"2ec4a460-8eb0-4bae-896c-aac773307969","creationTime":"2017-03-09T09:12:40.3326319Z","lastModifiedTime":"2018-03-31T01:15:52.7985312Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest11cus","name":"hdiadlstest11cus","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest11cuselh.azuredatalakestore.net","accountId":"7458bc08-e192-49f3-873a-cf8051e7e95d","creationTime":"2017-06-27T10:24:56.5930026Z","lastModifiedTime":"2018-03-31T01:15:55.8389429Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest11cuselh","name":"hdiadlstest11cuselh","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest11cuslh.azuredatalakestore.net","accountId":"df93c9e0-fcbc-418a-8194-26f7705b3be3","creationTime":"2017-04-07T18:12:15.1494655Z","lastModifiedTime":"2018-03-31T01:15:58.4864124Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest11cuslh","name":"hdiadlstest11cuslh","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest12cus.azuredatalakestore.net","accountId":"cecb12d1-204a-4ea1-8d13-4cb33c78160f","creationTime":"2017-03-09T09:50:10.2269576Z","lastModifiedTime":"2018-03-31T01:16:44.13381Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest12cus","name":"hdiadlstest12cus","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"vdusaneperfdm.azuredatalakestore.net","accountId":"85313406-811e-4eb7-ae0a-41938ecffd80","creationTime":"2016-10-17T07:32:39.8999493Z","lastModifiedTime":"2018-03-31T01:16:58.7179593Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/vdusaneperfdm","name":"vdusaneperfdm","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlus12acltest.azuredatalakestore.net","accountId":"374e1b55-2b83-49ac-a56b-fa37a1100a8d","creationTime":"2016-09-28T12:31:40.9815521Z","lastModifiedTime":"2018-03-31T01:32:52.3101607Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlus12acltest","name":"adlus12acltest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlus12acltestts.azuredatalakestore.net","accountId":"c48a3ea1-5e95-4cdc-8c95-b6e2a8c9aae3","creationTime":"2017-04-15T06:28:55.299521Z","lastModifiedTime":"2018-03-31T01:33:05.4565647Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlus12acltestts","name":"adlus12acltestts","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlus12e2etest.azuredatalakestore.net","accountId":"e4b9352a-2088-427c-bba0-daa45d9d9294","creationTime":"2016-09-28T12:30:26.6405755Z","lastModifiedTime":"2018-03-31T01:33:07.8393571Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlus12e2etest","name":"adlus12e2etest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlus12e2etestts.azuredatalakestore.net","accountId":"6170b31c-ba23-475a-9075-d1de6c767cae","creationTime":"2017-04-15T06:20:23.2078348Z","lastModifiedTime":"2018-03-31T01:33:10.2683741Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlus12e2etestts","name":"adlus12e2etestts","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"tpmwdus12dm2p.azuredatalakestore.net","accountId":"6fba11c5-61c3-4e10-8bc1-6d81662bcde9","creationTime":"2017-04-25T22:25:10.1795074Z","lastModifiedTime":"2018-03-31T01:33:24.0563907Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/tpmwdus12dm2p","name":"tpmwdus12dm2p","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"spirombenchadls.azuredatalakestore.net","accountId":"151fb35a-6266-4f5f-8c6a-60f38f5c3786","creationTime":"2017-02-03T00:22:19.4054867Z","lastModifiedTime":"2018-03-31T01:45:18.8960499Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/spirombenchadls","name":"spirombenchadls","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfblog.azuredatalakestore.net","accountId":"a1c106a4-5714-43bb-adc3-a9e27adfff8e","creationTime":"2016-10-06T00:04:30.4586445Z","lastModifiedTime":"2018-03-31T03:02:11.3981142Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adlsperfblog/providers/Microsoft.DataLakeStore/accounts/adlsperfblog","name":"adlsperfblog","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfbloglarge.azuredatalakestore.net","accountId":"2fcee7b4-fc1e-4a9e-9647-7e04ddac3661","creationTime":"2016-11-08T19:39:16.9999833Z","lastModifiedTime":"2018-03-31T03:02:13.6129634Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adlsperfblog/providers/Microsoft.DataLakeStore/accounts/adlsperfbloglarge","name":"adlsperfbloglarge","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlssparkcluster.azuredatalakestore.net","accountId":"3e96cc15-94e1-4f50-b5d4-7f461ae21119","creationTime":"2016-11-04T00:13:14.3873053Z","lastModifiedTime":"2018-03-31T03:02:15.7902878Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adlsperfblog/providers/Microsoft.DataLakeStore/accounts/adlssparkcluster","name":"adlssparkcluster","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlssparkcluster2.azuredatalakestore.net","accountId":"576f1071-78d9-4087-8b39-a2db64e5a580","creationTime":"2016-11-09T19:38:31.6354522Z","lastModifiedTime":"2018-03-31T03:02:17.8304521Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adlsperfblog/providers/Microsoft.DataLakeStore/accounts/adlssparkcluster2","name":"adlssparkcluster2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfstoredm1.azuredatalakestore.net","accountId":"3412f0ff-1289-4e2f-bc46-3581dca21ff7","creationTime":"2016-10-05T22:51:27.4403267Z","lastModifiedTime":"2018-03-31T03:04:33.0453761Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adlsperfdm1/providers/Microsoft.DataLakeStore/accounts/adlsperfstoredm1","name":"adlsperfstoredm1","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfstoredm2.azuredatalakestore.net","accountId":"7d44ba9c-883d-4531-a2fc-dd876a6e27f5","creationTime":"2016-10-07T21:14:11.7712263Z","lastModifiedTime":"2018-03-31T03:05:49.0446796Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adlsperfdm2rg/providers/Microsoft.DataLakeStore/accounts/adlsperfstoredm2","name":"adlsperfstoredm2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"teststore003adls.azuredatalakestore.net","accountId":"ddc2ff5f-28a3-46e3-9e51-c6c81624f5cc","creationTime":"2017-07-05T20:32:21.2167924Z","lastModifiedTime":"2018-03-31T03:46:21.1549339Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AdobeIngressEgressTest/providers/Microsoft.DataLakeStore/accounts/teststore003adls","name":"teststore003adls","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperf03us12.azuredatalakestore.net","accountId":"1316c87f-0f2d-4df4-8916-bbf4d1fc0a5b","creationTime":"2017-02-27T18:32:26.6729375Z","lastModifiedTime":"2018-04-10T05:44:10.5993882Z"},"location":"centralus","tags":{"Component":"ADL_Perf","Project":"ADL_CapacityTesting","Evictable":"6/30/2018","Owner":"sumameh"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cabosumameh/providers/Microsoft.DataLakeStore/accounts/adlsperf03us12","name":"adlsperf03us12","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"bnavarmaadls.azuredatalakestore.net","accountId":"4925c5b7-fe28-4c2c-9fed-a665d119ddfb","creationTime":"2017-01-12T04:41:33.9269642Z","lastModifiedTime":"2018-03-31T18:13:32.1259108Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/DataLakeTesting/providers/Microsoft.DataLakeStore/accounts/bnavarmaadls","name":"bnavarmaadls","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"diguptaadlscentralus.azuredatalakestore.net","accountId":"00309881-4f00-452d-94a3-9db9320916b6","creationTime":"2017-08-12T08:43:36.3150342Z","lastModifiedTime":"2018-03-31T18:57:48.4941348Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/digupta/providers/Microsoft.DataLakeStore/accounts/diguptaadlscentralus","name":"diguptaadlscentralus","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"defaultconfigtestadls.azuredatalakestore.net","accountId":"596471b3-df63-4966-bcbe-a21b83567776","creationTime":"2017-05-12T04:30:46.6380485Z","lastModifiedTime":"2018-03-31T21:01:51.5745408Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/EndToEnd_PerfTest/providers/Microsoft.DataLakeStore/accounts/defaultconfigtestadls","name":"defaultconfigtestadls","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"tpcxbb.azuredatalakestore.net","accountId":"8772fb68-07c5-4373-8707-eb2f5f897b9d","creationTime":"2016-12-06T22:43:19.1746486Z","lastModifiedTime":"2018-03-31T21:01:54.9046192Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/EndToEnd_PerfTest/providers/Microsoft.DataLakeStore/accounts/tpcxbb","name":"tpcxbb","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"ingestionread.azuredatalakestore.net","accountId":"e0020588-b8fd-44e1-ac96-2cb2061ab0ca","creationTime":"2017-05-09T19:37:28.5540579Z","lastModifiedTime":"2018-03-31T22:06:27.3855574Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ingestionread_rg/providers/Microsoft.DataLakeStore/accounts/ingestionread","name":"ingestionread","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"lattedatainsightsdm.azuredatalakestore.net","accountId":"be63fce1-29ba-4650-a451-265520a8d24b","creationTime":"2017-08-11T12:41:44.2310856Z","lastModifiedTime":"2018-03-31T22:47:16.0324434Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Latte/providers/Microsoft.DataLakeStore/accounts/lattedatainsightsdm","name":"lattedatainsightsdm","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"michandncentralusadlus12.azuredatalakestore.net","accountId":"abe3a11a-e001-473c-b77b-4af0c613abef","creationTime":"2017-10-04T13:47:11.5211403Z","lastModifiedTime":"2018-04-01T00:08:13.9778102Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/michandncentralusadlus12rg/providers/Microsoft.DataLakeStore/accounts/michandncentralusadlus12","name":"michandncentralusadlus12","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlssparkdata.azuredatalakestore.net","accountId":"f9678944-48ab-425d-8bd1-67aefd90a824","creationTime":"2016-10-07T18:21:10.6335949Z","lastModifiedTime":"2018-04-01T00:16:55.2208657Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mohaelrg1/providers/Microsoft.DataLakeStore/accounts/adlssparkdata","name":"adlssparkdata","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"sparkadls180gb.azuredatalakestore.net","accountId":"a8796996-b753-4c5f-af03-9fa7fc4a2c4d","creationTime":"2016-10-11T21:04:55.1691974Z","lastModifiedTime":"2018-04-01T00:16:58.7471755Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mohaelrg1/providers/Microsoft.DataLakeStore/accounts/sparkadls180gb","name":"sparkadls180gb","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"sparkadls180gbcompressed.azuredatalakestore.net","accountId":"7353019f-6f7a-43d5-8838-fe007148c268","creationTime":"2016-10-14T18:57:46.3778774Z","lastModifiedTime":"2018-04-01T00:17:01.2120093Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mohaelrg1/providers/Microsoft.DataLakeStore/accounts/sparkadls180gbcompressed","name":"sparkadls180gbcompressed","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"sparkadlsstreamingdata.azuredatalakestore.net","accountId":"0ecf17a4-4471-4a36-a242-fb23aeb80ca6","creationTime":"2016-10-07T22:37:44.0581278Z","lastModifiedTime":"2018-04-01T00:17:06.4068856Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mohaelrg1/providers/Microsoft.DataLakeStore/accounts/sparkadlsstreamingdata","name":"sparkadlsstreamingdata","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"nigoydummy.azuredatalakestore.net","accountId":"db8520aa-7765-49f9-a6ea-f72bea686236","creationTime":"2017-09-18T09:07:26.8992234Z","lastModifiedTime":"2018-04-01T00:43:04.8358225Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nigoyrg/providers/Microsoft.DataLakeStore/accounts/nigoydummy","name":"nigoydummy","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"perftesttiered.azuredatalakestore.net","accountId":"b95e1b2e-8e4d-4769-b86e-624c20dee7e7","creationTime":"2017-03-08T10:31:01.4608227Z","lastModifiedTime":"2018-04-01T01:34:41.864784Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/perftesting/providers/Microsoft.DataLakeStore/accounts/perftesttiered","name":"perftesttiered","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlus12wasbtest2.azuredatalakestore.net","accountId":"8700f67c-f906-4159-83e8-79967bd9f851","creationTime":"2018-02-26T11:14:10.229506Z","lastModifiedTime":"2018-04-01T02:17:29.5205634Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvarmarg/providers/Microsoft.DataLakeStore/accounts/adlus12wasbtest2","name":"adlus12wasbtest2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"sparkadls.azuredatalakestore.net","accountId":"045bf79a-b6a6-4a2a-a5b9-411798baa3f5","creationTime":"2016-10-06T18:57:57.6739391Z","lastModifiedTime":"2018-04-01T02:35:02.2345332Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sparkadlsrg/providers/Microsoft.DataLakeStore/accounts/sparkadls","name":"sparkadls","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlshivedm.azuredatalakestore.net","accountId":"281122e1-f8d7-4bf7-bf36-36d62bc217a5","creationTime":"2017-02-10T02:09:09.9243241Z","lastModifiedTime":"2018-04-01T02:58:06.5823091Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sssperf/providers/Microsoft.DataLakeStore/accounts/adlshivedm","name":"adlshivedm","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlshivetempdm.azuredatalakestore.net","accountId":"b45ddec4-77b4-44f6-9fc1-78f409738946","creationTime":"2017-06-23T22:41:44.0376107Z","lastModifiedTime":"2018-04-01T02:58:08.635802Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sssperf/providers/Microsoft.DataLakeStore/accounts/adlshivetempdm","name":"adlshivetempdm","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlscentralusacc.azuredatalakestore.net","accountId":"a9dee058-d13d-4c34-8855-359cdefdf263","creationTime":"2018-03-07T11:07:43.970711Z","lastModifiedTime":"2018-04-17T20:36:26.4899967Z"},"location":"centralus","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/adlscentralusacc","name":"adlscentralusacc","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"tpcxbb1.azuredatalakestore.net","accountId":"67970161-c8ca-46c8-8df5-2aac9e7638db","creationTime":"2017-10-06T19:51:51.513108Z","lastModifiedTime":"2018-04-01T04:07:40.3644176Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testdkakadia/providers/Microsoft.DataLakeStore/accounts/tpcxbb1","name":"tpcxbb1","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"tsperfadls.azuredatalakestore.net","accountId":"27acbb9d-7be0-4cba-a06b-c8106904bd05","creationTime":"2017-05-08T23:11:37.5945839Z","lastModifiedTime":"2018-04-01T04:32:51.9462841Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TIEREDSTORE-PERF/providers/Microsoft.DataLakeStore/accounts/tsperfadls","name":"tsperfadls","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"tpcxbbpubready.azuredatalakestore.net","accountId":"5aba66a5-e805-43e6-a785-160902c9a458","creationTime":"2016-12-08T21:48:55.8097474Z","lastModifiedTime":"2018-04-01T04:48:40.3448711Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tpcxbb_pub_readiness/providers/Microsoft.DataLakeStore/accounts/tpcxbbpubready","name":"tpcxbbpubready","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlstreamsparkdefault.azuredatalakestore.net","accountId":"56e91503-a736-46d3-98a8-cf3d6d53b870","creationTime":"2016-10-10T09:59:17.1233584Z","lastModifiedTime":"2018-04-01T05:42:44.9083623Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/adlstreamsparkdefault","name":"adlstreamsparkdefault","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"centralusadhocmr.azuredatalakestore.net","accountId":"aeb2d7f1-350c-4907-abc4-cb6f3de0984b","creationTime":"2017-05-16T07:24:14.6600208Z","lastModifiedTime":"2018-04-01T05:42:47.2900592Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/centralusadhocmr","name":"centralusadhocmr","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"centralussparktaxidata.azuredatalakestore.net","accountId":"b9265e33-0b5d-4136-8ad2-11f05b93c262","creationTime":"2017-05-09T12:36:53.8022588Z","lastModifiedTime":"2018-04-01T05:42:49.7234311Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/centralussparktaxidata","name":"centralussparktaxidata","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"centrushadoop.azuredatalakestore.net","accountId":"00ca1166-0aa1-4859-8235-cd8f4c2c2f15","creationTime":"2017-05-29T11:42:21.9994428Z","lastModifiedTime":"2018-04-01T05:42:52.1312479Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/centrushadoop","name":"centrushadoop","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"defaultcentralus.azuredatalakestore.net","accountId":"1501baad-3536-4216-aaf0-f88053bcd423","creationTime":"2017-01-27T05:14:32.7952888Z","lastModifiedTime":"2018-04-01T05:42:54.4916738Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/defaultcentralus","name":"defaultcentralus","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"defhivetpchcent.azuredatalakestore.net","accountId":"607caa47-2a38-48b0-8689-5f7db119816e","creationTime":"2017-04-05T09:09:34.5754146Z","lastModifiedTime":"2018-04-01T05:43:00.6225809Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/defhivetpchcent","name":"defhivetpchcent","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hadoopmrcentralus.azuredatalakestore.net","accountId":"7364c35e-7b03-4652-a8dc-159520556ae2","creationTime":"2017-05-16T06:55:21.4476566Z","lastModifiedTime":"2018-04-01T05:43:06.8800514Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/hadoopmrcentralus","name":"hadoopmrcentralus","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"yogi.azuredatalakestore.net","accountId":"61ba2540-4524-4bce-99c7-69405372eef4","creationTime":"2017-01-12T08:46:20.6910312Z","lastModifiedTime":"2018-04-01T15:52:23.6666643Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yogi/providers/Microsoft.DataLakeStore/accounts/yogi","name":"yogi","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"yokamath.azuredatalakestore.net","accountId":"0bbc7322-37cc-4c5f-8bd0-0e22fd6b0f39","creationTime":"2017-03-02T07:12:18.6493909Z","lastModifiedTime":"2018-04-01T16:05:25.5352412Z"},"location":"centralus","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yokamath/providers/Microsoft.DataLakeStore/accounts/yokamath","name":"yokamath","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest11wethelh.azuredatalakestore.net","accountId":"1f233735-12c0-4889-a679-743a296edfb8","creationTime":"2017-07-11T07:30:56.4988803Z","lastModifiedTime":"2018-03-31T01:16:36.7911325Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest11wethelh","name":"hdiadlstest11wethelh","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlnl10acltestts.azuredatalakestore.net","accountId":"a155d0b6-d439-4156-9e84-f0febd1a93f7","creationTime":"2017-06-02T07:16:35.4474447Z","lastModifiedTime":"2018-03-31T01:31:58.866414Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlnl10acltestts","name":"adlnl10acltestts","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlnl10contractts.azuredatalakestore.net","accountId":"9a2c4a9d-2152-4bba-8a61-0e6b0060ef3f","creationTime":"2017-06-09T11:12:35.3874377Z","lastModifiedTime":"2018-03-31T01:32:02.7145463Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlnl10contractts","name":"adlnl10contractts","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlnl10dvp.azuredatalakestore.net","accountId":"1bcd321a-15ac-424a-bafd-4e6d01bdafb5","creationTime":"2017-08-30T06:47:35.0312959Z","lastModifiedTime":"2018-03-31T01:32:06.1224027Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlnl10dvp","name":"adlnl10dvp","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlnl10e2etestts.azuredatalakestore.net","accountId":"3f251b51-6321-47c4-a047-f02b20212876","creationTime":"2017-05-30T10:21:39.8306497Z","lastModifiedTime":"2018-03-31T01:32:09.5820193Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlnl10e2etestts","name":"adlnl10e2etestts","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfhdd.azuredatalakestore.net","accountId":"7ca3660b-447d-4ef7-8f4c-0a5eedbd2102","creationTime":"2017-06-13T16:41:42.8946749Z","lastModifiedTime":"2018-03-31T01:32:34.3433523Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlsperfhdd","name":"adlsperfhdd","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfwehdd.azuredatalakestore.net","accountId":"6aa054c0-b00a-4704-8afa-20171670fb24","creationTime":"2017-06-14T00:56:42.3913734Z","lastModifiedTime":"2018-03-31T01:32:43.6008206Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlsperfwehdd","name":"adlsperfwehdd","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfwehdd2.azuredatalakestore.net","accountId":"72824e90-ee00-4144-b628-7f453d6dc217","creationTime":"2017-08-02T22:44:45.6222924Z","lastModifiedTime":"2018-03-31T01:32:47.1063506Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlsperfwehdd2","name":"adlsperfwehdd2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"sssam3plonghaults.azuredatalakestore.net","accountId":"b929f2cd-bbec-4700-a790-1d21d02eb481","creationTime":"2017-11-30T21:51:40.3640861Z","lastModifiedTime":"2018-03-31T01:45:43.6782841Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/sssam3plonghaults","name":"sssam3plonghaults","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"tpmwdnl10am3p.azuredatalakestore.net","accountId":"d4e618a4-cdb9-435c-afd5-aa30e72bc788","creationTime":"2017-05-12T17:19:49.1834382Z","lastModifiedTime":"2018-03-31T02:00:15.697563Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-TS-WD/providers/Microsoft.DataLakeStore/accounts/tpmwdnl10am3p","name":"tpmwdnl10am3p","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"amsperf03.azuredatalakestore.net","accountId":"11179b16-af32-46b3-a5b2-8d09fa8976f7","creationTime":"2018-03-05T19:32:29.5877865Z","lastModifiedTime":"2018-03-31T04:18:49.5567141Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/amsperf03-rg/providers/Microsoft.DataLakeStore/accounts/amsperf03","name":"amsperf03","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"amsperfold01.azuredatalakestore.net","accountId":"789f47a9-91de-4261-b746-9167a84cc072","creationTime":"2018-01-18T23:02:26.425391Z","lastModifiedTime":"2018-04-09T20:52:02.3696589Z"},"location":"westeurope","tags":{"Component":"ADL_Perf","Project":"ADL_CapacityTesting","Evictable":"6/30/2018","Owner":"sumameh"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/amsperfold01/providers/Microsoft.DataLakeStore/accounts/amsperfold01","name":"amsperfold01","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfam3p06.azuredatalakestore.net","accountId":"83eb74ec-f95a-4354-877c-5b634889f36e","creationTime":"2017-04-28T01:16:20.7718094Z","lastModifiedTime":"2018-04-10T05:44:15.3829003Z"},"location":"westeurope","tags":{"Component":"ADL_Perf","Project":"ADL_CapacityTesting","Evictable":"6/30/2018","Owner":"sumameh"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cabosumameh/providers/Microsoft.DataLakeStore/accounts/adlsperfam3p06","name":"adlsperfam3p06","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"am3pperfns1.azuredatalakestore.net","accountId":"14960711-6bce-47f9-8442-ad30d61f18b3","creationTime":"2018-01-11T11:09:47.0633311Z","lastModifiedTime":"2018-04-10T05:44:20.1308437Z"},"location":"westeurope","tags":{"Component":"ADL_Perf","Project":"ADL_CapacityTesting","Evictable":"6/30/2018","Owner":"sumameh"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cabosumameh/providers/Microsoft.DataLakeStore/accounts/am3pperfns1","name":"am3pperfns1","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"cdhadlsperfwe.azuredatalakestore.net","accountId":"9c3c8d19-6a5d-478e-ad27-cdedf9ba34c5","creationTime":"2017-08-24T23:31:51.6963032Z","lastModifiedTime":"2018-03-31T17:26:06.2909674Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cdhadlsperfwe/providers/Microsoft.DataLakeStore/accounts/cdhadlsperfwe","name":"cdhadlsperfwe","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsam3phdd.azuredatalakestore.net","accountId":"3263ec06-3e38-4a9e-bb7d-42b4066b50fd","creationTime":"2017-06-13T22:45:08.7014672Z","lastModifiedTime":"2018-03-31T21:01:30.4609803Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/EndToEnd_PerfTest/providers/Microsoft.DataLakeStore/accounts/adlsam3phdd","name":"adlsam3phdd","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsam3phddp0.azuredatalakestore.net","accountId":"05158e9e-112c-4858-965d-cfbf9b31ca9e","creationTime":"2017-06-13T23:56:03.2057073Z","lastModifiedTime":"2018-03-31T21:01:34.5994545Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/EndToEnd_PerfTest/providers/Microsoft.DataLakeStore/accounts/adlsam3phddp0","name":"adlsam3phddp0","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsam3pssd.azuredatalakestore.net","accountId":"15e4a48d-29e0-4553-a4ab-7c47b158b4bb","creationTime":"2017-06-13T23:54:13.5064961Z","lastModifiedTime":"2018-03-31T21:01:38.9080002Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/EndToEnd_PerfTest/providers/Microsoft.DataLakeStore/accounts/adlsam3pssd","name":"adlsam3pssd","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsam3pwas.azuredatalakestore.net","accountId":"65096387-a369-4a16-915a-d7d9b2c3bb86","creationTime":"2017-04-28T04:31:08.1598228Z","lastModifiedTime":"2018-03-31T21:01:43.3139926Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/EndToEnd_PerfTest/providers/Microsoft.DataLakeStore/accounts/adlsam3pwas","name":"adlsam3pwas","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"inteladlsgawesteurope.azuredatalakestore.net","accountId":"91814cb5-9ccf-415c-9b8d-136c462d621b","creationTime":"2018-04-05T22:04:05.4587011Z","lastModifiedTime":"2018-04-05T22:04:05.4587011Z"},"location":"westeurope","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/intel-rg/providers/Microsoft.DataLakeStore/accounts/inteladlsgawesteurope","name":"inteladlsgawesteurope","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"inteladlstshddwesteurope.azuredatalakestore.net","accountId":"8489de7a-fb07-4e5e-a439-b12db1769723","creationTime":"2018-04-05T22:12:11.4171754Z","lastModifiedTime":"2018-04-05T22:12:11.4171754Z"},"location":"westeurope","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/intel-rg/providers/Microsoft.DataLakeStore/accounts/inteladlstshddwesteurope","name":"inteladlstshddwesteurope","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"inteltpcxbb.azuredatalakestore.net","accountId":"d3085bc5-6f0f-4c8b-b826-668c97a24678","creationTime":"2017-08-02T18:09:23.6596498Z","lastModifiedTime":"2018-03-31T22:13:14.7254112Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/intel-rg/providers/Microsoft.DataLakeStore/accounts/inteltpcxbb","name":"inteltpcxbb","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"lattedatainsightsam.azuredatalakestore.net","accountId":"a48777b7-af15-4e63-a7da-5fa529db1ee3","creationTime":"2017-08-11T12:45:41.2808515Z","lastModifiedTime":"2018-03-31T22:47:08.8782865Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Latte/providers/Microsoft.DataLakeStore/accounts/lattedatainsightsam","name":"lattedatainsightsam","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlnl10chelantest.azuredatalakestore.net","accountId":"88e9c96e-1a42-4b35-aa75-6cd3c3e6f05d","creationTime":"2018-02-20T07:15:57.957405Z","lastModifiedTime":"2018-04-01T02:17:23.1278251Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvarmarg/providers/Microsoft.DataLakeStore/accounts/adlnl10chelantest","name":"adlnl10chelantest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlnl10wasbtest.azuredatalakestore.net","accountId":"01f71ee2-d0d4-42cf-a760-8eef2ddee8c7","creationTime":"2018-02-20T06:51:47.0962918Z","lastModifiedTime":"2018-04-01T02:17:26.1814095Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvarmarg/providers/Microsoft.DataLakeStore/accounts/adlnl10wasbtest","name":"adlnl10wasbtest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"chelanmonitoringssd.azuredatalakestore.net","accountId":"cf8f0805-6435-4d7f-a3ed-7f28d19635c5","creationTime":"2017-12-24T18:07:13.5316068Z","lastModifiedTime":"2018-04-01T02:17:33.9680121Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvarmarg/providers/Microsoft.DataLakeStore/accounts/chelanmonitoringssd","name":"chelanmonitoringssd","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"snvarmalogstoragewas.azuredatalakestore.net","accountId":"bcea4ca8-7a6c-43f4-8864-33255d833ce0","creationTime":"2018-02-05T07:51:55.585453Z","lastModifiedTime":"2018-04-01T02:17:39.8701626Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvarmarg/providers/Microsoft.DataLakeStore/accounts/snvarmalogstoragewas","name":"snvarmalogstoragewas","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"snvarmawehddp4.azuredatalakestore.net","accountId":"a0ceb526-4d24-4e6a-9f62-e5e623350158","creationTime":"2018-02-01T09:24:41.3865691Z","lastModifiedTime":"2018-04-01T02:17:46.1175381Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvarmarg/providers/Microsoft.DataLakeStore/accounts/snvarmawehddp4","name":"snvarmawehddp4","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"snvarmawessdp4.azuredatalakestore.net","accountId":"a8bfc151-4d43-4d3e-9198-e14f3bb628bc","creationTime":"2018-02-01T08:50:06.1771908Z","lastModifiedTime":"2018-04-01T02:17:49.1350729Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvarmarg/providers/Microsoft.DataLakeStore/accounts/snvarmawessdp4","name":"snvarmawessdp4","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsam3p.azuredatalakestore.net","accountId":"9940b65f-25db-4c9f-bda4-767d57f34f7a","creationTime":"2017-04-28T01:21:36.1801705Z","lastModifiedTime":"2018-04-01T02:57:59.6801257Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sssperf/providers/Microsoft.DataLakeStore/accounts/adlsam3p","name":"adlsam3p","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlshiveweu.azuredatalakestore.net","accountId":"c94c26f8-8da2-4964-901e-f6e68e706d92","creationTime":"2017-03-17T23:41:25.0668896Z","lastModifiedTime":"2018-04-01T02:58:11.3084849Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sssperf/providers/Microsoft.DataLakeStore/accounts/adlshiveweu","name":"adlshiveweu","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"am3adlshddp1.azuredatalakestore.net","accountId":"d463bfd5-a5e1-4abb-9b12-fbc12550dcfc","creationTime":"2017-12-01T23:04:22.8248309Z","lastModifiedTime":"2018-04-17T20:36:33.263831Z"},"location":"westeurope","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/am3adlshddp1","name":"am3adlshddp1","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"am3adlshddp1stress.azuredatalakestore.net","accountId":"123b7f9b-6d5a-4e68-b723-c7123ee771da","creationTime":"2017-12-01T23:06:42.0729611Z","lastModifiedTime":"2018-04-17T20:36:37.3036373Z"},"location":"westeurope","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/am3adlshddp1stress","name":"am3adlshddp1stress","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"am3adlshddp2.azuredatalakestore.net","accountId":"18ca15a4-086f-4c69-a696-a9608e67007b","creationTime":"2017-12-01T23:07:57.2493348Z","lastModifiedTime":"2018-04-17T20:36:40.9132475Z"},"location":"westeurope","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/am3adlshddp2","name":"am3adlshddp2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"am3adlshddp4.azuredatalakestore.net","accountId":"69097090-7b1c-457c-b556-e4d5c5ab4122","creationTime":"2017-12-01T20:39:56.4737636Z","lastModifiedTime":"2018-04-17T20:36:45.403987Z"},"location":"westeurope","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/am3adlshddp4","name":"am3adlshddp4","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"am3adlshddp4stress.azuredatalakestore.net","accountId":"fc24fd3b-581e-452c-afad-bd985af141b5","creationTime":"2017-12-01T22:04:06.5203739Z","lastModifiedTime":"2018-04-17T20:36:49.084771Z"},"location":"westeurope","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/am3adlshddp4stress","name":"am3adlshddp4stress","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"am3adlshddp5.azuredatalakestore.net","accountId":"0813a7a1-57f6-4a49-a473-a275ab48ce6c","creationTime":"2017-12-01T20:40:48.4644517Z","lastModifiedTime":"2018-04-17T20:36:52.8427526Z"},"location":"westeurope","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/am3adlshddp5","name":"am3adlshddp5","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"am3adlsssdp2.azuredatalakestore.net","accountId":"09728cb9-7ee6-4e1e-950c-5e7cbb35a5f2","creationTime":"2017-12-08T23:56:52.5532322Z","lastModifiedTime":"2018-04-17T20:36:56.7441321Z"},"location":"westeurope","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/am3adlsssdp2","name":"am3adlsssdp2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"am3adlsssdp4.azuredatalakestore.net","accountId":"02acb9c8-2a6f-406f-8606-5542299e822d","creationTime":"2017-12-08T23:57:46.8128001Z","lastModifiedTime":"2018-04-17T20:37:00.3047376Z"},"location":"westeurope","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/am3adlsssdp4","name":"am3adlsssdp4","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"am3adlswas.azuredatalakestore.net","accountId":"1105c65e-6871-4292-849c-70755a233de8","creationTime":"2018-03-19T16:32:53.2956555Z","lastModifiedTime":"2018-04-17T20:37:04.9366422Z"},"location":"westeurope","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/am3adlswas","name":"am3adlswas","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"weuropehddhadoop.azuredatalakestore.net","accountId":"9912ef22-23e9-4a2a-a979-daf3dd154905","creationTime":"2017-06-27T08:51:07.6274517Z","lastModifiedTime":"2018-04-01T05:43:56.5598829Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/weuropehddhadoop","name":"weuropehddhadoop","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlnl10acltest.azuredatalakestore.net","accountId":"1a7bdbd6-5426-4a3c-98e0-81131cb26569","creationTime":"2017-01-24T07:43:13.36745Z","lastModifiedTime":"2018-04-01T05:54:52.3387101Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfstest/providers/Microsoft.DataLakeStore/accounts/adlnl10acltest","name":"adlnl10acltest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlnl10e2etest.azuredatalakestore.net","accountId":"b1324195-8e3d-41d1-bd10-daea392bced5","creationTime":"2017-01-24T07:41:51.5297051Z","lastModifiedTime":"2018-04-01T05:54:56.9786732Z"},"location":"westeurope","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfstest/providers/Microsoft.DataLakeStore/accounts/adlnl10e2etest","name":"adlnl10e2etest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlie01hddqi.azuredatalakestore.net","accountId":"b4324640-4932-439d-be11-632e0bcf985a","creationTime":"2017-07-21T19:26:46.9050899Z","lastModifiedTime":"2018-03-31T02:09:31.0096873Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS_PERF_HIVE/providers/Microsoft.DataLakeStore/accounts/adlie01hddqi","name":"adlie01hddqi","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlie01hddsteven.azuredatalakestore.net","accountId":"b071b7d0-f617-433a-8afa-b82d4bfdc3f9","creationTime":"2017-07-21T19:25:32.4198724Z","lastModifiedTime":"2018-03-31T02:09:36.0116068Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS_PERF_HIVE/providers/Microsoft.DataLakeStore/accounts/adlie01hddsteven","name":"adlie01hddsteven","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsdan2.azuredatalakestore.net","accountId":"3df36cdb-5bc0-4a52-82bb-00a8d88638ea","creationTime":"2016-08-01T20:17:24.0411332Z","lastModifiedTime":"2018-03-31T01:13:59.0439231Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-Dan/providers/Microsoft.DataLakeStore/accounts/adlsdan2","name":"adlsdan2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Failed","state":null,"endpoint":null,"accountId":"c1464836-edf3-4ecf-9eae-d61de707f982"},"location":"ukwest","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-Dan/providers/Microsoft.DataLakeStore/accounts/adlsperfsdkdb5","name":"adlsperfsdkdb5","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest10ne.azuredatalakestore.net","accountId":"0822f55a-1dd1-445f-b0d2-fd4329d35847","creationTime":"2016-11-18T04:47:37.439593Z","lastModifiedTime":"2018-03-31T01:15:34.5035797Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest10ne","name":"hdiadlstest10ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest10nee.azuredatalakestore.net","accountId":"7c3d4f64-49f6-4ff1-998e-c5f893bd0b95","creationTime":"2017-02-14T06:27:51.7555079Z","lastModifiedTime":"2018-03-31T01:15:37.7550514Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest10nee","name":"hdiadlstest10nee","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest10net.azuredatalakestore.net","accountId":"62142fa4-7edc-4495-9ae6-b73165f01ebb","creationTime":"2017-02-02T18:31:39.2427043Z","lastModifiedTime":"2018-03-31T01:15:44.2412489Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest10net","name":"hdiadlstest10net","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest10netws.azuredatalakestore.net","accountId":"88f5abaf-7195-4eaa-909c-c64301fd6501","creationTime":"2017-02-17T05:00:49.4962861Z","lastModifiedTime":"2018-03-31T01:15:47.6690522Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest10netws","name":"hdiadlstest10netws","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest11ne.azuredatalakestore.net","accountId":"4891ce60-28d2-4a83-ac02-6d9ba45bec79","creationTime":"2016-11-21T17:04:23.5353517Z","lastModifiedTime":"2018-03-31T01:16:04.251318Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest11ne","name":"hdiadlstest11ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest11net.azuredatalakestore.net","accountId":"a3b59db6-89e3-4c4e-8b2c-1f153d06706d","creationTime":"2017-02-02T18:32:24.2550597Z","lastModifiedTime":"2018-03-31T01:16:14.2968026Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest11net","name":"hdiadlstest11net","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest11netlh.azuredatalakestore.net","accountId":"14fd9a8e-97d9-43c1-bbd0-1aba0efdb3d7","creationTime":"2017-04-26T05:40:13.1442874Z","lastModifiedTime":"2018-03-31T01:16:17.6846899Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest11netlh","name":"hdiadlstest11netlh","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest11netws.azuredatalakestore.net","accountId":"c9b89626-2d5a-443c-8ea9-f1b289051abf","creationTime":"2017-02-17T00:27:04.1394757Z","lastModifiedTime":"2018-03-31T01:16:21.1632805Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest11netws","name":"hdiadlstest11netws","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest11ukwethp0.azuredatalakestore.net","accountId":"729542de-88e5-4208-b4a5-7baf182ce4ec","creationTime":"2017-08-01T06:27:47.5437557Z","lastModifiedTime":"2018-03-31T01:16:25.3225112Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest11ukwethp0","name":"hdiadlstest11ukwethp0","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest11ukwethp1.azuredatalakestore.net","accountId":"f7920609-74da-40f7-b6a7-ffd4cb214840","creationTime":"2017-08-08T19:15:12.2300619Z","lastModifiedTime":"2018-03-31T01:16:28.5702791Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest11ukwethp1","name":"hdiadlstest11ukwethp1","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest11ukwethp4.azuredatalakestore.net","accountId":"ebe82b81-2a39-4f39-bc6b-094be6426296","creationTime":"2017-08-01T06:50:42.8592483Z","lastModifiedTime":"2018-03-31T01:16:33.4758189Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest11ukwethp4","name":"hdiadlstest11ukwethp4","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdiadlstest12ukwetsp1.azuredatalakestore.net","accountId":"ddbd6525-ab8a-4c10-b33c-c551efe9b7af","creationTime":"2017-12-08T06:44:33.2776949Z","lastModifiedTime":"2018-03-31T01:16:55.4997239Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-PERF-HBASE/providers/Microsoft.DataLakeStore/accounts/hdiadlstest12ukwetsp1","name":"hdiadlstest12ukwetsp1","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlshiveperfneu02.azuredatalakestore.net","accountId":"c7b14187-0157-4169-87b6-c4e5bdf3eb8c","creationTime":"2016-08-14T12:34:29.8506767Z","lastModifiedTime":"2018-03-31T01:32:27.5458455Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlshiveperfneu02","name":"adlshiveperfneu02","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfhiveclusterneu3.azuredatalakestore.net","accountId":"361a2b09-8823-4fe2-8de9-51f7a9a89b53","creationTime":"2016-08-10T15:32:24.140567Z","lastModifiedTime":"2018-03-31T01:32:40.1424632Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/adlsperfhiveclusterneu3","name":"adlsperfhiveclusterneu3","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdfscontractdb5.azuredatalakestore.net","accountId":"d2ff2328-8303-4004-8e78-78cf762bd7f4","creationTime":"2016-12-02T17:35:30.4520765Z","lastModifiedTime":"2018-03-31T01:33:15.9145543Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/hdfscontractdb5","name":"hdfscontractdb5","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"nasachinadlie.azuredatalakestore.net","accountId":"b570be58-c7db-45de-9156-36fb15ad23ba","creationTime":"2017-11-02T09:45:45.242065Z","lastModifiedTime":"2018-03-31T01:33:21.7765887Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-E2E-TEST/providers/Microsoft.DataLakeStore/accounts/nasachinadlie","name":"nasachinadlie","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"db5adlswas.azuredatalakestore.net","accountId":"c7612127-aa71-4401-b677-2ba1813173be","creationTime":"2018-06-08T07:34:14.3081452Z","lastModifiedTime":"2018-06-08T07:34:14.3081452Z"},"location":"ukwest","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/db5adlswas","name":"db5adlswas","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"perfdata.azuredatalakestore.net","accountId":"796c14ea-ac71-4606-994f-b98ad6683201","creationTime":"2016-09-28T21:31:23.2768503Z","lastModifiedTime":"2018-03-31T01:44:59.4750676Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/perfdata","name":"perfdata","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"spiromdublin.azuredatalakestore.net","accountId":"09507c0a-9027-4478-9d5d-8a962471845d","creationTime":"2016-11-30T02:31:23.7410758Z","lastModifiedTime":"2018-03-31T01:45:26.7026264Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/spiromdublin","name":"spiromdublin","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"srevadlne.azuredatalakestore.net","accountId":"5c0b4479-aea6-45ae-9f16-d5f0bdd3b576","creationTime":"2016-08-23T07:33:20.9254485Z","lastModifiedTime":"2018-03-31T01:45:30.6277881Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/srevadlne","name":"srevadlne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"srevadlne2.azuredatalakestore.net","accountId":"91729377-8e21-455a-856b-56bb4e3675ef","creationTime":"2016-08-23T18:52:37.6002246Z","lastModifiedTime":"2018-03-31T01:45:33.90568Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/srevadlne2","name":"srevadlne2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"sssdb5longhaults.azuredatalakestore.net","accountId":"1e5ae6b7-0c02-44c9-bed9-8efc711e48f2","creationTime":"2017-11-30T21:44:50.3646972Z","lastModifiedTime":"2018-03-31T01:45:46.7604537Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-PERF/providers/Microsoft.DataLakeStore/accounts/sssdb5longhaults","name":"sssdb5longhaults","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"benchmarktierstoressd.azuredatalakestore.net","accountId":"182d5ae3-eb34-4cf5-818a-b6b6852e0e3c","creationTime":"2017-01-04T18:52:03.0583152Z","lastModifiedTime":"2018-03-31T01:56:45.885344Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-Steven/providers/Microsoft.DataLakeStore/accounts/benchmarktierstoressd","name":"benchmarktierstoressd","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"defaultneuropebenchmark.azuredatalakestore.net","accountId":"cda29fcc-3852-4426-bbe9-82d6262b8781","creationTime":"2016-10-31T19:13:05.981294Z","lastModifiedTime":"2018-03-31T01:56:51.2727628Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ADLS-Steven/providers/Microsoft.DataLakeStore/accounts/defaultneuropebenchmark","name":"defaultneuropebenchmark","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlswithoutshim.azuredatalakestore.net","accountId":"4582cd5b-339e-4322-886c-f5236dc7967d","creationTime":"2018-01-06T00:53:00.5535285Z","lastModifiedTime":"2018-04-12T21:20:18.13363Z"},"location":"ukwest","tags":{"Component":"ADL_HADOOP_TeraStar","Project":"ADL_SHIM","Evictable":"6/30/2018","Owner":"v-zhzha2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adlswithoutshimbits/providers/Microsoft.DataLakeStore/accounts/adlswithoutshim","name":"adlswithoutshim","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"asikaria1db5.azuredatalakestore.net","accountId":"12f7fe24-3ec9-4ac5-84c4-9effaff9f3e1","creationTime":"2017-01-20T19:21:00.1410263Z","lastModifiedTime":"2018-04-11T19:32:38.079129Z"},"location":"ukwest","tags":{"Component":"ADLS-SDK","Project":"ADLS-SDK","Evictable":"06/30/2019","Owner":"asikaria"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asikaria1db5RG2/providers/Microsoft.DataLakeStore/accounts/asikaria1db5","name":"asikaria1db5","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Failed","state":null,"endpoint":null,"accountId":"22168c37-5763-438c-93d6-6ca84dcb26d7"},"location":"ukwest","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cabosumameh/providers/Microsoft.DataLakeStore/accounts/adlie01perf21","name":"adlie01perf21","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"chakrabdb5.azuredatalakestore.net","accountId":"ff4f9272-831d-41e0-bbe0-edcfc01548d2","creationTime":"2016-11-13T17:19:30.4372677Z","lastModifiedTime":"2018-03-31T17:28:05.5459394Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/chakrab/providers/Microsoft.DataLakeStore/accounts/chakrabdb5","name":"chakrabdb5","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Failed","state":null,"endpoint":null,"accountId":"83c1abef-ecc7-47f8-a2c6-d24824240ffb","creationTime":"2016-04-22T06:59:19.5098042Z","lastModifiedTime":"2016-04-22T06:59:19.5098042Z"},"location":"uk + west","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-24-DB5/providers/Microsoft.DataLakeStore/accounts/adldevtest22","name":"adldevtest22","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Failed","state":null,"endpoint":null,"accountId":"14bb3218-8bd0-4698-8c0e-736752f20552","creationTime":"2016-04-22T07:22:17.5991588Z","lastModifiedTime":"2016-04-22T07:22:17.5991588Z"},"location":"ukwest","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-24-DB5/providers/Microsoft.DataLakeStore/accounts/adldevtest44","name":"adldevtest44","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"ha1hadl25ne.azuredatalakestore.net","accountId":"6a0a35ea-8579-45a2-8b27-f7cd3207a1aa","creationTime":"2016-08-30T05:38:00.2941735Z","lastModifiedTime":"2018-03-31T21:44:54.9322373Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/ha1hadl25ne","name":"ha1hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"ha2hadl25ne.azuredatalakestore.net","accountId":"59f55c75-15b9-48a8-8b3e-c7a4a5747f43","creationTime":"2016-08-30T05:38:40.3547083Z","lastModifiedTime":"2018-03-31T21:45:03.9307886Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/ha2hadl25ne","name":"ha2hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"ha3hadl25ne.azuredatalakestore.net","accountId":"905c70a2-85a8-4af1-ba51-91444013fe1b","creationTime":"2016-08-30T05:39:21.9604376Z","lastModifiedTime":"2018-03-31T21:45:07.6532759Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/ha3hadl25ne","name":"ha3hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"ha4hadl25ne.azuredatalakestore.net","accountId":"fce86758-e58b-4e97-bea9-980a7939fbb7","creationTime":"2016-08-30T05:40:00.0313711Z","lastModifiedTime":"2018-03-31T21:45:12.5374189Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/ha4hadl25ne","name":"ha4hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"ha6hadl25ne.azuredatalakestore.net","accountId":"d14d0207-9f35-4bf4-bd14-e32ebd9c5089","creationTime":"2016-08-30T05:40:42.3936987Z","lastModifiedTime":"2018-03-31T21:45:20.5864799Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/ha6hadl25ne","name":"ha6hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"ha7hadl25ne.azuredatalakestore.net","accountId":"9e92de8e-5d7e-44b1-8cc2-484960583b83","creationTime":"2016-08-30T05:41:25.5080004Z","lastModifiedTime":"2018-03-31T21:45:36.4667887Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/ha7hadl25ne","name":"ha7hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"ha8hadl25ne.azuredatalakestore.net","accountId":"8a8a318e-f5e2-4d8b-b6e6-2ed8b0537f9f","creationTime":"2016-08-30T05:42:10.2637249Z","lastModifiedTime":"2018-03-31T21:45:40.7127804Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/ha8hadl25ne","name":"ha8hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"ha9hadl25ne.azuredatalakestore.net","accountId":"d546a37e-edd3-4869-83cf-6e27876798a5","creationTime":"2016-08-30T05:42:49.6958597Z","lastModifiedTime":"2018-03-31T21:45:45.0927348Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/ha9hadl25ne","name":"ha9hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hahb1hadl25ne.azuredatalakestore.net","accountId":"1573b0e7-3f4a-484c-a3f3-7ccd177bba4c","creationTime":"2016-08-30T05:43:31.1545774Z","lastModifiedTime":"2018-03-31T21:45:50.8548948Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hahb1hadl25ne","name":"hahb1hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hahb2hadl25ne.azuredatalakestore.net","accountId":"f1d6b3a5-c961-4eb9-b3e3-b3b2d056f569","creationTime":"2016-08-30T05:44:14.9382158Z","lastModifiedTime":"2018-03-31T21:45:56.6144139Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hahb2hadl25ne","name":"hahb2hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hahb3hadl25ne.azuredatalakestore.net","accountId":"ecdbc2f1-c5a2-49d7-b887-b485761ce723","creationTime":"2016-08-30T05:44:54.3430817Z","lastModifiedTime":"2018-03-31T21:46:01.5869976Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hahb3hadl25ne","name":"hahb3hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hbase1hadl25ne.azuredatalakestore.net","accountId":"a4e87cb1-344e-4511-a2f8-8b6ffea3b0d4","creationTime":"2016-08-30T05:45:34.8012894Z","lastModifiedTime":"2018-03-31T21:46:07.1575716Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hbase1hadl25ne","name":"hbase1hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hbase2hadl25ne.azuredatalakestore.net","accountId":"0795776f-62bc-4c36-a2bd-8ad214a2f779","creationTime":"2016-08-30T05:46:16.6473788Z","lastModifiedTime":"2018-03-31T21:46:12.4729551Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hbase2hadl25ne","name":"hbase2hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hbase3hadl25ne.azuredatalakestore.net","accountId":"4bcde730-ed96-4f40-9f3c-68587a5e6102","creationTime":"2016-08-30T05:46:58.2718863Z","lastModifiedTime":"2018-03-31T21:46:16.6847121Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hbase3hadl25ne","name":"hbase3hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hbase4hadl25ne.azuredatalakestore.net","accountId":"d4406f8d-d171-4f63-9111-c47882838f52","creationTime":"2016-08-30T05:47:39.6017623Z","lastModifiedTime":"2018-03-31T21:46:23.1390286Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hbase4hadl25ne","name":"hbase4hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hbase5hadl25ne.azuredatalakestore.net","accountId":"b2a4d876-fa5a-4e7b-9040-4c44083345fe","creationTime":"2016-08-30T05:48:23.3100983Z","lastModifiedTime":"2018-03-31T21:46:29.1950899Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hbase5hadl25ne","name":"hbase5hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hcathadl25ne.azuredatalakestore.net","accountId":"f6a119fb-9552-4362-b9f4-98602de0ea80","creationTime":"2016-08-30T05:49:01.413833Z","lastModifiedTime":"2018-03-31T21:46:33.7711438Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hcathadl25ne","name":"hcathadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hdfshadl25ne.azuredatalakestore.net","accountId":"a5cdfe19-27bd-4872-b5c9-32faea3ce88a","creationTime":"2016-08-30T05:49:45.3076958Z","lastModifiedTime":"2018-03-31T21:46:38.8795675Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hdfshadl25ne","name":"hdfshadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hive1hadl25ne.azuredatalakestore.net","accountId":"748ad20c-b2cb-4f12-a522-83582f4ac526","creationTime":"2016-08-30T05:50:24.9113215Z","lastModifiedTime":"2018-03-31T21:46:43.5742127Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hive1hadl25ne","name":"hive1hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hive2hadl25ne.azuredatalakestore.net","accountId":"b81a0fea-6c7a-44e3-b614-b90de921bad2","creationTime":"2016-08-30T05:51:07.2562061Z","lastModifiedTime":"2018-03-31T21:46:47.8746535Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hive2hadl25ne","name":"hive2hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hive3hadl25ne.azuredatalakestore.net","accountId":"ef6801a6-c991-4068-8d70-4cf703b59124","creationTime":"2016-08-30T05:51:47.3923847Z","lastModifiedTime":"2018-03-31T21:46:52.1647331Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hive3hadl25ne","name":"hive3hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hive4hadl25ne.azuredatalakestore.net","accountId":"84704e84-2499-48c6-9295-4a06b369ad91","creationTime":"2016-08-30T05:52:29.7211477Z","lastModifiedTime":"2018-03-31T21:46:56.3318737Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hive4hadl25ne","name":"hive4hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs210hadl25ne.azuredatalakestore.net","accountId":"41a08413-8b94-45ba-8fd5-d762ff767905","creationTime":"2016-08-30T05:53:51.2442336Z","lastModifiedTime":"2018-03-31T21:47:00.3883915Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs210hadl25ne","name":"hs210hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs211hadl25ne.azuredatalakestore.net","accountId":"1d350e7f-68da-43f7-9497-00dcd480b46f","creationTime":"2016-08-30T05:54:33.9100445Z","lastModifiedTime":"2018-03-31T21:47:04.731629Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs211hadl25ne","name":"hs211hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs212hadl25ne.azuredatalakestore.net","accountId":"2413658e-80d5-4626-b16b-8559e11e4685","creationTime":"2016-08-30T05:55:16.1825835Z","lastModifiedTime":"2018-03-31T21:47:08.8653861Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs212hadl25ne","name":"hs212hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs213hadl25ne.azuredatalakestore.net","accountId":"69be05c2-3da2-49e8-a972-b318f97f528b","creationTime":"2016-08-30T05:55:55.2954321Z","lastModifiedTime":"2018-03-31T21:47:12.8510078Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs213hadl25ne","name":"hs213hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs214hadl25ne.azuredatalakestore.net","accountId":"044ea28e-685d-4f45-a870-9080ebd865af","creationTime":"2016-08-30T05:56:38.47935Z","lastModifiedTime":"2018-03-31T21:47:17.4207323Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs214hadl25ne","name":"hs214hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs215hadl25ne.azuredatalakestore.net","accountId":"a406cdec-716d-401e-b637-1398252cca9f","creationTime":"2016-08-30T05:57:20.0123412Z","lastModifiedTime":"2018-03-31T21:47:21.4661206Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs215hadl25ne","name":"hs215hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs216hadl25ne.azuredatalakestore.net","accountId":"dfa79136-b15f-486d-a744-807e3c439d3f","creationTime":"2016-08-30T05:58:03.3212767Z","lastModifiedTime":"2018-03-31T21:47:25.3445039Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs216hadl25ne","name":"hs216hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs217hadl25ne.azuredatalakestore.net","accountId":"df589cd8-2535-4545-9338-7d583bcdc781","creationTime":"2016-08-30T05:58:42.042751Z","lastModifiedTime":"2018-03-31T21:47:29.4020084Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs217hadl25ne","name":"hs217hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs218hadl25ne.azuredatalakestore.net","accountId":"5900ed38-6512-47df-9976-1b0ae2f5164f","creationTime":"2016-08-30T05:59:21.5617045Z","lastModifiedTime":"2018-03-31T21:47:34.4407026Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs218hadl25ne","name":"hs218hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs219hadl25ne.azuredatalakestore.net","accountId":"446536a3-b6b8-4706-b828-40b0ed602196","creationTime":"2016-08-30T06:00:02.7805496Z","lastModifiedTime":"2018-03-31T21:47:38.9991093Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs219hadl25ne","name":"hs219hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs21hadl25ne.azuredatalakestore.net","accountId":"e1056993-84ad-4c75-9aff-63a819756338","creationTime":"2016-08-30T05:53:10.4893613Z","lastModifiedTime":"2018-03-31T21:47:42.9019895Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs21hadl25ne","name":"hs21hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs22hadl25ne.azuredatalakestore.net","accountId":"dc6c6962-beb2-4c5d-ac79-396e2754f4d7","creationTime":"2016-08-30T06:00:44.6306996Z","lastModifiedTime":"2018-03-31T21:47:46.7898642Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs22hadl25ne","name":"hs22hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs23hadl25ne.azuredatalakestore.net","accountId":"7e805752-92b0-4fc9-a4a0-4193938967a0","creationTime":"2016-08-30T06:01:24.7524018Z","lastModifiedTime":"2018-03-31T21:47:50.9210855Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs23hadl25ne","name":"hs23hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs24hadl25ne.azuredatalakestore.net","accountId":"be5f84d0-0aad-4653-b8e8-a43a7645ef30","creationTime":"2016-08-30T06:02:04.3489769Z","lastModifiedTime":"2018-03-31T21:47:54.9105981Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs24hadl25ne","name":"hs24hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs25hadl25ne.azuredatalakestore.net","accountId":"82282756-b7d1-45d6-8de1-4212df4a46ff","creationTime":"2016-08-30T06:02:45.9334808Z","lastModifiedTime":"2018-03-31T21:47:59.2123203Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs25hadl25ne","name":"hs25hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs26hadl25ne.azuredatalakestore.net","accountId":"70eb27b6-51f6-49eb-826f-4e09ed1144f4","creationTime":"2016-08-30T06:03:26.4368147Z","lastModifiedTime":"2018-03-31T21:48:03.3279333Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs26hadl25ne","name":"hs26hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs27hadl25ne.azuredatalakestore.net","accountId":"1ef2a07b-4ccd-4a41-a65f-72eee88e7970","creationTime":"2016-08-30T06:04:08.0911811Z","lastModifiedTime":"2018-03-31T21:48:07.476711Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs27hadl25ne","name":"hs27hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs28hadl25ne.azuredatalakestore.net","accountId":"f766acf0-2b52-4c34-8ad0-4aa6735992c0","creationTime":"2016-08-30T06:04:50.3828989Z","lastModifiedTime":"2018-03-31T21:48:11.6921987Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs28hadl25ne","name":"hs28hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hs29hadl25ne.azuredatalakestore.net","accountId":"a122e897-8c0f-4d16-a33c-01da4a538b37","creationTime":"2016-08-30T06:05:29.0192936Z","lastModifiedTime":"2018-03-31T21:48:15.3890009Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hs29hadl25ne","name":"hs29hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hsrv2hadl25ne.azuredatalakestore.net","accountId":"961e4a64-e2ad-43e5-8e2a-7f88f23dd51d","creationTime":"2016-08-30T06:06:08.7463475Z","lastModifiedTime":"2018-03-31T21:48:19.4594045Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/hsrv2hadl25ne","name":"hsrv2hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"mahouthadl25ne.azuredatalakestore.net","accountId":"d93502cb-ebc2-4a47-a466-1927041f1611","creationTime":"2016-08-30T06:06:51.1072948Z","lastModifiedTime":"2018-03-31T21:48:23.7977194Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/mahouthadl25ne","name":"mahouthadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"mapred1hadl25ne.azuredatalakestore.net","accountId":"6f73d58d-c23c-4a54-8333-0186abe356e2","creationTime":"2016-08-30T06:07:33.5953146Z","lastModifiedTime":"2018-03-31T21:48:28.1771533Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/mapred1hadl25ne","name":"mapred1hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"mapred2hadl25ne.azuredatalakestore.net","accountId":"b034fac2-e341-43d9-9b8d-af596f6c4a80","creationTime":"2016-08-30T06:08:13.1233329Z","lastModifiedTime":"2018-03-31T21:48:32.3796412Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/mapred2hadl25ne","name":"mapred2hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"oozie1hadl25ne.azuredatalakestore.net","accountId":"6bbdedbd-dc24-4a83-a1d7-c54f5fe03721","creationTime":"2016-08-30T06:08:53.6092079Z","lastModifiedTime":"2018-03-31T21:48:37.2194044Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/oozie1hadl25ne","name":"oozie1hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"oozie2hadl25ne.azuredatalakestore.net","accountId":"dc92badd-306f-4cc9-8c6e-c410e8c986cf","creationTime":"2016-08-30T06:09:34.3989858Z","lastModifiedTime":"2018-03-31T21:48:41.3815867Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/oozie2hadl25ne","name":"oozie2hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"oozie3hadl25ne.azuredatalakestore.net","accountId":"51d3e160-2247-4999-8d24-3fd002e47b12","creationTime":"2016-08-30T06:10:15.7253463Z","lastModifiedTime":"2018-03-31T21:48:45.5575868Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/oozie3hadl25ne","name":"oozie3hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"phoenix1hadl25ne.azuredatalakestore.net","accountId":"9d03e20f-fd5e-474c-b1a3-b11647637fa3","creationTime":"2016-09-01T04:55:37.8207185Z","lastModifiedTime":"2018-03-31T21:48:49.642653Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/phoenix1hadl25ne","name":"phoenix1hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"phoenix2hadl25ne.azuredatalakestore.net","accountId":"082090c5-291f-440e-8d0f-41742e810306","creationTime":"2016-09-01T04:56:18.088745Z","lastModifiedTime":"2018-03-31T21:48:53.3227577Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/phoenix2hadl25ne","name":"phoenix2hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pig2hadl25ne.azuredatalakestore.net","accountId":"6824fcbb-fa04-435b-8537-693dc721b6fe","creationTime":"2016-08-30T06:12:58.7637934Z","lastModifiedTime":"2018-03-31T21:48:57.4151292Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/pig2hadl25ne","name":"pig2hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pighadl25ne.azuredatalakestore.net","accountId":"fe9111f3-0bf2-4cec-b13a-bd3227f77554","creationTime":"2016-08-30T06:12:18.5935066Z","lastModifiedTime":"2018-03-31T21:49:01.4858375Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/pighadl25ne","name":"pighadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pqchadl25ne.azuredatalakestore.net","accountId":"e25ae48f-85bf-410e-a005-0cf0d6d0e189","creationTime":"2016-09-01T04:56:57.2281902Z","lastModifiedTime":"2018-03-31T21:49:05.5915094Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/pqchadl25ne","name":"pqchadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"pqshadl25ne.azuredatalakestore.net","accountId":"4d4c921d-ec2d-45d0-9b33-e80d7de857e4","creationTime":"2016-09-01T04:57:39.1878734Z","lastModifiedTime":"2018-03-31T21:49:10.5103353Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/pqshadl25ne","name":"pqshadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"sliderhadl25ne.azuredatalakestore.net","accountId":"8782993a-220b-424f-8520-961524fe1692","creationTime":"2016-08-30T06:15:01.022262Z","lastModifiedTime":"2018-03-31T21:49:14.6311452Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/sliderhadl25ne","name":"sliderhadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"spark2hadl25ne.azuredatalakestore.net","accountId":"6fbf7182-20df-41d9-878e-f6460dd24f98","creationTime":"2016-08-30T06:16:21.1970202Z","lastModifiedTime":"2018-03-31T21:49:18.2466516Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/spark2hadl25ne","name":"spark2hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"sparkhadl25ne.azuredatalakestore.net","accountId":"769662a7-3ecf-499f-bb46-ded59f0f3395","creationTime":"2016-08-30T06:15:40.9834203Z","lastModifiedTime":"2018-03-31T21:49:22.3730036Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/sparkhadl25ne","name":"sparkhadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"sparkhhadl25ne.azuredatalakestore.net","accountId":"cfac02cb-8d4c-49e0-9303-48af6923e387","creationTime":"2016-08-30T06:17:00.2666617Z","lastModifiedTime":"2018-03-31T21:49:26.5782652Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/sparkhhadl25ne","name":"sparkhhadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"sqoophadl25ne.azuredatalakestore.net","accountId":"36ea99f5-241b-4937-9ba2-ac0dcc549bd3","creationTime":"2016-08-30T06:17:40.7203741Z","lastModifiedTime":"2018-03-31T21:49:30.8070405Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/sqoophadl25ne","name":"sqoophadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"stormhadl25ne.azuredatalakestore.net","accountId":"db778174-e1f5-4128-b1b0-136af06cb57e","creationTime":"2016-08-30T06:18:23.2550976Z","lastModifiedTime":"2018-03-31T21:49:35.389229Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/stormhadl25ne","name":"stormhadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"tez1hadl25ne.azuredatalakestore.net","accountId":"ee63470e-74d7-49fd-a6ee-59ba3efe768a","creationTime":"2016-08-30T06:19:03.7991921Z","lastModifiedTime":"2018-03-31T21:49:39.6178459Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/tez1hadl25ne","name":"tez1hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"tez2hadl25ne.azuredatalakestore.net","accountId":"a49ded70-45ae-4f5b-86fe-e26a5c7873ba","creationTime":"2016-08-30T06:19:45.1187954Z","lastModifiedTime":"2018-03-31T21:49:43.6315595Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/tez2hadl25ne","name":"tez2hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"tez3hadl25ne.azuredatalakestore.net","accountId":"c1ab3720-c239-43cb-a189-1d56cadbf95d","creationTime":"2016-08-30T06:20:25.2233559Z","lastModifiedTime":"2018-03-31T21:49:47.6285609Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/tez3hadl25ne","name":"tez3hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"tezv21hadl25ne.azuredatalakestore.net","accountId":"06c1164c-2a47-4e40-8a13-8fdaa21fad9e","creationTime":"2016-09-01T04:58:20.8559754Z","lastModifiedTime":"2018-03-31T21:49:51.7429698Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/tezv21hadl25ne","name":"tezv21hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"tezv22hadl25ne.azuredatalakestore.net","accountId":"b9abee6b-5ace-4b72-a7f2-73dcdaee55ce","creationTime":"2016-09-01T04:59:00.3220011Z","lastModifiedTime":"2018-03-31T21:49:55.9602602Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/tezv22hadl25ne","name":"tezv22hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"tezv23hadl25ne.azuredatalakestore.net","accountId":"861f550c-2695-4d0e-b5e4-e856b1d04caf","creationTime":"2016-09-01T04:59:43.5067238Z","lastModifiedTime":"2018-03-31T21:50:00.0650762Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/tezv23hadl25ne","name":"tezv23hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"webhhadl25ne.azuredatalakestore.net","accountId":"d1d68ca8-2f40-4888-b3c8-7fbd5f83d85a","creationTime":"2016-08-30T06:23:13.2621621Z","lastModifiedTime":"2018-03-31T21:50:04.4692025Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/webhhadl25ne","name":"webhhadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"yarn1hadl25ne.azuredatalakestore.net","accountId":"20f90712-dab6-48a4-804b-5d5bfaa6faa4","creationTime":"2016-08-30T06:23:50.3524793Z","lastModifiedTime":"2018-03-31T21:50:08.3615545Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/yarn1hadl25ne","name":"yarn1hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"yarn2hadl25ne.azuredatalakestore.net","accountId":"c5cb9c6c-c221-4a3c-ac88-cd07f9375b01","creationTime":"2016-08-30T06:24:35.5819011Z","lastModifiedTime":"2018-03-31T21:50:12.0816007Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/yarn2hadl25ne","name":"yarn2hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"yarn3hadl25ne.azuredatalakestore.net","accountId":"933f0568-c11e-4095-8b85-e7fdb6c94e67","creationTime":"2016-08-30T06:25:14.3144237Z","lastModifiedTime":"2018-03-31T21:50:15.9253679Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/yarn3hadl25ne","name":"yarn3hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"yarn4hadl25ne.azuredatalakestore.net","accountId":"b14cd603-a84a-414a-8c47-e82da3015b0b","creationTime":"2016-08-30T06:25:54.3838675Z","lastModifiedTime":"2018-03-31T21:50:19.882303Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/yarn4hadl25ne","name":"yarn4hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"yarn5hadl25ne.azuredatalakestore.net","accountId":"04357a09-f866-412b-a925-84aa8c33bb6a","creationTime":"2016-08-30T06:26:35.2347374Z","lastModifiedTime":"2018-03-31T21:50:23.8639528Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/yarn5hadl25ne","name":"yarn5hadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"zeppelinhadl25ne.azuredatalakestore.net","accountId":"3aef3090-cf28-4793-b9e7-e2ccec0f8c5f","creationTime":"2016-09-01T05:00:23.9140272Z","lastModifiedTime":"2018-03-31T21:50:28.3951464Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/zeppelinhadl25ne","name":"zeppelinhadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"zkhadl25ne.azuredatalakestore.net","accountId":"64899a19-4768-4326-ae4e-8096632963c7","creationTime":"2016-08-30T06:27:57.9373178Z","lastModifiedTime":"2018-03-31T21:50:32.7016405Z"},"location":"uk + west","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/HWX-CERT-25-PROD-NE/providers/Microsoft.DataLakeStore/accounts/zkhadl25ne","name":"zkhadl25ne","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"inteladls.azuredatalakestore.net","accountId":"e699494f-d3ec-404e-8658-3d4b91ff27dd","creationTime":"2017-07-15T00:03:29.7685318Z","lastModifiedTime":"2018-03-31T22:18:54.3581948Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Intel_RG/providers/Microsoft.DataLakeStore/accounts/inteladls","name":"inteladls","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"inteladls1.azuredatalakestore.net","accountId":"8996258f-3321-4f57-a94f-570e10484584","creationTime":"2017-07-14T02:12:00.3896709Z","lastModifiedTime":"2018-03-31T22:12:44.923806Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/intel-rg/providers/Microsoft.DataLakeStore/accounts/inteladls1","name":"inteladls1","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"inteladls1gaukwest.azuredatalakestore.net","accountId":"623b0183-8d5e-4386-b802-dc785a6a0b2d","creationTime":"2017-10-04T20:27:04.0214126Z","lastModifiedTime":"2018-03-31T22:12:53.6092342Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/intel-rg/providers/Microsoft.DataLakeStore/accounts/inteladls1gaukwest","name":"inteladls1gaukwest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"inteladls1tshdd.azuredatalakestore.net","accountId":"62616fe7-7f13-4023-b9c2-a6a56334b07e","creationTime":"2017-07-14T02:19:51.7013002Z","lastModifiedTime":"2018-03-31T22:12:57.6977402Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/intel-rg/providers/Microsoft.DataLakeStore/accounts/inteladls1tshdd","name":"inteladls1tshdd","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"inteladlstshdd.azuredatalakestore.net","accountId":"22859fcb-a6c6-4cc9-b385-700f900f7a4a","creationTime":"2017-07-15T00:12:35.9767391Z","lastModifiedTime":"2018-03-31T22:13:10.1423533Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/intel-rg/providers/Microsoft.DataLakeStore/accounts/inteladlstshdd","name":"inteladlstshdd","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"michandnwestukadlie01.azuredatalakestore.net","accountId":"5d504edd-c121-4b37-92fc-560dac7a3b33","creationTime":"2017-10-03T13:17:46.0528945Z","lastModifiedTime":"2018-04-01T00:05:14.4378101Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/michandn-west-uk-adlie01-rg/providers/Microsoft.DataLakeStore/accounts/michandnwestukadlie01","name":"michandnwestukadlie01","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlprodd5.azuredatalakestore.net","accountId":"04a69429-c7d9-4b86-ab49-f56d27c5515b","creationTime":"2016-04-11T08:37:05.8614261Z","lastModifiedTime":"2018-04-01T00:49:13.7408953Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/North-Europe-ADL-PERF/providers/Microsoft.DataLakeStore/accounts/adlprodd5","name":"adlprodd5","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"proddb5adlperf.azuredatalakestore.net","accountId":"0f8729d3-f1e2-4798-bd2e-c2002a0f93b9","creationTime":"2016-03-30T21:53:20.2388694Z","lastModifiedTime":"2018-04-01T00:49:17.7855141Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/North-Europe-ADL-PERF/providers/Microsoft.DataLakeStore/accounts/proddb5adlperf","name":"proddb5adlperf","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"sarvav2perf19.azuredatalakestore.net","accountId":"cd4e052e-6e32-4f72-a640-d87c9483bdf1","creationTime":"2016-05-25T23:24:12.6640527Z","lastModifiedTime":"2018-04-01T00:49:22.4013815Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/North-Europe-ADL-PERF/providers/Microsoft.DataLakeStore/accounts/sarvav2perf19","name":"sarvav2perf19","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlie01hddregresion.azuredatalakestore.net","accountId":"1568b459-160c-47f7-9c5e-ddd52dd71e9a","creationTime":"2017-05-23T16:10:25.4521078Z","lastModifiedTime":"2018-04-01T01:05:32.1492499Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Perf_regression_test/providers/Microsoft.DataLakeStore/accounts/adlie01hddregresion","name":"adlie01hddregresion","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlie01perf01.azuredatalakestore.net","accountId":"14bd30ee-8c8a-452c-9486-80e429fb43cf","creationTime":"2016-05-20T23:34:25.2288477Z","lastModifiedTime":"2018-04-01T01:55:03.4732745Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/proddb-group/providers/Microsoft.DataLakeStore/accounts/adlie01perf01","name":"adlie01perf01","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlie01perf03.azuredatalakestore.net","accountId":"354fa943-53bb-4c92-b59b-442b3d101de0","creationTime":"2016-06-07T23:19:29.613588Z","lastModifiedTime":"2018-04-01T01:55:08.2959682Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/proddb-group/providers/Microsoft.DataLakeStore/accounts/adlie01perf03","name":"adlie01perf03","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"metadatav2adlie01.azuredatalakestore.net","accountId":"cb7d850d-99f5-43ab-95c6-bde1bb94e748","creationTime":"2016-05-03T18:02:05.7806576Z","lastModifiedTime":"2018-04-01T01:55:13.2853629Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/proddb-group/providers/Microsoft.DataLakeStore/accounts/metadatav2adlie01","name":"metadatav2adlie01","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"metadatav2defaultadlie01.azuredatalakestore.net","accountId":"ab398629-c58b-44df-9982-71596cd073e7","creationTime":"2016-05-04T23:13:40.683082Z","lastModifiedTime":"2018-04-01T01:55:17.7489671Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/proddb-group/providers/Microsoft.DataLakeStore/accounts/metadatav2defaultadlie01","name":"metadatav2defaultadlie01","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"metadatav2niadlie01.azuredatalakestore.net","accountId":"83c34764-56e9-4abb-8505-5ba3daa07dfa","creationTime":"2016-05-04T01:01:00.0349098Z","lastModifiedTime":"2018-04-01T01:55:22.7749466Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/proddb-group/providers/Microsoft.DataLakeStore/accounts/metadatav2niadlie01","name":"metadatav2niadlie01","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsroyukwest.azuredatalakestore.net","accountId":"6f92a58a-ffbc-4ce1-8c7a-754b62f46083","creationTime":"2017-02-07T00:50:41.3386661Z","lastModifiedTime":"2018-04-01T02:00:47.4495552Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgroyukwest/providers/Microsoft.DataLakeStore/accounts/adlsroyukwest","name":"adlsroyukwest","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsforshim.azuredatalakestore.net","accountId":"c9fe10ee-93fd-4242-8530-7f3f26b23724","creationTime":"2017-12-13T21:59:06.24278Z","lastModifiedTime":"2018-04-12T21:19:53.2889971Z"},"location":"ukwest","tags":{"Component":"ADL_HADOOP_TeraStar","Project":"ADL_SHIM","Evictable":"6/30/2018","Owner":"v-zhzha2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/shimhadoop/providers/Microsoft.DataLakeStore/accounts/adlsforshim","name":"adlsforshim","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"snvarmanontiered.azuredatalakestore.net","accountId":"dea863c0-96c0-4fe1-ae72-76e95ae5ddae","creationTime":"2018-03-01T04:49:22.607866Z","lastModifiedTime":"2018-04-01T02:17:42.8573048Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvarmarg/providers/Microsoft.DataLakeStore/accounts/snvarmanontiered","name":"snvarmanontiered","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlie01contracthdfsts.azuredatalakestore.net","accountId":"b1af17bc-409d-4f96-a13d-1dfba88c1d34","creationTime":"2017-02-23T07:42:35.4022803Z","lastModifiedTime":"2018-04-01T02:31:43.1918981Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvijaya/providers/Microsoft.DataLakeStore/accounts/adlie01contracthdfsts","name":"adlie01contracthdfsts","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlie01hadooptests.azuredatalakestore.net","accountId":"33837399-2977-46b6-93a9-2bb651470908","creationTime":"2016-12-02T07:39:34.0415998Z","lastModifiedTime":"2018-04-01T02:31:47.3531452Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvijaya/providers/Microsoft.DataLakeStore/accounts/adlie01hadooptests","name":"adlie01hadooptests","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlie01mocktestsn.azuredatalakestore.net","accountId":"1c7fec1a-9c57-4599-8358-c5b58ae7fab2","creationTime":"2016-11-17T20:13:30.1190684Z","lastModifiedTime":"2018-04-01T02:31:51.8746481Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvijaya/providers/Microsoft.DataLakeStore/accounts/adlie01mocktestsn","name":"adlie01mocktestsn","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"snvijayaadlie01.azuredatalakestore.net","accountId":"9da526a7-56e4-44ae-9882-91bee9d1b9f5","creationTime":"2018-04-20T10:41:14.7364669Z","lastModifiedTime":"2018-04-20T10:41:14.7364669Z"},"location":"ukwest","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvijaya/providers/Microsoft.DataLakeStore/accounts/snvijayaadlie01","name":"snvijayaadlie01","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"snvijayaadlie01tiered.azuredatalakestore.net","accountId":"5c9cc710-1a47-4279-9836-efb646f1d43e","creationTime":"2018-03-28T08:57:00.3013126Z","lastModifiedTime":"2018-04-01T02:32:03.7240708Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/snvijaya/providers/Microsoft.DataLakeStore/accounts/snvijayaadlie01tiered","name":"snvijayaadlie01tiered","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"spiromplayground.azuredatalakestore.net","accountId":"0e48caee-4139-479b-9ede-90a0bbf0fd9b","creationTime":"2017-11-14T22:27:28.1204153Z","lastModifiedTime":"2018-04-01T02:54:06.9222372Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/spirotest/providers/Microsoft.DataLakeStore/accounts/spiromplayground","name":"spiromplayground","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"db5adlshddp1.azuredatalakestore.net","accountId":"9227bfe5-2c1b-4249-927c-21fd2ab4ba3c","creationTime":"2017-12-01T23:19:26.4351047Z","lastModifiedTime":"2018-04-17T20:37:12.614558Z"},"location":"ukwest","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/db5adlshddp1","name":"db5adlshddp1","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"db5adlshddp1stress.azuredatalakestore.net","accountId":"9e5b7bd9-e5a2-4db3-8f07-bc1d75682868","creationTime":"2017-12-01T23:22:07.8890238Z","lastModifiedTime":"2018-04-17T20:37:16.2153536Z"},"location":"ukwest","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/db5adlshddp1stress","name":"db5adlshddp1stress","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"db5adlshddp2.azuredatalakestore.net","accountId":"668a3407-3c01-4543-baa6-8c2a01c61b73","creationTime":"2017-12-01T23:21:10.2760998Z","lastModifiedTime":"2018-04-17T20:37:19.7560427Z"},"location":"ukwest","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/db5adlshddp2","name":"db5adlshddp2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"db5adlshddp4.azuredatalakestore.net","accountId":"639130c7-ecb0-4ace-9fd3-13c0325c7fd0","creationTime":"2017-12-01T20:44:35.8821664Z","lastModifiedTime":"2018-04-17T20:37:23.4488759Z"},"location":"ukwest","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/db5adlshddp4","name":"db5adlshddp4","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"db5adlshddp4stress.azuredatalakestore.net","accountId":"8eb4655e-80d0-410f-a5dd-bce99613831f","creationTime":"2017-12-08T23:36:45.9201858Z","lastModifiedTime":"2018-04-17T20:37:29.0542712Z"},"location":"ukwest","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/db5adlshddp4stress","name":"db5adlshddp4stress","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"db5adlshddp5.azuredatalakestore.net","accountId":"b7d1e807-34f8-4e76-83fb-39068f6c663a","creationTime":"2017-12-01T20:45:29.4561999Z","lastModifiedTime":"2018-04-17T20:37:34.0820523Z"},"location":"ukwest","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/db5adlshddp5","name":"db5adlshddp5","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"db5adlsssdp2.azuredatalakestore.net","accountId":"64a467a2-0ad9-4e80-97e3-6b20187e9663","creationTime":"2017-12-08T23:49:39.1623162Z","lastModifiedTime":"2018-04-17T20:37:37.9290226Z"},"location":"ukwest","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/db5adlsssdp2","name":"db5adlsssdp2","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"db5adlsssdp4.azuredatalakestore.net","accountId":"e803a8af-764c-415c-a144-217c40591b47","creationTime":"2017-12-08T23:48:02.5217289Z","lastModifiedTime":"2018-04-17T20:37:42.7172383Z"},"location":"ukwest","tags":{"Component":"ADL + GA and Chelan Performance tracking","Project":"Performance Automation Framework","Evictable":"04/17/2020","Owner":"chrishes"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/StoreTeamAutomationPerformanceFramework/providers/Microsoft.DataLakeStore/accounts/db5adlsssdp4","name":"db5adlsssdp4","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlsperfencrypt.azuredatalakestore.net","accountId":"ba2d9642-4949-4a88-8f16-4eab72f302e6","creationTime":"2016-08-31T23:00:02.5312056Z","lastModifiedTime":"2018-04-01T03:37:11.7378491Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/t-chatal/providers/Microsoft.DataLakeStore/accounts/adlsperfencrypt","name":"adlsperfencrypt","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"tsperfadlshdd01.azuredatalakestore.net","accountId":"da319cb6-228f-4385-8615-29722e231054","creationTime":"2017-03-14T18:22:53.0679221Z","lastModifiedTime":"2018-04-01T04:32:56.0440123Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TIEREDSTORE-PERF/providers/Microsoft.DataLakeStore/accounts/tsperfadlshdd01","name":"tsperfadlshdd01","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"tsperfadlsssd01.azuredatalakestore.net","accountId":"4ea62145-0948-4e2b-a08a-a67da40d19eb","creationTime":"2017-03-14T18:22:12.6209174Z","lastModifiedTime":"2018-04-01T04:33:00.6190116Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TIEREDSTORE-PERF/providers/Microsoft.DataLakeStore/accounts/tsperfadlsssd01","name":"tsperfadlsssd01","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"tsperfadlswas01.azuredatalakestore.net","accountId":"b6bbe00d-d05e-4f87-adb9-eadcda3cfdcd","creationTime":"2017-03-14T17:59:30.3146858Z","lastModifiedTime":"2018-04-01T04:33:05.0804265Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TIEREDSTORE-PERF/providers/Microsoft.DataLakeStore/accounts/tsperfadlswas01","name":"tsperfadlswas01","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlperfd5northeur.azuredatalakestore.net","accountId":"957fb7e2-f298-458c-9fe3-724f40d7de7a","creationTime":"2016-04-11T09:39:18.8080019Z","lastModifiedTime":"2018-04-01T05:36:57.3218396Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperf/providers/Microsoft.DataLakeStore/accounts/adlperfd5northeur","name":"adlperfd5northeur","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlcompressionencryption.azuredatalakestore.net","accountId":"d2ce33fd-e2c2-4200-aadf-99272327e630","creationTime":"2016-09-02T10:23:10.4462681Z","lastModifiedTime":"2018-04-01T05:42:19.4245719Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/adlcompressionencryption","name":"adlcompressionencryption","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlcompressiononly.azuredatalakestore.net","accountId":"19bcde03-1e91-44a6-bcc6-ea608fea9562","creationTime":"2016-09-02T10:12:03.3340021Z","lastModifiedTime":"2018-04-01T05:42:22.6508705Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/adlcompressiononly","name":"adlcompressiononly","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adldailynorthrun.azuredatalakestore.net","accountId":"d69240f9-d397-45eb-bcda-76f27bbb4605","creationTime":"2016-08-16T12:08:29.0465243Z","lastModifiedTime":"2018-04-01T05:42:26.231679Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/adldailynorthrun","name":"adldailynorthrun","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlencryptiononly.azuredatalakestore.net","accountId":"573b85bb-81ba-46e5-a60d-3ed012988f17","creationTime":"2016-09-06T09:26:34.5828193Z","lastModifiedTime":"2018-04-01T05:42:29.7887184Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/adlencryptiononly","name":"adlencryptiononly","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"adlneuropenoral.azuredatalakestore.net","accountId":"c884ebcc-e005-463f-8b39-10425b517070","creationTime":"2016-08-16T06:23:44.0536674Z","lastModifiedTime":"2018-04-01T05:42:33.8458918Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/adlneuropenoral","name":"adlneuropenoral","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"defhivetpch.azuredatalakestore.net","accountId":"4f892916-ca00-4f30-9b45-cb2d1e633e03","creationTime":"2017-03-09T09:15:55.1954594Z","lastModifiedTime":"2018-04-01T05:42:57.9728163Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/defhivetpch","name":"defhivetpch","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"deftpchhive.azuredatalakestore.net","accountId":"3527d10e-8c7f-4287-b1f5-c87c1b618f20","creationTime":"2017-03-30T05:49:05.548991Z","lastModifiedTime":"2018-04-01T05:43:04.1821337Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/deftpchhive","name":"deftpchhive","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"hddhivetpch.azuredatalakestore.net","accountId":"8839fb84-5b25-4352-8455-2d2c5c264734","creationTime":"2017-03-09T09:14:07.6023544Z","lastModifiedTime":"2018-04-01T05:43:10.9194068Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/hddhivetpch","name":"hddhivetpch","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"sparkexpdata.azuredatalakestore.net","accountId":"efbd100f-ea9e-4f2f-b669-dcf117f34859","creationTime":"2016-08-16T06:50:12.711012Z","lastModifiedTime":"2018-04-01T05:43:23.2856747Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/sparkexpdata","name":"sparkexpdata","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"ssdhivetpch.azuredatalakestore.net","accountId":"061d0712-d054-464b-b20d-aab318d82603","creationTime":"2017-03-09T09:15:01.9097677Z","lastModifiedTime":"2018-04-01T05:43:36.4056471Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/ssdhivetpch","name":"ssdhivetpch","type":"Microsoft.DataLakeStore/accounts"},{"properties":{"provisioningState":"Succeeded","state":"Active","endpoint":"ukwestdefaultaccount.azuredatalakestore.net","accountId":"33650619-da1b-48a6-806b-216252dcc685","creationTime":"2017-01-20T12:07:40.8833919Z","lastModifiedTime":"2018-04-01T05:43:47.5726756Z"},"location":"ukwest","tags":{"Component":"ADLS_DefaultComponent","Project":"ADLS_Defaultproject","Evictable":"6/30/2018","Owner":"MyAlias"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/webhdfsperfrunner/providers/Microsoft.DataLakeStore/accounts/ukwestdefaultaccount","name":"ukwestdefaultaccount","type":"Microsoft.DataLakeStore/accounts"}]}'} + headers: + cache-control: [no-cache] + content-length: ['235389'] + content-type: [application/json; charset=utf-8] + date: ['Mon, 11 Jun 2018 06:17:21 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-original-request-ids: [47cbdc0d-27f1-4a80-a6ab-751a9382c267, 1ac63167-6eac-4f54-bd3d-db3cac955dc9, + 64ae3170-5a2f-40e9-8cb7-7ff81e0890b8, a54a04c0-6638-40eb-b1a1-a5ab3d8c8a1d, + 28a0ef8b-1191-4183-bb2f-98b32c2f00cb] status: {code: 200, message: OK} - request: body: '{"tags": {"tag2": "value2"}}' @@ -2078,33 +507,28 @@ interactions: Connection: [keep-alive] Content-Length: ['28'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] accept-language: [en-US] - x-ms-client-request-id: [6c6f8e2e-103b-11e8-b339-705a0f2f3d93] method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 response: - body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"d9179e2d-7515-4718-b25e-0432f38cf422","creationTime":"2018-02-12T21:25:09.9513797Z","lastModifiedTime":"2018-02-12T21:26:44.1433416Z"},"location":"East - US 2","tags":{"tag2":"value2"},"identity":{"type":"SystemAssigned","principalId":"cd342977-9584-4834-b311-e869cf6c3201","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} - headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:26:46 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['1045'] - x-ms-correlation-request-id: [f7dd451e-3d42-4f59-a1b4-1a408d6bf4d6] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [3da99d3a-e04d-4740-b47a-16efafdb7f74] - x-ms-routing-request-id: ['WESTUS2:20180212T212646Z:f7dd451e-3d42-4f59-a1b4-1a408d6bf4d6'] + body: {string: '{"properties":{"firewallState":"Disabled","firewallAllowAzureIps":"Disabled","firewallAllowDataLakeAnalytics":"Disabled","firewallRules":[],"virtualNetworkRules":[],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","dataLakePerformanceTierState":"Disabled","provisioningState":"Succeeded","state":"Active","endpoint":"pyarmadls847d11a7.azuredatalakestore.net","accountId":"50240b99-e52f-413f-bb9e-e82cfc75754d","creationTime":"2018-06-11T06:15:46.0137613Z","lastModifiedTime":"2018-06-11T06:17:25.4779681Z"},"location":"eastus2","tags":{"tag2":"value2"},"identity":{"type":"SystemAssigned","principalId":"f84c1c58-5627-4e42-a9ba-0d8b12b53125","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7","name":"pyarmadls847d11a7","type":"Microsoft.DataLakeStore/accounts"}'} + headers: + cache-control: [no-cache] + content-length: ['1085'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:17:25 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-powered-by: [ASP.NET] status: {code: 200, message: OK} - request: body: null @@ -2113,32 +537,27 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] accept-language: [en-US] - x-ms-client-request-id: [6dc3199c-103b-11e8-9b2d-705a0f2f3d93] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/EastUS2/capability?api-version=2016-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataLakeStore/locations/eastus2/capability?api-version=2016-11-01 response: - body: {string: '{"subscriptionId":"00000000-0000-0000-0000-000000000000","state":"Registered","maxAccountCount":10,"accountCount":2,"migrationState":false}'} + body: {string: '{"subscriptionId":"00000000-0000-0000-0000-000000000000","state":"Registered","maxAccountCount":150,"accountCount":105,"migrationState":false}'} headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:26:45 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['139'] - x-ms-correlation-request-id: [807170a5-af21-4f3b-aaea-d10a1a58c800] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [7a612cf2-4e14-4fa8-bf34-21e4ca409ff6] - x-ms-routing-request-id: ['WESTUS2:20180212T212646Z:807170a5-af21-4f3b-aaea-d10a1a58c800'] + cache-control: [no-cache] + content-length: ['142'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:17:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] status: {code: 200, message: OK} - request: body: null @@ -2147,10 +566,9 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] accept-language: [en-US] - x-ms-client-request-id: [6e629306-103b-11e8-9af5-705a0f2f3d93] method: GET uri: https://management.azure.com/providers/Microsoft.DataLakeStore/operations?api-version=2016-11-01 response: @@ -2184,7 +602,13 @@ interactions: DataLakeStore","resource":"Trusted IdProvider","operation":"Delete Trusted Identity Provider","description":"Delete a trusted identity provider."}},{"name":"Microsoft.DataLakeStore/accounts/Superuser/action","display":{"provider":"Microsoft DataLakeStore","resource":"Superuser","operation":"Grant Superuser","description":"Grant - Superuser on Data Lake Store when granted with Microsoft.Authorization/roleAssignments/write."}},{"name":"Microsoft.DataLakeStore/locations/capability/read","display":{"provider":"Microsoft + Superuser on Data Lake Store when granted with Microsoft.Authorization/roleAssignments/write."}},{"name":"Microsoft.DataLakeStore/accounts/eventGridFilters/read","display":{"provider":"Microsoft + DataLakeStore","resource":"EventGrid Filter","operation":"Get EventGrid Filter","description":"Get + an EventGrid Filter."}},{"name":"Microsoft.DataLakeStore/accounts/eventGridFilters/write","display":{"provider":"Microsoft + DataLakeStore","resource":"EventGrid Filter","operation":"Create or Update + EventGrid Filter","description":"Create or update an EventGrid Filter."}},{"name":"Microsoft.DataLakeStore/accounts/eventGridFilters/delete","display":{"provider":"Microsoft + DataLakeStore","resource":"EventGrid Filter","operation":"Delete EventGrid + Filter","description":"Delete an EventGrid Filter."}},{"name":"Microsoft.DataLakeStore/locations/capability/read","display":{"provider":"Microsoft DataLakeStore","resource":"Subscription Capability","operation":"Get DataLakeStore Subscription Capability","description":"Get capability information of a subscription regarding using DataLakeStore."}},{"name":"Microsoft.DataLakeStore/locations/checkNameAvailability/action","display":{"provider":"Microsoft @@ -2213,23 +637,19 @@ interactions: DataLakeStore Account diagnostic settings","description":"Create or update the diagnostic settings for the DataLakeStore account."},"origin":"system"}]}'} headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Type: [application/json] - Date: ['Mon, 12 Feb 2018 21:26:48 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['7160'] - x-ms-correlation-request-id: [feb6709a-a884-45eb-a739-675b351020b1] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [3a544811-4902-4f6a-92f0-8f16902aeb41] - x-ms-routing-request-id: ['WESTUS2:20180212T212648Z:feb6709a-a884-45eb-a739-675b351020b1'] + cache-control: [no-cache] + content-length: ['7858'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:17:28 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] status: {code: 200, message: OK} - request: body: null @@ -2239,28 +659,24 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.24 - msrest_azure/0.4.19 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] accept-language: [en-US] - x-ms-client-request-id: [6ef6671e-103b-11e8-853a-705a0f2f3d93] method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_datalake_store_test_adls_accounts847d11a7/providers/Microsoft.DataLakeStore/accounts/pyarmadls847d11a7?api-version=2016-11-01 response: body: {string: ''} headers: - Cache-Control: [no-cache] - Connection: [close] - Content-Length: ['0'] - Date: ['Mon, 12 Feb 2018 21:26:52 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-AspNet-Version: [4.0.30319] - X-Powered-By: [ASP.NET] - x-ms-correlation-request-id: [76ac1c39-b96a-46ae-a1e8-53ffafaada79] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [f7928427-dbd8-4313-8788-1e22afec871d] - x-ms-routing-request-id: ['WESTUS2:20180212T212652Z:76ac1c39-b96a-46ae-a1e8-53ffafaada79'] + cache-control: [no-cache] + content-length: ['0'] + date: ['Mon, 11 Jun 2018 06:17:32 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14998'] + x-powered-by: [ASP.NET] status: {code: 200, message: OK} version: 1 diff --git a/azure-mgmt-datalake-store/tests/recordings/test_mgmt_datalake_store.test_vnet_operations.yaml b/azure-mgmt-datalake-store/tests/recordings/test_mgmt_datalake_store.test_vnet_operations.yaml new file mode 100644 index 000000000000..1ef1feeec345 --- /dev/null +++ b/azure-mgmt-datalake-store/tests/recordings/test_mgmt_datalake_store.test_vnet_operations.yaml @@ -0,0 +1,180 @@ +interactions: +- request: + body: 'b''b\''b\\\''b\\\\\\\''{"location": "eastus2", "properties": {"virtualNetworkRules": + [{"name": "vnetrule1ab2612a4", "properties": {"subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.Network/virtualNetworks/lewuVNET/subnets/default"}}], + "firewallState": "Enabled", "firewallAllowAzureIps": "Enabled"}}\\\\\\\''\\\''\''''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['334'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.DataLakeStore/accounts/adlsacctab2612a4?api-version=2016-11-01 + response: + body: {string: '{"properties":{"firewallState":"Enabled","firewallAllowAzureIps":"Enabled","firewallAllowDataLakeAnalytics":"Enabled","firewallRules":[],"virtualNetworkRules":[{"properties":{"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.Network/virtualNetworks/lewuVNET/subnets/default"},"name":"vnetrule1ab2612a4"}],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","dataLakePerformanceTierState":"Disabled","provisioningState":"Succeeded","state":"Active","endpoint":"adlsacctab2612a4.azuredatalakestore.net","accountId":"4c7674bc-2170-4e62-a6e0-877ffcf5f02f","creationTime":"2018-05-31T00:54:06.7380774Z","lastModifiedTime":"2018-06-11T06:17:48.068763Z"},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.DataLakeStore/accounts/adlsacctab2612a4","name":"adlsacctab2612a4","type":"Microsoft.DataLakeStore/accounts"}'} + headers: + cache-control: [no-cache] + content-length: ['1069'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:17:47 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-powered-by: [ASP.NET] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.DataLakeStore/accounts/adlsacctab2612a4?api-version=2016-11-01 + response: + body: {string: '{"properties":{"firewallState":"Enabled","firewallAllowAzureIps":"Enabled","firewallAllowDataLakeAnalytics":"Enabled","firewallRules":[],"virtualNetworkRules":[{"properties":{"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.Network/virtualNetworks/lewuVNET/subnets/default","state":"Active"},"name":"vnetrule1ab2612a4"}],"trustedIdProviderState":"Disabled","trustedIdProviders":[],"encryptionState":"Enabled","encryptionConfig":{"type":"ServiceManaged"},"currentTier":"Consumption","newTier":"Consumption","dataLakePerformanceTierState":"Disabled","provisioningState":"Succeeded","state":"Active","endpoint":"adlsacctab2612a4.azuredatalakestore.net","accountId":"4c7674bc-2170-4e62-a6e0-877ffcf5f02f","creationTime":"2018-05-31T00:54:06.7380774Z","lastModifiedTime":"2018-06-11T06:17:48.068763Z"},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.DataLakeStore/accounts/adlsacctab2612a4","name":"adlsacctab2612a4","type":"Microsoft.DataLakeStore/accounts"}'} + headers: + cache-control: [no-cache] + content-length: ['1086'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:17:48 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.DataLakeStore/accounts/adlsacctab2612a4/virtualNetworkRules/vnetrule1ab2612a4?api-version=2016-11-01 + response: + body: {string: '{"properties":{"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.Network/virtualNetworks/lewuVNET/subnets/default","state":"Active"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.DataLakeStore/accounts/adlsacctab2612a4/virtualNetworkRules/vnetrule1ab2612a4","name":"vnetrule1ab2612a4","type":"Microsoft.DataLakeStore/accounts/virtualNetworkRules"}'} + headers: + cache-control: [no-cache] + content-length: ['459'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:17:49 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] + status: {code: 200, message: OK} +- request: + body: 'b''b\''b\\\''b\\\\\\\''{"properties": {"subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.Network/virtualNetworks/lewuVNET/subnets/updatedSubnetId"}}\\\\\\\''\\\''\''''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['183'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.DataLakeStore/accounts/adlsacctab2612a4/virtualNetworkRules/vnetrule1ab2612a4?api-version=2016-11-01 + response: + body: {string: '{"properties":{"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.Network/virtualNetworks/lewuVNET/subnets/updatedSubnetId"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.DataLakeStore/accounts/adlsacctab2612a4/virtualNetworkRules/vnetrule1ab2612a4","name":"vnetrule1ab2612a4","type":"Microsoft.DataLakeStore/accounts/virtualNetworkRules"}'} + headers: + cache-control: [no-cache] + content-length: ['450'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:17:52 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-powered-by: [ASP.NET] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.DataLakeStore/accounts/adlsacctab2612a4/virtualNetworkRules/vnetrule1ab2612a4?api-version=2016-11-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Mon, 11 Jun 2018 06:17:55 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + x-powered-by: [ASP.NET] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.4 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.31 azure-mgmt-datalake-store/2016-11-01 Azure-SDK-For-Python] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lewu-rg/providers/Microsoft.DataLakeStore/accounts/adlsacctab2612a4/virtualNetworkRules/vnetrule1ab2612a4?api-version=2016-11-01 + response: + body: {string: '{"error":{"code":"NestedResourceNotFound","message":"Nested resource + does not exist."}}'} + headers: + cache-control: [no-cache] + content-length: ['87'] + content-type: [application/json] + date: ['Mon, 11 Jun 2018 06:17:56 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] + status: {code: 404, message: Not Found} +version: 1 diff --git a/azure-mgmt-datalake-store/tests/test_mgmt_datalake_store.py b/azure-mgmt-datalake-store/tests/test_mgmt_datalake_store.py index 4ea60f1f60a3..1acc5fd276d1 100644 --- a/azure-mgmt-datalake-store/tests/test_mgmt_datalake_store.py +++ b/azure-mgmt-datalake-store/tests/test_mgmt_datalake_store.py @@ -9,9 +9,12 @@ import azure.mgmt.datalake.store from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer +from devtools_testutils.mgmt_settings_real import get_credentials +from msrestazure.azure_exceptions import CloudError +from azure.mgmt.datalake.store import models # this is the ADL produciton region for now -_REGION = 'East US 2' +_REGION = 'eastus2' class MgmtDataLakeStoreTest(AzureMgmtTestCase): @@ -21,6 +24,88 @@ def setUp(self): azure.mgmt.datalake.store.DataLakeStoreAccountManagementClient ) + @ResourceGroupPreparer(location=_REGION) + def test_vnet_operations(self, location): + account_name = self.get_resource_name('adlsacct') + vnet_rule_name = self.get_resource_name('vnetrule1') + + subscription_id = '9e1f0ab2-2f85-49de-9677-9da6f829b914' + credentials = get_credentials() + + adls_mgmt_account_client = azure.mgmt.datalake.store.DataLakeStoreAccountManagementClient(credentials, subscription_id) + + subnet_id = '/subscriptions/9e1f0ab2-2f85-49de-9677-9da6f829b914/resourceGroups/lewu-rg/providers/Microsoft.Network/virtualNetworks/lewuVNET/subnets/default' + resource_group = 'lewu-rg' + virtual_network_rule = models.CreateVirtualNetworkRuleWithAccountParameters( + name = vnet_rule_name, + subnet_id = subnet_id + ) + + params_create = models.CreateDataLakeStoreAccountParameters( + location = location, + firewall_state = models.FirewallState.enabled, + firewall_allow_azure_ips = models.FirewallAllowAzureIpsState.enabled, + virtual_network_rules = [virtual_network_rule] + ) + + # create and validate an ADLS account + response_create = adls_mgmt_account_client.accounts.create( + resource_group, + account_name, + params_create, + ).result() + self.assertEqual(models.DataLakeStoreAccountStatus.succeeded, response_create.provisioning_state) + + # get the account and ensure that all the values are properly set + response_get = adls_mgmt_account_client.accounts.get( + resource_group, + account_name + ) + + # Validate the account creation process + self.assertEqual(models.DataLakeStoreAccountStatus.succeeded, response_get.provisioning_state) + self.assertEqual(response_get.name, account_name) + + # Validate firewall state + self.assertEqual(models.FirewallState.enabled, response_get.firewall_state) + self.assertEqual(models.FirewallAllowAzureIpsState.enabled, response_get.firewall_allow_azure_ips) + + # Validate virtual network state + self.assertEqual(1, len(response_get.virtual_network_rules)) + self.assertEqual(vnet_rule_name, response_get.virtual_network_rules[0].name) + self.assertEqual(subnet_id, response_get.virtual_network_rules[0].subnet_id) + + vnet_rule = adls_mgmt_account_client.virtual_network_rules.get( + resource_group, + account_name, + vnet_rule_name + ) + self.assertEqual(vnet_rule_name, vnet_rule.name) + self.assertEqual(subnet_id, vnet_rule.subnet_id) + + updated_subnet_id = '/subscriptions/9e1f0ab2-2f85-49de-9677-9da6f829b914/resourceGroups/lewu-rg/providers/Microsoft.Network/virtualNetworks/lewuVNET/subnets/updatedSubnetId' + + # Update the virtual network rule to change the subnetId + vnet_rule = adls_mgmt_account_client.virtual_network_rules.create_or_update( + resource_group, + account_name, + vnet_rule_name, + updated_subnet_id + ) + self.assertEqual(updated_subnet_id, vnet_rule.subnet_id) + + # Remove the virtual network rule and verify it is gone + adls_mgmt_account_client.virtual_network_rules.delete( + resource_group, + account_name, + vnet_rule_name + ) + self.assertRaises(CloudError, lambda: adls_mgmt_account_client.virtual_network_rules.get( + resource_group, + account_name, + vnet_rule_name + )) + @ResourceGroupPreparer(location=_REGION) def test_adls_accounts(self, resource_group, location): # define account params diff --git a/azure-mgmt-datamigration/HISTORY.rst b/azure-mgmt-datamigration/HISTORY.rst index 6c9d66b18f61..bea7a8fb41fd 100644 --- a/azure-mgmt-datamigration/HISTORY.rst +++ b/azure-mgmt-datamigration/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +1.0.0 (2018-06-05) +++++++++++++++++++ + +* Initial stable release + 0.1.0 (2018-04-20) ++++++++++++++++++ diff --git a/azure-mgmt-datamigration/README.rst b/azure-mgmt-datamigration/README.rst index ba01cbc9fb1e..6ec3c65cdb55 100644 --- a/azure-mgmt-datamigration/README.rst +++ b/azure-mgmt-datamigration/README.rst @@ -37,7 +37,7 @@ Usage ===== For code examples, see `Data Migration -`__ +`__ on docs.microsoft.com. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/data_migration_service_client.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/data_migration_service_client.py index 755b25efcf73..e378ec10b4be 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/data_migration_service_client.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/data_migration_service_client.py @@ -88,7 +88,7 @@ def __init__( super(DataMigrationServiceClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-03-31-preview' + self.api_version = '2018-04-19' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py index 6ae5e015ac65..b72ad77faf01 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py @@ -13,15 +13,6 @@ from .tracked_resource_py3 import TrackedResource from .resource_py3 import Resource from .odata_error_py3 import ODataError - from .reportable_exception_py3 import ReportableException - from .validate_migration_input_sql_server_sql_mi_task_output_py3 import ValidateMigrationInputSqlServerSqlMITaskOutput - from .blob_share_py3 import BlobShare - from .file_share_py3 import FileShare - from .migrate_sql_server_sql_mi_database_input_py3 import MigrateSqlServerSqlMIDatabaseInput - from .connection_info_py3 import ConnectionInfo - from .sql_connection_info_py3 import SqlConnectionInfo - from .validate_migration_input_sql_server_sql_mi_task_input_py3 import ValidateMigrationInputSqlServerSqlMITaskInput - from .validate_migration_input_sql_server_sql_mi_task_properties_py3 import ValidateMigrationInputSqlServerSqlMITaskProperties from .validation_error_py3 import ValidationError from .wait_statistics_py3 import WaitStatistics from .execution_statistics_py3 import ExecutionStatistics @@ -33,6 +24,7 @@ from .migration_validation_database_level_result_py3 import MigrationValidationDatabaseLevelResult from .migration_validation_database_summary_result_py3 import MigrationValidationDatabaseSummaryResult from .migration_validation_result_py3 import MigrationValidationResult + from .reportable_exception_py3 import ReportableException from .migrate_sql_server_sql_db_task_output_error_py3 import MigrateSqlServerSqlDbTaskOutputError from .migrate_sql_server_sql_db_task_output_table_level_py3 import MigrateSqlServerSqlDbTaskOutputTableLevel from .data_item_migration_summary_result_py3 import DataItemMigrationSummaryResult @@ -41,20 +33,13 @@ from .database_summary_result_py3 import DatabaseSummaryResult from .migrate_sql_server_sql_db_task_output_migration_level_py3 import MigrateSqlServerSqlDbTaskOutputMigrationLevel from .migrate_sql_server_sql_db_task_output_py3 import MigrateSqlServerSqlDbTaskOutput + from .connection_info_py3 import ConnectionInfo + from .sql_connection_info_py3 import SqlConnectionInfo from .sql_migration_task_input_py3 import SqlMigrationTaskInput from .migration_validation_options_py3 import MigrationValidationOptions from .migrate_sql_server_sql_db_database_input_py3 import MigrateSqlServerSqlDbDatabaseInput from .migrate_sql_server_sql_db_task_input_py3 import MigrateSqlServerSqlDbTaskInput from .migrate_sql_server_sql_db_task_properties_py3 import MigrateSqlServerSqlDbTaskProperties - from .migrate_sql_server_sql_mi_task_output_error_py3 import MigrateSqlServerSqlMITaskOutputError - from .migrate_sql_server_sql_mi_task_output_login_level_py3 import MigrateSqlServerSqlMITaskOutputLoginLevel - from .migrate_sql_server_sql_mi_task_output_agent_job_level_py3 import MigrateSqlServerSqlMITaskOutputAgentJobLevel - from .migrate_sql_server_sql_mi_task_output_database_level_py3 import MigrateSqlServerSqlMITaskOutputDatabaseLevel - from .start_migration_scenario_server_role_result_py3 import StartMigrationScenarioServerRoleResult - from .migrate_sql_server_sql_mi_task_output_migration_level_py3 import MigrateSqlServerSqlMITaskOutputMigrationLevel - from .migrate_sql_server_sql_mi_task_output_py3 import MigrateSqlServerSqlMITaskOutput - from .migrate_sql_server_sql_mi_task_input_py3 import MigrateSqlServerSqlMITaskInput - from .migrate_sql_server_sql_mi_task_properties_py3 import MigrateSqlServerSqlMITaskProperties from .database_table_py3 import DatabaseTable from .get_user_tables_sql_task_output_py3 import GetUserTablesSqlTaskOutput from .get_user_tables_sql_task_input_py3 import GetUserTablesSqlTaskInput @@ -62,9 +47,6 @@ from .connect_to_target_sql_db_task_output_py3 import ConnectToTargetSqlDbTaskOutput from .connect_to_target_sql_db_task_input_py3 import ConnectToTargetSqlDbTaskInput from .connect_to_target_sql_db_task_properties_py3 import ConnectToTargetSqlDbTaskProperties - from .connect_to_target_sql_mi_task_output_py3 import ConnectToTargetSqlMITaskOutput - from .connect_to_target_sql_mi_task_input_py3 import ConnectToTargetSqlMITaskInput - from .connect_to_target_sql_mi_task_properties_py3 import ConnectToTargetSqlMITaskProperties from .migration_eligibility_info_py3 import MigrationEligibilityInfo from .connect_to_source_sql_server_task_output_agent_job_level_py3 import ConnectToSourceSqlServerTaskOutputAgentJobLevel from .connect_to_source_sql_server_task_output_login_level_py3 import ConnectToSourceSqlServerTaskOutputLoginLevel @@ -101,21 +83,15 @@ from .migration_table_metadata_py3 import MigrationTableMetadata from .data_migration_project_metadata_py3 import DataMigrationProjectMetadata from .data_migration_error_py3 import DataMigrationError + from .file_share_py3 import FileShare from .database_file_input_py3 import DatabaseFileInput from .migrate_sql_server_sql_server_database_input_py3 import MigrateSqlServerSqlServerDatabaseInput + from .blob_share_py3 import BlobShare + from .start_migration_scenario_server_role_result_py3 import StartMigrationScenarioServerRoleResult except (SyntaxError, ImportError): from .tracked_resource import TrackedResource from .resource import Resource from .odata_error import ODataError - from .reportable_exception import ReportableException - from .validate_migration_input_sql_server_sql_mi_task_output import ValidateMigrationInputSqlServerSqlMITaskOutput - from .blob_share import BlobShare - from .file_share import FileShare - from .migrate_sql_server_sql_mi_database_input import MigrateSqlServerSqlMIDatabaseInput - from .connection_info import ConnectionInfo - from .sql_connection_info import SqlConnectionInfo - from .validate_migration_input_sql_server_sql_mi_task_input import ValidateMigrationInputSqlServerSqlMITaskInput - from .validate_migration_input_sql_server_sql_mi_task_properties import ValidateMigrationInputSqlServerSqlMITaskProperties from .validation_error import ValidationError from .wait_statistics import WaitStatistics from .execution_statistics import ExecutionStatistics @@ -127,6 +103,7 @@ from .migration_validation_database_level_result import MigrationValidationDatabaseLevelResult from .migration_validation_database_summary_result import MigrationValidationDatabaseSummaryResult from .migration_validation_result import MigrationValidationResult + from .reportable_exception import ReportableException from .migrate_sql_server_sql_db_task_output_error import MigrateSqlServerSqlDbTaskOutputError from .migrate_sql_server_sql_db_task_output_table_level import MigrateSqlServerSqlDbTaskOutputTableLevel from .data_item_migration_summary_result import DataItemMigrationSummaryResult @@ -135,20 +112,13 @@ from .database_summary_result import DatabaseSummaryResult from .migrate_sql_server_sql_db_task_output_migration_level import MigrateSqlServerSqlDbTaskOutputMigrationLevel from .migrate_sql_server_sql_db_task_output import MigrateSqlServerSqlDbTaskOutput + from .connection_info import ConnectionInfo + from .sql_connection_info import SqlConnectionInfo from .sql_migration_task_input import SqlMigrationTaskInput from .migration_validation_options import MigrationValidationOptions from .migrate_sql_server_sql_db_database_input import MigrateSqlServerSqlDbDatabaseInput from .migrate_sql_server_sql_db_task_input import MigrateSqlServerSqlDbTaskInput from .migrate_sql_server_sql_db_task_properties import MigrateSqlServerSqlDbTaskProperties - from .migrate_sql_server_sql_mi_task_output_error import MigrateSqlServerSqlMITaskOutputError - from .migrate_sql_server_sql_mi_task_output_login_level import MigrateSqlServerSqlMITaskOutputLoginLevel - from .migrate_sql_server_sql_mi_task_output_agent_job_level import MigrateSqlServerSqlMITaskOutputAgentJobLevel - from .migrate_sql_server_sql_mi_task_output_database_level import MigrateSqlServerSqlMITaskOutputDatabaseLevel - from .start_migration_scenario_server_role_result import StartMigrationScenarioServerRoleResult - from .migrate_sql_server_sql_mi_task_output_migration_level import MigrateSqlServerSqlMITaskOutputMigrationLevel - from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput - from .migrate_sql_server_sql_mi_task_input import MigrateSqlServerSqlMITaskInput - from .migrate_sql_server_sql_mi_task_properties import MigrateSqlServerSqlMITaskProperties from .database_table import DatabaseTable from .get_user_tables_sql_task_output import GetUserTablesSqlTaskOutput from .get_user_tables_sql_task_input import GetUserTablesSqlTaskInput @@ -156,9 +126,6 @@ from .connect_to_target_sql_db_task_output import ConnectToTargetSqlDbTaskOutput from .connect_to_target_sql_db_task_input import ConnectToTargetSqlDbTaskInput from .connect_to_target_sql_db_task_properties import ConnectToTargetSqlDbTaskProperties - from .connect_to_target_sql_mi_task_output import ConnectToTargetSqlMITaskOutput - from .connect_to_target_sql_mi_task_input import ConnectToTargetSqlMITaskInput - from .connect_to_target_sql_mi_task_properties import ConnectToTargetSqlMITaskProperties from .migration_eligibility_info import MigrationEligibilityInfo from .connect_to_source_sql_server_task_output_agent_job_level import ConnectToSourceSqlServerTaskOutputAgentJobLevel from .connect_to_source_sql_server_task_output_login_level import ConnectToSourceSqlServerTaskOutputLoginLevel @@ -195,8 +162,11 @@ from .migration_table_metadata import MigrationTableMetadata from .data_migration_project_metadata import DataMigrationProjectMetadata from .data_migration_error import DataMigrationError + from .file_share import FileShare from .database_file_input import DatabaseFileInput from .migrate_sql_server_sql_server_database_input import MigrateSqlServerSqlServerDatabaseInput + from .blob_share import BlobShare + from .start_migration_scenario_server_role_result import StartMigrationScenarioServerRoleResult from .resource_sku_paged import ResourceSkuPaged from .available_service_sku_paged import AvailableServiceSkuPaged from .data_migration_service_paged import DataMigrationServicePaged @@ -205,7 +175,6 @@ from .quota_paged import QuotaPaged from .service_operation_paged import ServiceOperationPaged from .data_migration_service_client_enums import ( - AuthenticationType, ValidationStatus, Severity, UpdateActionType, @@ -213,7 +182,7 @@ MigrationState, DatabaseMigrationStage, MigrationStatus, - LoginMigrationStage, + AuthenticationType, LoginType, DatabaseState, DatabaseCompatLevel, @@ -230,21 +199,13 @@ ResourceSkuRestrictionsReasonCode, ResourceSkuCapacityScaleType, ErrorType, + LoginMigrationStage, ) __all__ = [ 'TrackedResource', 'Resource', 'ODataError', - 'ReportableException', - 'ValidateMigrationInputSqlServerSqlMITaskOutput', - 'BlobShare', - 'FileShare', - 'MigrateSqlServerSqlMIDatabaseInput', - 'ConnectionInfo', - 'SqlConnectionInfo', - 'ValidateMigrationInputSqlServerSqlMITaskInput', - 'ValidateMigrationInputSqlServerSqlMITaskProperties', 'ValidationError', 'WaitStatistics', 'ExecutionStatistics', @@ -256,6 +217,7 @@ 'MigrationValidationDatabaseLevelResult', 'MigrationValidationDatabaseSummaryResult', 'MigrationValidationResult', + 'ReportableException', 'MigrateSqlServerSqlDbTaskOutputError', 'MigrateSqlServerSqlDbTaskOutputTableLevel', 'DataItemMigrationSummaryResult', @@ -264,20 +226,13 @@ 'DatabaseSummaryResult', 'MigrateSqlServerSqlDbTaskOutputMigrationLevel', 'MigrateSqlServerSqlDbTaskOutput', + 'ConnectionInfo', + 'SqlConnectionInfo', 'SqlMigrationTaskInput', 'MigrationValidationOptions', 'MigrateSqlServerSqlDbDatabaseInput', 'MigrateSqlServerSqlDbTaskInput', 'MigrateSqlServerSqlDbTaskProperties', - 'MigrateSqlServerSqlMITaskOutputError', - 'MigrateSqlServerSqlMITaskOutputLoginLevel', - 'MigrateSqlServerSqlMITaskOutputAgentJobLevel', - 'MigrateSqlServerSqlMITaskOutputDatabaseLevel', - 'StartMigrationScenarioServerRoleResult', - 'MigrateSqlServerSqlMITaskOutputMigrationLevel', - 'MigrateSqlServerSqlMITaskOutput', - 'MigrateSqlServerSqlMITaskInput', - 'MigrateSqlServerSqlMITaskProperties', 'DatabaseTable', 'GetUserTablesSqlTaskOutput', 'GetUserTablesSqlTaskInput', @@ -285,9 +240,6 @@ 'ConnectToTargetSqlDbTaskOutput', 'ConnectToTargetSqlDbTaskInput', 'ConnectToTargetSqlDbTaskProperties', - 'ConnectToTargetSqlMITaskOutput', - 'ConnectToTargetSqlMITaskInput', - 'ConnectToTargetSqlMITaskProperties', 'MigrationEligibilityInfo', 'ConnectToSourceSqlServerTaskOutputAgentJobLevel', 'ConnectToSourceSqlServerTaskOutputLoginLevel', @@ -324,8 +276,11 @@ 'MigrationTableMetadata', 'DataMigrationProjectMetadata', 'DataMigrationError', + 'FileShare', 'DatabaseFileInput', 'MigrateSqlServerSqlServerDatabaseInput', + 'BlobShare', + 'StartMigrationScenarioServerRoleResult', 'ResourceSkuPaged', 'AvailableServiceSkuPaged', 'DataMigrationServicePaged', @@ -333,7 +288,6 @@ 'ProjectPaged', 'QuotaPaged', 'ServiceOperationPaged', - 'AuthenticationType', 'ValidationStatus', 'Severity', 'UpdateActionType', @@ -341,7 +295,7 @@ 'MigrationState', 'DatabaseMigrationStage', 'MigrationStatus', - 'LoginMigrationStage', + 'AuthenticationType', 'LoginType', 'DatabaseState', 'DatabaseCompatLevel', @@ -358,4 +312,5 @@ 'ResourceSkuRestrictionsReasonCode', 'ResourceSkuCapacityScaleType', 'ErrorType', + 'LoginMigrationStage', ] diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input.py index ffea39a8f531..a7cc0d41dd7e 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input.py @@ -41,8 +41,8 @@ class ConnectToSourceSqlServerTaskInput(Model): _attribute_map = { 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, 'check_permissions_group': {'key': 'checkPermissionsGroup', 'type': 'str'}, - 'collect_logins': {'key': 'CollectLogins', 'type': 'bool'}, - 'collect_agent_jobs': {'key': 'CollectAgentJobs', 'type': 'bool'}, + 'collect_logins': {'key': 'collectLogins', 'type': 'bool'}, + 'collect_agent_jobs': {'key': 'collectAgentJobs', 'type': 'bool'}, } def __init__(self, **kwargs): diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input_py3.py index 0546c68bfad5..db247d3cb17b 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input_py3.py @@ -41,8 +41,8 @@ class ConnectToSourceSqlServerTaskInput(Model): _attribute_map = { 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, 'check_permissions_group': {'key': 'checkPermissionsGroup', 'type': 'str'}, - 'collect_logins': {'key': 'CollectLogins', 'type': 'bool'}, - 'collect_agent_jobs': {'key': 'CollectAgentJobs', 'type': 'bool'}, + 'collect_logins': {'key': 'collectLogins', 'type': 'bool'}, + 'collect_agent_jobs': {'key': 'collectAgentJobs', 'type': 'bool'}, } def __init__(self, *, source_connection_info, check_permissions_group=None, collect_logins: bool=False, collect_agent_jobs: bool=False, **kwargs) -> None: diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level_py3.py index 42fe15a9e52d..2380a3f6ff12 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .connect_to_source_sql_server_task_output import ConnectToSourceSqlServerTaskOutput +from .connect_to_source_sql_server_task_output_py3 import ConnectToSourceSqlServerTaskOutput class ConnectToSourceSqlServerTaskOutputAgentJobLevel(ConnectToSourceSqlServerTaskOutput): diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_database_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_database_level_py3.py index 6ad882d8d5f3..86308636fb90 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_database_level_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_database_level_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .connect_to_source_sql_server_task_output import ConnectToSourceSqlServerTaskOutput +from .connect_to_source_sql_server_task_output_py3 import ConnectToSourceSqlServerTaskOutput class ConnectToSourceSqlServerTaskOutputDatabaseLevel(ConnectToSourceSqlServerTaskOutput): diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level_py3.py index 05f9bcf56dd2..a02d6b46a3df 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .connect_to_source_sql_server_task_output import ConnectToSourceSqlServerTaskOutput +from .connect_to_source_sql_server_task_output_py3 import ConnectToSourceSqlServerTaskOutput class ConnectToSourceSqlServerTaskOutputLoginLevel(ConnectToSourceSqlServerTaskOutput): diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level.py index df44d2f07919..e6d060ea8e71 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level.py @@ -56,8 +56,8 @@ class ConnectToSourceSqlServerTaskOutputTaskLevel(ConnectToSourceSqlServerTaskOu 'id': {'key': 'id', 'type': 'str'}, 'result_type': {'key': 'resultType', 'type': 'str'}, 'databases': {'key': 'databases', 'type': '{str}'}, - 'logins': {'key': 'Logins', 'type': '{str}'}, - 'agent_jobs': {'key': 'AgentJobs', 'type': '{str}'}, + 'logins': {'key': 'logins', 'type': '{str}'}, + 'agent_jobs': {'key': 'agentJobs', 'type': '{str}'}, 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level_py3.py index 88fe91e89294..35fda096b09d 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .connect_to_source_sql_server_task_output import ConnectToSourceSqlServerTaskOutput +from .connect_to_source_sql_server_task_output_py3 import ConnectToSourceSqlServerTaskOutput class ConnectToSourceSqlServerTaskOutputTaskLevel(ConnectToSourceSqlServerTaskOutput): @@ -56,8 +56,8 @@ class ConnectToSourceSqlServerTaskOutputTaskLevel(ConnectToSourceSqlServerTaskOu 'id': {'key': 'id', 'type': 'str'}, 'result_type': {'key': 'resultType', 'type': 'str'}, 'databases': {'key': 'databases', 'type': '{str}'}, - 'logins': {'key': 'Logins', 'type': '{str}'}, - 'agent_jobs': {'key': 'AgentJobs', 'type': '{str}'}, + 'logins': {'key': 'logins', 'type': '{str}'}, + 'agent_jobs': {'key': 'agentJobs', 'type': '{str}'}, 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_properties.py index 91a3642127a7..01f6e015c94c 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_properties.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_properties.py @@ -21,8 +21,8 @@ class ConnectToSourceSqlServerTaskProperties(ProjectTaskProperties): All required parameters must be populated in order to send to Azure. - :ivar errors: Array of errors. This is ignored if submitted. - :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :param errors: Array of errors. This is ignored if submitted. + :type errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' @@ -38,7 +38,6 @@ class ConnectToSourceSqlServerTaskProperties(ProjectTaskProperties): """ _validation = { - 'errors': {'readonly': True}, 'state': {'readonly': True}, 'task_type': {'required': True}, 'output': {'readonly': True}, diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_properties_py3.py index 4698d76d96d5..aff6212ab398 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_properties_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_properties_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .project_task_properties import ProjectTaskProperties +from .project_task_properties_py3 import ProjectTaskProperties class ConnectToSourceSqlServerTaskProperties(ProjectTaskProperties): @@ -21,8 +21,8 @@ class ConnectToSourceSqlServerTaskProperties(ProjectTaskProperties): All required parameters must be populated in order to send to Azure. - :ivar errors: Array of errors. This is ignored if submitted. - :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :param errors: Array of errors. This is ignored if submitted. + :type errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' @@ -38,7 +38,6 @@ class ConnectToSourceSqlServerTaskProperties(ProjectTaskProperties): """ _validation = { - 'errors': {'readonly': True}, 'state': {'readonly': True}, 'task_type': {'required': True}, 'output': {'readonly': True}, @@ -52,8 +51,8 @@ class ConnectToSourceSqlServerTaskProperties(ProjectTaskProperties): 'output': {'key': 'output', 'type': '[ConnectToSourceSqlServerTaskOutput]'}, } - def __init__(self, *, input=None, **kwargs) -> None: - super(ConnectToSourceSqlServerTaskProperties, self).__init__(**kwargs) + def __init__(self, *, errors=None, input=None, **kwargs) -> None: + super(ConnectToSourceSqlServerTaskProperties, self).__init__(errors=errors, **kwargs) self.input = input self.output = None self.task_type = 'ConnectToSource.SqlServer' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_db_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_db_task_properties.py index 7ba8885f046e..4f92302d5253 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_db_task_properties.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_db_task_properties.py @@ -21,8 +21,8 @@ class ConnectToTargetSqlDbTaskProperties(ProjectTaskProperties): All required parameters must be populated in order to send to Azure. - :ivar errors: Array of errors. This is ignored if submitted. - :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :param errors: Array of errors. This is ignored if submitted. + :type errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' @@ -38,7 +38,6 @@ class ConnectToTargetSqlDbTaskProperties(ProjectTaskProperties): """ _validation = { - 'errors': {'readonly': True}, 'state': {'readonly': True}, 'task_type': {'required': True}, 'output': {'readonly': True}, diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_db_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_db_task_properties_py3.py index 4e7c44b85e5c..5c8b6a2eaadf 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_db_task_properties_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_db_task_properties_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .project_task_properties import ProjectTaskProperties +from .project_task_properties_py3 import ProjectTaskProperties class ConnectToTargetSqlDbTaskProperties(ProjectTaskProperties): @@ -21,8 +21,8 @@ class ConnectToTargetSqlDbTaskProperties(ProjectTaskProperties): All required parameters must be populated in order to send to Azure. - :ivar errors: Array of errors. This is ignored if submitted. - :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :param errors: Array of errors. This is ignored if submitted. + :type errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' @@ -38,7 +38,6 @@ class ConnectToTargetSqlDbTaskProperties(ProjectTaskProperties): """ _validation = { - 'errors': {'readonly': True}, 'state': {'readonly': True}, 'task_type': {'required': True}, 'output': {'readonly': True}, @@ -52,8 +51,8 @@ class ConnectToTargetSqlDbTaskProperties(ProjectTaskProperties): 'output': {'key': 'output', 'type': '[ConnectToTargetSqlDbTaskOutput]'}, } - def __init__(self, *, input=None, **kwargs) -> None: - super(ConnectToTargetSqlDbTaskProperties, self).__init__(**kwargs) + def __init__(self, *, errors=None, input=None, **kwargs) -> None: + super(ConnectToTargetSqlDbTaskProperties, self).__init__(errors=errors, **kwargs) self.input = input self.output = None self.task_type = 'ConnectToTarget.SqlDb' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_input_py3.py deleted file mode 100644 index 873c751e9c5c..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_input_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConnectToTargetSqlMITaskInput(Model): - """Input for the task that validates connection to Azure SQL Database Managed - Instance. - - All required parameters must be populated in order to send to Azure. - - :param target_connection_info: Required. Connection information for target - SQL Server - :type target_connection_info: - ~azure.mgmt.datamigration.models.SqlConnectionInfo - """ - - _validation = { - 'target_connection_info': {'required': True}, - } - - _attribute_map = { - 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, - } - - def __init__(self, *, target_connection_info, **kwargs) -> None: - super(ConnectToTargetSqlMITaskInput, self).__init__(**kwargs) - self.target_connection_info = target_connection_info diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_output.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_output.py deleted file mode 100644 index 8476f1a067db..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_output.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConnectToTargetSqlMITaskOutput(Model): - """Output for the task that validates connection to Azure SQL Database Managed - Instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Result identifier - :vartype id: str - :ivar target_server_version: Target server version - :vartype target_server_version: str - :ivar target_server_brand_version: Target server brand version - :vartype target_server_brand_version: str - :ivar logins: List of logins on the target server. - :vartype logins: list[str] - :ivar agent_jobs: List of agent jobs on the target server. - :vartype agent_jobs: list[str] - :ivar validation_errors: Validation errors - :vartype validation_errors: - list[~azure.mgmt.datamigration.models.ReportableException] - """ - - _validation = { - 'id': {'readonly': True}, - 'target_server_version': {'readonly': True}, - 'target_server_brand_version': {'readonly': True}, - 'logins': {'readonly': True}, - 'agent_jobs': {'readonly': True}, - 'validation_errors': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, - 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, - 'logins': {'key': 'Logins', 'type': '[str]'}, - 'agent_jobs': {'key': 'AgentJobs', 'type': '[str]'}, - 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, - } - - def __init__(self, **kwargs): - super(ConnectToTargetSqlMITaskOutput, self).__init__(**kwargs) - self.id = None - self.target_server_version = None - self.target_server_brand_version = None - self.logins = None - self.agent_jobs = None - self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_output_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_output_py3.py deleted file mode 100644 index 3befd75e28da..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_output_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConnectToTargetSqlMITaskOutput(Model): - """Output for the task that validates connection to Azure SQL Database Managed - Instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Result identifier - :vartype id: str - :ivar target_server_version: Target server version - :vartype target_server_version: str - :ivar target_server_brand_version: Target server brand version - :vartype target_server_brand_version: str - :ivar logins: List of logins on the target server. - :vartype logins: list[str] - :ivar agent_jobs: List of agent jobs on the target server. - :vartype agent_jobs: list[str] - :ivar validation_errors: Validation errors - :vartype validation_errors: - list[~azure.mgmt.datamigration.models.ReportableException] - """ - - _validation = { - 'id': {'readonly': True}, - 'target_server_version': {'readonly': True}, - 'target_server_brand_version': {'readonly': True}, - 'logins': {'readonly': True}, - 'agent_jobs': {'readonly': True}, - 'validation_errors': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, - 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, - 'logins': {'key': 'Logins', 'type': '[str]'}, - 'agent_jobs': {'key': 'AgentJobs', 'type': '[str]'}, - 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, - } - - def __init__(self, **kwargs) -> None: - super(ConnectToTargetSqlMITaskOutput, self).__init__(**kwargs) - self.id = None - self.target_server_version = None - self.target_server_brand_version = None - self.logins = None - self.agent_jobs = None - self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties.py deleted file mode 100644 index 0cb955b2bebc..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .project_task_properties import ProjectTaskProperties - - -class ConnectToTargetSqlMITaskProperties(ProjectTaskProperties): - """Properties for the task that validates connection to Azure SQL Database - Managed Instance. - - 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 errors: Array of errors. This is ignored if submitted. - :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] - :ivar state: The state of the task. This is ignored if submitted. Possible - values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', - 'Failed', 'FailedInputValidation', 'Faulted' - :vartype state: str or ~azure.mgmt.datamigration.models.TaskState - :param task_type: Required. Constant filled by server. - :type task_type: str - :param input: Task input - :type input: - ~azure.mgmt.datamigration.models.ConnectToTargetSqlMITaskInput - :ivar output: Task output. This is ignored if submitted. - :vartype output: - list[~azure.mgmt.datamigration.models.ConnectToTargetSqlMITaskOutput] - """ - - _validation = { - 'errors': {'readonly': True}, - 'state': {'readonly': True}, - 'task_type': {'required': True}, - 'output': {'readonly': True}, - } - - _attribute_map = { - 'errors': {'key': 'errors', 'type': '[ODataError]'}, - 'state': {'key': 'state', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'input': {'key': 'input', 'type': 'ConnectToTargetSqlMITaskInput'}, - 'output': {'key': 'output', 'type': '[ConnectToTargetSqlMITaskOutput]'}, - } - - def __init__(self, **kwargs): - super(ConnectToTargetSqlMITaskProperties, self).__init__(**kwargs) - self.input = kwargs.get('input', None) - self.output = None - self.task_type = 'ConnectToTarget.AzureSqlDbMI' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties_py3.py deleted file mode 100644 index 05130b369de6..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .project_task_properties import ProjectTaskProperties - - -class ConnectToTargetSqlMITaskProperties(ProjectTaskProperties): - """Properties for the task that validates connection to Azure SQL Database - Managed Instance. - - 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 errors: Array of errors. This is ignored if submitted. - :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] - :ivar state: The state of the task. This is ignored if submitted. Possible - values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', - 'Failed', 'FailedInputValidation', 'Faulted' - :vartype state: str or ~azure.mgmt.datamigration.models.TaskState - :param task_type: Required. Constant filled by server. - :type task_type: str - :param input: Task input - :type input: - ~azure.mgmt.datamigration.models.ConnectToTargetSqlMITaskInput - :ivar output: Task output. This is ignored if submitted. - :vartype output: - list[~azure.mgmt.datamigration.models.ConnectToTargetSqlMITaskOutput] - """ - - _validation = { - 'errors': {'readonly': True}, - 'state': {'readonly': True}, - 'task_type': {'required': True}, - 'output': {'readonly': True}, - } - - _attribute_map = { - 'errors': {'key': 'errors', 'type': '[ODataError]'}, - 'state': {'key': 'state', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'input': {'key': 'input', 'type': 'ConnectToTargetSqlMITaskInput'}, - 'output': {'key': 'output', 'type': '[ConnectToTargetSqlMITaskOutput]'}, - } - - def __init__(self, *, input=None, **kwargs) -> None: - super(ConnectToTargetSqlMITaskProperties, self).__init__(**kwargs) - self.input = input - self.output = None - self.task_type = 'ConnectToTarget.AzureSqlDbMI' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_integrity_validation_result.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_integrity_validation_result.py index 7b82ac28cc97..2a3c8b040b67 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_integrity_validation_result.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_integrity_validation_result.py @@ -15,14 +15,22 @@ class DataIntegrityValidationResult(Model): """Results for checksum based Data Integrity validation results. - :param failed_objects: List of failed table names of source and target - pair - :type failed_objects: dict[str, str] - :param validation_errors: List of errors that happened while performing + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar failed_objects: List of failed table names of source and target pair + :vartype failed_objects: dict[str, str] + :ivar validation_errors: List of errors that happened while performing data integrity validation - :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError + :vartype validation_errors: + ~azure.mgmt.datamigration.models.ValidationError """ + _validation = { + 'failed_objects': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + _attribute_map = { 'failed_objects': {'key': 'failedObjects', 'type': '{str}'}, 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, @@ -30,5 +38,5 @@ class DataIntegrityValidationResult(Model): def __init__(self, **kwargs): super(DataIntegrityValidationResult, self).__init__(**kwargs) - self.failed_objects = kwargs.get('failed_objects', None) - self.validation_errors = kwargs.get('validation_errors', None) + self.failed_objects = None + self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_integrity_validation_result_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_integrity_validation_result_py3.py index 026a2b642eb8..2a0f4f51dd4e 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_integrity_validation_result_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_integrity_validation_result_py3.py @@ -15,20 +15,28 @@ class DataIntegrityValidationResult(Model): """Results for checksum based Data Integrity validation results. - :param failed_objects: List of failed table names of source and target - pair - :type failed_objects: dict[str, str] - :param validation_errors: List of errors that happened while performing + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar failed_objects: List of failed table names of source and target pair + :vartype failed_objects: dict[str, str] + :ivar validation_errors: List of errors that happened while performing data integrity validation - :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError + :vartype validation_errors: + ~azure.mgmt.datamigration.models.ValidationError """ + _validation = { + 'failed_objects': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + _attribute_map = { 'failed_objects': {'key': 'failedObjects', 'type': '{str}'}, 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, } - def __init__(self, *, failed_objects=None, validation_errors=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(DataIntegrityValidationResult, self).__init__(**kwargs) - self.failed_objects = failed_objects - self.validation_errors = validation_errors + self.failed_objects = None + self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_error.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_error.py index 110159c5b509..7db00f94bcd5 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_error.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_error.py @@ -20,7 +20,8 @@ class DataMigrationError(Model): :ivar message: Error description :vartype message: str - :param type: Possible values include: 'Default', 'Warning', 'Error' + :param type: Type of error. Possible values include: 'Default', 'Warning', + 'Error' :type type: str or ~azure.mgmt.datamigration.models.ErrorType """ diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_error_py3.py index 9cb1fa6fc5cb..c2d670e0227f 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_error_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_error_py3.py @@ -20,7 +20,8 @@ class DataMigrationError(Model): :ivar message: Error description :vartype message: str - :param type: Possible values include: 'Default', 'Warning', 'Error' + :param type: Type of error. Possible values include: 'Default', 'Warning', + 'Error' :type type: str or ~azure.mgmt.datamigration.models.ErrorType """ diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_service.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_service.py index 0d55893b1dc1..9524dabd3b16 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_service.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_service.py @@ -13,7 +13,7 @@ class DataMigrationService(TrackedResource): - """A Data Migration Service resource. + """A Database Migration Service resource. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_service_client_enums.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_service_client_enums.py index ce5c348948bf..d239d78e1fbb 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_service_client_enums.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_service_client_enums.py @@ -12,15 +12,6 @@ from enum import Enum -class AuthenticationType(str, Enum): - - none = "None" - windows_authentication = "WindowsAuthentication" - sql_authentication = "SqlAuthentication" - active_directory_integrated = "ActiveDirectoryIntegrated" - active_directory_password = "ActiveDirectoryPassword" - - class ValidationStatus(str, Enum): default = "Default" @@ -91,17 +82,13 @@ class MigrationStatus(str, Enum): completed_with_warnings = "CompletedWithWarnings" -class LoginMigrationStage(str, Enum): +class AuthenticationType(str, Enum): none = "None" - initialize = "Initialize" - login_migration = "LoginMigration" - establish_user_mapping = "EstablishUserMapping" - assign_role_membership = "AssignRoleMembership" - assign_role_ownership = "AssignRoleOwnership" - establish_server_permissions = "EstablishServerPermissions" - establish_object_permissions = "EstablishObjectPermissions" - completed = "Completed" + windows_authentication = "WindowsAuthentication" + sql_authentication = "SqlAuthentication" + active_directory_integrated = "ActiveDirectoryIntegrated" + active_directory_password = "ActiveDirectoryPassword" class LoginType(str, Enum): @@ -183,7 +170,6 @@ class ServiceProvisioningState(str, Enum): class ProjectTargetPlatform(str, Enum): sqldb = "SQLDB" - sqlmi = "SQLMI" unknown = "Unknown" @@ -235,3 +221,16 @@ class ErrorType(str, Enum): default = "Default" warning = "Warning" error = "Error" + + +class LoginMigrationStage(str, Enum): + + none = "None" + initialize = "Initialize" + login_migration = "LoginMigration" + establish_user_mapping = "EstablishUserMapping" + assign_role_membership = "AssignRoleMembership" + assign_role_ownership = "AssignRoleOwnership" + establish_server_permissions = "EstablishServerPermissions" + establish_object_permissions = "EstablishObjectPermissions" + completed = "Completed" diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_service_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_service_py3.py index fa7d686efe30..126c1bc99cce 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_service_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_service_py3.py @@ -9,11 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .tracked_resource import TrackedResource +from .tracked_resource_py3 import TrackedResource class DataMigrationService(TrackedResource): - """A Data Migration Service resource. + """A Database Migration Service resource. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database.py index 527ea44ee80c..a098e7c6a412 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database.py @@ -15,50 +15,73 @@ class Database(Model): """Information about a single database. - :param id: Unique identifier for the database - :type id: str - :param name: Name of the database - :type name: str - :param compatibility_level: SQL Server compatibility level of database. + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Unique identifier for the database + :vartype id: str + :ivar name: Name of the database + :vartype name: str + :ivar compatibility_level: SQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140' - :type compatibility_level: str or + :vartype compatibility_level: str or ~azure.mgmt.datamigration.models.DatabaseCompatLevel - :param collation: Collation name of the database - :type collation: str - :param server_name: Name of the server - :type server_name: str - :param fqdn: Fully qualified name - :type fqdn: str - :param install_id: Install id of the database - :type install_id: str - :param server_version: Version of the server - :type server_version: str - :param server_edition: Edition of the server - :type server_edition: str - :param server_level: Product level of the server (RTM, SP, CTP). - :type server_level: str - :param server_default_data_path: Default path of the data files - :type server_default_data_path: str - :param server_default_log_path: Default path of the log files - :type server_default_log_path: str - :param server_default_backup_path: Default path of the backup folder - :type server_default_backup_path: str - :param server_core_count: Number of cores on the server - :type server_core_count: int - :param server_visible_online_core_count: Number of cores on the server - that have VISIBLE ONLINE status - :type server_visible_online_core_count: int - :param database_state: State of the database. Possible values include: + :ivar collation: Collation name of the database + :vartype collation: str + :ivar server_name: Name of the server + :vartype server_name: str + :ivar fqdn: Fully qualified name + :vartype fqdn: str + :ivar install_id: Install id of the database + :vartype install_id: str + :ivar server_version: Version of the server + :vartype server_version: str + :ivar server_edition: Edition of the server + :vartype server_edition: str + :ivar server_level: Product level of the server (RTM, SP, CTP). + :vartype server_level: str + :ivar server_default_data_path: Default path of the data files + :vartype server_default_data_path: str + :ivar server_default_log_path: Default path of the log files + :vartype server_default_log_path: str + :ivar server_default_backup_path: Default path of the backup folder + :vartype server_default_backup_path: str + :ivar server_core_count: Number of cores on the server + :vartype server_core_count: int + :ivar server_visible_online_core_count: Number of cores on the server that + have VISIBLE ONLINE status + :vartype server_visible_online_core_count: int + :ivar database_state: State of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary' - :type database_state: str or + :vartype database_state: str or ~azure.mgmt.datamigration.models.DatabaseState - :param server_id: The unique Server Id - :type server_id: str + :ivar server_id: The unique Server Id + :vartype server_id: str """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'compatibility_level': {'readonly': True}, + 'collation': {'readonly': True}, + 'server_name': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'install_id': {'readonly': True}, + 'server_version': {'readonly': True}, + 'server_edition': {'readonly': True}, + 'server_level': {'readonly': True}, + 'server_default_data_path': {'readonly': True}, + 'server_default_log_path': {'readonly': True}, + 'server_default_backup_path': {'readonly': True}, + 'server_core_count': {'readonly': True}, + 'server_visible_online_core_count': {'readonly': True}, + 'database_state': {'readonly': True}, + 'server_id': {'readonly': True}, + } + _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -81,20 +104,20 @@ class Database(Model): def __init__(self, **kwargs): super(Database, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.compatibility_level = kwargs.get('compatibility_level', None) - self.collation = kwargs.get('collation', None) - self.server_name = kwargs.get('server_name', None) - self.fqdn = kwargs.get('fqdn', None) - self.install_id = kwargs.get('install_id', None) - self.server_version = kwargs.get('server_version', None) - self.server_edition = kwargs.get('server_edition', None) - self.server_level = kwargs.get('server_level', None) - self.server_default_data_path = kwargs.get('server_default_data_path', None) - self.server_default_log_path = kwargs.get('server_default_log_path', None) - self.server_default_backup_path = kwargs.get('server_default_backup_path', None) - self.server_core_count = kwargs.get('server_core_count', None) - self.server_visible_online_core_count = kwargs.get('server_visible_online_core_count', None) - self.database_state = kwargs.get('database_state', None) - self.server_id = kwargs.get('server_id', None) + self.id = None + self.name = None + self.compatibility_level = None + self.collation = None + self.server_name = None + self.fqdn = None + self.install_id = None + self.server_version = None + self.server_edition = None + self.server_level = None + self.server_default_data_path = None + self.server_default_log_path = None + self.server_default_backup_path = None + self.server_core_count = None + self.server_visible_online_core_count = None + self.database_state = None + self.server_id = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_py3.py index 4f11b4f238c7..b8795479e407 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_py3.py @@ -15,50 +15,73 @@ class Database(Model): """Information about a single database. - :param id: Unique identifier for the database - :type id: str - :param name: Name of the database - :type name: str - :param compatibility_level: SQL Server compatibility level of database. + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Unique identifier for the database + :vartype id: str + :ivar name: Name of the database + :vartype name: str + :ivar compatibility_level: SQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140' - :type compatibility_level: str or + :vartype compatibility_level: str or ~azure.mgmt.datamigration.models.DatabaseCompatLevel - :param collation: Collation name of the database - :type collation: str - :param server_name: Name of the server - :type server_name: str - :param fqdn: Fully qualified name - :type fqdn: str - :param install_id: Install id of the database - :type install_id: str - :param server_version: Version of the server - :type server_version: str - :param server_edition: Edition of the server - :type server_edition: str - :param server_level: Product level of the server (RTM, SP, CTP). - :type server_level: str - :param server_default_data_path: Default path of the data files - :type server_default_data_path: str - :param server_default_log_path: Default path of the log files - :type server_default_log_path: str - :param server_default_backup_path: Default path of the backup folder - :type server_default_backup_path: str - :param server_core_count: Number of cores on the server - :type server_core_count: int - :param server_visible_online_core_count: Number of cores on the server - that have VISIBLE ONLINE status - :type server_visible_online_core_count: int - :param database_state: State of the database. Possible values include: + :ivar collation: Collation name of the database + :vartype collation: str + :ivar server_name: Name of the server + :vartype server_name: str + :ivar fqdn: Fully qualified name + :vartype fqdn: str + :ivar install_id: Install id of the database + :vartype install_id: str + :ivar server_version: Version of the server + :vartype server_version: str + :ivar server_edition: Edition of the server + :vartype server_edition: str + :ivar server_level: Product level of the server (RTM, SP, CTP). + :vartype server_level: str + :ivar server_default_data_path: Default path of the data files + :vartype server_default_data_path: str + :ivar server_default_log_path: Default path of the log files + :vartype server_default_log_path: str + :ivar server_default_backup_path: Default path of the backup folder + :vartype server_default_backup_path: str + :ivar server_core_count: Number of cores on the server + :vartype server_core_count: int + :ivar server_visible_online_core_count: Number of cores on the server that + have VISIBLE ONLINE status + :vartype server_visible_online_core_count: int + :ivar database_state: State of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary' - :type database_state: str or + :vartype database_state: str or ~azure.mgmt.datamigration.models.DatabaseState - :param server_id: The unique Server Id - :type server_id: str + :ivar server_id: The unique Server Id + :vartype server_id: str """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'compatibility_level': {'readonly': True}, + 'collation': {'readonly': True}, + 'server_name': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'install_id': {'readonly': True}, + 'server_version': {'readonly': True}, + 'server_edition': {'readonly': True}, + 'server_level': {'readonly': True}, + 'server_default_data_path': {'readonly': True}, + 'server_default_log_path': {'readonly': True}, + 'server_default_backup_path': {'readonly': True}, + 'server_core_count': {'readonly': True}, + 'server_visible_online_core_count': {'readonly': True}, + 'database_state': {'readonly': True}, + 'server_id': {'readonly': True}, + } + _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -79,22 +102,22 @@ class Database(Model): 'server_id': {'key': 'serverId', 'type': 'str'}, } - def __init__(self, *, id: str=None, name: str=None, compatibility_level=None, collation: str=None, server_name: str=None, fqdn: str=None, install_id: str=None, server_version: str=None, server_edition: str=None, server_level: str=None, server_default_data_path: str=None, server_default_log_path: str=None, server_default_backup_path: str=None, server_core_count: int=None, server_visible_online_core_count: int=None, database_state=None, server_id: str=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(Database, self).__init__(**kwargs) - self.id = id - self.name = name - self.compatibility_level = compatibility_level - self.collation = collation - self.server_name = server_name - self.fqdn = fqdn - self.install_id = install_id - self.server_version = server_version - self.server_edition = server_edition - self.server_level = server_level - self.server_default_data_path = server_default_data_path - self.server_default_log_path = server_default_log_path - self.server_default_backup_path = server_default_backup_path - self.server_core_count = server_core_count - self.server_visible_online_core_count = server_visible_online_core_count - self.database_state = database_state - self.server_id = server_id + self.id = None + self.name = None + self.compatibility_level = None + self.collation = None + self.server_name = None + self.fqdn = None + self.install_id = None + self.server_version = None + self.server_edition = None + self.server_level = None + self.server_default_data_path = None + self.server_default_log_path = None + self.server_default_backup_path = None + self.server_core_count = None + self.server_visible_online_core_count = None + self.database_state = None + self.server_id = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_summary_result_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_summary_result_py3.py index f79873cc2707..57212a73673f 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_summary_result_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_summary_result_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .data_item_migration_summary_result import DataItemMigrationSummaryResult +from .data_item_migration_summary_result_py3 import DataItemMigrationSummaryResult class DatabaseSummaryResult(DataItemMigrationSummaryResult): diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/execution_statistics.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/execution_statistics.py index eb2c318820a1..098919cb25a7 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/execution_statistics.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/execution_statistics.py @@ -15,23 +15,34 @@ class ExecutionStatistics(Model): """Description about the errors happen while performing migration validation. - :param execution_count: No. of query executions - :type execution_count: long - :param cpu_time_ms: CPU Time in millisecond(s) for the query execution - :type cpu_time_ms: float - :param elapsed_time_ms: Time taken in millisecond(s) for executing the + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar execution_count: No. of query executions + :vartype execution_count: long + :ivar cpu_time_ms: CPU Time in millisecond(s) for the query execution + :vartype cpu_time_ms: float + :ivar elapsed_time_ms: Time taken in millisecond(s) for executing the query - :type elapsed_time_ms: float + :vartype elapsed_time_ms: float :param wait_stats: Dictionary of sql query execution wait types and the respective statistics :type wait_stats: dict[str, ~azure.mgmt.datamigration.models.WaitStatistics] - :param has_errors: Indicates whether the query resulted in an error - :type has_errors: bool - :param sql_errors: List of sql Errors - :type sql_errors: list[str] + :ivar has_errors: Indicates whether the query resulted in an error + :vartype has_errors: bool + :ivar sql_errors: List of sql Errors + :vartype sql_errors: list[str] """ + _validation = { + 'execution_count': {'readonly': True}, + 'cpu_time_ms': {'readonly': True}, + 'elapsed_time_ms': {'readonly': True}, + 'has_errors': {'readonly': True}, + 'sql_errors': {'readonly': True}, + } + _attribute_map = { 'execution_count': {'key': 'executionCount', 'type': 'long'}, 'cpu_time_ms': {'key': 'cpuTimeMs', 'type': 'float'}, @@ -43,9 +54,9 @@ class ExecutionStatistics(Model): def __init__(self, **kwargs): super(ExecutionStatistics, self).__init__(**kwargs) - self.execution_count = kwargs.get('execution_count', None) - self.cpu_time_ms = kwargs.get('cpu_time_ms', None) - self.elapsed_time_ms = kwargs.get('elapsed_time_ms', None) + self.execution_count = None + self.cpu_time_ms = None + self.elapsed_time_ms = None self.wait_stats = kwargs.get('wait_stats', None) - self.has_errors = kwargs.get('has_errors', None) - self.sql_errors = kwargs.get('sql_errors', None) + self.has_errors = None + self.sql_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/execution_statistics_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/execution_statistics_py3.py index 7fefb7275b2a..f19075a919ff 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/execution_statistics_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/execution_statistics_py3.py @@ -15,23 +15,34 @@ class ExecutionStatistics(Model): """Description about the errors happen while performing migration validation. - :param execution_count: No. of query executions - :type execution_count: long - :param cpu_time_ms: CPU Time in millisecond(s) for the query execution - :type cpu_time_ms: float - :param elapsed_time_ms: Time taken in millisecond(s) for executing the + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar execution_count: No. of query executions + :vartype execution_count: long + :ivar cpu_time_ms: CPU Time in millisecond(s) for the query execution + :vartype cpu_time_ms: float + :ivar elapsed_time_ms: Time taken in millisecond(s) for executing the query - :type elapsed_time_ms: float + :vartype elapsed_time_ms: float :param wait_stats: Dictionary of sql query execution wait types and the respective statistics :type wait_stats: dict[str, ~azure.mgmt.datamigration.models.WaitStatistics] - :param has_errors: Indicates whether the query resulted in an error - :type has_errors: bool - :param sql_errors: List of sql Errors - :type sql_errors: list[str] + :ivar has_errors: Indicates whether the query resulted in an error + :vartype has_errors: bool + :ivar sql_errors: List of sql Errors + :vartype sql_errors: list[str] """ + _validation = { + 'execution_count': {'readonly': True}, + 'cpu_time_ms': {'readonly': True}, + 'elapsed_time_ms': {'readonly': True}, + 'has_errors': {'readonly': True}, + 'sql_errors': {'readonly': True}, + } + _attribute_map = { 'execution_count': {'key': 'executionCount', 'type': 'long'}, 'cpu_time_ms': {'key': 'cpuTimeMs', 'type': 'float'}, @@ -41,11 +52,11 @@ class ExecutionStatistics(Model): 'sql_errors': {'key': 'sqlErrors', 'type': '[str]'}, } - def __init__(self, *, execution_count: int=None, cpu_time_ms: float=None, elapsed_time_ms: float=None, wait_stats=None, has_errors: bool=None, sql_errors=None, **kwargs) -> None: + def __init__(self, *, wait_stats=None, **kwargs) -> None: super(ExecutionStatistics, self).__init__(**kwargs) - self.execution_count = execution_count - self.cpu_time_ms = cpu_time_ms - self.elapsed_time_ms = elapsed_time_ms + self.execution_count = None + self.cpu_time_ms = None + self.elapsed_time_ms = None self.wait_stats = wait_stats - self.has_errors = has_errors - self.sql_errors = sql_errors + self.has_errors = None + self.sql_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_task_properties.py index 0d8aca71745b..51f06680e246 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_task_properties.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_task_properties.py @@ -21,8 +21,8 @@ class GetUserTablesSqlTaskProperties(ProjectTaskProperties): All required parameters must be populated in order to send to Azure. - :ivar errors: Array of errors. This is ignored if submitted. - :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :param errors: Array of errors. This is ignored if submitted. + :type errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' @@ -37,7 +37,6 @@ class GetUserTablesSqlTaskProperties(ProjectTaskProperties): """ _validation = { - 'errors': {'readonly': True}, 'state': {'readonly': True}, 'task_type': {'required': True}, 'output': {'readonly': True}, diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_task_properties_py3.py index 238079fa0ac7..af726e4b4e53 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_task_properties_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_task_properties_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .project_task_properties import ProjectTaskProperties +from .project_task_properties_py3 import ProjectTaskProperties class GetUserTablesSqlTaskProperties(ProjectTaskProperties): @@ -21,8 +21,8 @@ class GetUserTablesSqlTaskProperties(ProjectTaskProperties): All required parameters must be populated in order to send to Azure. - :ivar errors: Array of errors. This is ignored if submitted. - :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :param errors: Array of errors. This is ignored if submitted. + :type errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' @@ -37,7 +37,6 @@ class GetUserTablesSqlTaskProperties(ProjectTaskProperties): """ _validation = { - 'errors': {'readonly': True}, 'state': {'readonly': True}, 'task_type': {'required': True}, 'output': {'readonly': True}, @@ -51,8 +50,8 @@ class GetUserTablesSqlTaskProperties(ProjectTaskProperties): 'output': {'key': 'output', 'type': '[GetUserTablesSqlTaskOutput]'}, } - def __init__(self, *, input=None, **kwargs) -> None: - super(GetUserTablesSqlTaskProperties, self).__init__(**kwargs) + def __init__(self, *, errors=None, input=None, **kwargs) -> None: + super(GetUserTablesSqlTaskProperties, self).__init__(errors=errors, **kwargs) self.input = input self.output = None self.task_type = 'GetUserTables.Sql' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_input_py3.py index 78e04b0339e9..52ddf0bc50de 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_input_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_input_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sql_migration_task_input import SqlMigrationTaskInput +from .sql_migration_task_input_py3 import SqlMigrationTaskInput class MigrateSqlServerSqlDbTaskInput(SqlMigrationTaskInput): diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level.py index a889f9e00f7b..32badbf078b1 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level.py @@ -13,7 +13,7 @@ class MigrateSqlServerSqlDbTaskOutputDatabaseLevel(MigrateSqlServerSqlDbTaskOutput): - """MigrateSqlServerSqlDbTaskOutputDatabaseLevel. + """Database level result for Sql Server to Azure Sql DB migration. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level_py3.py index 7cb7b2f40159..1e919575fc96 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level_py3.py @@ -9,11 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .migrate_sql_server_sql_db_task_output import MigrateSqlServerSqlDbTaskOutput +from .migrate_sql_server_sql_db_task_output_py3 import MigrateSqlServerSqlDbTaskOutput class MigrateSqlServerSqlDbTaskOutputDatabaseLevel(MigrateSqlServerSqlDbTaskOutput): - """MigrateSqlServerSqlDbTaskOutputDatabaseLevel. + """Database level result for Sql Server to Azure Sql DB migration. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error.py index 01af38599841..e576cdc7e233 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error.py @@ -13,7 +13,7 @@ class MigrateSqlServerSqlDbTaskOutputError(MigrateSqlServerSqlDbTaskOutput): - """MigrateSqlServerSqlDbTaskOutputError. + """Task errors for Sql Server to Azure Sql DB migration. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error_py3.py index 248b5eb7ca20..addea931935d 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error_py3.py @@ -9,11 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .migrate_sql_server_sql_db_task_output import MigrateSqlServerSqlDbTaskOutput +from .migrate_sql_server_sql_db_task_output_py3 import MigrateSqlServerSqlDbTaskOutput class MigrateSqlServerSqlDbTaskOutputError(MigrateSqlServerSqlDbTaskOutput): - """MigrateSqlServerSqlDbTaskOutputError. + """Task errors for Sql Server to Azure Sql DB migration. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level.py index 54ec3bfee665..34f22e16d191 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level.py @@ -13,7 +13,7 @@ class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOutput): - """MigrateSqlServerSqlDbTaskOutputMigrationLevel. + """Migration level result for Sql server to Azure Sql DB migration. Variables are only populated by the server, and will be ignored when sending a request. @@ -45,9 +45,9 @@ class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOut :ivar database_summary: Summary of database results in the migration :vartype database_summary: dict[str, ~azure.mgmt.datamigration.models.DatabaseSummaryResult] - :param migration_report_result: Migration Report Result, provides unique - url for downloading your migration report. - :type migration_report_result: + :ivar migration_report: Migration Report Result, provides unique url for + downloading your migration report. + :vartype migration_report: ~azure.mgmt.datamigration.models.MigrationReportResult :ivar source_server_version: Source server version :vartype source_server_version: str @@ -73,6 +73,7 @@ class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOut 'message': {'readonly': True}, 'databases': {'readonly': True}, 'database_summary': {'readonly': True}, + 'migration_report': {'readonly': True}, 'source_server_version': {'readonly': True}, 'source_server_brand_version': {'readonly': True}, 'target_server_version': {'readonly': True}, @@ -91,7 +92,7 @@ class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOut 'message': {'key': 'message', 'type': 'str'}, 'databases': {'key': 'databases', 'type': '{str}'}, 'database_summary': {'key': 'databaseSummary', 'type': '{DatabaseSummaryResult}'}, - 'migration_report_result': {'key': 'migrationReportResult', 'type': 'MigrationReportResult'}, + 'migration_report': {'key': 'migrationReport', 'type': 'MigrationReportResult'}, 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, @@ -109,7 +110,7 @@ def __init__(self, **kwargs): self.message = None self.databases = None self.database_summary = None - self.migration_report_result = kwargs.get('migration_report_result', None) + self.migration_report = None self.source_server_version = None self.source_server_brand_version = None self.target_server_version = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level_py3.py index 9d37af7aa443..71976086a201 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level_py3.py @@ -9,11 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .migrate_sql_server_sql_db_task_output import MigrateSqlServerSqlDbTaskOutput +from .migrate_sql_server_sql_db_task_output_py3 import MigrateSqlServerSqlDbTaskOutput class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOutput): - """MigrateSqlServerSqlDbTaskOutputMigrationLevel. + """Migration level result for Sql server to Azure Sql DB migration. Variables are only populated by the server, and will be ignored when sending a request. @@ -45,9 +45,9 @@ class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOut :ivar database_summary: Summary of database results in the migration :vartype database_summary: dict[str, ~azure.mgmt.datamigration.models.DatabaseSummaryResult] - :param migration_report_result: Migration Report Result, provides unique - url for downloading your migration report. - :type migration_report_result: + :ivar migration_report: Migration Report Result, provides unique url for + downloading your migration report. + :vartype migration_report: ~azure.mgmt.datamigration.models.MigrationReportResult :ivar source_server_version: Source server version :vartype source_server_version: str @@ -73,6 +73,7 @@ class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOut 'message': {'readonly': True}, 'databases': {'readonly': True}, 'database_summary': {'readonly': True}, + 'migration_report': {'readonly': True}, 'source_server_version': {'readonly': True}, 'source_server_brand_version': {'readonly': True}, 'target_server_version': {'readonly': True}, @@ -91,7 +92,7 @@ class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOut 'message': {'key': 'message', 'type': 'str'}, 'databases': {'key': 'databases', 'type': '{str}'}, 'database_summary': {'key': 'databaseSummary', 'type': '{DatabaseSummaryResult}'}, - 'migration_report_result': {'key': 'migrationReportResult', 'type': 'MigrationReportResult'}, + 'migration_report': {'key': 'migrationReport', 'type': 'MigrationReportResult'}, 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, @@ -99,7 +100,7 @@ class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOut 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, } - def __init__(self, *, migration_report_result=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(MigrateSqlServerSqlDbTaskOutputMigrationLevel, self).__init__(**kwargs) self.started_on = None self.ended_on = None @@ -109,7 +110,7 @@ def __init__(self, *, migration_report_result=None, **kwargs) -> None: self.message = None self.databases = None self.database_summary = None - self.migration_report_result = migration_report_result + self.migration_report = None self.source_server_version = None self.source_server_brand_version = None self.target_server_version = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level.py index 7b56087a2627..9a149e79792b 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level.py @@ -13,7 +13,7 @@ class MigrateSqlServerSqlDbTaskOutputTableLevel(MigrateSqlServerSqlDbTaskOutput): - """MigrateSqlServerSqlDbTaskOutputTableLevel. + """Table level result for Sql Server to Azure Sql DB migration. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level_py3.py index 4ccd9422f010..8c621fe4aa7e 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level_py3.py @@ -9,11 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .migrate_sql_server_sql_db_task_output import MigrateSqlServerSqlDbTaskOutput +from .migrate_sql_server_sql_db_task_output_py3 import MigrateSqlServerSqlDbTaskOutput class MigrateSqlServerSqlDbTaskOutputTableLevel(MigrateSqlServerSqlDbTaskOutput): - """MigrateSqlServerSqlDbTaskOutputTableLevel. + """Table level result for Sql Server to Azure Sql DB migration. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties.py index 2e8e4915407b..f3099f7805f2 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties.py @@ -21,8 +21,8 @@ class MigrateSqlServerSqlDbTaskProperties(ProjectTaskProperties): All required parameters must be populated in order to send to Azure. - :ivar errors: Array of errors. This is ignored if submitted. - :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :param errors: Array of errors. This is ignored if submitted. + :type errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' @@ -38,7 +38,6 @@ class MigrateSqlServerSqlDbTaskProperties(ProjectTaskProperties): """ _validation = { - 'errors': {'readonly': True}, 'state': {'readonly': True}, 'task_type': {'required': True}, 'output': {'readonly': True}, diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties_py3.py index e768d2e9e064..af6120676665 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .project_task_properties import ProjectTaskProperties +from .project_task_properties_py3 import ProjectTaskProperties class MigrateSqlServerSqlDbTaskProperties(ProjectTaskProperties): @@ -21,8 +21,8 @@ class MigrateSqlServerSqlDbTaskProperties(ProjectTaskProperties): All required parameters must be populated in order to send to Azure. - :ivar errors: Array of errors. This is ignored if submitted. - :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :param errors: Array of errors. This is ignored if submitted. + :type errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' @@ -38,7 +38,6 @@ class MigrateSqlServerSqlDbTaskProperties(ProjectTaskProperties): """ _validation = { - 'errors': {'readonly': True}, 'state': {'readonly': True}, 'task_type': {'required': True}, 'output': {'readonly': True}, @@ -52,8 +51,8 @@ class MigrateSqlServerSqlDbTaskProperties(ProjectTaskProperties): 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlDbTaskOutput]'}, } - def __init__(self, *, input=None, **kwargs) -> None: - super(MigrateSqlServerSqlDbTaskProperties, self).__init__(**kwargs) + def __init__(self, *, errors=None, input=None, **kwargs) -> None: + super(MigrateSqlServerSqlDbTaskProperties, self).__init__(errors=errors, **kwargs) self.input = input self.output = None self.task_type = 'Migrate.SqlServer.SqlDb' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input.py deleted file mode 100644 index ed71210e47d8..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MigrateSqlServerSqlMIDatabaseInput(Model): - """Database specific information for SQL to Azure SQL DB Managed Instance - migration task inputs. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the database - :type name: str - :param restore_database_name: Required. Name of the database at - destination - :type restore_database_name: str - :param backup_file_share: Backup file share information for backing up - this database. - :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare - """ - - _validation = { - 'name': {'required': True}, - 'restore_database_name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'restore_database_name': {'key': 'restoreDatabaseName', 'type': 'str'}, - 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, - } - - def __init__(self, **kwargs): - super(MigrateSqlServerSqlMIDatabaseInput, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.restore_database_name = kwargs.get('restore_database_name', None) - self.backup_file_share = kwargs.get('backup_file_share', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input_py3.py deleted file mode 100644 index 6be7084bb292..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MigrateSqlServerSqlMIDatabaseInput(Model): - """Database specific information for SQL to Azure SQL DB Managed Instance - migration task inputs. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the database - :type name: str - :param restore_database_name: Required. Name of the database at - destination - :type restore_database_name: str - :param backup_file_share: Backup file share information for backing up - this database. - :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare - """ - - _validation = { - 'name': {'required': True}, - 'restore_database_name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'restore_database_name': {'key': 'restoreDatabaseName', 'type': 'str'}, - 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, - } - - def __init__(self, *, name: str, restore_database_name: str, backup_file_share=None, **kwargs) -> None: - super(MigrateSqlServerSqlMIDatabaseInput, self).__init__(**kwargs) - self.name = name - self.restore_database_name = restore_database_name - self.backup_file_share = backup_file_share diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input.py deleted file mode 100644 index f611e6927792..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sql_migration_task_input import SqlMigrationTaskInput - - -class MigrateSqlServerSqlMITaskInput(SqlMigrationTaskInput): - """Input for task that migrates SQL Server databases to Azure SQL Database - Managed Instance. - - All required parameters must be populated in order to send to Azure. - - :param source_connection_info: Required. Information for connecting to - source - :type source_connection_info: - ~azure.mgmt.datamigration.models.SqlConnectionInfo - :param target_connection_info: Required. Information for connecting to - target - :type target_connection_info: - ~azure.mgmt.datamigration.models.SqlConnectionInfo - :param selected_databases: Required. Databases to migrate - :type selected_databases: - list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMIDatabaseInput] - :param selected_logins: Logins to migrate. - :type selected_logins: list[str] - :param selected_agent_jobs: Agent Jobs to migrate. - :type selected_agent_jobs: list[str] - :param backup_file_share: Backup file share information for all selected - databases. - :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare - :param backup_blob_share: Required. SAS URI of Azure Storage Account - Container to be used for storing backup files. - :type backup_blob_share: ~azure.mgmt.datamigration.models.BlobShare - """ - - _validation = { - 'source_connection_info': {'required': True}, - 'target_connection_info': {'required': True}, - 'selected_databases': {'required': True}, - 'backup_blob_share': {'required': True}, - } - - _attribute_map = { - 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, - 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, - 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMIDatabaseInput]'}, - 'selected_logins': {'key': 'selectedLogins', 'type': '[str]'}, - 'selected_agent_jobs': {'key': 'selectedAgentJobs', 'type': '[str]'}, - 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, - 'backup_blob_share': {'key': 'backupBlobShare', 'type': 'BlobShare'}, - } - - def __init__(self, **kwargs): - super(MigrateSqlServerSqlMITaskInput, self).__init__(**kwargs) - self.selected_databases = kwargs.get('selected_databases', None) - self.selected_logins = kwargs.get('selected_logins', None) - self.selected_agent_jobs = kwargs.get('selected_agent_jobs', None) - self.backup_file_share = kwargs.get('backup_file_share', None) - self.backup_blob_share = kwargs.get('backup_blob_share', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input_py3.py deleted file mode 100644 index ca3b87318261..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sql_migration_task_input import SqlMigrationTaskInput - - -class MigrateSqlServerSqlMITaskInput(SqlMigrationTaskInput): - """Input for task that migrates SQL Server databases to Azure SQL Database - Managed Instance. - - All required parameters must be populated in order to send to Azure. - - :param source_connection_info: Required. Information for connecting to - source - :type source_connection_info: - ~azure.mgmt.datamigration.models.SqlConnectionInfo - :param target_connection_info: Required. Information for connecting to - target - :type target_connection_info: - ~azure.mgmt.datamigration.models.SqlConnectionInfo - :param selected_databases: Required. Databases to migrate - :type selected_databases: - list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMIDatabaseInput] - :param selected_logins: Logins to migrate. - :type selected_logins: list[str] - :param selected_agent_jobs: Agent Jobs to migrate. - :type selected_agent_jobs: list[str] - :param backup_file_share: Backup file share information for all selected - databases. - :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare - :param backup_blob_share: Required. SAS URI of Azure Storage Account - Container to be used for storing backup files. - :type backup_blob_share: ~azure.mgmt.datamigration.models.BlobShare - """ - - _validation = { - 'source_connection_info': {'required': True}, - 'target_connection_info': {'required': True}, - 'selected_databases': {'required': True}, - 'backup_blob_share': {'required': True}, - } - - _attribute_map = { - 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, - 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, - 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMIDatabaseInput]'}, - 'selected_logins': {'key': 'selectedLogins', 'type': '[str]'}, - 'selected_agent_jobs': {'key': 'selectedAgentJobs', 'type': '[str]'}, - 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, - 'backup_blob_share': {'key': 'backupBlobShare', 'type': 'BlobShare'}, - } - - def __init__(self, *, source_connection_info, target_connection_info, selected_databases, backup_blob_share, selected_logins=None, selected_agent_jobs=None, backup_file_share=None, **kwargs) -> None: - super(MigrateSqlServerSqlMITaskInput, self).__init__(source_connection_info=source_connection_info, target_connection_info=target_connection_info, **kwargs) - self.selected_databases = selected_databases - self.selected_logins = selected_logins - self.selected_agent_jobs = selected_agent_jobs - self.backup_file_share = backup_file_share - self.backup_blob_share = backup_blob_share diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output.py deleted file mode 100644 index 2c52e1015bb9..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MigrateSqlServerSqlMITaskOutput(Model): - """Output for task that migrates SQL Server databases to Azure SQL Database - Managed Instance. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: MigrateSqlServerSqlMITaskOutputError, - MigrateSqlServerSqlMITaskOutputLoginLevel, - MigrateSqlServerSqlMITaskOutputAgentJobLevel, - MigrateSqlServerSqlMITaskOutputDatabaseLevel, - MigrateSqlServerSqlMITaskOutputMigrationLevel - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Result identifier - :vartype id: str - :param result_type: Required. Constant filled by server. - :type result_type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'result_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'result_type': {'key': 'resultType', 'type': 'str'}, - } - - _subtype_map = { - 'result_type': {'ErrorOutput': 'MigrateSqlServerSqlMITaskOutputError', 'LoginLevelOutput': 'MigrateSqlServerSqlMITaskOutputLoginLevel', 'AgentJobLevelOutput': 'MigrateSqlServerSqlMITaskOutputAgentJobLevel', 'DatabaseLevelOutput': 'MigrateSqlServerSqlMITaskOutputDatabaseLevel', 'MigrationLevelOutput': 'MigrateSqlServerSqlMITaskOutputMigrationLevel'} - } - - def __init__(self, **kwargs): - super(MigrateSqlServerSqlMITaskOutput, self).__init__(**kwargs) - self.id = None - self.result_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level.py deleted file mode 100644 index 84f35f544462..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput - - -class MigrateSqlServerSqlMITaskOutputAgentJobLevel(MigrateSqlServerSqlMITaskOutput): - """MigrateSqlServerSqlMITaskOutputAgentJobLevel. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Result identifier - :vartype id: str - :param result_type: Required. Constant filled by server. - :type result_type: str - :ivar name: AgentJob name. - :vartype name: str - :ivar is_enabled: The state of the original AgentJob. - :vartype is_enabled: bool - :ivar state: Current state of migration. Possible values include: 'None', - 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped' - :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState - :ivar started_on: Migration start time - :vartype started_on: datetime - :ivar ended_on: Migration end time - :vartype ended_on: datetime - :ivar message: Migration progress message - :vartype message: str - :ivar exceptions_and_warnings: Migration errors and warnings per job - :vartype exceptions_and_warnings: - list[~azure.mgmt.datamigration.models.ReportableException] - """ - - _validation = { - 'id': {'readonly': True}, - 'result_type': {'required': True}, - 'name': {'readonly': True}, - 'is_enabled': {'readonly': True}, - 'state': {'readonly': True}, - 'started_on': {'readonly': True}, - 'ended_on': {'readonly': True}, - 'message': {'readonly': True}, - 'exceptions_and_warnings': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'result_type': {'key': 'resultType', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'state': {'key': 'state', 'type': 'str'}, - 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, - 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, - 'message': {'key': 'message', 'type': 'str'}, - 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, - } - - def __init__(self, **kwargs): - super(MigrateSqlServerSqlMITaskOutputAgentJobLevel, self).__init__(**kwargs) - self.name = None - self.is_enabled = None - self.state = None - self.started_on = None - self.ended_on = None - self.message = None - self.exceptions_and_warnings = None - self.result_type = 'AgentJobLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level_py3.py deleted file mode 100644 index c268fca05742..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput - - -class MigrateSqlServerSqlMITaskOutputAgentJobLevel(MigrateSqlServerSqlMITaskOutput): - """MigrateSqlServerSqlMITaskOutputAgentJobLevel. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Result identifier - :vartype id: str - :param result_type: Required. Constant filled by server. - :type result_type: str - :ivar name: AgentJob name. - :vartype name: str - :ivar is_enabled: The state of the original AgentJob. - :vartype is_enabled: bool - :ivar state: Current state of migration. Possible values include: 'None', - 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped' - :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState - :ivar started_on: Migration start time - :vartype started_on: datetime - :ivar ended_on: Migration end time - :vartype ended_on: datetime - :ivar message: Migration progress message - :vartype message: str - :ivar exceptions_and_warnings: Migration errors and warnings per job - :vartype exceptions_and_warnings: - list[~azure.mgmt.datamigration.models.ReportableException] - """ - - _validation = { - 'id': {'readonly': True}, - 'result_type': {'required': True}, - 'name': {'readonly': True}, - 'is_enabled': {'readonly': True}, - 'state': {'readonly': True}, - 'started_on': {'readonly': True}, - 'ended_on': {'readonly': True}, - 'message': {'readonly': True}, - 'exceptions_and_warnings': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'result_type': {'key': 'resultType', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'state': {'key': 'state', 'type': 'str'}, - 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, - 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, - 'message': {'key': 'message', 'type': 'str'}, - 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, - } - - def __init__(self, **kwargs) -> None: - super(MigrateSqlServerSqlMITaskOutputAgentJobLevel, self).__init__(**kwargs) - self.name = None - self.is_enabled = None - self.state = None - self.started_on = None - self.ended_on = None - self.message = None - self.exceptions_and_warnings = None - self.result_type = 'AgentJobLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level.py deleted file mode 100644 index fb0b68e98fdb..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput - - -class MigrateSqlServerSqlMITaskOutputDatabaseLevel(MigrateSqlServerSqlMITaskOutput): - """MigrateSqlServerSqlMITaskOutputDatabaseLevel. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Result identifier - :vartype id: str - :param result_type: Required. Constant filled by server. - :type result_type: str - :ivar database_name: Name of the database - :vartype database_name: str - :ivar size_mb: Size of the database in megabytes - :vartype size_mb: float - :ivar state: Current state of migration. Possible values include: 'None', - 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped' - :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState - :ivar stage: Current stage of migration. Possible values include: 'None', - 'Initialize', 'Backup', 'FileCopy', 'Restore', 'Completed' - :vartype stage: str or - ~azure.mgmt.datamigration.models.DatabaseMigrationStage - :ivar started_on: Migration start time - :vartype started_on: datetime - :ivar ended_on: Migration end time - :vartype ended_on: datetime - :ivar message: Migration progress message - :vartype message: str - :ivar exceptions_and_warnings: Migration exceptions and warnings - :vartype exceptions_and_warnings: - list[~azure.mgmt.datamigration.models.ReportableException] - """ - - _validation = { - 'id': {'readonly': True}, - 'result_type': {'required': True}, - 'database_name': {'readonly': True}, - 'size_mb': {'readonly': True}, - 'state': {'readonly': True}, - 'stage': {'readonly': True}, - 'started_on': {'readonly': True}, - 'ended_on': {'readonly': True}, - 'message': {'readonly': True}, - 'exceptions_and_warnings': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'result_type': {'key': 'resultType', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'size_mb': {'key': 'sizeMB', 'type': 'float'}, - 'state': {'key': 'state', 'type': 'str'}, - 'stage': {'key': 'stage', 'type': 'str'}, - 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, - 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, - 'message': {'key': 'message', 'type': 'str'}, - 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, - } - - def __init__(self, **kwargs): - super(MigrateSqlServerSqlMITaskOutputDatabaseLevel, self).__init__(**kwargs) - self.database_name = None - self.size_mb = None - self.state = None - self.stage = None - self.started_on = None - self.ended_on = None - self.message = None - self.exceptions_and_warnings = None - self.result_type = 'DatabaseLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level_py3.py deleted file mode 100644 index 1af72d51a74b..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput - - -class MigrateSqlServerSqlMITaskOutputDatabaseLevel(MigrateSqlServerSqlMITaskOutput): - """MigrateSqlServerSqlMITaskOutputDatabaseLevel. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Result identifier - :vartype id: str - :param result_type: Required. Constant filled by server. - :type result_type: str - :ivar database_name: Name of the database - :vartype database_name: str - :ivar size_mb: Size of the database in megabytes - :vartype size_mb: float - :ivar state: Current state of migration. Possible values include: 'None', - 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped' - :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState - :ivar stage: Current stage of migration. Possible values include: 'None', - 'Initialize', 'Backup', 'FileCopy', 'Restore', 'Completed' - :vartype stage: str or - ~azure.mgmt.datamigration.models.DatabaseMigrationStage - :ivar started_on: Migration start time - :vartype started_on: datetime - :ivar ended_on: Migration end time - :vartype ended_on: datetime - :ivar message: Migration progress message - :vartype message: str - :ivar exceptions_and_warnings: Migration exceptions and warnings - :vartype exceptions_and_warnings: - list[~azure.mgmt.datamigration.models.ReportableException] - """ - - _validation = { - 'id': {'readonly': True}, - 'result_type': {'required': True}, - 'database_name': {'readonly': True}, - 'size_mb': {'readonly': True}, - 'state': {'readonly': True}, - 'stage': {'readonly': True}, - 'started_on': {'readonly': True}, - 'ended_on': {'readonly': True}, - 'message': {'readonly': True}, - 'exceptions_and_warnings': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'result_type': {'key': 'resultType', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'size_mb': {'key': 'sizeMB', 'type': 'float'}, - 'state': {'key': 'state', 'type': 'str'}, - 'stage': {'key': 'stage', 'type': 'str'}, - 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, - 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, - 'message': {'key': 'message', 'type': 'str'}, - 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, - } - - def __init__(self, **kwargs) -> None: - super(MigrateSqlServerSqlMITaskOutputDatabaseLevel, self).__init__(**kwargs) - self.database_name = None - self.size_mb = None - self.state = None - self.stage = None - self.started_on = None - self.ended_on = None - self.message = None - self.exceptions_and_warnings = None - self.result_type = 'DatabaseLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error_py3.py deleted file mode 100644 index 0f918134327d..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput - - -class MigrateSqlServerSqlMITaskOutputError(MigrateSqlServerSqlMITaskOutput): - """MigrateSqlServerSqlMITaskOutputError. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Result identifier - :vartype id: str - :param result_type: Required. Constant filled by server. - :type result_type: str - :ivar error: Migration error - :vartype error: ~azure.mgmt.datamigration.models.ReportableException - """ - - _validation = { - 'id': {'readonly': True}, - 'result_type': {'required': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'result_type': {'key': 'resultType', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ReportableException'}, - } - - def __init__(self, **kwargs) -> None: - super(MigrateSqlServerSqlMITaskOutputError, self).__init__(**kwargs) - self.error = None - self.result_type = 'ErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level.py deleted file mode 100644 index 77639ac9f70c..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput - - -class MigrateSqlServerSqlMITaskOutputLoginLevel(MigrateSqlServerSqlMITaskOutput): - """MigrateSqlServerSqlMITaskOutputLoginLevel. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Result identifier - :vartype id: str - :param result_type: Required. Constant filled by server. - :type result_type: str - :ivar login_name: Login name. - :vartype login_name: str - :ivar state: Current state of login. Possible values include: 'None', - 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped' - :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState - :ivar stage: Current stage of login. Possible values include: 'None', - 'Initialize', 'LoginMigration', 'EstablishUserMapping', - 'AssignRoleMembership', 'AssignRoleOwnership', - 'EstablishServerPermissions', 'EstablishObjectPermissions', 'Completed' - :vartype stage: str or - ~azure.mgmt.datamigration.models.LoginMigrationStage - :ivar started_on: Login migration start time - :vartype started_on: datetime - :ivar ended_on: Login migration end time - :vartype ended_on: datetime - :ivar message: Login migration progress message - :vartype message: str - :ivar exceptions_and_warnings: Login migration errors and warnings per - login - :vartype exceptions_and_warnings: - list[~azure.mgmt.datamigration.models.ReportableException] - """ - - _validation = { - 'id': {'readonly': True}, - 'result_type': {'required': True}, - 'login_name': {'readonly': True}, - 'state': {'readonly': True}, - 'stage': {'readonly': True}, - 'started_on': {'readonly': True}, - 'ended_on': {'readonly': True}, - 'message': {'readonly': True}, - 'exceptions_and_warnings': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'result_type': {'key': 'resultType', 'type': 'str'}, - 'login_name': {'key': 'loginName', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'stage': {'key': 'stage', 'type': 'LoginMigrationStage'}, - 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, - 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, - 'message': {'key': 'message', 'type': 'str'}, - 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, - } - - def __init__(self, **kwargs): - super(MigrateSqlServerSqlMITaskOutputLoginLevel, self).__init__(**kwargs) - self.login_name = None - self.state = None - self.stage = None - self.started_on = None - self.ended_on = None - self.message = None - self.exceptions_and_warnings = None - self.result_type = 'LoginLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level_py3.py deleted file mode 100644 index 5cf8ae498511..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput - - -class MigrateSqlServerSqlMITaskOutputLoginLevel(MigrateSqlServerSqlMITaskOutput): - """MigrateSqlServerSqlMITaskOutputLoginLevel. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Result identifier - :vartype id: str - :param result_type: Required. Constant filled by server. - :type result_type: str - :ivar login_name: Login name. - :vartype login_name: str - :ivar state: Current state of login. Possible values include: 'None', - 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped' - :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState - :ivar stage: Current stage of login. Possible values include: 'None', - 'Initialize', 'LoginMigration', 'EstablishUserMapping', - 'AssignRoleMembership', 'AssignRoleOwnership', - 'EstablishServerPermissions', 'EstablishObjectPermissions', 'Completed' - :vartype stage: str or - ~azure.mgmt.datamigration.models.LoginMigrationStage - :ivar started_on: Login migration start time - :vartype started_on: datetime - :ivar ended_on: Login migration end time - :vartype ended_on: datetime - :ivar message: Login migration progress message - :vartype message: str - :ivar exceptions_and_warnings: Login migration errors and warnings per - login - :vartype exceptions_and_warnings: - list[~azure.mgmt.datamigration.models.ReportableException] - """ - - _validation = { - 'id': {'readonly': True}, - 'result_type': {'required': True}, - 'login_name': {'readonly': True}, - 'state': {'readonly': True}, - 'stage': {'readonly': True}, - 'started_on': {'readonly': True}, - 'ended_on': {'readonly': True}, - 'message': {'readonly': True}, - 'exceptions_and_warnings': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'result_type': {'key': 'resultType', 'type': 'str'}, - 'login_name': {'key': 'loginName', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'stage': {'key': 'stage', 'type': 'LoginMigrationStage'}, - 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, - 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, - 'message': {'key': 'message', 'type': 'str'}, - 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, - } - - def __init__(self, **kwargs) -> None: - super(MigrateSqlServerSqlMITaskOutputLoginLevel, self).__init__(**kwargs) - self.login_name = None - self.state = None - self.stage = None - self.started_on = None - self.ended_on = None - self.message = None - self.exceptions_and_warnings = None - self.result_type = 'LoginLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level.py deleted file mode 100644 index 299889910900..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput - - -class MigrateSqlServerSqlMITaskOutputMigrationLevel(MigrateSqlServerSqlMITaskOutput): - """MigrateSqlServerSqlMITaskOutputMigrationLevel. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Result identifier - :vartype id: str - :param result_type: Required. Constant filled by server. - :type result_type: str - :ivar started_on: Migration start time - :vartype started_on: datetime - :ivar ended_on: Migration end time - :vartype ended_on: datetime - :ivar status: Current status of migration. Possible values include: - 'Default', 'Connecting', 'SourceAndTargetSelected', 'SelectLogins', - 'Configured', 'Running', 'Error', 'Stopped', 'Completed', - 'CompletedWithWarnings' - :vartype status: str or ~azure.mgmt.datamigration.models.MigrationStatus - :ivar state: Current state of migration. Possible values include: 'None', - 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped' - :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState - :ivar agent_jobs: Selected agent jobs as a map from name to id - :vartype agent_jobs: dict[str, str] - :ivar logins: Selected logins as a map from name to id - :vartype logins: dict[str, str] - :ivar message: Migration progress message - :vartype message: str - :ivar server_role_results: Map of server role migration results. - :vartype server_role_results: dict[str, - ~azure.mgmt.datamigration.models.StartMigrationScenarioServerRoleResult] - :ivar orphaned_users: Map of users to database name of orphaned users. - :vartype orphaned_users: dict[str, str] - :ivar databases: Selected databases as a map from database name to - database id - :vartype databases: dict[str, str] - :ivar source_server_version: Source server version - :vartype source_server_version: str - :ivar source_server_brand_version: Source server brand version - :vartype source_server_brand_version: str - :ivar target_server_version: Target server version - :vartype target_server_version: str - :ivar target_server_brand_version: Target server brand version - :vartype target_server_brand_version: str - :ivar exceptions_and_warnings: Migration exceptions and warnings. - :vartype exceptions_and_warnings: - list[~azure.mgmt.datamigration.models.ReportableException] - """ - - _validation = { - 'id': {'readonly': True}, - 'result_type': {'required': True}, - 'started_on': {'readonly': True}, - 'ended_on': {'readonly': True}, - 'status': {'readonly': True}, - 'state': {'readonly': True}, - 'agent_jobs': {'readonly': True}, - 'logins': {'readonly': True}, - 'message': {'readonly': True}, - 'server_role_results': {'readonly': True}, - 'orphaned_users': {'readonly': True}, - 'databases': {'readonly': True}, - 'source_server_version': {'readonly': True}, - 'source_server_brand_version': {'readonly': True}, - 'target_server_version': {'readonly': True}, - 'target_server_brand_version': {'readonly': True}, - 'exceptions_and_warnings': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'result_type': {'key': 'resultType', 'type': 'str'}, - 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, - 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'agent_jobs': {'key': 'agentJobs', 'type': '{str}'}, - 'logins': {'key': 'logins', 'type': '{str}'}, - 'message': {'key': 'message', 'type': 'str'}, - 'server_role_results': {'key': 'serverRoleResults', 'type': '{StartMigrationScenarioServerRoleResult}'}, - 'orphaned_users': {'key': 'orphanedUsers', 'type': '{str}'}, - 'databases': {'key': 'databases', 'type': '{str}'}, - 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, - 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, - 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, - 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, - 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, - } - - def __init__(self, **kwargs): - super(MigrateSqlServerSqlMITaskOutputMigrationLevel, self).__init__(**kwargs) - self.started_on = None - self.ended_on = None - self.status = None - self.state = None - self.agent_jobs = None - self.logins = None - self.message = None - self.server_role_results = None - self.orphaned_users = None - self.databases = None - self.source_server_version = None - self.source_server_brand_version = None - self.target_server_version = None - self.target_server_brand_version = None - self.exceptions_and_warnings = None - self.result_type = 'MigrationLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level_py3.py deleted file mode 100644 index 4b794f21fa2e..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level_py3.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput - - -class MigrateSqlServerSqlMITaskOutputMigrationLevel(MigrateSqlServerSqlMITaskOutput): - """MigrateSqlServerSqlMITaskOutputMigrationLevel. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Result identifier - :vartype id: str - :param result_type: Required. Constant filled by server. - :type result_type: str - :ivar started_on: Migration start time - :vartype started_on: datetime - :ivar ended_on: Migration end time - :vartype ended_on: datetime - :ivar status: Current status of migration. Possible values include: - 'Default', 'Connecting', 'SourceAndTargetSelected', 'SelectLogins', - 'Configured', 'Running', 'Error', 'Stopped', 'Completed', - 'CompletedWithWarnings' - :vartype status: str or ~azure.mgmt.datamigration.models.MigrationStatus - :ivar state: Current state of migration. Possible values include: 'None', - 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped' - :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState - :ivar agent_jobs: Selected agent jobs as a map from name to id - :vartype agent_jobs: dict[str, str] - :ivar logins: Selected logins as a map from name to id - :vartype logins: dict[str, str] - :ivar message: Migration progress message - :vartype message: str - :ivar server_role_results: Map of server role migration results. - :vartype server_role_results: dict[str, - ~azure.mgmt.datamigration.models.StartMigrationScenarioServerRoleResult] - :ivar orphaned_users: Map of users to database name of orphaned users. - :vartype orphaned_users: dict[str, str] - :ivar databases: Selected databases as a map from database name to - database id - :vartype databases: dict[str, str] - :ivar source_server_version: Source server version - :vartype source_server_version: str - :ivar source_server_brand_version: Source server brand version - :vartype source_server_brand_version: str - :ivar target_server_version: Target server version - :vartype target_server_version: str - :ivar target_server_brand_version: Target server brand version - :vartype target_server_brand_version: str - :ivar exceptions_and_warnings: Migration exceptions and warnings. - :vartype exceptions_and_warnings: - list[~azure.mgmt.datamigration.models.ReportableException] - """ - - _validation = { - 'id': {'readonly': True}, - 'result_type': {'required': True}, - 'started_on': {'readonly': True}, - 'ended_on': {'readonly': True}, - 'status': {'readonly': True}, - 'state': {'readonly': True}, - 'agent_jobs': {'readonly': True}, - 'logins': {'readonly': True}, - 'message': {'readonly': True}, - 'server_role_results': {'readonly': True}, - 'orphaned_users': {'readonly': True}, - 'databases': {'readonly': True}, - 'source_server_version': {'readonly': True}, - 'source_server_brand_version': {'readonly': True}, - 'target_server_version': {'readonly': True}, - 'target_server_brand_version': {'readonly': True}, - 'exceptions_and_warnings': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'result_type': {'key': 'resultType', 'type': 'str'}, - 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, - 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'agent_jobs': {'key': 'agentJobs', 'type': '{str}'}, - 'logins': {'key': 'logins', 'type': '{str}'}, - 'message': {'key': 'message', 'type': 'str'}, - 'server_role_results': {'key': 'serverRoleResults', 'type': '{StartMigrationScenarioServerRoleResult}'}, - 'orphaned_users': {'key': 'orphanedUsers', 'type': '{str}'}, - 'databases': {'key': 'databases', 'type': '{str}'}, - 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, - 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, - 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, - 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, - 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, - } - - def __init__(self, **kwargs) -> None: - super(MigrateSqlServerSqlMITaskOutputMigrationLevel, self).__init__(**kwargs) - self.started_on = None - self.ended_on = None - self.status = None - self.state = None - self.agent_jobs = None - self.logins = None - self.message = None - self.server_role_results = None - self.orphaned_users = None - self.databases = None - self.source_server_version = None - self.source_server_brand_version = None - self.target_server_version = None - self.target_server_brand_version = None - self.exceptions_and_warnings = None - self.result_type = 'MigrationLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_py3.py deleted file mode 100644 index d56b33cdb678..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MigrateSqlServerSqlMITaskOutput(Model): - """Output for task that migrates SQL Server databases to Azure SQL Database - Managed Instance. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: MigrateSqlServerSqlMITaskOutputError, - MigrateSqlServerSqlMITaskOutputLoginLevel, - MigrateSqlServerSqlMITaskOutputAgentJobLevel, - MigrateSqlServerSqlMITaskOutputDatabaseLevel, - MigrateSqlServerSqlMITaskOutputMigrationLevel - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Result identifier - :vartype id: str - :param result_type: Required. Constant filled by server. - :type result_type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'result_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'result_type': {'key': 'resultType', 'type': 'str'}, - } - - _subtype_map = { - 'result_type': {'ErrorOutput': 'MigrateSqlServerSqlMITaskOutputError', 'LoginLevelOutput': 'MigrateSqlServerSqlMITaskOutputLoginLevel', 'AgentJobLevelOutput': 'MigrateSqlServerSqlMITaskOutputAgentJobLevel', 'DatabaseLevelOutput': 'MigrateSqlServerSqlMITaskOutputDatabaseLevel', 'MigrationLevelOutput': 'MigrateSqlServerSqlMITaskOutputMigrationLevel'} - } - - def __init__(self, **kwargs) -> None: - super(MigrateSqlServerSqlMITaskOutput, self).__init__(**kwargs) - self.id = None - self.result_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties.py deleted file mode 100644 index c08a63fd4935..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .project_task_properties import ProjectTaskProperties - - -class MigrateSqlServerSqlMITaskProperties(ProjectTaskProperties): - """Properties for task that migrates SQL Server databases to Azure SQL - Database Managed Instance. - - 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 errors: Array of errors. This is ignored if submitted. - :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] - :ivar state: The state of the task. This is ignored if submitted. Possible - values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', - 'Failed', 'FailedInputValidation', 'Faulted' - :vartype state: str or ~azure.mgmt.datamigration.models.TaskState - :param task_type: Required. Constant filled by server. - :type task_type: str - :param input: Task input - :type input: - ~azure.mgmt.datamigration.models.MigrateSqlServerSqlMITaskInput - :ivar output: Task output. This is ignored if submitted. - :vartype output: - list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMITaskOutput] - """ - - _validation = { - 'errors': {'readonly': True}, - 'state': {'readonly': True}, - 'task_type': {'required': True}, - 'output': {'readonly': True}, - } - - _attribute_map = { - 'errors': {'key': 'errors', 'type': '[ODataError]'}, - 'state': {'key': 'state', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlMITaskInput'}, - 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlMITaskOutput]'}, - } - - def __init__(self, **kwargs): - super(MigrateSqlServerSqlMITaskProperties, self).__init__(**kwargs) - self.input = kwargs.get('input', None) - self.output = None - self.task_type = 'Migrate.SqlServer.AzureSqlDbMI' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties_py3.py deleted file mode 100644 index 0c31ffb43a3f..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .project_task_properties import ProjectTaskProperties - - -class MigrateSqlServerSqlMITaskProperties(ProjectTaskProperties): - """Properties for task that migrates SQL Server databases to Azure SQL - Database Managed Instance. - - 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 errors: Array of errors. This is ignored if submitted. - :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] - :ivar state: The state of the task. This is ignored if submitted. Possible - values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', - 'Failed', 'FailedInputValidation', 'Faulted' - :vartype state: str or ~azure.mgmt.datamigration.models.TaskState - :param task_type: Required. Constant filled by server. - :type task_type: str - :param input: Task input - :type input: - ~azure.mgmt.datamigration.models.MigrateSqlServerSqlMITaskInput - :ivar output: Task output. This is ignored if submitted. - :vartype output: - list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMITaskOutput] - """ - - _validation = { - 'errors': {'readonly': True}, - 'state': {'readonly': True}, - 'task_type': {'required': True}, - 'output': {'readonly': True}, - } - - _attribute_map = { - 'errors': {'key': 'errors', 'type': '[ODataError]'}, - 'state': {'key': 'state', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlMITaskInput'}, - 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlMITaskOutput]'}, - } - - def __init__(self, *, input=None, **kwargs) -> None: - super(MigrateSqlServerSqlMITaskProperties, self).__init__(**kwargs) - self.input = input - self.output = None - self.task_type = 'Migrate.SqlServer.AzureSqlDbMI' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_report_result.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_report_result.py index 7b059511f6b5..79e3f9d60bfa 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_report_result.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_report_result.py @@ -16,12 +16,20 @@ class MigrationReportResult(Model): """Migration validation report result, contains the url for downloading the generated report. - :param id: Migration validation result identifier - :type id: str - :param report_url: The url of the report. - :type report_url: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Migration validation result identifier + :vartype id: str + :ivar report_url: The url of the report. + :vartype report_url: str """ + _validation = { + 'id': {'readonly': True}, + 'report_url': {'readonly': True}, + } + _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'report_url': {'key': 'reportUrl', 'type': 'str'}, @@ -29,5 +37,5 @@ class MigrationReportResult(Model): def __init__(self, **kwargs): super(MigrationReportResult, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.report_url = kwargs.get('report_url', None) + self.id = None + self.report_url = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_report_result_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_report_result_py3.py index 27eaefba14b7..f97c133366f8 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_report_result_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_report_result_py3.py @@ -16,18 +16,26 @@ class MigrationReportResult(Model): """Migration validation report result, contains the url for downloading the generated report. - :param id: Migration validation result identifier - :type id: str - :param report_url: The url of the report. - :type report_url: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Migration validation result identifier + :vartype id: str + :ivar report_url: The url of the report. + :vartype report_url: str """ + _validation = { + 'id': {'readonly': True}, + 'report_url': {'readonly': True}, + } + _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'report_url': {'key': 'reportUrl', 'type': 'str'}, } - def __init__(self, *, id: str=None, report_url: str=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(MigrationReportResult, self).__init__(**kwargs) - self.id = id - self.report_url = report_url + self.id = None + self.report_url = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/name_availability_response.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/name_availability_response.py index 221f7b81e05c..e37e9b0ea619 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/name_availability_response.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/name_availability_response.py @@ -15,18 +15,27 @@ class NameAvailabilityResponse(Model): """Indicates whether a proposed resource name is available. - :param name_available: If true, the name is valid and available. If false, + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: If true, the name is valid and available. If false, 'reason' describes why not. - :type name_available: bool - :param reason: The reason why the name is not available, if nameAvailable + :vartype name_available: bool + :ivar reason: The reason why the name is not available, if nameAvailable is false. Possible values include: 'AlreadyExists', 'Invalid' - :type reason: str or + :vartype reason: str or ~azure.mgmt.datamigration.models.NameCheckFailureReason - :param message: The localized reason why the name is not available, if + :ivar message: The localized reason why the name is not available, if nameAvailable is false - :type message: str + :vartype message: str """ + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + _attribute_map = { 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, 'reason': {'key': 'reason', 'type': 'str'}, @@ -35,6 +44,6 @@ class NameAvailabilityResponse(Model): def __init__(self, **kwargs): super(NameAvailabilityResponse, self).__init__(**kwargs) - self.name_available = kwargs.get('name_available', None) - self.reason = kwargs.get('reason', None) - self.message = kwargs.get('message', None) + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/name_availability_response_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/name_availability_response_py3.py index 2ab59490aa55..7a3e3429ef1f 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/name_availability_response_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/name_availability_response_py3.py @@ -15,26 +15,35 @@ class NameAvailabilityResponse(Model): """Indicates whether a proposed resource name is available. - :param name_available: If true, the name is valid and available. If false, + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: If true, the name is valid and available. If false, 'reason' describes why not. - :type name_available: bool - :param reason: The reason why the name is not available, if nameAvailable + :vartype name_available: bool + :ivar reason: The reason why the name is not available, if nameAvailable is false. Possible values include: 'AlreadyExists', 'Invalid' - :type reason: str or + :vartype reason: str or ~azure.mgmt.datamigration.models.NameCheckFailureReason - :param message: The localized reason why the name is not available, if + :ivar message: The localized reason why the name is not available, if nameAvailable is false - :type message: str + :vartype message: str """ + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + _attribute_map = { 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, 'reason': {'key': 'reason', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, *, name_available: bool=None, reason=None, message: str=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(NameAvailabilityResponse, self).__init__(**kwargs) - self.name_available = name_available - self.reason = reason - self.message = message + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/odata_error.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/odata_error.py index 2a35761e0ea5..6a56c520f2bb 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/odata_error.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/odata_error.py @@ -15,15 +15,24 @@ class ODataError(Model): """Error information in OData format. - :param code: The machine-readable description of the error, such as + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The machine-readable description of the error, such as 'InvalidRequest' or 'InternalServerError' - :type code: str - :param message: The human-readable description of the error - :type message: str - :param details: Inner errors that caused this error - :type details: list[~azure.mgmt.datamigration.models.ODataError] + :vartype code: str + :ivar message: The human-readable description of the error + :vartype message: str + :ivar details: Inner errors that caused this error + :vartype details: list[~azure.mgmt.datamigration.models.ODataError] """ + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'details': {'readonly': True}, + } + _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, @@ -32,6 +41,6 @@ class ODataError(Model): def __init__(self, **kwargs): super(ODataError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.details = kwargs.get('details', None) + self.code = None + self.message = None + self.details = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/odata_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/odata_error_py3.py index c5cdfe626026..fa6ab9d577cf 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/odata_error_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/odata_error_py3.py @@ -15,23 +15,32 @@ class ODataError(Model): """Error information in OData format. - :param code: The machine-readable description of the error, such as + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The machine-readable description of the error, such as 'InvalidRequest' or 'InternalServerError' - :type code: str - :param message: The human-readable description of the error - :type message: str - :param details: Inner errors that caused this error - :type details: list[~azure.mgmt.datamigration.models.ODataError] + :vartype code: str + :ivar message: The human-readable description of the error + :vartype message: str + :ivar details: Inner errors that caused this error + :vartype details: list[~azure.mgmt.datamigration.models.ODataError] """ + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'details': {'readonly': True}, + } + _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'details': {'key': 'details', 'type': '[ODataError]'}, } - def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(ODataError, self).__init__(**kwargs) - self.code = code - self.message = message - self.details = details + self.code = None + self.message = None + self.details = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project.py index dfff1eafee0b..ad75f31100eb 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project.py @@ -35,7 +35,7 @@ class Project(TrackedResource): :type source_platform: str or ~azure.mgmt.datamigration.models.ProjectSourcePlatform :param target_platform: Required. Target platform for the project. - Possible values include: 'SQLDB', 'SQLMI', 'Unknown' + Possible values include: 'SQLDB', 'Unknown' :type target_platform: str or ~azure.mgmt.datamigration.models.ProjectTargetPlatform :ivar creation_time: UTC Date and time when project was created diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_py3.py index 179f1bdbeb74..4c9ab4674b1d 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .tracked_resource import TrackedResource +from .tracked_resource_py3 import TrackedResource class Project(TrackedResource): @@ -35,7 +35,7 @@ class Project(TrackedResource): :type source_platform: str or ~azure.mgmt.datamigration.models.ProjectSourcePlatform :param target_platform: Required. Target platform for the project. - Possible values include: 'SQLDB', 'SQLMI', 'Unknown' + Possible values include: 'SQLDB', 'Unknown' :type target_platform: str or ~azure.mgmt.datamigration.models.ProjectTargetPlatform :ivar creation_time: UTC Date and time when project was created diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties.py index 8a8183572221..fc353d371570 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties.py @@ -17,18 +17,17 @@ class ProjectTaskProperties(Model): by current client, this object is returned. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ValidateMigrationInputSqlServerSqlMITaskProperties, - MigrateSqlServerSqlDbTaskProperties, MigrateSqlServerSqlMITaskProperties, + sub-classes are: MigrateSqlServerSqlDbTaskProperties, GetUserTablesSqlTaskProperties, ConnectToTargetSqlDbTaskProperties, - ConnectToTargetSqlMITaskProperties, ConnectToSourceSqlServerTaskProperties + ConnectToSourceSqlServerTaskProperties 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 errors: Array of errors. This is ignored if submitted. - :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :param errors: Array of errors. This is ignored if submitted. + :type errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' @@ -38,7 +37,6 @@ class ProjectTaskProperties(Model): """ _validation = { - 'errors': {'readonly': True}, 'state': {'readonly': True}, 'task_type': {'required': True}, } @@ -50,11 +48,11 @@ class ProjectTaskProperties(Model): } _subtype_map = { - 'task_type': {'ValidateMigrationInput.SqlServer.AzureSqlDbMI': 'ValidateMigrationInputSqlServerSqlMITaskProperties', 'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI': 'MigrateSqlServerSqlMITaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToTarget.AzureSqlDbMI': 'ConnectToTargetSqlMITaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties'} + 'task_type': {'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties'} } def __init__(self, **kwargs): super(ProjectTaskProperties, self).__init__(**kwargs) - self.errors = None + self.errors = kwargs.get('errors', None) self.state = None self.task_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties_py3.py index cbd010514ded..e9d89aa108ca 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties_py3.py @@ -17,18 +17,17 @@ class ProjectTaskProperties(Model): by current client, this object is returned. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ValidateMigrationInputSqlServerSqlMITaskProperties, - MigrateSqlServerSqlDbTaskProperties, MigrateSqlServerSqlMITaskProperties, + sub-classes are: MigrateSqlServerSqlDbTaskProperties, GetUserTablesSqlTaskProperties, ConnectToTargetSqlDbTaskProperties, - ConnectToTargetSqlMITaskProperties, ConnectToSourceSqlServerTaskProperties + ConnectToSourceSqlServerTaskProperties 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 errors: Array of errors. This is ignored if submitted. - :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :param errors: Array of errors. This is ignored if submitted. + :type errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' @@ -38,7 +37,6 @@ class ProjectTaskProperties(Model): """ _validation = { - 'errors': {'readonly': True}, 'state': {'readonly': True}, 'task_type': {'required': True}, } @@ -50,11 +48,11 @@ class ProjectTaskProperties(Model): } _subtype_map = { - 'task_type': {'ValidateMigrationInput.SqlServer.AzureSqlDbMI': 'ValidateMigrationInputSqlServerSqlMITaskProperties', 'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI': 'MigrateSqlServerSqlMITaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToTarget.AzureSqlDbMI': 'ConnectToTargetSqlMITaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties'} + 'task_type': {'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties'} } - def __init__(self, **kwargs) -> None: + def __init__(self, *, errors=None, **kwargs) -> None: super(ProjectTaskProperties, self).__init__(**kwargs) - self.errors = None + self.errors = errors self.state = None self.task_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_py3.py index 6ed36acb2840..798e0c9aed2c 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class ProjectTask(Resource): diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_analysis_validation_result.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_analysis_validation_result.py index 07b83e757fdc..d424fa61efbc 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_analysis_validation_result.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_analysis_validation_result.py @@ -15,13 +15,23 @@ class QueryAnalysisValidationResult(Model): """Results for query analysis comparison between the source and target. - :param query_results: List of queries executed and it's execution results + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar query_results: List of queries executed and it's execution results in source and target - :type query_results: ~azure.mgmt.datamigration.models.QueryExecutionResult - :param validation_errors: Errors that are part of the execution - :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError + :vartype query_results: + ~azure.mgmt.datamigration.models.QueryExecutionResult + :ivar validation_errors: Errors that are part of the execution + :vartype validation_errors: + ~azure.mgmt.datamigration.models.ValidationError """ + _validation = { + 'query_results': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + _attribute_map = { 'query_results': {'key': 'queryResults', 'type': 'QueryExecutionResult'}, 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, @@ -29,5 +39,5 @@ class QueryAnalysisValidationResult(Model): def __init__(self, **kwargs): super(QueryAnalysisValidationResult, self).__init__(**kwargs) - self.query_results = kwargs.get('query_results', None) - self.validation_errors = kwargs.get('validation_errors', None) + self.query_results = None + self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_analysis_validation_result_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_analysis_validation_result_py3.py index ba46bf53513b..6f259ed6f776 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_analysis_validation_result_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_analysis_validation_result_py3.py @@ -15,19 +15,29 @@ class QueryAnalysisValidationResult(Model): """Results for query analysis comparison between the source and target. - :param query_results: List of queries executed and it's execution results + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar query_results: List of queries executed and it's execution results in source and target - :type query_results: ~azure.mgmt.datamigration.models.QueryExecutionResult - :param validation_errors: Errors that are part of the execution - :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError + :vartype query_results: + ~azure.mgmt.datamigration.models.QueryExecutionResult + :ivar validation_errors: Errors that are part of the execution + :vartype validation_errors: + ~azure.mgmt.datamigration.models.ValidationError """ + _validation = { + 'query_results': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + _attribute_map = { 'query_results': {'key': 'queryResults', 'type': 'QueryExecutionResult'}, 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, } - def __init__(self, *, query_results=None, validation_errors=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(QueryAnalysisValidationResult, self).__init__(**kwargs) - self.query_results = query_results - self.validation_errors = validation_errors + self.query_results = None + self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_execution_result.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_execution_result.py index eb9d1f20ded4..726c9fc2a5c8 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_execution_result.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_execution_result.py @@ -15,16 +15,28 @@ class QueryExecutionResult(Model): """Describes query analysis results for execution in source and target. - :param query_text: Query text retrieved from the source server - :type query_text: str - :param statements_in_batch: Total no. of statements in the batch - :type statements_in_batch: long - :param source_result: Query analysis result from the source - :type source_result: ~azure.mgmt.datamigration.models.ExecutionStatistics - :param target_result: Query analysis result from the target - :type target_result: ~azure.mgmt.datamigration.models.ExecutionStatistics + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar query_text: Query text retrieved from the source server + :vartype query_text: str + :ivar statements_in_batch: Total no. of statements in the batch + :vartype statements_in_batch: long + :ivar source_result: Query analysis result from the source + :vartype source_result: + ~azure.mgmt.datamigration.models.ExecutionStatistics + :ivar target_result: Query analysis result from the target + :vartype target_result: + ~azure.mgmt.datamigration.models.ExecutionStatistics """ + _validation = { + 'query_text': {'readonly': True}, + 'statements_in_batch': {'readonly': True}, + 'source_result': {'readonly': True}, + 'target_result': {'readonly': True}, + } + _attribute_map = { 'query_text': {'key': 'queryText', 'type': 'str'}, 'statements_in_batch': {'key': 'statementsInBatch', 'type': 'long'}, @@ -34,7 +46,7 @@ class QueryExecutionResult(Model): def __init__(self, **kwargs): super(QueryExecutionResult, self).__init__(**kwargs) - self.query_text = kwargs.get('query_text', None) - self.statements_in_batch = kwargs.get('statements_in_batch', None) - self.source_result = kwargs.get('source_result', None) - self.target_result = kwargs.get('target_result', None) + self.query_text = None + self.statements_in_batch = None + self.source_result = None + self.target_result = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_execution_result_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_execution_result_py3.py index 129ddb35d62a..3e9bf67bf54c 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_execution_result_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_execution_result_py3.py @@ -15,16 +15,28 @@ class QueryExecutionResult(Model): """Describes query analysis results for execution in source and target. - :param query_text: Query text retrieved from the source server - :type query_text: str - :param statements_in_batch: Total no. of statements in the batch - :type statements_in_batch: long - :param source_result: Query analysis result from the source - :type source_result: ~azure.mgmt.datamigration.models.ExecutionStatistics - :param target_result: Query analysis result from the target - :type target_result: ~azure.mgmt.datamigration.models.ExecutionStatistics + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar query_text: Query text retrieved from the source server + :vartype query_text: str + :ivar statements_in_batch: Total no. of statements in the batch + :vartype statements_in_batch: long + :ivar source_result: Query analysis result from the source + :vartype source_result: + ~azure.mgmt.datamigration.models.ExecutionStatistics + :ivar target_result: Query analysis result from the target + :vartype target_result: + ~azure.mgmt.datamigration.models.ExecutionStatistics """ + _validation = { + 'query_text': {'readonly': True}, + 'statements_in_batch': {'readonly': True}, + 'source_result': {'readonly': True}, + 'target_result': {'readonly': True}, + } + _attribute_map = { 'query_text': {'key': 'queryText', 'type': 'str'}, 'statements_in_batch': {'key': 'statementsInBatch', 'type': 'long'}, @@ -32,9 +44,9 @@ class QueryExecutionResult(Model): 'target_result': {'key': 'targetResult', 'type': 'ExecutionStatistics'}, } - def __init__(self, *, query_text: str=None, statements_in_batch: int=None, source_result=None, target_result=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(QueryExecutionResult, self).__init__(**kwargs) - self.query_text = query_text - self.statements_in_batch = statements_in_batch - self.source_result = source_result - self.target_result = target_result + self.query_text = None + self.statements_in_batch = None + self.source_result = None + self.target_result = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/reportable_exception.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/reportable_exception.py index c4e5af2d63d0..f5d3b861de4c 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/reportable_exception.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/reportable_exception.py @@ -15,19 +15,30 @@ class ReportableException(Model): """Exception object for all custom exceptions. - :param message: Error message - :type message: str - :param file_path: The path to the file where exception occurred - :type file_path: str - :param line_number: The line number where exception occurred - :type line_number: str - :param h_result: Coded numerical value that is assigned to a specific + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar message: Error message + :vartype message: str + :ivar file_path: The path to the file where exception occurred + :vartype file_path: str + :ivar line_number: The line number where exception occurred + :vartype line_number: str + :ivar h_result: Coded numerical value that is assigned to a specific exception - :type h_result: int - :param stack_trace: Stack trace - :type stack_trace: str + :vartype h_result: int + :ivar stack_trace: Stack trace + :vartype stack_trace: str """ + _validation = { + 'message': {'readonly': True}, + 'file_path': {'readonly': True}, + 'line_number': {'readonly': True}, + 'h_result': {'readonly': True}, + 'stack_trace': {'readonly': True}, + } + _attribute_map = { 'message': {'key': 'message', 'type': 'str'}, 'file_path': {'key': 'filePath', 'type': 'str'}, @@ -38,8 +49,8 @@ class ReportableException(Model): def __init__(self, **kwargs): super(ReportableException, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.file_path = kwargs.get('file_path', None) - self.line_number = kwargs.get('line_number', None) - self.h_result = kwargs.get('h_result', None) - self.stack_trace = kwargs.get('stack_trace', None) + self.message = None + self.file_path = None + self.line_number = None + self.h_result = None + self.stack_trace = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/reportable_exception_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/reportable_exception_py3.py index 10d533c29b70..f42f505c63c4 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/reportable_exception_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/reportable_exception_py3.py @@ -15,19 +15,30 @@ class ReportableException(Model): """Exception object for all custom exceptions. - :param message: Error message - :type message: str - :param file_path: The path to the file where exception occurred - :type file_path: str - :param line_number: The line number where exception occurred - :type line_number: str - :param h_result: Coded numerical value that is assigned to a specific + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar message: Error message + :vartype message: str + :ivar file_path: The path to the file where exception occurred + :vartype file_path: str + :ivar line_number: The line number where exception occurred + :vartype line_number: str + :ivar h_result: Coded numerical value that is assigned to a specific exception - :type h_result: int - :param stack_trace: Stack trace - :type stack_trace: str + :vartype h_result: int + :ivar stack_trace: Stack trace + :vartype stack_trace: str """ + _validation = { + 'message': {'readonly': True}, + 'file_path': {'readonly': True}, + 'line_number': {'readonly': True}, + 'h_result': {'readonly': True}, + 'stack_trace': {'readonly': True}, + } + _attribute_map = { 'message': {'key': 'message', 'type': 'str'}, 'file_path': {'key': 'filePath', 'type': 'str'}, @@ -36,10 +47,10 @@ class ReportableException(Model): 'stack_trace': {'key': 'stackTrace', 'type': 'str'}, } - def __init__(self, *, message: str=None, file_path: str=None, line_number: str=None, h_result: int=None, stack_trace: str=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(ReportableException, self).__init__(**kwargs) - self.message = message - self.file_path = file_path - self.line_number = line_number - self.h_result = h_result - self.stack_trace = stack_trace + self.message = None + self.file_path = None + self.line_number = None + self.h_result = None + self.stack_trace = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result.py index 9cd9e4caf96e..fc3073048378 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result.py @@ -15,19 +15,28 @@ class SchemaComparisonValidationResult(Model): """Results for schema comparison between the source and target. - :param schema_differences: List of schema differences between the source + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar schema_differences: List of schema differences between the source and target databases - :type schema_differences: + :vartype schema_differences: ~azure.mgmt.datamigration.models.SchemaComparisonValidationResultType - :param validation_errors: List of errors that happened while performing + :ivar validation_errors: List of errors that happened while performing schema compare validation - :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError + :vartype validation_errors: + ~azure.mgmt.datamigration.models.ValidationError :param source_database_object_count: Count of source database objects :type source_database_object_count: dict[str, long] :param target_database_object_count: Count of target database objects :type target_database_object_count: dict[str, long] """ + _validation = { + 'schema_differences': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + _attribute_map = { 'schema_differences': {'key': 'schemaDifferences', 'type': 'SchemaComparisonValidationResultType'}, 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, @@ -37,7 +46,7 @@ class SchemaComparisonValidationResult(Model): def __init__(self, **kwargs): super(SchemaComparisonValidationResult, self).__init__(**kwargs) - self.schema_differences = kwargs.get('schema_differences', None) - self.validation_errors = kwargs.get('validation_errors', None) + self.schema_differences = None + self.validation_errors = None self.source_database_object_count = kwargs.get('source_database_object_count', None) self.target_database_object_count = kwargs.get('target_database_object_count', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_py3.py index 80d4e9462b13..1107b6b36d3f 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_py3.py @@ -15,19 +15,28 @@ class SchemaComparisonValidationResult(Model): """Results for schema comparison between the source and target. - :param schema_differences: List of schema differences between the source + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar schema_differences: List of schema differences between the source and target databases - :type schema_differences: + :vartype schema_differences: ~azure.mgmt.datamigration.models.SchemaComparisonValidationResultType - :param validation_errors: List of errors that happened while performing + :ivar validation_errors: List of errors that happened while performing schema compare validation - :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError + :vartype validation_errors: + ~azure.mgmt.datamigration.models.ValidationError :param source_database_object_count: Count of source database objects :type source_database_object_count: dict[str, long] :param target_database_object_count: Count of target database objects :type target_database_object_count: dict[str, long] """ + _validation = { + 'schema_differences': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + _attribute_map = { 'schema_differences': {'key': 'schemaDifferences', 'type': 'SchemaComparisonValidationResultType'}, 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, @@ -35,9 +44,9 @@ class SchemaComparisonValidationResult(Model): 'target_database_object_count': {'key': 'targetDatabaseObjectCount', 'type': '{long}'}, } - def __init__(self, *, schema_differences=None, validation_errors=None, source_database_object_count=None, target_database_object_count=None, **kwargs) -> None: + def __init__(self, *, source_database_object_count=None, target_database_object_count=None, **kwargs) -> None: super(SchemaComparisonValidationResult, self).__init__(**kwargs) - self.schema_differences = schema_differences - self.validation_errors = validation_errors + self.schema_differences = None + self.validation_errors = None self.source_database_object_count = source_database_object_count self.target_database_object_count = target_database_object_count diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_type.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_type.py index 2a53cac4d764..a8aa8c5abb7e 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_type.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_type.py @@ -15,18 +15,27 @@ class SchemaComparisonValidationResultType(Model): """Description about the errors happen while performing migration validation. - :param object_name: Name of the object that has the difference - :type object_name: str - :param object_type: Type of the object that has the difference. e.g + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar object_name: Name of the object that has the difference + :vartype object_name: str + :ivar object_type: Type of the object that has the difference. e.g (Table/View/StoredProcedure). Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function' - :type object_type: str or ~azure.mgmt.datamigration.models.ObjectType - :param update_action: Update action type with respect to target. Possible + :vartype object_type: str or ~azure.mgmt.datamigration.models.ObjectType + :ivar update_action: Update action type with respect to target. Possible values include: 'DeletedOnTarget', 'ChangedOnTarget', 'AddedOnTarget' - :type update_action: str or + :vartype update_action: str or ~azure.mgmt.datamigration.models.UpdateActionType """ + _validation = { + 'object_name': {'readonly': True}, + 'object_type': {'readonly': True}, + 'update_action': {'readonly': True}, + } + _attribute_map = { 'object_name': {'key': 'objectName', 'type': 'str'}, 'object_type': {'key': 'objectType', 'type': 'str'}, @@ -35,6 +44,6 @@ class SchemaComparisonValidationResultType(Model): def __init__(self, **kwargs): super(SchemaComparisonValidationResultType, self).__init__(**kwargs) - self.object_name = kwargs.get('object_name', None) - self.object_type = kwargs.get('object_type', None) - self.update_action = kwargs.get('update_action', None) + self.object_name = None + self.object_type = None + self.update_action = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_type_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_type_py3.py index e469340af8aa..3967a083850a 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_type_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_type_py3.py @@ -15,26 +15,35 @@ class SchemaComparisonValidationResultType(Model): """Description about the errors happen while performing migration validation. - :param object_name: Name of the object that has the difference - :type object_name: str - :param object_type: Type of the object that has the difference. e.g + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar object_name: Name of the object that has the difference + :vartype object_name: str + :ivar object_type: Type of the object that has the difference. e.g (Table/View/StoredProcedure). Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function' - :type object_type: str or ~azure.mgmt.datamigration.models.ObjectType - :param update_action: Update action type with respect to target. Possible + :vartype object_type: str or ~azure.mgmt.datamigration.models.ObjectType + :ivar update_action: Update action type with respect to target. Possible values include: 'DeletedOnTarget', 'ChangedOnTarget', 'AddedOnTarget' - :type update_action: str or + :vartype update_action: str or ~azure.mgmt.datamigration.models.UpdateActionType """ + _validation = { + 'object_name': {'readonly': True}, + 'object_type': {'readonly': True}, + 'update_action': {'readonly': True}, + } + _attribute_map = { 'object_name': {'key': 'objectName', 'type': 'str'}, 'object_type': {'key': 'objectType', 'type': 'str'}, 'update_action': {'key': 'updateAction', 'type': 'str'}, } - def __init__(self, *, object_name: str=None, object_type=None, update_action=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(SchemaComparisonValidationResultType, self).__init__(**kwargs) - self.object_name = object_name - self.object_type = object_type - self.update_action = update_action + self.object_name = None + self.object_type = None + self.update_action = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/service_operation.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/service_operation.py index 65254c700dda..fa09e79adad1 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/service_operation.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/service_operation.py @@ -13,7 +13,7 @@ class ServiceOperation(Model): - """Description of an action supported by the Data Migration Service. + """Description of an action supported by the Database Migration Service. :param name: The fully qualified action name, e.g. Microsoft.DataMigration/services/read diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/service_operation_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/service_operation_py3.py index 819b1025ca9b..27e51b4e5021 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/service_operation_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/service_operation_py3.py @@ -13,7 +13,7 @@ class ServiceOperation(Model): - """Description of an action supported by the Data Migration Service. + """Description of an action supported by the Database Migration Service. :param name: The fully qualified action name, e.g. Microsoft.DataMigration/services/read diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sql_connection_info_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sql_connection_info_py3.py index 47a643c77ed5..1227cde800a1 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sql_connection_info_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sql_connection_info_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .connection_info import ConnectionInfo +from .connection_info_py3 import ConnectionInfo class SqlConnectionInfo(ConnectionInfo): diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/start_migration_scenario_server_role_result.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/start_migration_scenario_server_role_result.py index f124eb80738d..a14f6e618b1e 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/start_migration_scenario_server_role_result.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/start_migration_scenario_server_role_result.py @@ -13,7 +13,7 @@ class StartMigrationScenarioServerRoleResult(Model): - """StartMigrationScenarioServerRoleResult. + """Migration results from a server role. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/start_migration_scenario_server_role_result_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/start_migration_scenario_server_role_result_py3.py index 579e48bcda6d..e351b2d780cb 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/start_migration_scenario_server_role_result_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/start_migration_scenario_server_role_result_py3.py @@ -13,7 +13,7 @@ class StartMigrationScenarioServerRoleResult(Model): - """StartMigrationScenarioServerRoleResult. + """Migration results from a server role. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/tracked_resource_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/tracked_resource_py3.py index 4d8ec200976a..6375e9a90eba 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/tracked_resource_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/tracked_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class TrackedResource(Resource): diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input.py deleted file mode 100644 index 7788fa2c730e..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ValidateMigrationInputSqlServerSqlMITaskInput(Model): - """Input for task that validates migration input for SQL to Azure SQL Managed - Instance. - - All required parameters must be populated in order to send to Azure. - - :param target_connection_info: Required. Information for connecting to - target - :type target_connection_info: - ~azure.mgmt.datamigration.models.SqlConnectionInfo - :param selected_databases: Required. Databases to migrate - :type selected_databases: - list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMIDatabaseInput] - :param backup_file_share: Backup file share information for all selected - databases. - :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare - :param backup_blob_share: Required. SAS URI of Azure Storage Account - Container to be used for storing backup files. - :type backup_blob_share: ~azure.mgmt.datamigration.models.BlobShare - """ - - _validation = { - 'target_connection_info': {'required': True}, - 'selected_databases': {'required': True}, - 'backup_blob_share': {'required': True}, - } - - _attribute_map = { - 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, - 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMIDatabaseInput]'}, - 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, - 'backup_blob_share': {'key': 'backupBlobShare', 'type': 'BlobShare'}, - } - - def __init__(self, **kwargs): - super(ValidateMigrationInputSqlServerSqlMITaskInput, self).__init__(**kwargs) - self.target_connection_info = kwargs.get('target_connection_info', None) - self.selected_databases = kwargs.get('selected_databases', None) - self.backup_file_share = kwargs.get('backup_file_share', None) - self.backup_blob_share = kwargs.get('backup_blob_share', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input_py3.py deleted file mode 100644 index 1e4e48120240..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ValidateMigrationInputSqlServerSqlMITaskInput(Model): - """Input for task that validates migration input for SQL to Azure SQL Managed - Instance. - - All required parameters must be populated in order to send to Azure. - - :param target_connection_info: Required. Information for connecting to - target - :type target_connection_info: - ~azure.mgmt.datamigration.models.SqlConnectionInfo - :param selected_databases: Required. Databases to migrate - :type selected_databases: - list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMIDatabaseInput] - :param backup_file_share: Backup file share information for all selected - databases. - :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare - :param backup_blob_share: Required. SAS URI of Azure Storage Account - Container to be used for storing backup files. - :type backup_blob_share: ~azure.mgmt.datamigration.models.BlobShare - """ - - _validation = { - 'target_connection_info': {'required': True}, - 'selected_databases': {'required': True}, - 'backup_blob_share': {'required': True}, - } - - _attribute_map = { - 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, - 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMIDatabaseInput]'}, - 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, - 'backup_blob_share': {'key': 'backupBlobShare', 'type': 'BlobShare'}, - } - - def __init__(self, *, target_connection_info, selected_databases, backup_blob_share, backup_file_share=None, **kwargs) -> None: - super(ValidateMigrationInputSqlServerSqlMITaskInput, self).__init__(**kwargs) - self.target_connection_info = target_connection_info - self.selected_databases = selected_databases - self.backup_file_share = backup_file_share - self.backup_blob_share = backup_blob_share diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output.py deleted file mode 100644 index e465fa15dfe3..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ValidateMigrationInputSqlServerSqlMITaskOutput(Model): - """Output for task that validates migration input for SQL to Azure SQL Managed - Instance migrations. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Result identifier - :vartype id: str - :ivar name: Name of database - :vartype name: str - :ivar restore_database_name_errors: Errors associated with the - RestoreDatabaseName - :vartype restore_database_name_errors: - list[~azure.mgmt.datamigration.models.ReportableException] - :ivar backup_folder_errors: Errors associated with the BackupFolder path - :vartype backup_folder_errors: - list[~azure.mgmt.datamigration.models.ReportableException] - :ivar backup_share_credentials_errors: Errors associated with backup share - user name and password credentials - :vartype backup_share_credentials_errors: - list[~azure.mgmt.datamigration.models.ReportableException] - :ivar backup_storage_account_errors: Errors associated with the storage - account provided. - :vartype backup_storage_account_errors: - list[~azure.mgmt.datamigration.models.ReportableException] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'restore_database_name_errors': {'readonly': True}, - 'backup_folder_errors': {'readonly': True}, - 'backup_share_credentials_errors': {'readonly': True}, - 'backup_storage_account_errors': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'restore_database_name_errors': {'key': 'restoreDatabaseNameErrors', 'type': '[ReportableException]'}, - 'backup_folder_errors': {'key': 'backupFolderErrors', 'type': '[ReportableException]'}, - 'backup_share_credentials_errors': {'key': 'backupShareCredentialsErrors', 'type': '[ReportableException]'}, - 'backup_storage_account_errors': {'key': 'backupStorageAccountErrors', 'type': '[ReportableException]'}, - } - - def __init__(self, **kwargs): - super(ValidateMigrationInputSqlServerSqlMITaskOutput, self).__init__(**kwargs) - self.id = None - self.name = None - self.restore_database_name_errors = None - self.backup_folder_errors = None - self.backup_share_credentials_errors = None - self.backup_storage_account_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output_py3.py deleted file mode 100644 index 599079bb4258..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ValidateMigrationInputSqlServerSqlMITaskOutput(Model): - """Output for task that validates migration input for SQL to Azure SQL Managed - Instance migrations. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Result identifier - :vartype id: str - :ivar name: Name of database - :vartype name: str - :ivar restore_database_name_errors: Errors associated with the - RestoreDatabaseName - :vartype restore_database_name_errors: - list[~azure.mgmt.datamigration.models.ReportableException] - :ivar backup_folder_errors: Errors associated with the BackupFolder path - :vartype backup_folder_errors: - list[~azure.mgmt.datamigration.models.ReportableException] - :ivar backup_share_credentials_errors: Errors associated with backup share - user name and password credentials - :vartype backup_share_credentials_errors: - list[~azure.mgmt.datamigration.models.ReportableException] - :ivar backup_storage_account_errors: Errors associated with the storage - account provided. - :vartype backup_storage_account_errors: - list[~azure.mgmt.datamigration.models.ReportableException] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'restore_database_name_errors': {'readonly': True}, - 'backup_folder_errors': {'readonly': True}, - 'backup_share_credentials_errors': {'readonly': True}, - 'backup_storage_account_errors': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'restore_database_name_errors': {'key': 'restoreDatabaseNameErrors', 'type': '[ReportableException]'}, - 'backup_folder_errors': {'key': 'backupFolderErrors', 'type': '[ReportableException]'}, - 'backup_share_credentials_errors': {'key': 'backupShareCredentialsErrors', 'type': '[ReportableException]'}, - 'backup_storage_account_errors': {'key': 'backupStorageAccountErrors', 'type': '[ReportableException]'}, - } - - def __init__(self, **kwargs) -> None: - super(ValidateMigrationInputSqlServerSqlMITaskOutput, self).__init__(**kwargs) - self.id = None - self.name = None - self.restore_database_name_errors = None - self.backup_folder_errors = None - self.backup_share_credentials_errors = None - self.backup_storage_account_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties.py deleted file mode 100644 index b56775637dec..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .project_task_properties import ProjectTaskProperties - - -class ValidateMigrationInputSqlServerSqlMITaskProperties(ProjectTaskProperties): - """Properties for task that validates migration input for SQL to Azure SQL - Database Managed Instance. - - 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 errors: Array of errors. This is ignored if submitted. - :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] - :ivar state: The state of the task. This is ignored if submitted. Possible - values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', - 'Failed', 'FailedInputValidation', 'Faulted' - :vartype state: str or ~azure.mgmt.datamigration.models.TaskState - :param task_type: Required. Constant filled by server. - :type task_type: str - :param input: Task input - :type input: - ~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMITaskInput - :ivar output: Task output. This is ignored if submitted. - :vartype output: - list[~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMITaskOutput] - """ - - _validation = { - 'errors': {'readonly': True}, - 'state': {'readonly': True}, - 'task_type': {'required': True}, - 'output': {'readonly': True}, - } - - _attribute_map = { - 'errors': {'key': 'errors', 'type': '[ODataError]'}, - 'state': {'key': 'state', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'input': {'key': 'input', 'type': 'ValidateMigrationInputSqlServerSqlMITaskInput'}, - 'output': {'key': 'output', 'type': '[ValidateMigrationInputSqlServerSqlMITaskOutput]'}, - } - - def __init__(self, **kwargs): - super(ValidateMigrationInputSqlServerSqlMITaskProperties, self).__init__(**kwargs) - self.input = kwargs.get('input', None) - self.output = None - self.task_type = 'ValidateMigrationInput.SqlServer.AzureSqlDbMI' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties_py3.py deleted file mode 100644 index 702d9c6b2342..000000000000 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .project_task_properties import ProjectTaskProperties - - -class ValidateMigrationInputSqlServerSqlMITaskProperties(ProjectTaskProperties): - """Properties for task that validates migration input for SQL to Azure SQL - Database Managed Instance. - - 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 errors: Array of errors. This is ignored if submitted. - :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] - :ivar state: The state of the task. This is ignored if submitted. Possible - values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', - 'Failed', 'FailedInputValidation', 'Faulted' - :vartype state: str or ~azure.mgmt.datamigration.models.TaskState - :param task_type: Required. Constant filled by server. - :type task_type: str - :param input: Task input - :type input: - ~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMITaskInput - :ivar output: Task output. This is ignored if submitted. - :vartype output: - list[~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMITaskOutput] - """ - - _validation = { - 'errors': {'readonly': True}, - 'state': {'readonly': True}, - 'task_type': {'required': True}, - 'output': {'readonly': True}, - } - - _attribute_map = { - 'errors': {'key': 'errors', 'type': '[ODataError]'}, - 'state': {'key': 'state', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'input': {'key': 'input', 'type': 'ValidateMigrationInputSqlServerSqlMITaskInput'}, - 'output': {'key': 'output', 'type': '[ValidateMigrationInputSqlServerSqlMITaskOutput]'}, - } - - def __init__(self, *, input=None, **kwargs) -> None: - super(ValidateMigrationInputSqlServerSqlMITaskProperties, self).__init__(**kwargs) - self.input = input - self.output = None - self.task_type = 'ValidateMigrationInput.SqlServer.AzureSqlDbMI' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validation_error.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validation_error.py index 2dcb6d4fdf0c..7879e2effa78 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validation_error.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validation_error.py @@ -15,13 +15,21 @@ class ValidationError(Model): """Description about the errors happen while performing migration validation. - :param text: Error Text - :type text: str - :param severity: Severity of the error. Possible values include: - 'Message', 'Warning', 'Error' - :type severity: str or ~azure.mgmt.datamigration.models.Severity + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar text: Error Text + :vartype text: str + :ivar severity: Severity of the error. Possible values include: 'Message', + 'Warning', 'Error' + :vartype severity: str or ~azure.mgmt.datamigration.models.Severity """ + _validation = { + 'text': {'readonly': True}, + 'severity': {'readonly': True}, + } + _attribute_map = { 'text': {'key': 'text', 'type': 'str'}, 'severity': {'key': 'severity', 'type': 'str'}, @@ -29,5 +37,5 @@ class ValidationError(Model): def __init__(self, **kwargs): super(ValidationError, self).__init__(**kwargs) - self.text = kwargs.get('text', None) - self.severity = kwargs.get('severity', None) + self.text = None + self.severity = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validation_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validation_error_py3.py index 6e7ce050ff4e..cb8f150455cf 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validation_error_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validation_error_py3.py @@ -15,19 +15,27 @@ class ValidationError(Model): """Description about the errors happen while performing migration validation. - :param text: Error Text - :type text: str - :param severity: Severity of the error. Possible values include: - 'Message', 'Warning', 'Error' - :type severity: str or ~azure.mgmt.datamigration.models.Severity + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar text: Error Text + :vartype text: str + :ivar severity: Severity of the error. Possible values include: 'Message', + 'Warning', 'Error' + :vartype severity: str or ~azure.mgmt.datamigration.models.Severity """ + _validation = { + 'text': {'readonly': True}, + 'severity': {'readonly': True}, + } + _attribute_map = { 'text': {'key': 'text', 'type': 'str'}, 'severity': {'key': 'severity', 'type': 'str'}, } - def __init__(self, *, text: str=None, severity=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(ValidationError, self).__init__(**kwargs) - self.text = text - self.severity = severity + self.text = None + self.severity = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/wait_statistics.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/wait_statistics.py index 2e1b9a76d7fc..9db8f0f3334c 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/wait_statistics.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/wait_statistics.py @@ -15,15 +15,23 @@ class WaitStatistics(Model): """Wait statistics gathered during query batch execution. - :param wait_type: Type of the Wait - :type wait_type: str - :param wait_time_ms: Total wait time in millisecond(s) . Default value: 0 - . - :type wait_time_ms: float - :param wait_count: Total no. of waits - :type wait_count: long + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar wait_type: Type of the Wait + :vartype wait_type: str + :ivar wait_time_ms: Total wait time in millisecond(s). Default value: 0 . + :vartype wait_time_ms: float + :ivar wait_count: Total no. of waits + :vartype wait_count: long """ + _validation = { + 'wait_type': {'readonly': True}, + 'wait_time_ms': {'readonly': True}, + 'wait_count': {'readonly': True}, + } + _attribute_map = { 'wait_type': {'key': 'waitType', 'type': 'str'}, 'wait_time_ms': {'key': 'waitTimeMs', 'type': 'float'}, @@ -32,6 +40,6 @@ class WaitStatistics(Model): def __init__(self, **kwargs): super(WaitStatistics, self).__init__(**kwargs) - self.wait_type = kwargs.get('wait_type', None) - self.wait_time_ms = kwargs.get('wait_time_ms', 0) - self.wait_count = kwargs.get('wait_count', None) + self.wait_type = None + self.wait_time_ms = None + self.wait_count = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/wait_statistics_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/wait_statistics_py3.py index 4ac3fbbb9247..ae6f3ccdcb29 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/wait_statistics_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/wait_statistics_py3.py @@ -15,23 +15,31 @@ class WaitStatistics(Model): """Wait statistics gathered during query batch execution. - :param wait_type: Type of the Wait - :type wait_type: str - :param wait_time_ms: Total wait time in millisecond(s) . Default value: 0 - . - :type wait_time_ms: float - :param wait_count: Total no. of waits - :type wait_count: long + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar wait_type: Type of the Wait + :vartype wait_type: str + :ivar wait_time_ms: Total wait time in millisecond(s). Default value: 0 . + :vartype wait_time_ms: float + :ivar wait_count: Total no. of waits + :vartype wait_count: long """ + _validation = { + 'wait_type': {'readonly': True}, + 'wait_time_ms': {'readonly': True}, + 'wait_count': {'readonly': True}, + } + _attribute_map = { 'wait_type': {'key': 'waitType', 'type': 'str'}, 'wait_time_ms': {'key': 'waitTimeMs', 'type': 'float'}, 'wait_count': {'key': 'waitCount', 'type': 'long'}, } - def __init__(self, *, wait_type: str=None, wait_time_ms: float=0, wait_count: int=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(WaitStatistics, self).__init__(**kwargs) - self.wait_type = wait_type - self.wait_time_ms = wait_time_ms - self.wait_count = wait_count + self.wait_type = None + self.wait_time_ms = None + self.wait_count = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/operations.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/operations.py index 2188f0a13f4e..541b10fbca20 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/operations.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/operations.py @@ -22,7 +22,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API. Constant value: "2018-03-31-preview". + :ivar api_version: Version of the API. Constant value: "2018-04-19". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-03-31-preview" + self.api_version = "2018-04-19" self.config = config @@ -40,7 +40,7 @@ def list( self, custom_headers=None, raw=False, **operation_config): """Get available resource provider actions (operations). - Lists all available actions exposed by the Data Migration Service + Lists all available actions exposed by the Database Migration Service resource provider. :param dict custom_headers: headers that will be added to the request diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/projects_operations.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/projects_operations.py index a60a670f4747..9e071cc44f02 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/projects_operations.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/projects_operations.py @@ -22,7 +22,7 @@ class ProjectsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API. Constant value: "2018-03-31-preview". + :ivar api_version: Version of the API. Constant value: "2018-04-19". """ models = models @@ -32,11 +32,11 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-03-31-preview" + self.api_version = "2018-04-19" self.config = config - def list( + def list_by_resource_group( self, group_name, service_name, custom_headers=None, raw=False, **operation_config): """Get projects in a service. @@ -63,7 +63,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'groupName': self._serialize.url("group_name", group_name, 'str'), @@ -108,7 +108,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects'} + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects'} def create_or_update( self, parameters, group_name, service_name, project_name, custom_headers=None, raw=False, **operation_config): diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/resource_skus_operations.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/resource_skus_operations.py index 19694debce87..a089b020981f 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/resource_skus_operations.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/resource_skus_operations.py @@ -22,7 +22,7 @@ class ResourceSkusOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API. Constant value: "2018-03-31-preview". + :ivar api_version: Version of the API. Constant value: "2018-04-19". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-03-31-preview" + self.api_version = "2018-04-19" self.config = config diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/services_operations.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/services_operations.py index 6956272c9dee..4fd7a95abe38 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/services_operations.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/services_operations.py @@ -24,7 +24,7 @@ class ServicesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API. Constant value: "2018-03-31-preview". + :ivar api_version: Version of the API. Constant value: "2018-04-19". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-03-31-preview" + self.api_version = "2018-04-19" self.config = config @@ -93,15 +93,16 @@ def create_or_update( """Create or update DMS Instance. The services resource is the top-level resource that represents the - Data Migration Service. The PUT method creates a new service or updates - an existing one. When a service is updated, existing child resources - (i.e. tasks) are unaffected. Services currently support a single kind, - "vm", which refers to a VM-based service, although other kinds may be - added in the future. This method can change the kind, SKU, and network - of the service, but if tasks are currently running (i.e. the service is - busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The - provider will reply when successful with 200 OK or 201 Created. - Long-running operations use the provisioningState property. + Database Migration Service. The PUT method creates a new service or + updates an existing one. When a service is updated, existing child + resources (i.e. tasks) are unaffected. Services currently support a + single kind, "vm", which refers to a VM-based service, although other + kinds may be added in the future. This method can change the kind, SKU, + and network of the service, but if tasks are currently running (i.e. + the service is busy), this will fail with 400 Bad Request + ("ServiceIsBusy"). The provider will reply when successful with 200 OK + or 201 Created. Long-running operations use the provisioningState + property. :param parameters: Information about the service :type parameters: @@ -156,8 +157,8 @@ def get( """Get DMS Service Instance. The services resource is the top-level resource that represents the - Data Migration Service. The GET method retrieves information about a - service instance. + Database Migration Service. The GET method retrieves information about + a service instance. :param group_name: Name of the resource group :type group_name: str @@ -260,7 +261,7 @@ def delete( """Delete DMS Service Instance. The services resource is the top-level resource that represents the - Data Migration Service. The DELETE method deletes a service. Any + Database Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. :param group_name: Name of the resource group @@ -358,10 +359,10 @@ def update( """Create or update DMS Service Instance. The services resource is the top-level resource that represents the - Data Migration Service. The PATCH method updates an existing service. - This method can change the kind, SKU, and network of the service, but - if tasks are currently running (i.e. the service is busy), this will - fail with 400 Bad Request ("ServiceIsBusy"). + Database Migration Service. The PATCH method updates an existing + service. This method can change the kind, SKU, and network of the + service, but if tasks are currently running (i.e. the service is busy), + this will fail with 400 Bad Request ("ServiceIsBusy"). :param parameters: Information about the service :type parameters: @@ -416,8 +417,8 @@ def check_status( """Check service health status. The services resource is the top-level resource that represents the - Data Migration Service. This action performs a health check and returns - the status of the service and virtual machine size. + Database Migration Service. This action performs a health check and + returns the status of the service and virtual machine size. :param group_name: Name of the resource group :type group_name: str @@ -520,8 +521,8 @@ def start( """Start service. The services resource is the top-level resource that represents the - Data Migration Service. This action starts the service and the service - can be used for data migration. + Database Migration Service. This action starts the service and the + service can be used for data migration. :param group_name: Name of the resource group :type group_name: str @@ -603,9 +604,9 @@ def stop( """Stop service. The services resource is the top-level resource that represents the - Data Migration Service. This action stops the service and the service - cannot be used for data migration. The service owner won't be billed - when the service is stopped. + Database Migration Service. This action stops the service and the + service cannot be used for data migration. The service owner won't be + billed when the service is stopped. :param group_name: Name of the resource group :type group_name: str @@ -650,8 +651,8 @@ def list_skus( """Get compatible SKUs. The services resource is the top-level resource that represents the - Data Migration Service. The skus action returns the list of SKUs that a - service resource can be updated to. + Database Migration Service. The skus action returns the list of SKUs + that a service resource can be updated to. :param group_name: Name of the resource group :type group_name: str @@ -719,7 +720,7 @@ def internal_paging(next_link=None, raw=False): return deserialized list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/skus'} - def check_children_name_availability( + def nested_check_name_availability( self, group_name, service_name, name=None, type=None, custom_headers=None, raw=False, **operation_config): """Check nested resource name validity and availability. @@ -748,7 +749,7 @@ def check_children_name_availability( parameters = models.NameAvailabilityRequest(name=name, type=type) # Construct URL - url = self.check_children_name_availability.metadata['url'] + url = self.nested_check_name_availability.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'groupName': self._serialize.url("group_name", group_name, 'str'), @@ -791,15 +792,15 @@ def check_children_name_availability( return client_raw_response return deserialized - check_children_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkNameAvailability'} + nested_check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkNameAvailability'} def list_by_resource_group( self, group_name, custom_headers=None, raw=False, **operation_config): """Get services in resource group. The Services resource is the top-level resource that represents the - Data Migration Service. This method returns a list of service resources - in a resource group. + Database Migration Service. This method returns a list of service + resources in a resource group. :param group_name: Name of the resource group :type group_name: str @@ -869,8 +870,8 @@ def list( """Get services in subscription. The services resource is the top-level resource that represents the - Data Migration Service. This method returns a list of service resources - in a subscription. + Database Migration Service. This method returns a list of service + resources in a subscription. :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/tasks_operations.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/tasks_operations.py index fb887902f321..5f5d65d9eacc 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/tasks_operations.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/tasks_operations.py @@ -22,7 +22,7 @@ class TasksOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API. Constant value: "2018-03-31-preview". + :ivar api_version: Version of the API. Constant value: "2018-04-19". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-03-31-preview" + self.api_version = "2018-04-19" self.config = config @@ -41,8 +41,8 @@ def list( """Get tasks in a service. The services resource is the top-level resource that represents the - Data Migration Service. This method returns a list of tasks owned by a - service resource. Some tasks may have a status of Unknown, which + Database Migration Service. This method returns a list of tasks owned + by a service resource. Some tasks may have a status of Unknown, which indicates that an error occurred while querying the status of that task. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/usages_operations.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/usages_operations.py index 14eb432b67ee..502c3ea22afe 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/usages_operations.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/usages_operations.py @@ -22,7 +22,7 @@ class UsagesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API. Constant value: "2018-03-31-preview". + :ivar api_version: Version of the API. Constant value: "2018-04-19". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-03-31-preview" + self.api_version = "2018-04-19" self.config = config @@ -41,7 +41,7 @@ def list( """Get resource quotas and usage information. This method returns region-specific quotas and resource usage - information for the Data Migration Service. + information for the Database Migration Service. :param location: The Azure region of the operation :type location: str diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/version.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/version.py index e0ec669828cb..a39916c162ce 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/version.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "1.0.0" diff --git a/azure-mgmt-datamigration/sdk_packaging.toml b/azure-mgmt-datamigration/sdk_packaging.toml new file mode 100644 index 000000000000..a26a61223d02 --- /dev/null +++ b/azure-mgmt-datamigration/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-datamigration" +package_pprint_name = "Data Migration" +package_doc_id = "" +is_stable = true diff --git a/azure-mgmt-datamigration/setup.py b/azure-mgmt-datamigration/setup.py index ced4f87a9123..57a54a470d6e 100644 --- a/azure-mgmt-datamigration/setup.py +++ b/azure-mgmt-datamigration/setup.py @@ -64,7 +64,7 @@ author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', diff --git a/azure-mgmt-datamigration/tests/recordings/test_mgmt_datamigration.test_datamigration.yaml b/azure-mgmt-datamigration/tests/recordings/test_mgmt_datamigration.test_datamigration.yaml index f4a5c912a63f..11f67ab884d3 100644 --- a/azure-mgmt-datamigration/tests/recordings/test_mgmt_datamigration.test_datamigration.yaml +++ b/azure-mgmt-datamigration/tests/recordings/test_mgmt_datamigration.test_datamigration.yaml @@ -11,14 +11,14 @@ interactions: msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/checkNameAvailability?api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/checkNameAvailability?api-version=2018-04-19 response: body: {string: '{"nameAvailable":true}'} headers: cache-control: [no-cache] content-length: ['22'] content-type: [application/json; charset=utf-8] - date: ['Mon, 14 May 2018 23:56:11 GMT'] + date: ['Wed, 16 May 2018 00:11:08 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-IIS/8.5] @@ -44,20 +44,20 @@ interactions: response: body: {string: "{\r\n \"name\": \"pysdkdmstestvnet74501149\",\r\n \"id\": \"\ /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/virtualNetworks/pysdkdmstestvnet74501149\"\ - ,\r\n \"etag\": \"W/\\\"e506a13d-3058-4855-9688-172f1229fe33\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"78f14562-a606-48ef-8407-22ea4b9b56da\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"centralus\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ - \ \"resourceGuid\": \"f52a9f74-d261-495f-85d7-948242668ff6\",\r\n \"\ + \ \"resourceGuid\": \"dc0b0d58-5a46-42d4-8b5b-c251d15dd129\",\r\n \"\ addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ : [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\"\ : false\r\n }\r\n}"} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/operations/e79ba977-50bd-4e4d-a989-204c9a20a08b?api-version=2018-02-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/operations/0fdf6f56-b97e-425c-aefc-bddf6a3c4340?api-version=2018-02-01'] cache-control: [no-cache] content-length: ['683'] content-type: [application/json; charset=utf-8] - date: ['Mon, 14 May 2018 23:56:13 GMT'] + date: ['Wed, 16 May 2018 00:11:11 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -74,14 +74,14 @@ interactions: User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/operations/e79ba977-50bd-4e4d-a989-204c9a20a08b?api-version=2018-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/operations/0fdf6f56-b97e-425c-aefc-bddf6a3c4340?api-version=2018-02-01 response: body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} headers: cache-control: [no-cache] content-length: ['30'] content-type: [application/json; charset=utf-8] - date: ['Mon, 14 May 2018 23:56:18 GMT'] + date: ['Wed, 16 May 2018 00:11:14 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -99,14 +99,14 @@ interactions: User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/operations/e79ba977-50bd-4e4d-a989-204c9a20a08b?api-version=2018-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/operations/0fdf6f56-b97e-425c-aefc-bddf6a3c4340?api-version=2018-02-01 response: body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} headers: cache-control: [no-cache] content-length: ['29'] content-type: [application/json; charset=utf-8] - date: ['Mon, 14 May 2018 23:56:28 GMT'] + date: ['Wed, 16 May 2018 00:11:25 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -128,10 +128,10 @@ interactions: response: body: {string: "{\r\n \"name\": \"pysdkdmstestvnet74501149\",\r\n \"id\": \"\ /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/virtualNetworks/pysdkdmstestvnet74501149\"\ - ,\r\n \"etag\": \"W/\\\"c06849f5-b33f-43c6-9e0f-2ef5334fcefb\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"14c35df8-e39f-43fd-abd8-dc2f51f88e6a\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"centralus\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"f52a9f74-d261-495f-85d7-948242668ff6\",\r\n \"\ + \ \"resourceGuid\": \"dc0b0d58-5a46-42d4-8b5b-c251d15dd129\",\r\n \"\ addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ : [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\"\ @@ -140,8 +140,8 @@ interactions: cache-control: [no-cache] content-length: ['684'] content-type: [application/json; charset=utf-8] - date: ['Mon, 14 May 2018 23:56:28 GMT'] - etag: [W/"c06849f5-b33f-43c6-9e0f-2ef5334fcefb"] + date: ['Wed, 16 May 2018 00:11:25 GMT'] + etag: [W/"14c35df8-e39f-43fd-abd8-dc2f51f88e6a"] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -165,15 +165,15 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/virtualNetworks/pysdkdmstestvnet74501149/subnets/subnet1?api-version=2018-02-01 response: body: {string: "{\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/virtualNetworks/pysdkdmstestvnet74501149/subnets/subnet1\"\ - ,\r\n \"etag\": \"W/\\\"3552ce4e-56de-4757-9cdf-b784f8e52c06\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"510a90b2-734c-4b60-9c89-8133dc54af4d\\\"\",\r\n \ \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ addressPrefix\": \"10.0.0.0/24\"\r\n }\r\n}"} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/operations/2720a5c5-f737-4f80-9140-6b35b0ae23da?api-version=2018-02-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/operations/746dc1ec-e348-494e-885b-34e7f3893b1f?api-version=2018-02-01'] cache-control: [no-cache] content-length: ['366'] content-type: [application/json; charset=utf-8] - date: ['Mon, 14 May 2018 23:56:31 GMT'] + date: ['Wed, 16 May 2018 00:11:26 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -181,617 +181,6 @@ interactions: x-content-type-options: [nosniff] x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} -- request: - body: 'b''b\''b\\\''b\\\\\\\''{"location": "centralus", "properties": {"virtualSubnetId": - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/virtualNetworks/pysdkdmstestvnet74501149/subnets/subnet1"}, - "sku": {"name": "Basic_2vCores"}}\\\\\\\''\\\''\''''' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['270'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149?api-version=2018-03-31-preview - response: - body: {string: '{"properties":{"provisioningState":"Accepted","virtualSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/virtualNetworks/pysdkdmstestvnet74501149/subnets/subnet1"},"etag":"53vC4/R7Ph4WE0zUzIkttJCaBKfkEb8lS0zlGxmtfaw=","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149","location":"centralus","name":"pysdkdmstestservice74501149","sku":{"name":"Basic_2vCores","size":"2 - vCores","tier":"Basic"},"type":"Microsoft.DataMigration/services"}'} - headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview'] - cache-control: [no-cache] - content-length: ['626'] - content-type: [application/json; charset=utf-8] - date: ['Mon, 14 May 2018 23:56:32 GMT'] - etag: ['"53vC4/R7Ph4WE0zUzIkttJCaBKfkEb8lS0zlGxmtfaw="'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/operations/2720a5c5-f737-4f80-9140-6b35b0ae23da?api-version=2018-02-01 - response: - body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} - headers: - cache-control: [no-cache] - content-length: ['29'] - content-type: [application/json; charset=utf-8] - date: ['Mon, 14 May 2018 23:56:33 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/virtualNetworks/pysdkdmstestvnet74501149/subnets/subnet1?api-version=2018-02-01 - response: - body: {string: "{\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/virtualNetworks/pysdkdmstestvnet74501149/subnets/subnet1\"\ - ,\r\n \"etag\": \"W/\\\"714b8434-d7d6-49d9-b6c4-015cd43ba8b8\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - addressPrefix\": \"10.0.0.0/24\"\r\n }\r\n}"} - headers: - cache-control: [no-cache] - content-length: ['367'] - content-type: [application/json; charset=utf-8] - date: ['Mon, 14 May 2018 23:56:34 GMT'] - etag: [W/"714b8434-d7d6-49d9-b6c4-015cd43ba8b8"] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Mon, 14 May 2018 23:57:02 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Mon, 14 May 2018 23:57:33 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Mon, 14 May 2018 23:58:04 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Mon, 14 May 2018 23:58:34 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Mon, 14 May 2018 23:59:05 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Mon, 14 May 2018 23:59:36 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:00:07 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:00:37 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:01:07 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:01:38 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:02:09 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:02:39 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:03:10 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:03:41 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:04:12 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:04:42 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:05:13 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:05:43 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:06:13 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:06:45 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview - response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:07:15 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} - request: body: null headers: @@ -799,19 +188,19 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] + msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/operations/746dc1ec-e348-494e-885b-34e7f3893b1f?api-version=2018-02-01 response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} + body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} headers: cache-control: [no-cache] - content-length: ['234'] + content-length: ['29'] content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:07:46 GMT'] + date: ['Wed, 16 May 2018 00:11:30 GMT'] expires: ['-1'] pragma: [no-cache] - server: [Microsoft-IIS/8.5] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] @@ -824,49 +213,60 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] + msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/virtualNetworks/pysdkdmstestvnet74501149/subnets/subnet1?api-version=2018-02-01 response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} + body: {string: "{\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/virtualNetworks/pysdkdmstestvnet74501149/subnets/subnet1\"\ + ,\r\n \"etag\": \"W/\\\"c069da59-5d5d-434b-92d4-3875e6e1c30d\\\"\",\r\n \ + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ + addressPrefix\": \"10.0.0.0/24\"\r\n }\r\n}"} headers: cache-control: [no-cache] - content-length: ['234'] + content-length: ['367'] content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:08:17 GMT'] + date: ['Wed, 16 May 2018 00:11:30 GMT'] + etag: [W/"c069da59-5d5d-434b-92d4-3875e6e1c30d"] expires: ['-1'] pragma: [no-cache] - server: [Microsoft-IIS/8.5] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] x-content-type-options: [nosniff] status: {code: 200, message: OK} - request: - body: null + body: 'b''b\''b\\\''b\\\\\\\''{"location": "centralus", "properties": {"virtualSubnetId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/virtualNetworks/pysdkdmstestvnet74501149/subnets/subnet1"}, + "sku": {"name": "Basic_2vCores"}}\\\\\\\''\\\''\''''' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] + Content-Length: ['270'] + Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149?api-version=2018-04-19 response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} + body: {string: '{"properties":{"provisioningState":"Accepted","virtualSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/virtualNetworks/pysdkdmstestvnet74501149/subnets/subnet1"},"etag":"53vC4/R7Ph4WE0zUzIkttJCaBKfkEb8lS0zlGxmtfaw=","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149","location":"centralus","name":"pysdkdmstestservice74501149","sku":{"name":"Basic_2vCores","size":"2 + vCores","tier":"Basic"},"type":"Microsoft.DataMigration/services"}'} headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/ad1ddc5c-ea2f-4551-9696-8e80aa1dd0a6?api-version=2018-04-19'] cache-control: [no-cache] - content-length: ['234'] + content-length: ['626'] content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:08:48 GMT'] + date: ['Wed, 16 May 2018 00:11:34 GMT'] + etag: ['"53vC4/R7Ph4WE0zUzIkttJCaBKfkEb8lS0zlGxmtfaw="'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-IIS/8.5] strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] x-content-type-options: [nosniff] - status: {code: 200, message: OK} + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} - request: body: null headers: @@ -876,14 +276,14 @@ interactions: User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/ad1ddc5c-ea2f-4551-9696-8e80aa1dd0a6?api-version=2018-04-19 response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Running"}'} + body: {string: '{"name":"ad1ddc5c-ea2f-4551-9696-8e80aa1dd0a6","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/ad1ddc5c-ea2f-4551-9696-8e80aa1dd0a6","status":"Running"}'} headers: cache-control: [no-cache] content-length: ['234'] content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:09:18 GMT'] + date: ['Wed, 16 May 2018 00:12:04 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-IIS/8.5] @@ -901,14 +301,14 @@ interactions: User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a?api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/ad1ddc5c-ea2f-4551-9696-8e80aa1dd0a6?api-version=2018-04-19 response: - body: {string: '{"name":"6077d525-6934-4e93-8e1f-083d2fd4074a","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/6077d525-6934-4e93-8e1f-083d2fd4074a","status":"Succeeded"}'} + body: {string: '{"name":"ad1ddc5c-ea2f-4551-9696-8e80aa1dd0a6","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/ad1ddc5c-ea2f-4551-9696-8e80aa1dd0a6","status":"Succeeded"}'} headers: cache-control: [no-cache] content-length: ['236'] content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:09:49 GMT'] + date: ['Wed, 16 May 2018 00:24:19 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-IIS/8.5] @@ -926,16 +326,16 @@ interactions: User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149?api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149?api-version=2018-04-19 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","virtualNicId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/networkInterfaces/NIC-9vu6zrpdhi6ntyrxuh4mfijf","virtualSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/virtualNetworks/pysdkdmstestvnet74501149/subnets/subnet1"},"etag":"M3c1EUgr6txbgHOHUN8B5b9WX1n5kQiVi6FtP7JEkcU=","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149","location":"centralus","name":"pysdkdmstestservice74501149","sku":{"name":"Basic_2vCores","size":"2 + body: {string: '{"properties":{"provisioningState":"Succeeded","virtualNicId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/networkInterfaces/NIC-q8y37gvd9fkz2jw7yd4j6hd6","virtualSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/virtualNetworks/pysdkdmstestvnet74501149/subnets/subnet1"},"etag":"RCbjT2PLWxCH5cLHF6xz2gS3VNTdE9rGdd4ITxKf7pQ=","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149","location":"centralus","name":"pysdkdmstestservice74501149","sku":{"name":"Basic_2vCores","size":"2 vCores","tier":"Basic"},"type":"Microsoft.DataMigration/services"}'} headers: cache-control: [no-cache] content-length: ['807'] content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:09:49 GMT'] - etag: ['"M3c1EUgr6txbgHOHUN8B5b9WX1n5kQiVi6FtP7JEkcU="'] + date: ['Wed, 16 May 2018 00:24:20 GMT'] + etag: ['"RCbjT2PLWxCH5cLHF6xz2gS3VNTdE9rGdd4ITxKf7pQ="'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-IIS/8.5] @@ -955,16 +355,16 @@ interactions: msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149?api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149?api-version=2018-04-19 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","virtualNicId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/networkInterfaces/NIC-9vu6zrpdhi6ntyrxuh4mfijf","virtualSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/virtualNetworks/pysdkdmstestvnet74501149/subnets/subnet1"},"etag":"M3c1EUgr6txbgHOHUN8B5b9WX1n5kQiVi6FtP7JEkcU=","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149","location":"centralus","name":"pysdkdmstestservice74501149","sku":{"name":"Basic_2vCores","size":"2 + body: {string: '{"properties":{"provisioningState":"Succeeded","virtualNicId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/networkInterfaces/NIC-q8y37gvd9fkz2jw7yd4j6hd6","virtualSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.Network/virtualNetworks/pysdkdmstestvnet74501149/subnets/subnet1"},"etag":"RCbjT2PLWxCH5cLHF6xz2gS3VNTdE9rGdd4ITxKf7pQ=","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149","location":"centralus","name":"pysdkdmstestservice74501149","sku":{"name":"Basic_2vCores","size":"2 vCores","tier":"Basic"},"type":"Microsoft.DataMigration/services"}'} headers: cache-control: [no-cache] content-length: ['807'] content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:09:49 GMT'] - etag: ['"M3c1EUgr6txbgHOHUN8B5b9WX1n5kQiVi6FtP7JEkcU="'] + date: ['Wed, 16 May 2018 00:24:21 GMT'] + etag: ['"RCbjT2PLWxCH5cLHF6xz2gS3VNTdE9rGdd4ITxKf7pQ="'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-IIS/8.5] @@ -985,7 +385,7 @@ interactions: msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/checkNameAvailability?api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/checkNameAvailability?api-version=2018-04-19 response: body: {string: '{"reason":"AlreadyExists","message":"The resource name is already in use.","nameAvailable":false}'} @@ -993,7 +393,7 @@ interactions: cache-control: [no-cache] content-length: ['97'] content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:09:50 GMT'] + date: ['Wed, 16 May 2018 00:24:22 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-IIS/8.5] @@ -1015,15 +415,15 @@ interactions: msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149?api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149?api-version=2018-04-19 response: - body: {string: '{"properties":{"sourcePlatform":"SQL","targetPlatform":"SQLDB","creationTime":"2018-05-15T00:09:53.2461629+00:00","provisioningState":"Succeeded"},"etag":"CVrLvxKLylpDI+hi+1eqQJQsZiGZELT0QLETsfdnfR0=","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149","location":"centralus","name":"pysdkdmstestproject74501149","type":"Microsoft.DataMigration/services/projects"}'} + body: {string: '{"properties":{"sourcePlatform":"SQL","targetPlatform":"SQLDB","creationTime":"2018-05-16T00:24:25.3368921+00:00","provisioningState":"Succeeded"},"etag":"GakHPelkIUBBsRzpGIyYIQy84b0jjjaKQqZ/8DSBT9s=","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149","location":"centralus","name":"pysdkdmstestproject74501149","type":"Microsoft.DataMigration/services/projects"}'} headers: cache-control: [no-cache] content-length: ['515'] content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:09:52 GMT'] - etag: ['"CVrLvxKLylpDI+hi+1eqQJQsZiGZELT0QLETsfdnfR0="'] + date: ['Wed, 16 May 2018 00:24:25 GMT'] + etag: ['"GakHPelkIUBBsRzpGIyYIQy84b0jjjaKQqZ/8DSBT9s="'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-IIS/8.5] @@ -1042,15 +442,15 @@ interactions: msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149?api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149?api-version=2018-04-19 response: - body: {string: '{"properties":{"sourcePlatform":"SQL","targetPlatform":"SQLDB","creationTime":"2018-05-15T00:09:53.2461629+00:00","provisioningState":"Succeeded"},"etag":"CVrLvxKLylpDI+hi+1eqQJQsZiGZELT0QLETsfdnfR0=","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149","location":"centralus","name":"pysdkdmstestproject74501149","type":"Microsoft.DataMigration/services/projects"}'} + body: {string: '{"properties":{"sourcePlatform":"SQL","targetPlatform":"SQLDB","creationTime":"2018-05-16T00:24:25.3368921+00:00","provisioningState":"Succeeded"},"etag":"GakHPelkIUBBsRzpGIyYIQy84b0jjjaKQqZ/8DSBT9s=","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149","location":"centralus","name":"pysdkdmstestproject74501149","type":"Microsoft.DataMigration/services/projects"}'} headers: cache-control: [no-cache] content-length: ['515'] content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:09:53 GMT'] - etag: ['"CVrLvxKLylpDI+hi+1eqQJQsZiGZELT0QLETsfdnfR0="'] + date: ['Wed, 16 May 2018 00:24:25 GMT'] + etag: ['"GakHPelkIUBBsRzpGIyYIQy84b0jjjaKQqZ/8DSBT9s="'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-IIS/8.5] @@ -1081,21 +481,21 @@ interactions: msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149/tasks/pysdkdmstesttask74501149?api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149/tasks/pysdkdmstesttask74501149?api-version=2018-04-19 response: body: {string: '{"properties":{"input":{"sourceConnectionInfo":{"userName":"testuser","type":"SqlConnectionInfo","dataSource":"testsource.microsoft.com","authentication":"SqlAuthentication","encryptConnection":true,"trustServerCertificate":true},"targetConnectionInfo":{"userName":"testuser","type":"SqlConnectionInfo","dataSource":"testtarget.microsoft.com","authentication":"SqlAuthentication","encryptConnection":true,"trustServerCertificate":true},"selectedDatabases":[{"name":"Test_Source","targetDatabaseName":"Test_Target","makeSourceDbReadOnly":false,"tableMap":{"dbo.TestTableForeign":"dbo.TestTableForeign","dbo.TestTablePrimary":"dbo.TestTablePrimary"}}],"validationOptions":{"enableSchemaValidation":false,"enableDataIntegrityValidation":false,"enableQueryAnalysisValidation":false}},"taskType":"Migrate.SqlServer.SqlDb","state":"Queued"},"etag":"AoEOtS7/NnLNspK4PfQdGCwCimVAjs4NSknIxN9KOzU=","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149/tasks/pysdkdmstesttask74501149","name":"pysdkdmstesttask74501149","type":"Microsoft.DataMigration/services/projects/tasks"}'} headers: cache-control: [no-cache] content-length: ['1214'] content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:09:56 GMT'] + date: ['Wed, 16 May 2018 00:24:28 GMT'] etag: ['"AoEOtS7/NnLNspK4PfQdGCwCimVAjs4NSknIxN9KOzU="'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-IIS/8.5] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: body: null @@ -1108,14 +508,14 @@ interactions: msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149/tasks/pysdkdmstesttask74501149?api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149/tasks/pysdkdmstesttask74501149?api-version=2018-04-19 response: body: {string: '{"properties":{"input":{"sourceConnectionInfo":{"userName":"testuser","type":"SqlConnectionInfo","dataSource":"testsource.microsoft.com","authentication":"SqlAuthentication","encryptConnection":true,"trustServerCertificate":true},"targetConnectionInfo":{"userName":"testuser","type":"SqlConnectionInfo","dataSource":"testtarget.microsoft.com","authentication":"SqlAuthentication","encryptConnection":true,"trustServerCertificate":true},"selectedDatabases":[{"name":"Test_Source","targetDatabaseName":"Test_Target","makeSourceDbReadOnly":false,"tableMap":{"dbo.TestTableForeign":"dbo.TestTableForeign","dbo.TestTablePrimary":"dbo.TestTablePrimary"}}],"validationOptions":{"enableSchemaValidation":false,"enableDataIntegrityValidation":false,"enableQueryAnalysisValidation":false}},"taskType":"Migrate.SqlServer.SqlDb","state":"Running"},"etag":"qbEoubDiFIl9GMwviCGsJlfQPlrf5QVpwlexppjozLQ=","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149/tasks/pysdkdmstesttask74501149","name":"pysdkdmstesttask74501149","type":"Microsoft.DataMigration/services/projects/tasks"}'} headers: cache-control: [no-cache] content-length: ['1215'] content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:09:58 GMT'] + date: ['Wed, 16 May 2018 00:24:30 GMT'] etag: ['"qbEoubDiFIl9GMwviCGsJlfQPlrf5QVpwlexppjozLQ="'] expires: ['-1'] pragma: [no-cache] @@ -1137,13 +537,13 @@ interactions: msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149/tasks/pysdkdmstesttask74501149?deleteRunningTasks=true&api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149/tasks/pysdkdmstesttask74501149?deleteRunningTasks=true&api-version=2018-04-19 response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] - date: ['Tue, 15 May 2018 00:09:59 GMT'] + date: ['Wed, 16 May 2018 00:24:30 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-IIS/8.5] @@ -1163,13 +563,13 @@ interactions: msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149?api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149/projects/pysdkdmstestproject74501149?api-version=2018-04-19 response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] - date: ['Tue, 15 May 2018 00:10:01 GMT'] + date: ['Wed, 16 May 2018 00:24:33 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-IIS/8.5] @@ -1189,16 +589,16 @@ interactions: msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149?api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dms_sdk_test74501149/providers/Microsoft.DataMigration/services/pysdkdmstestservice74501149?api-version=2018-04-19 response: body: {string: ''} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/039e7a22-b4aa-4f1d-8576-579620a9460c?api-version=2018-03-31-preview'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/9d5fba26-090f-4123-969e-d6464c9462e4?api-version=2018-04-19'] cache-control: [no-cache] content-length: ['0'] - date: ['Tue, 15 May 2018 00:10:02 GMT'] + date: ['Wed, 16 May 2018 00:24:34 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationResults/039e7a22-b4aa-4f1d-8576-579620a9460c?api-version=2018-03-31-preview'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationResults/9d5fba26-090f-4123-969e-d6464c9462e4?api-version=2018-04-19'] pragma: [no-cache] server: [Microsoft-IIS/8.5] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -1214,164 +614,14 @@ interactions: User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/039e7a22-b4aa-4f1d-8576-579620a9460c?api-version=2018-03-31-preview - response: - body: {string: '{"name":"039e7a22-b4aa-4f1d-8576-579620a9460c","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/039e7a22-b4aa-4f1d-8576-579620a9460c","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:10:33 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/039e7a22-b4aa-4f1d-8576-579620a9460c?api-version=2018-03-31-preview - response: - body: {string: '{"name":"039e7a22-b4aa-4f1d-8576-579620a9460c","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/039e7a22-b4aa-4f1d-8576-579620a9460c","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:11:03 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/039e7a22-b4aa-4f1d-8576-579620a9460c?api-version=2018-03-31-preview - response: - body: {string: '{"name":"039e7a22-b4aa-4f1d-8576-579620a9460c","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/039e7a22-b4aa-4f1d-8576-579620a9460c","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:11:34 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/039e7a22-b4aa-4f1d-8576-579620a9460c?api-version=2018-03-31-preview - response: - body: {string: '{"name":"039e7a22-b4aa-4f1d-8576-579620a9460c","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/039e7a22-b4aa-4f1d-8576-579620a9460c","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:12:05 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/039e7a22-b4aa-4f1d-8576-579620a9460c?api-version=2018-03-31-preview - response: - body: {string: '{"name":"039e7a22-b4aa-4f1d-8576-579620a9460c","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/039e7a22-b4aa-4f1d-8576-579620a9460c","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:12:35 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/039e7a22-b4aa-4f1d-8576-579620a9460c?api-version=2018-03-31-preview - response: - body: {string: '{"name":"039e7a22-b4aa-4f1d-8576-579620a9460c","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/039e7a22-b4aa-4f1d-8576-579620a9460c","status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['234'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:13:06 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/8.5] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/039e7a22-b4aa-4f1d-8576-579620a9460c?api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/9d5fba26-090f-4123-969e-d6464c9462e4?api-version=2018-04-19 response: - body: {string: '{"name":"039e7a22-b4aa-4f1d-8576-579620a9460c","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/039e7a22-b4aa-4f1d-8576-579620a9460c","status":"Running"}'} + body: {string: '{"name":"9d5fba26-090f-4123-969e-d6464c9462e4","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/9d5fba26-090f-4123-969e-d6464c9462e4","status":"Running"}'} headers: cache-control: [no-cache] content-length: ['234'] content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:13:36 GMT'] + date: ['Wed, 16 May 2018 00:25:03 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-IIS/8.5] @@ -1389,14 +639,14 @@ interactions: User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/039e7a22-b4aa-4f1d-8576-579620a9460c?api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/9d5fba26-090f-4123-969e-d6464c9462e4?api-version=2018-04-19 response: - body: {string: '{"name":"039e7a22-b4aa-4f1d-8576-579620a9460c","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/039e7a22-b4aa-4f1d-8576-579620a9460c","status":"Succeeded"}'} + body: {string: '{"name":"9d5fba26-090f-4123-969e-d6464c9462e4","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/operationStatuses/9d5fba26-090f-4123-969e-d6464c9462e4","status":"Succeeded"}'} headers: cache-control: [no-cache] content-length: ['236'] content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:14:07 GMT'] + date: ['Wed, 16 May 2018 00:28:38 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-IIS/8.5] @@ -1417,14 +667,14 @@ interactions: msrest_azure/0.4.29 azure-mgmt-datamigration/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/checkNameAvailability?api-version=2018-03-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/centralus/checkNameAvailability?api-version=2018-04-19 response: body: {string: '{"nameAvailable":true}'} headers: cache-control: [no-cache] content-length: ['22'] content-type: [application/json; charset=utf-8] - date: ['Tue, 15 May 2018 00:14:08 GMT'] + date: ['Wed, 16 May 2018 00:28:39 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-IIS/8.5] diff --git a/azure-mgmt-loganalytics/HISTORY.rst b/azure-mgmt-loganalytics/HISTORY.rst index fcff098136f3..86113559c583 100644 --- a/azure-mgmt-loganalytics/HISTORY.rst +++ b/azure-mgmt-loganalytics/HISTORY.rst @@ -3,6 +3,53 @@ Release History =============== +0.2.0 (2018-05-29) +++++++++++++++++++ + +**Features** + +- Model IntelligencePack has a new parameter display_name +- Model SavedSearch has a new parameter name +- Model SavedSearch has a new parameter type +- Added operation WorkspacesOperations.purge +- Added operation WorkspacesOperations.update +- Added operation group Operations +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**Breaking changes** + +- Model SavedSearch no longer has parameter etag (replaced by e_tag) +- Model SearchMetadata no longer has parameter etag (replaced by e_tag) + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + 0.1.0 (2017-11-01) ++++++++++++++++++ diff --git a/azure-mgmt-loganalytics/README.rst b/azure-mgmt-loganalytics/README.rst index 080abd41e37e..b2a999cb07a1 100644 --- a/azure-mgmt-loganalytics/README.rst +++ b/azure-mgmt-loganalytics/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Log Analytics Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `Log Analytics Management -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/log_analytics_management_client.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/log_analytics_management_client.py index d6caf7dd2d20..25d5d8a10b9a 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/log_analytics_management_client.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/log_analytics_management_client.py @@ -9,15 +9,16 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION -from .operations.linked_services_operations import LinkedServicesOperations -from .operations.data_sources_operations import DataSourcesOperations -from .operations.workspaces_operations import WorkspacesOperations from .operations.storage_insights_operations import StorageInsightsOperations +from .operations.workspaces_operations import WorkspacesOperations from .operations.saved_searches_operations import SavedSearchesOperations +from .operations.linked_services_operations import LinkedServicesOperations +from .operations.data_sources_operations import DataSourcesOperations +from .operations.operations import Operations from . import models @@ -43,36 +44,36 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(LogAnalyticsManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('loganalyticsmanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-loganalytics/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class LogAnalyticsManagementClient(object): +class LogAnalyticsManagementClient(SDKClient): """The Log Analytics Client. :ivar config: Configuration for client. :vartype config: LogAnalyticsManagementClientConfiguration - :ivar linked_services: LinkedServices operations - :vartype linked_services: azure.mgmt.loganalytics.operations.LinkedServicesOperations - :ivar data_sources: DataSources operations - :vartype data_sources: azure.mgmt.loganalytics.operations.DataSourcesOperations - :ivar workspaces: Workspaces operations - :vartype workspaces: azure.mgmt.loganalytics.operations.WorkspacesOperations :ivar storage_insights: StorageInsights operations :vartype storage_insights: azure.mgmt.loganalytics.operations.StorageInsightsOperations + :ivar workspaces: Workspaces operations + :vartype workspaces: azure.mgmt.loganalytics.operations.WorkspacesOperations :ivar saved_searches: SavedSearches operations :vartype saved_searches: azure.mgmt.loganalytics.operations.SavedSearchesOperations + :ivar linked_services: LinkedServices operations + :vartype linked_services: azure.mgmt.loganalytics.operations.LinkedServicesOperations + :ivar data_sources: DataSources operations + :vartype data_sources: azure.mgmt.loganalytics.operations.DataSourcesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.loganalytics.operations.Operations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -88,19 +89,21 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = LogAnalyticsManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(LogAnalyticsManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.linked_services = LinkedServicesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.data_sources = DataSourcesOperations( + self.storage_insights = StorageInsightsOperations( self._client, self.config, self._serialize, self._deserialize) self.workspaces = WorkspacesOperations( self._client, self.config, self._serialize, self._deserialize) - self.storage_insights = StorageInsightsOperations( - self._client, self.config, self._serialize, self._deserialize) self.saved_searches = SavedSearchesOperations( self._client, self.config, self._serialize, self._deserialize) + self.linked_services = LinkedServicesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.data_sources = DataSourcesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py index c5c5ecd343cb..10363263f00d 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py @@ -9,62 +9,95 @@ # regenerated. # -------------------------------------------------------------------------- -from .linked_service import LinkedService -from .data_source import DataSource -from .data_source_filter import DataSourceFilter -from .intelligence_pack import IntelligencePack -from .shared_keys import SharedKeys -from .metric_name import MetricName -from .usage_metric import UsageMetric -from .management_group import ManagementGroup -from .sku import Sku -from .workspace import Workspace -from .resource import Resource -from .proxy_resource import ProxyResource -from .link_target import LinkTarget -from .tag import Tag -from .core_summary import CoreSummary -from .search_sort import SearchSort -from .search_metadata_schema import SearchMetadataSchema -from .search_metadata import SearchMetadata -from .saved_search import SavedSearch -from .saved_searches_list_result import SavedSearchesListResult -from .search_error import SearchError -from .search_results_response import SearchResultsResponse -from .search_schema_value import SearchSchemaValue -from .search_get_schema_response import SearchGetSchemaResponse -from .search_highlight import SearchHighlight -from .search_parameters import SearchParameters -from .storage_account import StorageAccount -from .storage_insight_status import StorageInsightStatus -from .storage_insight import StorageInsight -from .linked_service_paged import LinkedServicePaged -from .data_source_paged import DataSourcePaged +try: + from .link_target_py3 import LinkTarget + from .tag_py3 import Tag + from .core_summary_py3 import CoreSummary + from .search_sort_py3 import SearchSort + from .search_metadata_schema_py3 import SearchMetadataSchema + from .search_metadata_py3 import SearchMetadata + from .saved_search_py3 import SavedSearch + from .saved_searches_list_result_py3 import SavedSearchesListResult + from .search_error_py3 import SearchError + from .search_results_response_py3 import SearchResultsResponse + from .search_schema_value_py3 import SearchSchemaValue + from .search_get_schema_response_py3 import SearchGetSchemaResponse + from .search_highlight_py3 import SearchHighlight + from .search_parameters_py3 import SearchParameters + from .storage_account_py3 import StorageAccount + from .storage_insight_status_py3 import StorageInsightStatus + from .storage_insight_py3 import StorageInsight + from .resource_py3 import Resource + from .proxy_resource_py3 import ProxyResource + from .workspace_purge_body_filters_py3 import WorkspacePurgeBodyFilters + from .workspace_purge_body_py3 import WorkspacePurgeBody + from .workspace_purge_response_py3 import WorkspacePurgeResponse + from .workspace_purge_status_response_py3 import WorkspacePurgeStatusResponse + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .linked_service_py3 import LinkedService + from .data_source_py3 import DataSource + from .data_source_filter_py3 import DataSourceFilter + from .intelligence_pack_py3 import IntelligencePack + from .shared_keys_py3 import SharedKeys + from .metric_name_py3 import MetricName + from .usage_metric_py3 import UsageMetric + from .management_group_py3 import ManagementGroup + from .sku_py3 import Sku + from .workspace_py3 import Workspace +except (SyntaxError, ImportError): + from .link_target import LinkTarget + from .tag import Tag + from .core_summary import CoreSummary + from .search_sort import SearchSort + from .search_metadata_schema import SearchMetadataSchema + from .search_metadata import SearchMetadata + from .saved_search import SavedSearch + from .saved_searches_list_result import SavedSearchesListResult + from .search_error import SearchError + from .search_results_response import SearchResultsResponse + from .search_schema_value import SearchSchemaValue + from .search_get_schema_response import SearchGetSchemaResponse + from .search_highlight import SearchHighlight + from .search_parameters import SearchParameters + from .storage_account import StorageAccount + from .storage_insight_status import StorageInsightStatus + from .storage_insight import StorageInsight + from .resource import Resource + from .proxy_resource import ProxyResource + from .workspace_purge_body_filters import WorkspacePurgeBodyFilters + from .workspace_purge_body import WorkspacePurgeBody + from .workspace_purge_response import WorkspacePurgeResponse + from .workspace_purge_status_response import WorkspacePurgeStatusResponse + from .operation_display import OperationDisplay + from .operation import Operation + from .linked_service import LinkedService + from .data_source import DataSource + from .data_source_filter import DataSourceFilter + from .intelligence_pack import IntelligencePack + from .shared_keys import SharedKeys + from .metric_name import MetricName + from .usage_metric import UsageMetric + from .management_group import ManagementGroup + from .sku import Sku + from .workspace import Workspace +from .storage_insight_paged import StorageInsightPaged from .usage_metric_paged import UsageMetricPaged from .management_group_paged import ManagementGroupPaged from .workspace_paged import WorkspacePaged -from .storage_insight_paged import StorageInsightPaged +from .linked_service_paged import LinkedServicePaged +from .data_source_paged import DataSourcePaged +from .operation_paged import OperationPaged from .log_analytics_management_client_enums import ( + SearchSortEnum, + StorageInsightState, + PurgeState, DataSourceKind, SkuNameEnum, EntityStatus, - SearchSortEnum, - StorageInsightState, ) __all__ = [ - 'LinkedService', - 'DataSource', - 'DataSourceFilter', - 'IntelligencePack', - 'SharedKeys', - 'MetricName', - 'UsageMetric', - 'ManagementGroup', - 'Sku', - 'Workspace', - 'Resource', - 'ProxyResource', 'LinkTarget', 'Tag', 'CoreSummary', @@ -82,15 +115,35 @@ 'StorageAccount', 'StorageInsightStatus', 'StorageInsight', - 'LinkedServicePaged', - 'DataSourcePaged', + 'Resource', + 'ProxyResource', + 'WorkspacePurgeBodyFilters', + 'WorkspacePurgeBody', + 'WorkspacePurgeResponse', + 'WorkspacePurgeStatusResponse', + 'OperationDisplay', + 'Operation', + 'LinkedService', + 'DataSource', + 'DataSourceFilter', + 'IntelligencePack', + 'SharedKeys', + 'MetricName', + 'UsageMetric', + 'ManagementGroup', + 'Sku', + 'Workspace', + 'StorageInsightPaged', 'UsageMetricPaged', 'ManagementGroupPaged', 'WorkspacePaged', - 'StorageInsightPaged', + 'LinkedServicePaged', + 'DataSourcePaged', + 'OperationPaged', + 'SearchSortEnum', + 'StorageInsightState', + 'PurgeState', 'DataSourceKind', 'SkuNameEnum', 'EntityStatus', - 'SearchSortEnum', - 'StorageInsightState', ] diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary.py index 478a1db45dcc..8facbdb80089 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary.py @@ -15,9 +15,12 @@ class CoreSummary(Model): """The core summary of a search. + All required parameters must be populated in order to send to Azure. + :param status: The status of a core summary. :type status: str - :param number_of_documents: The number of documents of a core summary. + :param number_of_documents: Required. The number of documents of a core + summary. :type number_of_documents: long """ @@ -26,10 +29,11 @@ class CoreSummary(Model): } _attribute_map = { - 'status': {'key': 'Status', 'type': 'str'}, - 'number_of_documents': {'key': 'NumberOfDocuments', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'str'}, + 'number_of_documents': {'key': 'numberOfDocuments', 'type': 'long'}, } - def __init__(self, number_of_documents, status=None): - self.status = status - self.number_of_documents = number_of_documents + def __init__(self, **kwargs): + super(CoreSummary, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.number_of_documents = kwargs.get('number_of_documents', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary_py3.py new file mode 100644 index 000000000000..adb9e80f5479 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CoreSummary(Model): + """The core summary of a search. + + All required parameters must be populated in order to send to Azure. + + :param status: The status of a core summary. + :type status: str + :param number_of_documents: Required. The number of documents of a core + summary. + :type number_of_documents: long + """ + + _validation = { + 'number_of_documents': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'number_of_documents': {'key': 'numberOfDocuments', 'type': 'long'}, + } + + def __init__(self, *, number_of_documents: int, status: str=None, **kwargs) -> None: + super(CoreSummary, self).__init__(**kwargs) + self.status = status + self.number_of_documents = number_of_documents diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source.py index 3b87ab959322..025239663f3c 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source.py @@ -18,6 +18,8 @@ class DataSource(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Resource ID. :vartype id: str :ivar name: Resource name. @@ -25,20 +27,19 @@ class DataSource(ProxyResource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags - :type tags: dict - :param properties: The data source properties in raw json format, each - kind of data source have it's own schema. + :type tags: dict[str, str] + :param properties: Required. The data source properties in raw json + format, each kind of data source have it's own schema. :type properties: object :param e_tag: The ETag of the data source. :type e_tag: str - :param kind: Possible values include: 'AzureActivityLog', + :param kind: Required. Possible values include: 'AzureActivityLog', 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' - :type kind: str or :class:`DataSourceKind - ` + :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind """ _validation = { @@ -59,8 +60,8 @@ class DataSource(ProxyResource): 'kind': {'key': 'kind', 'type': 'str'}, } - def __init__(self, properties, kind, tags=None, e_tag=None): - super(DataSource, self).__init__(tags=tags) - self.properties = properties - self.e_tag = e_tag - self.kind = kind + def __init__(self, **kwargs): + super(DataSource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.e_tag = kwargs.get('e_tag', None) + self.kind = kwargs.get('kind', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter.py index ba24c91e75bb..8a45a5250d77 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter.py @@ -21,13 +21,13 @@ class DataSourceFilter(Model): 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' - :type kind: str or :class:`DataSourceKind - ` + :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind """ _attribute_map = { 'kind': {'key': 'kind', 'type': 'str'}, } - def __init__(self, kind=None): - self.kind = kind + def __init__(self, **kwargs): + super(DataSourceFilter, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter_py3.py new file mode 100644 index 000000000000..e597802b8392 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DataSourceFilter(Model): + """DataSource filter. Right now, only filter by kind is supported. + + :param kind: Possible values include: 'AzureActivityLog', + 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', + 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', + 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', + 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', + 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' + :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind=None, **kwargs) -> None: + super(DataSourceFilter, self).__init__(**kwargs) + self.kind = kind diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_py3.py new file mode 100644 index 000000000000..d0f5e0bd78b6 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_py3.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class DataSource(ProxyResource): + """Datasources under OMS Workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param properties: Required. The data source properties in raw json + format, each kind of data source have it's own schema. + :type properties: object + :param e_tag: The ETag of the data source. + :type e_tag: str + :param kind: Required. Possible values include: 'AzureActivityLog', + 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', + 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', + 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', + 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', + 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' + :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, properties, kind, tags=None, e_tag: str=None, **kwargs) -> None: + super(DataSource, self).__init__(tags=tags, **kwargs) + self.properties = properties + self.e_tag = e_tag + self.kind = kind diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack.py index c1d69ea68c34..d65fb7ef0989 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack.py @@ -20,13 +20,18 @@ class IntelligencePack(Model): :type name: str :param enabled: The enabled boolean for the intelligence pack. :type enabled: bool + :param display_name: The display name of the intelligence pack. + :type display_name: str """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, } - def __init__(self, name=None, enabled=None): - self.name = name - self.enabled = enabled + def __init__(self, **kwargs): + super(IntelligencePack, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.enabled = kwargs.get('enabled', None) + self.display_name = kwargs.get('display_name', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack_py3.py new file mode 100644 index 000000000000..0cc4b30790a1 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IntelligencePack(Model): + """Intelligence Pack containing a string name and boolean indicating if it's + enabled. + + :param name: The name of the intelligence pack. + :type name: str + :param enabled: The enabled boolean for the intelligence pack. + :type enabled: bool + :param display_name: The display name of the intelligence pack. + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, enabled: bool=None, display_name: str=None, **kwargs) -> None: + super(IntelligencePack, self).__init__(**kwargs) + self.name = name + self.enabled = enabled + self.display_name = display_name diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target.py index c0fb26b2c1ed..bd3839982bd6 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target.py @@ -32,8 +32,9 @@ class LinkTarget(Model): 'location': {'key': 'location', 'type': 'str'}, } - def __init__(self, customer_id=None, display_name=None, workspace_name=None, location=None): - self.customer_id = customer_id - self.display_name = display_name - self.workspace_name = workspace_name - self.location = location + def __init__(self, **kwargs): + super(LinkTarget, self).__init__(**kwargs) + self.customer_id = kwargs.get('customer_id', None) + self.display_name = kwargs.get('display_name', None) + self.workspace_name = kwargs.get('workspace_name', None) + self.location = kwargs.get('location', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target_py3.py new file mode 100644 index 000000000000..cbc600ad0573 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LinkTarget(Model): + """Metadata for a workspace that isn't linked to an Azure subscription. + + :param customer_id: The GUID that uniquely identifies the workspace. + :type customer_id: str + :param display_name: The display name of the workspace. + :type display_name: str + :param workspace_name: The DNS valid workspace name. + :type workspace_name: str + :param location: The location of the workspace. + :type location: str + """ + + _attribute_map = { + 'customer_id': {'key': 'customerId', 'type': 'str'}, + 'display_name': {'key': 'accountName', 'type': 'str'}, + 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, customer_id: str=None, display_name: str=None, workspace_name: str=None, location: str=None, **kwargs) -> None: + super(LinkTarget, self).__init__(**kwargs) + self.customer_id = customer_id + self.display_name = display_name + self.workspace_name = workspace_name + self.location = location diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service.py index b58b4648c325..3ffe0205654e 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service.py @@ -18,6 +18,8 @@ class LinkedService(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Resource ID. :vartype id: str :ivar name: Resource name. @@ -25,9 +27,9 @@ class LinkedService(ProxyResource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags - :type tags: dict - :param resource_id: The resource id of the resource that will be linked to - the workspace. + :type tags: dict[str, str] + :param resource_id: Required. The resource id of the resource that will be + linked to the workspace. :type resource_id: str """ @@ -46,6 +48,6 @@ class LinkedService(ProxyResource): 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, } - def __init__(self, resource_id, tags=None): - super(LinkedService, self).__init__(tags=tags) - self.resource_id = resource_id + def __init__(self, **kwargs): + super(LinkedService, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_py3.py new file mode 100644 index 000000000000..2717ac4bd8a6 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class LinkedService(ProxyResource): + """The top level Linked service resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param resource_id: Required. The resource id of the resource that will be + linked to the workspace. + :type resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str, tags=None, **kwargs) -> None: + super(LinkedService, self).__init__(tags=tags, **kwargs) + self.resource_id = resource_id diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/log_analytics_management_client_enums.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/log_analytics_management_client_enums.py index c9b7875b3ffe..22641d5bc333 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/log_analytics_management_client_enums.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/log_analytics_management_client_enums.py @@ -12,7 +12,25 @@ from enum import Enum -class DataSourceKind(Enum): +class SearchSortEnum(str, Enum): + + asc = "asc" + desc = "desc" + + +class StorageInsightState(str, Enum): + + ok = "OK" + error = "ERROR" + + +class PurgeState(str, Enum): + + pending = "Pending" + completed = "Completed" + + +class DataSourceKind(str, Enum): azure_activity_log = "AzureActivityLog" change_tracking_path = "ChangeTrackingPath" @@ -31,17 +49,18 @@ class DataSourceKind(Enum): windows_performance_counter = "WindowsPerformanceCounter" -class SkuNameEnum(Enum): +class SkuNameEnum(str, Enum): free = "Free" standard = "Standard" premium = "Premium" unlimited = "Unlimited" per_node = "PerNode" + per_gb2018 = "PerGB2018" standalone = "Standalone" -class EntityStatus(Enum): +class EntityStatus(str, Enum): creating = "Creating" succeeded = "Succeeded" @@ -49,15 +68,3 @@ class EntityStatus(Enum): canceled = "Canceled" deleting = "Deleting" provisioning_account = "ProvisioningAccount" - - -class SearchSortEnum(Enum): - - asc = "asc" - desc = "desc" - - -class StorageInsightState(Enum): - - ok = "OK" - error = "ERROR" diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group.py index 7a5264498d39..1b79c460ce45 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group.py @@ -49,12 +49,13 @@ class ManagementGroup(Model): 'sku': {'key': 'properties.sku', 'type': 'str'}, } - def __init__(self, server_count=None, is_gateway=None, name=None, id=None, created=None, data_received=None, version=None, sku=None): - self.server_count = server_count - self.is_gateway = is_gateway - self.name = name - self.id = id - self.created = created - self.data_received = data_received - self.version = version - self.sku = sku + def __init__(self, **kwargs): + super(ManagementGroup, self).__init__(**kwargs) + self.server_count = kwargs.get('server_count', None) + self.is_gateway = kwargs.get('is_gateway', None) + self.name = kwargs.get('name', None) + self.id = kwargs.get('id', None) + self.created = kwargs.get('created', None) + self.data_received = kwargs.get('data_received', None) + self.version = kwargs.get('version', None) + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_py3.py new file mode 100644 index 000000000000..5a0d9a535bfe --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementGroup(Model): + """A management group that is connected to a workspace. + + :param server_count: The number of servers connected to the management + group. + :type server_count: int + :param is_gateway: Gets or sets a value indicating whether the management + group is a gateway. + :type is_gateway: bool + :param name: The name of the management group. + :type name: str + :param id: The unique ID of the management group. + :type id: str + :param created: The datetime that the management group was created. + :type created: datetime + :param data_received: The last datetime that the management group received + data. + :type data_received: datetime + :param version: The version of System Center that is managing the + management group. + :type version: str + :param sku: The SKU of System Center that is managing the management + group. + :type sku: str + """ + + _attribute_map = { + 'server_count': {'key': 'properties.serverCount', 'type': 'int'}, + 'is_gateway': {'key': 'properties.isGateway', 'type': 'bool'}, + 'name': {'key': 'properties.name', 'type': 'str'}, + 'id': {'key': 'properties.id', 'type': 'str'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'data_received': {'key': 'properties.dataReceived', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + } + + def __init__(self, *, server_count: int=None, is_gateway: bool=None, name: str=None, id: str=None, created=None, data_received=None, version: str=None, sku: str=None, **kwargs) -> None: + super(ManagementGroup, self).__init__(**kwargs) + self.server_count = server_count + self.is_gateway = is_gateway + self.name = name + self.id = id + self.created = created + self.data_received = data_received + self.version = version + self.sku = sku diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name.py index e425cfe2f265..36482f58ac5f 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name.py @@ -26,6 +26,7 @@ class MetricName(Model): 'localized_value': {'key': 'localizedValue', 'type': 'str'}, } - def __init__(self, value=None, localized_value=None): - self.value = value - self.localized_value = localized_value + def __init__(self, **kwargs): + super(MetricName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name_py3.py new file mode 100644 index 000000000000..515822cf3d47 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricName(Model): + """The name of a metric. + + :param value: The system name of the metric. + :type value: str + :param localized_value: The localized name of the metric. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(MetricName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation.py new file mode 100644 index 000000000000..26d84d4315aa --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Supported operation of OperationalInsights resource provider. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.loganalytics.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display.py new file mode 100644 index 000000000000..97f173941c27 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft OperationsManagement. + :type provider: str + :param resource: Resource on which the operation is performed etc. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display_py3.py new file mode 100644 index 000000000000..c5c2afad0bef --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft OperationsManagement. + :type provider: str + :param resource: Resource on which the operation is performed etc. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_paged.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_paged.py new file mode 100644 index 000000000000..e9cb0c61e3f6 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_py3.py new file mode 100644 index 000000000000..22e7ddff5ccf --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Supported operation of OperationalInsights resource provider. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.loganalytics.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource.py index 998e54a0b24f..e15c31fdd01f 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource.py @@ -25,7 +25,7 @@ class ProxyResource(Model): :ivar type: Resource type. :vartype type: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] """ _validation = { @@ -41,8 +41,9 @@ class ProxyResource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, tags=None): + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.tags = tags + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource_py3.py new file mode 100644 index 000000000000..89cd0dab699f --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProxyResource(Model): + """Common properties of proxy resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource.py index f2620239a160..8e4d6b9bdb23 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource.py @@ -27,14 +27,13 @@ class Resource(Model): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, } _attribute_map = { @@ -45,9 +44,10 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, location, tags=None): + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = location - self.tags = tags + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource_py3.py new file mode 100644 index 000000000000..95d57d535d37 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """The resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search.py index 5e55708848ae..7617dcd99070 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search.py @@ -18,28 +18,37 @@ class SavedSearch(Model): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: The id of the saved search. :vartype id: str - :param etag: The etag of the saved search. - :type etag: str - :param category: The category of the saved search. This helps the user to - find a saved search faster. + :ivar name: The name of the saved search. + :vartype name: str + :ivar type: The type of the saved search. + :vartype type: str + :param e_tag: The etag of the saved search. + :type e_tag: str + :param category: Required. The category of the saved search. This helps + the user to find a saved search faster. :type category: str - :param display_name: Saved search display name. + :param display_name: Required. Saved search display name. :type display_name: str - :param query: The query expression for the saved search. Please see + :param query: Required. The query expression for the saved search. Please + see https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-search-reference for reference. :type query: str - :param version: The version number of the query lanuage. Only verion 1 is - allowed here. + :param version: Required. The version number of the query lanuage. Only + verion 1 is allowed here. :type version: long :param tags: The tags attached to the saved search. - :type tags: list of :class:`Tag ` + :type tags: list[~azure.mgmt.loganalytics.models.Tag] """ _validation = { 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'category': {'required': True}, 'display_name': {'required': True}, 'query': {'required': True}, @@ -48,19 +57,24 @@ class SavedSearch(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'category': {'key': 'properties.Category', 'type': 'str'}, - 'display_name': {'key': 'properties.DisplayName', 'type': 'str'}, - 'query': {'key': 'properties.Query', 'type': 'str'}, - 'version': {'key': 'properties.Version', 'type': 'long'}, - 'tags': {'key': 'properties.Tags', 'type': '[Tag]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'query': {'key': 'properties.query', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'long'}, + 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, } - def __init__(self, category, display_name, query, version, etag=None, tags=None): + def __init__(self, **kwargs): + super(SavedSearch, self).__init__(**kwargs) self.id = None - self.etag = etag - self.category = category - self.display_name = display_name - self.query = query - self.version = version - self.tags = tags + self.name = None + self.type = None + self.e_tag = kwargs.get('e_tag', None) + self.category = kwargs.get('category', None) + self.display_name = kwargs.get('display_name', None) + self.query = kwargs.get('query', None) + self.version = kwargs.get('version', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search_py3.py new file mode 100644 index 000000000000..a994394bfc7a --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SavedSearch(Model): + """Value object for saved search results. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The id of the saved search. + :vartype id: str + :ivar name: The name of the saved search. + :vartype name: str + :ivar type: The type of the saved search. + :vartype type: str + :param e_tag: The etag of the saved search. + :type e_tag: str + :param category: Required. The category of the saved search. This helps + the user to find a saved search faster. + :type category: str + :param display_name: Required. Saved search display name. + :type display_name: str + :param query: Required. The query expression for the saved search. Please + see + https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-search-reference + for reference. + :type query: str + :param version: Required. The version number of the query lanuage. Only + verion 1 is allowed here. + :type version: long + :param tags: The tags attached to the saved search. + :type tags: list[~azure.mgmt.loganalytics.models.Tag] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'category': {'required': True}, + 'display_name': {'required': True}, + 'query': {'required': True}, + 'version': {'required': True, 'maximum': 1, 'minimum': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'query': {'key': 'properties.query', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'long'}, + 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, + } + + def __init__(self, *, category: str, display_name: str, query: str, version: int, e_tag: str=None, tags=None, **kwargs) -> None: + super(SavedSearch, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.e_tag = e_tag + self.category = category + self.display_name = display_name + self.query = query + self.version = version + self.tags = tags diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result.py index 71cb7b07c309..74509ad4e0d2 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result.py @@ -16,18 +16,17 @@ class SavedSearchesListResult(Model): """The saved search operation response. :param metadata: The metadata from search results. - :type metadata: :class:`SearchMetadata - ` + :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata :param value: The array of result values. - :type value: list of :class:`SavedSearch - ` + :type value: list[~azure.mgmt.loganalytics.models.SavedSearch] """ _attribute_map = { - 'metadata': {'key': '__metadata', 'type': 'SearchMetadata'}, + 'metadata': {'key': 'metaData', 'type': 'SearchMetadata'}, 'value': {'key': 'value', 'type': '[SavedSearch]'}, } - def __init__(self, metadata=None, value=None): - self.metadata = metadata - self.value = value + def __init__(self, **kwargs): + super(SavedSearchesListResult, self).__init__(**kwargs) + self.metadata = kwargs.get('metadata', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result_py3.py new file mode 100644 index 000000000000..10f174732fdc --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SavedSearchesListResult(Model): + """The saved search operation response. + + :param metadata: The metadata from search results. + :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata + :param value: The array of result values. + :type value: list[~azure.mgmt.loganalytics.models.SavedSearch] + """ + + _attribute_map = { + 'metadata': {'key': 'metaData', 'type': 'SearchMetadata'}, + 'value': {'key': 'value', 'type': '[SavedSearch]'}, + } + + def __init__(self, *, metadata=None, value=None, **kwargs) -> None: + super(SavedSearchesListResult, self).__init__(**kwargs) + self.metadata = metadata + self.value = value diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error.py index 559ed629c010..159823f38749 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error.py @@ -26,6 +26,7 @@ class SearchError(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, type=None, message=None): - self.type = type - self.message = message + def __init__(self, **kwargs): + super(SearchError, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error_py3.py new file mode 100644 index 000000000000..9b093afea61d --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SearchError(Model): + """Details for a search error. + + :param type: The error type. + :type type: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, type: str=None, message: str=None, **kwargs) -> None: + super(SearchError, self).__init__(**kwargs) + self.type = type + self.message = message diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response.py index a9ef0ff22a0a..91e914734fc0 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response.py @@ -16,18 +16,17 @@ class SearchGetSchemaResponse(Model): """The get schema operation response. :param metadata: The metadata from search results. - :type metadata: :class:`SearchMetadata - ` + :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata :param value: The array of result values. - :type value: list of :class:`SearchSchemaValue - ` + :type value: list[~azure.mgmt.loganalytics.models.SearchSchemaValue] """ _attribute_map = { - 'metadata': {'key': '__metadata', 'type': 'SearchMetadata'}, + 'metadata': {'key': 'metadata', 'type': 'SearchMetadata'}, 'value': {'key': 'value', 'type': '[SearchSchemaValue]'}, } - def __init__(self, metadata=None, value=None): - self.metadata = metadata - self.value = value + def __init__(self, **kwargs): + super(SearchGetSchemaResponse, self).__init__(**kwargs) + self.metadata = kwargs.get('metadata', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response_py3.py new file mode 100644 index 000000000000..7d64e05b18df --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SearchGetSchemaResponse(Model): + """The get schema operation response. + + :param metadata: The metadata from search results. + :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata + :param value: The array of result values. + :type value: list[~azure.mgmt.loganalytics.models.SearchSchemaValue] + """ + + _attribute_map = { + 'metadata': {'key': 'metadata', 'type': 'SearchMetadata'}, + 'value': {'key': 'value', 'type': '[SearchSchemaValue]'}, + } + + def __init__(self, *, metadata=None, value=None, **kwargs) -> None: + super(SearchGetSchemaResponse, self).__init__(**kwargs) + self.metadata = metadata + self.value = value diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight.py index 6867afea5f39..d4b7b292cb1c 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight.py @@ -26,6 +26,7 @@ class SearchHighlight(Model): 'post': {'key': 'post', 'type': 'str'}, } - def __init__(self, pre=None, post=None): - self.pre = pre - self.post = post + def __init__(self, **kwargs): + super(SearchHighlight, self).__init__(**kwargs) + self.pre = kwargs.get('pre', None) + self.post = kwargs.get('post', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight_py3.py new file mode 100644 index 000000000000..d427d47c3824 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SearchHighlight(Model): + """Highlight details. + + :param pre: The string that is put before a matched result. + :type pre: str + :param post: The string that is put after a matched result. + :type post: str + """ + + _attribute_map = { + 'pre': {'key': 'pre', 'type': 'str'}, + 'post': {'key': 'post', 'type': 'str'}, + } + + def __init__(self, *, pre: str=None, post: str=None, **kwargs) -> None: + super(SearchHighlight, self).__init__(**kwargs) + self.pre = pre + self.post = post diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata.py index 94414eeb4570..ba7f7a3dcffc 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata.py @@ -26,19 +26,17 @@ class SearchMetadata(Model): :param id: The id of the search results request. :type id: str :param core_summaries: The core summaries. - :type core_summaries: list of :class:`CoreSummary - ` + :type core_summaries: list[~azure.mgmt.loganalytics.models.CoreSummary] :param status: The status of the search results. :type status: str :param start_time: The start time for the search. :type start_time: datetime :param last_updated: The time of last update. :type last_updated: datetime - :param etag: The ETag of the search results. - :type etag: str + :param e_tag: The ETag of the search results. + :type e_tag: str :param sort: How the results are sorted. - :type sort: list of :class:`SearchSort - ` + :type sort: list[~azure.mgmt.loganalytics.models.SearchSort] :param request_time: The request time. :type request_time: long :param aggregated_value_field: The aggregated value field. @@ -50,21 +48,20 @@ class SearchMetadata(Model): :param max: The max of all aggregates returned in the result set. :type max: long :param schema: The schema. - :type schema: :class:`SearchMetadataSchema - ` + :type schema: ~azure.mgmt.loganalytics.models.SearchMetadataSchema """ _attribute_map = { - 'search_id': {'key': 'RequestId', 'type': 'str'}, + 'search_id': {'key': 'requestId', 'type': 'str'}, 'result_type': {'key': 'resultType', 'type': 'str'}, 'total': {'key': 'total', 'type': 'long'}, 'top': {'key': 'top', 'type': 'long'}, 'id': {'key': 'id', 'type': 'str'}, - 'core_summaries': {'key': 'CoreSummaries', 'type': '[CoreSummary]'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - 'last_updated': {'key': 'LastUpdated', 'type': 'iso-8601'}, - 'etag': {'key': 'ETag', 'type': 'str'}, + 'core_summaries': {'key': 'coreSummaries', 'type': '[CoreSummary]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, 'sort': {'key': 'sort', 'type': '[SearchSort]'}, 'request_time': {'key': 'requestTime', 'type': 'long'}, 'aggregated_value_field': {'key': 'aggregatedValueField', 'type': 'str'}, @@ -74,21 +71,22 @@ class SearchMetadata(Model): 'schema': {'key': 'schema', 'type': 'SearchMetadataSchema'}, } - def __init__(self, search_id=None, result_type=None, total=None, top=None, id=None, core_summaries=None, status=None, start_time=None, last_updated=None, etag=None, sort=None, request_time=None, aggregated_value_field=None, aggregated_grouping_fields=None, sum=None, max=None, schema=None): - self.search_id = search_id - self.result_type = result_type - self.total = total - self.top = top - self.id = id - self.core_summaries = core_summaries - self.status = status - self.start_time = start_time - self.last_updated = last_updated - self.etag = etag - self.sort = sort - self.request_time = request_time - self.aggregated_value_field = aggregated_value_field - self.aggregated_grouping_fields = aggregated_grouping_fields - self.sum = sum - self.max = max - self.schema = schema + def __init__(self, **kwargs): + super(SearchMetadata, self).__init__(**kwargs) + self.search_id = kwargs.get('search_id', None) + self.result_type = kwargs.get('result_type', None) + self.total = kwargs.get('total', None) + self.top = kwargs.get('top', None) + self.id = kwargs.get('id', None) + self.core_summaries = kwargs.get('core_summaries', None) + self.status = kwargs.get('status', None) + self.start_time = kwargs.get('start_time', None) + self.last_updated = kwargs.get('last_updated', None) + self.e_tag = kwargs.get('e_tag', None) + self.sort = kwargs.get('sort', None) + self.request_time = kwargs.get('request_time', None) + self.aggregated_value_field = kwargs.get('aggregated_value_field', None) + self.aggregated_grouping_fields = kwargs.get('aggregated_grouping_fields', None) + self.sum = kwargs.get('sum', None) + self.max = kwargs.get('max', None) + self.schema = kwargs.get('schema', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_py3.py new file mode 100644 index 000000000000..11793a3e9b88 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_py3.py @@ -0,0 +1,92 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SearchMetadata(Model): + """Metadata for search results. + + :param search_id: The request id of the search. + :type search_id: str + :param result_type: The search result type. + :type result_type: str + :param total: The total number of search results. + :type total: long + :param top: The number of top search results. + :type top: long + :param id: The id of the search results request. + :type id: str + :param core_summaries: The core summaries. + :type core_summaries: list[~azure.mgmt.loganalytics.models.CoreSummary] + :param status: The status of the search results. + :type status: str + :param start_time: The start time for the search. + :type start_time: datetime + :param last_updated: The time of last update. + :type last_updated: datetime + :param e_tag: The ETag of the search results. + :type e_tag: str + :param sort: How the results are sorted. + :type sort: list[~azure.mgmt.loganalytics.models.SearchSort] + :param request_time: The request time. + :type request_time: long + :param aggregated_value_field: The aggregated value field. + :type aggregated_value_field: str + :param aggregated_grouping_fields: The aggregated grouping fields. + :type aggregated_grouping_fields: str + :param sum: The sum of all aggregates returned in the result set. + :type sum: long + :param max: The max of all aggregates returned in the result set. + :type max: long + :param schema: The schema. + :type schema: ~azure.mgmt.loganalytics.models.SearchMetadataSchema + """ + + _attribute_map = { + 'search_id': {'key': 'requestId', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'total': {'key': 'total', 'type': 'long'}, + 'top': {'key': 'top', 'type': 'long'}, + 'id': {'key': 'id', 'type': 'str'}, + 'core_summaries': {'key': 'coreSummaries', 'type': '[CoreSummary]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'sort': {'key': 'sort', 'type': '[SearchSort]'}, + 'request_time': {'key': 'requestTime', 'type': 'long'}, + 'aggregated_value_field': {'key': 'aggregatedValueField', 'type': 'str'}, + 'aggregated_grouping_fields': {'key': 'aggregatedGroupingFields', 'type': 'str'}, + 'sum': {'key': 'sum', 'type': 'long'}, + 'max': {'key': 'max', 'type': 'long'}, + 'schema': {'key': 'schema', 'type': 'SearchMetadataSchema'}, + } + + def __init__(self, *, search_id: str=None, result_type: str=None, total: int=None, top: int=None, id: str=None, core_summaries=None, status: str=None, start_time=None, last_updated=None, e_tag: str=None, sort=None, request_time: int=None, aggregated_value_field: str=None, aggregated_grouping_fields: str=None, sum: int=None, max: int=None, schema=None, **kwargs) -> None: + super(SearchMetadata, self).__init__(**kwargs) + self.search_id = search_id + self.result_type = result_type + self.total = total + self.top = top + self.id = id + self.core_summaries = core_summaries + self.status = status + self.start_time = start_time + self.last_updated = last_updated + self.e_tag = e_tag + self.sort = sort + self.request_time = request_time + self.aggregated_value_field = aggregated_value_field + self.aggregated_grouping_fields = aggregated_grouping_fields + self.sum = sum + self.max = max + self.schema = schema diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema.py index 0374d007325d..81238273f963 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema.py @@ -26,6 +26,7 @@ class SearchMetadataSchema(Model): 'version': {'key': 'version', 'type': 'int'}, } - def __init__(self, name=None, version=None): - self.name = name - self.version = version + def __init__(self, **kwargs): + super(SearchMetadataSchema, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema_py3.py new file mode 100644 index 000000000000..530524c2606d --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SearchMetadataSchema(Model): + """Schema metadata for search. + + :param name: The name of the metadata schema. + :type name: str + :param version: The version of the metadata schema. + :type version: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, version: int=None, **kwargs) -> None: + super(SearchMetadataSchema, self).__init__(**kwargs) + self.name = name + self.version = version diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters.py index 072745e124aa..721438021b2d 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters.py @@ -15,12 +15,13 @@ class SearchParameters(Model): """Parameters specifying the search query and range. + All required parameters must be populated in order to send to Azure. + :param top: The number to get from the top. :type top: long :param highlight: The highlight that looks for all occurences of a string. - :type highlight: :class:`SearchHighlight - ` - :param query: The query to search. + :type highlight: ~azure.mgmt.loganalytics.models.SearchHighlight + :param query: Required. The query to search. :type query: str :param start: The start date filter, so the only query results returned are after this date. @@ -42,9 +43,10 @@ class SearchParameters(Model): 'end': {'key': 'end', 'type': 'iso-8601'}, } - def __init__(self, query, top=None, highlight=None, start=None, end=None): - self.top = top - self.highlight = highlight - self.query = query - self.start = start - self.end = end + def __init__(self, **kwargs): + super(SearchParameters, self).__init__(**kwargs) + self.top = kwargs.get('top', None) + self.highlight = kwargs.get('highlight', None) + self.query = kwargs.get('query', None) + self.start = kwargs.get('start', None) + self.end = kwargs.get('end', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters_py3.py new file mode 100644 index 000000000000..8789f694abfc --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SearchParameters(Model): + """Parameters specifying the search query and range. + + All required parameters must be populated in order to send to Azure. + + :param top: The number to get from the top. + :type top: long + :param highlight: The highlight that looks for all occurences of a string. + :type highlight: ~azure.mgmt.loganalytics.models.SearchHighlight + :param query: Required. The query to search. + :type query: str + :param start: The start date filter, so the only query results returned + are after this date. + :type start: datetime + :param end: The end date filter, so the only query results returned are + before this date. + :type end: datetime + """ + + _validation = { + 'query': {'required': True}, + } + + _attribute_map = { + 'top': {'key': 'top', 'type': 'long'}, + 'highlight': {'key': 'highlight', 'type': 'SearchHighlight'}, + 'query': {'key': 'query', 'type': 'str'}, + 'start': {'key': 'start', 'type': 'iso-8601'}, + 'end': {'key': 'end', 'type': 'iso-8601'}, + } + + def __init__(self, *, query: str, top: int=None, highlight=None, start=None, end=None, **kwargs) -> None: + super(SearchParameters, self).__init__(**kwargs) + self.top = top + self.highlight = highlight + self.query = query + self.start = start + self.end = end diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response.py index d43a32ea5e6e..88b9f99bcfe0 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response.py @@ -21,13 +21,11 @@ class SearchResultsResponse(Model): :ivar id: The id of the search, which includes the full url. :vartype id: str :param metadata: The metadata from search results. - :type metadata: :class:`SearchMetadata - ` + :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata :param value: The array of result values. - :type value: list of object + :type value: list[object] :param error: The error. - :type error: :class:`SearchError - ` + :type error: ~azure.mgmt.loganalytics.models.SearchError """ _validation = { @@ -36,13 +34,14 @@ class SearchResultsResponse(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'metadata': {'key': '__metadata', 'type': 'SearchMetadata'}, + 'metadata': {'key': 'metaData', 'type': 'SearchMetadata'}, 'value': {'key': 'value', 'type': '[object]'}, 'error': {'key': 'error', 'type': 'SearchError'}, } - def __init__(self, metadata=None, value=None, error=None): + def __init__(self, **kwargs): + super(SearchResultsResponse, self).__init__(**kwargs) self.id = None - self.metadata = metadata - self.value = value - self.error = error + self.metadata = kwargs.get('metadata', None) + self.value = kwargs.get('value', None) + self.error = kwargs.get('error', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response_py3.py new file mode 100644 index 000000000000..414d2aae709b --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SearchResultsResponse(Model): + """The get search result operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The id of the search, which includes the full url. + :vartype id: str + :param metadata: The metadata from search results. + :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata + :param value: The array of result values. + :type value: list[object] + :param error: The error. + :type error: ~azure.mgmt.loganalytics.models.SearchError + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'metadata': {'key': 'metaData', 'type': 'SearchMetadata'}, + 'value': {'key': 'value', 'type': '[object]'}, + 'error': {'key': 'error', 'type': 'SearchError'}, + } + + def __init__(self, *, metadata=None, value=None, error=None, **kwargs) -> None: + super(SearchResultsResponse, self).__init__(**kwargs) + self.id = None + self.metadata = metadata + self.value = value + self.error = error diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value.py index 71d388054576..56fe3e7089a6 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value.py @@ -15,23 +15,25 @@ class SearchSchemaValue(Model): """Value object for schema results. + All required parameters must be populated in order to send to Azure. + :param name: The name of the schema. :type name: str :param display_name: The display name of the schema. :type display_name: str :param type: The type. :type type: str - :param indexed: The boolean that indicates the field is searchable as free - text. + :param indexed: Required. The boolean that indicates the field is + searchable as free text. :type indexed: bool - :param stored: The boolean that indicates whether or not the field is - stored. + :param stored: Required. The boolean that indicates whether or not the + field is stored. :type stored: bool - :param facet: The boolean that indicates whether or not the field is a - facet. + :param facet: Required. The boolean that indicates whether or not the + field is a facet. :type facet: bool :param owner_type: The array of workflows containing the field. - :type owner_type: list of str + :type owner_type: list[str] """ _validation = { @@ -50,11 +52,12 @@ class SearchSchemaValue(Model): 'owner_type': {'key': 'ownerType', 'type': '[str]'}, } - def __init__(self, indexed, stored, facet, name=None, display_name=None, type=None, owner_type=None): - self.name = name - self.display_name = display_name - self.type = type - self.indexed = indexed - self.stored = stored - self.facet = facet - self.owner_type = owner_type + def __init__(self, **kwargs): + super(SearchSchemaValue, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.type = kwargs.get('type', None) + self.indexed = kwargs.get('indexed', None) + self.stored = kwargs.get('stored', None) + self.facet = kwargs.get('facet', None) + self.owner_type = kwargs.get('owner_type', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value_py3.py new file mode 100644 index 000000000000..f29fd92f0aa4 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SearchSchemaValue(Model): + """Value object for schema results. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the schema. + :type name: str + :param display_name: The display name of the schema. + :type display_name: str + :param type: The type. + :type type: str + :param indexed: Required. The boolean that indicates the field is + searchable as free text. + :type indexed: bool + :param stored: Required. The boolean that indicates whether or not the + field is stored. + :type stored: bool + :param facet: Required. The boolean that indicates whether or not the + field is a facet. + :type facet: bool + :param owner_type: The array of workflows containing the field. + :type owner_type: list[str] + """ + + _validation = { + 'indexed': {'required': True}, + 'stored': {'required': True}, + 'facet': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'indexed': {'key': 'indexed', 'type': 'bool'}, + 'stored': {'key': 'stored', 'type': 'bool'}, + 'facet': {'key': 'facet', 'type': 'bool'}, + 'owner_type': {'key': 'ownerType', 'type': '[str]'}, + } + + def __init__(self, *, indexed: bool, stored: bool, facet: bool, name: str=None, display_name: str=None, type: str=None, owner_type=None, **kwargs) -> None: + super(SearchSchemaValue, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.type = type + self.indexed = indexed + self.stored = stored + self.facet = facet + self.owner_type = owner_type diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort.py index 15814e6e38a8..2abb299ee3fd 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort.py @@ -19,8 +19,7 @@ class SearchSort(Model): :type name: str :param order: The sort order of the search. Possible values include: 'asc', 'desc' - :type order: str or :class:`SearchSortEnum - ` + :type order: str or ~azure.mgmt.loganalytics.models.SearchSortEnum """ _attribute_map = { @@ -28,6 +27,7 @@ class SearchSort(Model): 'order': {'key': 'order', 'type': 'str'}, } - def __init__(self, name=None, order=None): - self.name = name - self.order = order + def __init__(self, **kwargs): + super(SearchSort, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.order = kwargs.get('order', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort_py3.py new file mode 100644 index 000000000000..2e6c85535685 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SearchSort(Model): + """The sort parameters for search. + + :param name: The name of the field the search query is sorted on. + :type name: str + :param order: The sort order of the search. Possible values include: + 'asc', 'desc' + :type order: str or ~azure.mgmt.loganalytics.models.SearchSortEnum + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, order=None, **kwargs) -> None: + super(SearchSort, self).__init__(**kwargs) + self.name = name + self.order = order diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys.py index 6e0a05c16977..416c872cbbfe 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys.py @@ -26,6 +26,7 @@ class SharedKeys(Model): 'secondary_shared_key': {'key': 'secondarySharedKey', 'type': 'str'}, } - def __init__(self, primary_shared_key=None, secondary_shared_key=None): - self.primary_shared_key = primary_shared_key - self.secondary_shared_key = secondary_shared_key + def __init__(self, **kwargs): + super(SharedKeys, self).__init__(**kwargs) + self.primary_shared_key = kwargs.get('primary_shared_key', None) + self.secondary_shared_key = kwargs.get('secondary_shared_key', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys_py3.py new file mode 100644 index 000000000000..922f0b31cd8e --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SharedKeys(Model): + """The shared keys for a workspace. + + :param primary_shared_key: The primary shared key of a workspace. + :type primary_shared_key: str + :param secondary_shared_key: The secondary shared key of a workspace. + :type secondary_shared_key: str + """ + + _attribute_map = { + 'primary_shared_key': {'key': 'primarySharedKey', 'type': 'str'}, + 'secondary_shared_key': {'key': 'secondarySharedKey', 'type': 'str'}, + } + + def __init__(self, *, primary_shared_key: str=None, secondary_shared_key: str=None, **kwargs) -> None: + super(SharedKeys, self).__init__(**kwargs) + self.primary_shared_key = primary_shared_key + self.secondary_shared_key = secondary_shared_key diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku.py index 242b975d11ac..73f09793dec9 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku.py @@ -15,10 +15,12 @@ class Sku(Model): """The SKU (tier) of a workspace. - :param name: The name of the SKU. Possible values include: 'Free', - 'Standard', 'Premium', 'Unlimited', 'PerNode', 'Standalone' - :type name: str or :class:`SkuNameEnum - ` + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Possible values include: + 'Free', 'Standard', 'Premium', 'Unlimited', 'PerNode', 'PerGB2018', + 'Standalone' + :type name: str or ~azure.mgmt.loganalytics.models.SkuNameEnum """ _validation = { @@ -29,5 +31,6 @@ class Sku(Model): 'name': {'key': 'name', 'type': 'str'}, } - def __init__(self, name): - self.name = name + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku_py3.py new file mode 100644 index 000000000000..41a0c3d4b36b --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """The SKU (tier) of a workspace. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Possible values include: + 'Free', 'Standard', 'Premium', 'Unlimited', 'PerNode', 'PerGB2018', + 'Standalone' + :type name: str or ~azure.mgmt.loganalytics.models.SkuNameEnum + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account.py index 37d05a96d56a..d336824ca20c 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account.py @@ -15,9 +15,12 @@ class StorageAccount(Model): """Describes a storage account connection. - :param id: The Azure Resource Manager ID of the storage account resource. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The Azure Resource Manager ID of the storage account + resource. :type id: str - :param key: The storage account key. + :param key: Required. The storage account key. :type key: str """ @@ -31,6 +34,7 @@ class StorageAccount(Model): 'key': {'key': 'key', 'type': 'str'}, } - def __init__(self, id, key): - self.id = id - self.key = key + def __init__(self, **kwargs): + super(StorageAccount, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.key = kwargs.get('key', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account_py3.py new file mode 100644 index 000000000000..1df1cc8e83bb --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccount(Model): + """Describes a storage account connection. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The Azure Resource Manager ID of the storage account + resource. + :type id: str + :param key: Required. The storage account key. + :type key: str + """ + + _validation = { + 'id': {'required': True}, + 'key': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, *, id: str, key: str, **kwargs) -> None: + super(StorageAccount, self).__init__(**kwargs) + self.id = id + self.key = key diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight.py index 67a0c8200f9d..ce9b749756c2 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight.py @@ -18,6 +18,8 @@ class StorageInsight(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Resource ID. :vartype id: str :ivar name: Resource name. @@ -25,19 +27,17 @@ class StorageInsight(ProxyResource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param containers: The names of the blob containers that the workspace should read - :type containers: list of str + :type containers: list[str] :param tables: The names of the Azure tables that the workspace should read - :type tables: list of str - :param storage_account: The storage account connection details - :type storage_account: :class:`StorageAccount - ` + :type tables: list[str] + :param storage_account: Required. The storage account connection details + :type storage_account: ~azure.mgmt.loganalytics.models.StorageAccount :ivar status: The status of the storage insight - :vartype status: :class:`StorageInsightStatus - ` + :vartype status: ~azure.mgmt.loganalytics.models.StorageInsightStatus :param e_tag: The ETag of the storage insight. :type e_tag: str """ @@ -62,10 +62,10 @@ class StorageInsight(ProxyResource): 'e_tag': {'key': 'eTag', 'type': 'str'}, } - def __init__(self, storage_account, tags=None, containers=None, tables=None, e_tag=None): - super(StorageInsight, self).__init__(tags=tags) - self.containers = containers - self.tables = tables - self.storage_account = storage_account + def __init__(self, **kwargs): + super(StorageInsight, self).__init__(**kwargs) + self.containers = kwargs.get('containers', None) + self.tables = kwargs.get('tables', None) + self.storage_account = kwargs.get('storage_account', None) self.status = None - self.e_tag = e_tag + self.e_tag = kwargs.get('e_tag', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_py3.py new file mode 100644 index 000000000000..17c3f9624aa9 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_py3.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class StorageInsight(ProxyResource): + """The top level storage insight resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param containers: The names of the blob containers that the workspace + should read + :type containers: list[str] + :param tables: The names of the Azure tables that the workspace should + read + :type tables: list[str] + :param storage_account: Required. The storage account connection details + :type storage_account: ~azure.mgmt.loganalytics.models.StorageAccount + :ivar status: The status of the storage insight + :vartype status: ~azure.mgmt.loganalytics.models.StorageInsightStatus + :param e_tag: The ETag of the storage insight. + :type e_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_account': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'containers': {'key': 'properties.containers', 'type': '[str]'}, + 'tables': {'key': 'properties.tables', 'type': '[str]'}, + 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccount'}, + 'status': {'key': 'properties.status', 'type': 'StorageInsightStatus'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, *, storage_account, tags=None, containers=None, tables=None, e_tag: str=None, **kwargs) -> None: + super(StorageInsight, self).__init__(tags=tags, **kwargs) + self.containers = containers + self.tables = tables + self.storage_account = storage_account + self.status = None + self.e_tag = e_tag diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status.py index acf9028a859a..06af6f749f74 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status.py @@ -15,10 +15,11 @@ class StorageInsightStatus(Model): """The status of the storage insight. - :param state: The state of the storage insight connection to the + All required parameters must be populated in order to send to Azure. + + :param state: Required. The state of the storage insight connection to the workspace. Possible values include: 'OK', 'ERROR' - :type state: str or :class:`StorageInsightState - ` + :type state: str or ~azure.mgmt.loganalytics.models.StorageInsightState :param description: Description of the state of the storage insight. :type description: str """ @@ -32,6 +33,7 @@ class StorageInsightStatus(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, state, description=None): - self.state = state - self.description = description + def __init__(self, **kwargs): + super(StorageInsightStatus, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status_py3.py new file mode 100644 index 000000000000..b30d58481193 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageInsightStatus(Model): + """The status of the storage insight. + + All required parameters must be populated in order to send to Azure. + + :param state: Required. The state of the storage insight connection to the + workspace. Possible values include: 'OK', 'ERROR' + :type state: str or ~azure.mgmt.loganalytics.models.StorageInsightState + :param description: Description of the state of the storage insight. + :type description: str + """ + + _validation = { + 'state': {'required': True}, + } + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, state, description: str=None, **kwargs) -> None: + super(StorageInsightStatus, self).__init__(**kwargs) + self.state = state + self.description = description diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag.py index 5f5fe1cb869a..416b195fd329 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag.py @@ -15,9 +15,11 @@ class Tag(Model): """A tag of a saved search. - :param name: The tag name. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The tag name. :type name: str - :param value: The tag value. + :param value: Required. The tag value. :type value: str """ @@ -27,10 +29,11 @@ class Tag(Model): } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value): - self.name = name - self.value = value + def __init__(self, **kwargs): + super(Tag, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag_py3.py new file mode 100644 index 000000000000..cf70eba079bb --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Tag(Model): + """A tag of a saved search. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The tag name. + :type name: str + :param value: Required. The tag value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(Tag, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric.py index 2a836140a6f9..816554809aba 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric.py @@ -16,8 +16,7 @@ class UsageMetric(Model): """A metric describing the usage of a resource. :param name: The name of the metric. - :type name: :class:`MetricName - ` + :type name: ~azure.mgmt.loganalytics.models.MetricName :param unit: The units used for the metric. :type unit: str :param current_value: The current value of the metric. @@ -40,10 +39,11 @@ class UsageMetric(Model): 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, } - def __init__(self, name=None, unit=None, current_value=None, limit=None, next_reset_time=None, quota_period=None): - self.name = name - self.unit = unit - self.current_value = current_value - self.limit = limit - self.next_reset_time = next_reset_time - self.quota_period = quota_period + def __init__(self, **kwargs): + super(UsageMetric, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.unit = kwargs.get('unit', None) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.next_reset_time = kwargs.get('next_reset_time', None) + self.quota_period = kwargs.get('quota_period', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_py3.py new file mode 100644 index 000000000000..bb30a63af48e --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UsageMetric(Model): + """A metric describing the usage of a resource. + + :param name: The name of the metric. + :type name: ~azure.mgmt.loganalytics.models.MetricName + :param unit: The units used for the metric. + :type unit: str + :param current_value: The current value of the metric. + :type current_value: float + :param limit: The quota limit for the metric. + :type limit: float + :param next_reset_time: The time that the metric's value will reset. + :type next_reset_time: datetime + :param quota_period: The quota period that determines the length of time + between value resets. + :type quota_period: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'MetricName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + } + + def __init__(self, *, name=None, unit: str=None, current_value: float=None, limit: float=None, next_reset_time=None, quota_period: str=None, **kwargs) -> None: + super(UsageMetric, self).__init__(**kwargs) + self.name = name + self.unit = unit + self.current_value = current_value + self.limit = limit + self.next_reset_time = next_reset_time + self.quota_period = quota_period diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace.py index fa77db8a9125..1fc5acd6142e 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace.py @@ -27,12 +27,12 @@ class Workspace(Resource): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param provisioning_state: The provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount' - :type provisioning_state: str or :class:`EntityStatus - ` + :type provisioning_state: str or + ~azure.mgmt.loganalytics.models.EntityStatus :param source: The source of the workspace. Source defines where the workspace was created. 'Azure' implies it was created in Azure. 'External' implies it was created via the Operational Insights Portal. @@ -47,7 +47,7 @@ class Workspace(Resource): client side. :type portal_url: str :param sku: The SKU of the workspace. - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.loganalytics.models.Sku :param retention_in_days: The workspace data retention in days. -1 means Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed for all other Skus. @@ -60,7 +60,6 @@ class Workspace(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, 'retention_in_days': {'maximum': 730, 'minimum': -1}, } @@ -79,12 +78,12 @@ class Workspace(Resource): 'e_tag': {'key': 'eTag', 'type': 'str'}, } - def __init__(self, location, tags=None, provisioning_state=None, source=None, customer_id=None, portal_url=None, sku=None, retention_in_days=None, e_tag=None): - super(Workspace, self).__init__(location=location, tags=tags) - self.provisioning_state = provisioning_state - self.source = source - self.customer_id = customer_id - self.portal_url = portal_url - self.sku = sku - self.retention_in_days = retention_in_days - self.e_tag = e_tag + def __init__(self, **kwargs): + super(Workspace, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.source = kwargs.get('source', None) + self.customer_id = kwargs.get('customer_id', None) + self.portal_url = kwargs.get('portal_url', None) + self.sku = kwargs.get('sku', None) + self.retention_in_days = kwargs.get('retention_in_days', None) + self.e_tag = kwargs.get('e_tag', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body.py new file mode 100644 index 000000000000..8b5c2ccb6aa9 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkspacePurgeBody(Model): + """Describes the body of a purge request for an App Insights Workspace. + + All required parameters must be populated in order to send to Azure. + + :param table: Required. Table from which to purge data. + :type table: str + :param filters: Required. The set of columns and filters (queries) to run + over them to purge the resulting data. + :type filters: + list[~azure.mgmt.loganalytics.models.WorkspacePurgeBodyFilters] + """ + + _validation = { + 'table': {'required': True}, + 'filters': {'required': True}, + } + + _attribute_map = { + 'table': {'key': 'table', 'type': 'str'}, + 'filters': {'key': 'filters', 'type': '[WorkspacePurgeBodyFilters]'}, + } + + def __init__(self, **kwargs): + super(WorkspacePurgeBody, self).__init__(**kwargs) + self.table = kwargs.get('table', None) + self.filters = kwargs.get('filters', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters.py new file mode 100644 index 000000000000..0a9672178f6a --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkspacePurgeBodyFilters(Model): + """User-defined filters to return data which will be purged from the table. + + :param column: The column of the table over which the given query should + run + :type column: str + :param operator: A query operator to evaluate over the provided column and + value(s). + :type operator: str + :param value: the value for the operator to function over. This can be a + number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of + values. + :type value: object + """ + + _attribute_map = { + 'column': {'key': 'column', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(WorkspacePurgeBodyFilters, self).__init__(**kwargs) + self.column = kwargs.get('column', None) + self.operator = kwargs.get('operator', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters_py3.py new file mode 100644 index 000000000000..e5813d8d8c71 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkspacePurgeBodyFilters(Model): + """User-defined filters to return data which will be purged from the table. + + :param column: The column of the table over which the given query should + run + :type column: str + :param operator: A query operator to evaluate over the provided column and + value(s). + :type operator: str + :param value: the value for the operator to function over. This can be a + number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of + values. + :type value: object + """ + + _attribute_map = { + 'column': {'key': 'column', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + } + + def __init__(self, *, column: str=None, operator: str=None, value=None, **kwargs) -> None: + super(WorkspacePurgeBodyFilters, self).__init__(**kwargs) + self.column = column + self.operator = operator + self.value = value diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_py3.py new file mode 100644 index 000000000000..5112daee22c5 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkspacePurgeBody(Model): + """Describes the body of a purge request for an App Insights Workspace. + + All required parameters must be populated in order to send to Azure. + + :param table: Required. Table from which to purge data. + :type table: str + :param filters: Required. The set of columns and filters (queries) to run + over them to purge the resulting data. + :type filters: + list[~azure.mgmt.loganalytics.models.WorkspacePurgeBodyFilters] + """ + + _validation = { + 'table': {'required': True}, + 'filters': {'required': True}, + } + + _attribute_map = { + 'table': {'key': 'table', 'type': 'str'}, + 'filters': {'key': 'filters', 'type': '[WorkspacePurgeBodyFilters]'}, + } + + def __init__(self, *, table: str, filters, **kwargs) -> None: + super(WorkspacePurgeBody, self).__init__(**kwargs) + self.table = table + self.filters = filters diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response.py new file mode 100644 index 000000000000..35d54f2167a6 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkspacePurgeResponse(Model): + """Response containing operationId for a specific purge action. + + All required parameters must be populated in order to send to Azure. + + :param operation_id: Required. Id to use when querying for status for a + particular purge operation. + :type operation_id: str + """ + + _validation = { + 'operation_id': {'required': True}, + } + + _attribute_map = { + 'operation_id': {'key': 'operationId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkspacePurgeResponse, self).__init__(**kwargs) + self.operation_id = kwargs.get('operation_id', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response_py3.py new file mode 100644 index 000000000000..26f7fbc448ae --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkspacePurgeResponse(Model): + """Response containing operationId for a specific purge action. + + All required parameters must be populated in order to send to Azure. + + :param operation_id: Required. Id to use when querying for status for a + particular purge operation. + :type operation_id: str + """ + + _validation = { + 'operation_id': {'required': True}, + } + + _attribute_map = { + 'operation_id': {'key': 'operationId', 'type': 'str'}, + } + + def __init__(self, *, operation_id: str, **kwargs) -> None: + super(WorkspacePurgeResponse, self).__init__(**kwargs) + self.operation_id = operation_id diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response.py new file mode 100644 index 000000000000..52216b115125 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkspacePurgeStatusResponse(Model): + """Response containing status for a specific purge operation. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. Status of the operation represented by the + requested Id. Possible values include: 'Pending', 'Completed' + :type status: str or ~azure.mgmt.loganalytics.models.PurgeState + """ + + _validation = { + 'status': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkspacePurgeStatusResponse, self).__init__(**kwargs) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response_py3.py new file mode 100644 index 000000000000..09c2dcb4410f --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkspacePurgeStatusResponse(Model): + """Response containing status for a specific purge operation. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. Status of the operation represented by the + requested Id. Possible values include: 'Pending', 'Completed' + :type status: str or ~azure.mgmt.loganalytics.models.PurgeState + """ + + _validation = { + 'status': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, status, **kwargs) -> None: + super(WorkspacePurgeStatusResponse, self).__init__(**kwargs) + self.status = status diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_py3.py new file mode 100644 index 000000000000..6c9f42e6d975 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_py3.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class Workspace(Resource): + """The top level Workspace resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param provisioning_state: The provisioning state of the workspace. + Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', + 'Deleting', 'ProvisioningAccount' + :type provisioning_state: str or + ~azure.mgmt.loganalytics.models.EntityStatus + :param source: The source of the workspace. Source defines where the + workspace was created. 'Azure' implies it was created in Azure. + 'External' implies it was created via the Operational Insights Portal. + This value is set on the service side and read-only on the client side. + :type source: str + :param customer_id: The ID associated with the workspace. Setting this + value at creation time allows the workspace being created to be linked to + an existing workspace. + :type customer_id: str + :param portal_url: The URL of the Operational Insights portal for this + workspace. This value is set on the service side and read-only on the + client side. + :type portal_url: str + :param sku: The SKU of the workspace. + :type sku: ~azure.mgmt.loganalytics.models.Sku + :param retention_in_days: The workspace data retention in days. -1 means + Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed + for all other Skus. + :type retention_in_days: int + :param e_tag: The ETag of the workspace. + :type e_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'retention_in_days': {'maximum': 730, 'minimum': -1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'source': {'key': 'properties.source', 'type': 'str'}, + 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, + 'portal_url': {'key': 'properties.portalUrl', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'retention_in_days': {'key': 'properties.retentionInDays', 'type': 'int'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, provisioning_state=None, source: str=None, customer_id: str=None, portal_url: str=None, sku=None, retention_in_days: int=None, e_tag: str=None, **kwargs) -> None: + super(Workspace, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = provisioning_state + self.source = source + self.customer_id = customer_id + self.portal_url = portal_url + self.sku = sku + self.retention_in_days = retention_in_days + self.e_tag = e_tag diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py index b9ace78ff9b7..c5ba8a2e6ecf 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py @@ -9,16 +9,18 @@ # regenerated. # -------------------------------------------------------------------------- -from .linked_services_operations import LinkedServicesOperations -from .data_sources_operations import DataSourcesOperations -from .workspaces_operations import WorkspacesOperations from .storage_insights_operations import StorageInsightsOperations +from .workspaces_operations import WorkspacesOperations from .saved_searches_operations import SavedSearchesOperations +from .linked_services_operations import LinkedServicesOperations +from .data_sources_operations import DataSourcesOperations +from .operations import Operations __all__ = [ - 'LinkedServicesOperations', - 'DataSourcesOperations', - 'WorkspacesOperations', 'StorageInsightsOperations', + 'WorkspacesOperations', 'SavedSearchesOperations', + 'LinkedServicesOperations', + 'DataSourcesOperations', + 'Operations', ] diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/data_sources_operations.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/data_sources_operations.py index 322b19ed4d04..24b70947dd5b 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/data_sources_operations.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/data_sources_operations.py @@ -22,10 +22,12 @@ class DataSourcesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2015-11-01-preview". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,24 +51,19 @@ def create_or_update( :type data_source_name: str :param parameters: The parameters required to create or update a datasource. - :type parameters: :class:`DataSource - ` + :type parameters: ~azure.mgmt.loganalytics.models.DataSource :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`DataSource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`DataSource - ` or - :class:`ClientRawResponse` + :return: DataSource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.DataSource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -95,7 +92,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -114,6 +111,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}'} def delete( self, resource_group_name, workspace_name, data_source_name, custom_headers=None, raw=False, **operation_config): @@ -132,15 +130,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -165,7 +160,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -175,6 +170,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}'} def get( self, resource_group_name, workspace_name, data_source_name, custom_headers=None, raw=False, **operation_config): @@ -193,17 +189,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`DataSource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`DataSource - ` or - :class:`ClientRawResponse` + :return: DataSource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.DataSource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -228,7 +220,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -245,6 +237,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}'} def list_by_workspace( self, resource_group_name, workspace_name, filter, skiptoken=None, custom_headers=None, raw=False, **operation_config): @@ -266,17 +259,16 @@ def list_by_workspace( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`DataSource - ` - :rtype: :class:`DataSourcePaged - ` + :return: An iterator like instance of DataSource + :rtype: + ~azure.mgmt.loganalytics.models.DataSourcePaged[~azure.mgmt.loganalytics.models.DataSource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources' + url = self.list_by_workspace.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -308,7 +300,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -326,3 +318,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources'} diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/linked_services_operations.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/linked_services_operations.py index 5b13afe38a4c..397183f80a36 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/linked_services_operations.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/linked_services_operations.py @@ -22,10 +22,12 @@ class LinkedServicesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2015-11-01-preview". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,25 +53,21 @@ def create_or_update( linked to the workspace. :type resource_id: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`LinkedService - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`LinkedService - ` or - :class:`ClientRawResponse` + :return: LinkedService or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.LinkedService or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = models.LinkedService(tags=tags, resource_id=resource_id) # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -98,7 +96,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -117,6 +115,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}'} def delete( self, resource_group_name, workspace_name, linked_service_name, custom_headers=None, raw=False, **operation_config): @@ -135,15 +134,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -168,7 +164,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -178,6 +174,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}'} def get( self, resource_group_name, workspace_name, linked_service_name, custom_headers=None, raw=False, **operation_config): @@ -196,17 +193,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`LinkedService - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`LinkedService - ` or - :class:`ClientRawResponse` + :return: LinkedService or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.LinkedService or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -231,7 +224,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -248,6 +241,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}'} def list_by_workspace( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): @@ -264,17 +258,16 @@ def list_by_workspace( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`LinkedService - ` - :rtype: :class:`LinkedServicePaged - ` + :return: An iterator like instance of LinkedService + :rtype: + ~azure.mgmt.loganalytics.models.LinkedServicePaged[~azure.mgmt.loganalytics.models.LinkedService] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices' + url = self.list_by_workspace.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -303,7 +296,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -321,3 +314,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices'} diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/operations.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/operations.py new file mode 100644 index 000000000000..42e218c978a0 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/operations.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-11-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-11-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available OperationalInsights Rest API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.loganalytics.models.OperationPaged[~azure.mgmt.loganalytics.models.Operation] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.OperationalInsights/operations'} diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/saved_searches_operations.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/saved_searches_operations.py index b10a788cbe92..95bbe17347cb 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/saved_searches_operations.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/saved_searches_operations.py @@ -22,10 +22,12 @@ class SavedSearchesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2015-03-20". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,15 +53,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -84,7 +83,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -94,6 +93,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}'} def create_or_update( self, resource_group_name, workspace_name, saved_search_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -107,24 +107,19 @@ def create_or_update( :param saved_search_name: The id of the saved search. :type saved_search_name: str :param parameters: The parameters required to save a search. - :type parameters: :class:`SavedSearch - ` + :type parameters: ~azure.mgmt.loganalytics.models.SavedSearch :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SavedSearch - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SavedSearch - ` or - :class:`ClientRawResponse` + :return: SavedSearch or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.SavedSearch or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -153,7 +148,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -170,6 +165,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}'} def get( self, resource_group_name, workspace_name, saved_search_name, custom_headers=None, raw=False, **operation_config): @@ -187,17 +183,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SavedSearch - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SavedSearch - ` or - :class:`ClientRawResponse` + :return: SavedSearch or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.SavedSearch or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -222,7 +214,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -239,6 +231,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}'} def list_by_workspace( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): @@ -254,17 +247,13 @@ def list_by_workspace( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SavedSearchesListResult - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SavedSearchesListResult - ` or - :class:`ClientRawResponse` + :return: SavedSearchesListResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.SavedSearchesListResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches' + url = self.list_by_workspace.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -288,7 +277,7 @@ def list_by_workspace( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -305,6 +294,7 @@ def list_by_workspace( return client_raw_response return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches'} def get_results( self, resource_group_name, workspace_name, saved_search_name, custom_headers=None, raw=False, **operation_config): @@ -322,17 +312,13 @@ def get_results( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SearchResultsResponse - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SearchResultsResponse - ` or - :class:`ClientRawResponse` + :return: SearchResultsResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.SearchResultsResponse or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}/results' + url = self.get_results.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -357,7 +343,7 @@ def get_results( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -374,3 +360,4 @@ def get_results( return client_raw_response return deserialized + get_results.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}/results'} diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/storage_insights_operations.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/storage_insights_operations.py index b7da2e22eeca..3cd3adc2ed36 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/storage_insights_operations.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/storage_insights_operations.py @@ -22,10 +22,12 @@ class StorageInsightsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2015-03-20". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,24 +52,19 @@ def create_or_update( :type storage_insight_name: str :param parameters: The parameters required to create or update a storage insight. - :type parameters: :class:`StorageInsight - ` + :type parameters: ~azure.mgmt.loganalytics.models.StorageInsight :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`StorageInsight - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`StorageInsight - ` or - :class:`ClientRawResponse` + :return: StorageInsight or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.StorageInsight or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -96,25 +93,26 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [201, 200]: + if response.status_code not in [200, 201]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 201: - deserialized = self._deserialize('StorageInsight', response) if response.status_code == 200: deserialized = self._deserialize('StorageInsight', response) + if response.status_code == 201: + deserialized = self._deserialize('StorageInsight', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}'} def get( self, resource_group_name, workspace_name, storage_insight_name, custom_headers=None, raw=False, **operation_config): @@ -134,17 +132,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`StorageInsight - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`StorageInsight - ` or - :class:`ClientRawResponse` + :return: StorageInsight or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.StorageInsight or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -169,7 +163,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -186,6 +180,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}'} def delete( self, resource_group_name, workspace_name, storage_insight_name, custom_headers=None, raw=False, **operation_config): @@ -205,15 +200,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -238,7 +230,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -248,6 +240,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}'} def list_by_workspace( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): @@ -264,17 +257,16 @@ def list_by_workspace( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`StorageInsight - ` - :rtype: :class:`StorageInsightPaged - ` + :return: An iterator like instance of StorageInsight + :rtype: + ~azure.mgmt.loganalytics.models.StorageInsightPaged[~azure.mgmt.loganalytics.models.StorageInsight] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs' + url = self.list_by_workspace.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -303,7 +295,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -321,3 +313,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs'} diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/workspaces_operations.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/workspaces_operations.py index 2f4034630ca9..50f97070acc1 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/workspaces_operations.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/workspaces_operations.py @@ -12,7 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -23,9 +24,11 @@ class WorkspacesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -34,6 +37,417 @@ def __init__(self, client, config, serializer, deserializer): self.config = config + def list_link_targets( + self, custom_headers=None, raw=False, **operation_config): + """Get a list of workspaces which the current user has administrator + privileges and are not associated with an Azure Subscription. The + subscriptionId parameter in the Url is ignored. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.loganalytics.models.LinkTarget] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + api_version = "2015-03-20" + + # Construct URL + url = self.list_link_targets.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[LinkTarget]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_link_targets.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/linkTargets'} + + def get_schema( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets the schema for a given workspace. + + :param resource_group_name: The name of the resource group to get. The + name is case insensitive. + :type resource_group_name: str + :param workspace_name: Log Analytics workspace name + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SearchGetSchemaResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.SearchGetSchemaResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + api_version = "2015-03-20" + + # Construct URL + url = self.get_schema.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SearchGetSchemaResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_schema.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/schema'} + + + def _get_search_results_initial( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): + api_version = "2015-03-20" + + # Construct URL + url = self.get_search_results.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'SearchParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SearchResultsResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def get_search_results( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Submit a search for a given workspace. The response will contain an id + to track the search. User can use the id to poll the search status and + get the full search result later if the search takes long time to + finish. . + + :param resource_group_name: The name of the resource group to get. The + name is case insensitive. + :type resource_group_name: str + :param workspace_name: Log Analytics workspace name + :type workspace_name: str + :param parameters: The parameters required to execute a search query. + :type parameters: ~azure.mgmt.loganalytics.models.SearchParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SearchResultsResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.loganalytics.models.SearchResultsResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.loganalytics.models.SearchResultsResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._get_search_results_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SearchResultsResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + get_search_results.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/search'} + + def update_search_results( + self, resource_group_name, workspace_name, id, custom_headers=None, raw=False, **operation_config): + """Gets updated search results for a given search query. + + :param resource_group_name: The name of the resource group to get. The + name is case insensitive. + :type resource_group_name: str + :param workspace_name: Log Analytics workspace name + :type workspace_name: str + :param id: The id of the search that will have results updated. You + can get the id from the response of the GetResults call. + :type id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SearchResultsResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.SearchResultsResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + api_version = "2015-03-20" + + # Construct URL + url = self.update_search_results.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SearchResultsResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_search_results.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/search/{id}'} + + + def _purge_initial( + self, resource_group_name, workspace_name, table, filters, custom_headers=None, raw=False, **operation_config): + body = models.WorkspacePurgeBody(table=table, filters=filters) + + api_version = "2015-03-20" + + # Construct URL + url = self.purge.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(body, 'WorkspacePurgeBody') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkspacePurgeStatusResponse', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkspacePurgeResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def purge( + self, resource_group_name, workspace_name, table, filters, custom_headers=None, raw=False, polling=True, **operation_config): + """Purges data in an Log Analytics workspace by a set of user-defined + filters. + + :param resource_group_name: The name of the resource group to get. The + name is case insensitive. + :type resource_group_name: str + :param workspace_name: Log Analytics workspace name + :type workspace_name: str + :param table: Table from which to purge data. + :type table: str + :param filters: The set of columns and filters (queries) to run over + them to purge the resulting data. + :type filters: + list[~azure.mgmt.loganalytics.models.WorkspacePurgeBodyFilters] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns object or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] + :raises: :class:`CloudError` + """ + raw_result = self._purge_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + table=table, + filters=filters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + purge.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/purge'} + def disable_intelligence_pack( self, resource_group_name, workspace_name, intelligence_pack_name, custom_headers=None, raw=False, **operation_config): """Disables an intelligence pack for a given workspace. @@ -51,17 +465,14 @@ def disable_intelligence_pack( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Disable' + url = self.disable_intelligence_pack.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -86,7 +497,7 @@ def disable_intelligence_pack( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -96,6 +507,7 @@ def disable_intelligence_pack( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + disable_intelligence_pack.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Disable'} def enable_intelligence_pack( self, resource_group_name, workspace_name, intelligence_pack_name, custom_headers=None, raw=False, **operation_config): @@ -114,17 +526,14 @@ def enable_intelligence_pack( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Enable' + url = self.enable_intelligence_pack.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -149,7 +558,7 @@ def enable_intelligence_pack( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -159,6 +568,7 @@ def enable_intelligence_pack( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + enable_intelligence_pack.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Enable'} def list_intelligence_packs( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): @@ -175,19 +585,15 @@ def list_intelligence_packs( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list of :class:`IntelligencePack - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`IntelligencePack - ` or - :class:`ClientRawResponse` + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.loganalytics.models.IntelligencePack] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks' + url = self.list_intelligence_packs.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -211,7 +617,7 @@ def list_intelligence_packs( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -228,6 +634,7 @@ def list_intelligence_packs( return client_raw_response return deserialized + list_intelligence_packs.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks'} def get_shared_keys( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): @@ -243,19 +650,15 @@ def get_shared_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SharedKeys - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SharedKeys - ` or - :class:`ClientRawResponse` + :return: SharedKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.SharedKeys or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/sharedKeys' + url = self.get_shared_keys.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -279,7 +682,7 @@ def get_shared_keys( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -296,6 +699,7 @@ def get_shared_keys( return client_raw_response return deserialized + get_shared_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/sharedKeys'} def list_usages( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): @@ -311,10 +715,9 @@ def list_usages( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`UsageMetric - ` - :rtype: :class:`UsageMetricPaged - ` + :return: An iterator like instance of UsageMetric + :rtype: + ~azure.mgmt.loganalytics.models.UsageMetricPaged[~azure.mgmt.loganalytics.models.UsageMetric] :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" @@ -323,7 +726,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/usages' + url = self.list_usages.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -352,7 +755,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -370,6 +773,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/usages'} def list_management_groups( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): @@ -385,10 +789,9 @@ def list_management_groups( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ManagementGroup - ` - :rtype: :class:`ManagementGroupPaged - ` + :return: An iterator like instance of ManagementGroup + :rtype: + ~azure.mgmt.loganalytics.models.ManagementGroupPaged[~azure.mgmt.loganalytics.models.ManagementGroup] :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" @@ -397,7 +800,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups' + url = self.list_management_groups.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -426,7 +829,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -444,6 +847,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_management_groups.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -457,10 +861,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Workspace - ` - :rtype: :class:`WorkspacePaged - ` + :return: An iterator like instance of Workspace + :rtype: + ~azure.mgmt.loganalytics.models.WorkspacePaged[~azure.mgmt.loganalytics.models.Workspace] :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" @@ -469,7 +872,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -497,7 +900,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -515,6 +918,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces'} def list( self, custom_headers=None, raw=False, **operation_config): @@ -525,10 +929,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Workspace - ` - :rtype: :class:`WorkspacePaged - ` + :return: An iterator like instance of Workspace + :rtype: + ~azure.mgmt.loganalytics.models.WorkspacePaged[~azure.mgmt.loganalytics.models.Workspace] :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" @@ -537,7 +940,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/workspaces' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -564,7 +967,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -582,37 +985,15 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/workspaces'} - def create_or_update( - self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update a workspace. - :param resource_group_name: The resource group name of the workspace. - :type resource_group_name: str - :param workspace_name: The name of the workspace. - :type workspace_name: str - :param parameters: The parameters required to create or update a - workspace. - :type parameters: :class:`Workspace - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`Workspace - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _create_or_update_initial( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): api_version = "2015-11-01-preview" # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), @@ -638,33 +1019,63 @@ def create_or_update( body_content = self._serialize.body(parameters, 'Workspace') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - def get_long_running_status(status_link, headers=None): + deserialized = None - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if response.status_code == 200: + deserialized = self._deserialize('Workspace', response) + if response.status_code == 201: + deserialized = self._deserialize('Workspace', response) - def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + return deserialized + + def create_or_update( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a workspace. - deserialized = None + :param resource_group_name: The resource group name of the workspace. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param parameters: The parameters required to create or update a + workspace. + :type parameters: ~azure.mgmt.loganalytics.models.Workspace + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Workspace or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.loganalytics.models.Workspace] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.loganalytics.models.Workspace]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) - if response.status_code == 200: - deserialized = self._deserialize('Workspace', response) - if response.status_code == 201: - deserialized = self._deserialize('Workspace', response) + def get_long_running_output(response): + deserialized = self._deserialize('Workspace', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -672,16 +1083,14 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}'} def delete( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): @@ -696,17 +1105,14 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -730,7 +1136,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -740,6 +1146,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}'} def get( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): @@ -754,17 +1161,15 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Workspace ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Workspace ` - or :class:`ClientRawResponse` + :return: Workspace or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.Workspace or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -788,7 +1193,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -805,174 +1210,35 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}'} - def list_link_targets( - self, custom_headers=None, raw=False, **operation_config): - """Get a list of workspaces which the current user has administrator - privileges and are not associated with an Azure Subscription. The - subscriptionId parameter in the Url is ignored. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list of :class:`LinkTarget - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`LinkTarget - ` or - :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ - api_version = "2015-03-20" - - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/linkTargets' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[LinkTarget]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def get_schema( - self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): - """Gets the schema for a given workspace. + def update( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): + """Updates a workspace. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The resource group name of the workspace. :type resource_group_name: str - :param workspace_name: Log Analytics workspace name + :param workspace_name: The name of the workspace. :type workspace_name: str + :param parameters: The parameters required to patch a workspace. + :type parameters: ~azure.mgmt.loganalytics.models.Workspace :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SearchGetSchemaResponse - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SearchGetSchemaResponse - ` or - :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ - api_version = "2015-03-20" - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/schema' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SearchGetSchemaResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def get_search_results( - self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): - """Submit a search for a given workspace. The response will contain an id - to track the search. User can use the id to poll the search status and - get the full search result later if the search takes long time to - finish. . - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :param parameters: The parameters required to execute a search query. - :type parameters: :class:`SearchParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`SearchResultsResponse - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` + :return: Workspace or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.Workspace or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-03-20" + api_version = "2015-11-01-preview" # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/search' + url = self.update.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -992,107 +1258,12 @@ def get_search_results( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'SearchParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SearchResultsResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def update_search_results( - self, resource_group_name, workspace_name, id, custom_headers=None, raw=False, **operation_config): - """Gets updated search results for a given search query. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :param id: The id of the search that will have results updated. You - can get the id from the response of the GetResults call. - :type id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: :class:`SearchResultsResponse - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SearchResultsResponse - ` or - :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ - api_version = "2015-03-20" - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/search/{id}' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'id': self._serialize.url("id", id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + body_content = self._serialize.body(parameters, 'Workspace') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1102,10 +1273,11 @@ def update_search_results( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SearchResultsResponse', response) + deserialized = self._deserialize('Workspace', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}'} diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/version.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/version.py index e0ec669828cb..9bd1dfac7ecb 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/version.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "0.2.0" diff --git a/azure-mgmt-loganalytics/sdk_packaging.toml b/azure-mgmt-loganalytics/sdk_packaging.toml new file mode 100644 index 000000000000..10f312526134 --- /dev/null +++ b/azure-mgmt-loganalytics/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-loganalytics" +package_pprint_name = "Log Analytics Management" +package_doc_id = "" +is_stable = false diff --git a/azure-mgmt-loganalytics/setup.py b/azure-mgmt-loganalytics/setup.py index ace1a862f01b..96f4ca887a06 100644 --- a/azure-mgmt-loganalytics/setup.py +++ b/azure-mgmt-loganalytics/setup.py @@ -69,7 +69,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', @@ -78,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-logic/HISTORY.rst b/azure-mgmt-logic/HISTORY.rst index 21d8a5e14f65..721fc826b313 100644 --- a/azure-mgmt-logic/HISTORY.rst +++ b/azure-mgmt-logic/HISTORY.rst @@ -3,6 +3,64 @@ Release History =============== +3.0.0 (2018-05-18) +++++++++++++++++++ + +**Features** + +- Model WorkflowTriggerListCallbackUrlQueries has a new parameter se +- Model WorkflowRun has a new parameter wait_end_time +- Model WorkflowRunTrigger has a new parameter scheduled_time +- Added operation IntegrationAccountsOperations.log_tracking_events +- Added operation IntegrationAccountsOperations.regenerate_access_key +- Added operation IntegrationAccountsOperations.list_key_vault_keys +- Added operation WorkflowRunActionsOperations.list_expression_traces +- Added operation PartnersOperations.list_content_callback_url +- Added operation AgreementsOperations.list_content_callback_url +- Added operation SchemasOperations.list_content_callback_url +- Added operation WorkflowsOperations.move +- Added operation WorkflowsOperations.validate_workflow +- Added operation WorkflowsOperations.list_callback_url +- Added operation WorkflowTriggersOperations.get_schema_json +- Added operation WorkflowTriggersOperations.reset +- Added operation WorkflowTriggersOperations.set_state +- Added operation MapsOperations.list_content_callback_url +- Added operation group IntegrationAccountAssembliesOperations +- Added operation group WorkflowRunActionScopedRepetitionsOperations +- Added operation group WorkflowRunActionRepetitionsOperations +- Added operation group IntegrationAccountBatchConfigurationsOperations +- Added operation group WorkflowRunOperations +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + 2.1.0 (2017-04-18) ++++++++++++++++++ diff --git a/azure-mgmt-logic/README.rst b/azure-mgmt-logic/README.rst index 75b3efa52753..095902143154 100644 --- a/azure-mgmt-logic/README.rst +++ b/azure-mgmt-logic/README.rst @@ -1,9 +1,15 @@ Microsoft Azure SDK for Python ============================== -This is the Microsoft Azure LogicApps Management Client Library. +This is the Microsoft Azure Logic Apps Management Client Library. -This package has been tested with Python 2.7, 3.3, 3.4 and 3.5. +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. For a more complete set of Azure libraries, see the `azure `__ bundle package. @@ -30,9 +36,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `Logic Apps Resource Management -`__ -on readthedocs.org. +For code examples, see `Logic Apps Management +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-logic/azure/mgmt/logic/__init__.py b/azure-mgmt-logic/azure/mgmt/logic/__init__.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-logic/azure/mgmt/logic/logic_management_client.py b/azure-mgmt-logic/azure/mgmt/logic/logic_management_client.py old mode 100755 new mode 100644 index 359c38574c04..1546c6d7fffd --- a/azure-mgmt-logic/azure/mgmt/logic/logic_management_client.py +++ b/azure-mgmt-logic/azure/mgmt/logic/logic_management_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -22,7 +22,12 @@ from .operations.workflow_trigger_histories_operations import WorkflowTriggerHistoriesOperations from .operations.workflow_runs_operations import WorkflowRunsOperations from .operations.workflow_run_actions_operations import WorkflowRunActionsOperations +from .operations.workflow_run_action_repetitions_operations import WorkflowRunActionRepetitionsOperations +from .operations.workflow_run_action_scoped_repetitions_operations import WorkflowRunActionScopedRepetitionsOperations +from .operations.workflow_run_operations import WorkflowRunOperations from .operations.integration_accounts_operations import IntegrationAccountsOperations +from .operations.integration_account_assemblies_operations import IntegrationAccountAssembliesOperations +from .operations.integration_account_batch_configurations_operations import IntegrationAccountBatchConfigurationsOperations from .operations.schemas_operations import SchemasOperations from .operations.maps_operations import MapsOperations from .operations.partners_operations import PartnersOperations @@ -52,52 +57,60 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(LogicManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('logicmanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-logic/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class LogicManagementClient(object): +class LogicManagementClient(SDKClient): """REST API for Azure Logic Apps. :ivar config: Configuration for client. :vartype config: LogicManagementClientConfiguration :ivar workflows: Workflows operations - :vartype workflows: .operations.WorkflowsOperations + :vartype workflows: azure.mgmt.logic.operations.WorkflowsOperations :ivar workflow_versions: WorkflowVersions operations - :vartype workflow_versions: .operations.WorkflowVersionsOperations + :vartype workflow_versions: azure.mgmt.logic.operations.WorkflowVersionsOperations :ivar workflow_triggers: WorkflowTriggers operations - :vartype workflow_triggers: .operations.WorkflowTriggersOperations + :vartype workflow_triggers: azure.mgmt.logic.operations.WorkflowTriggersOperations :ivar workflow_trigger_histories: WorkflowTriggerHistories operations - :vartype workflow_trigger_histories: .operations.WorkflowTriggerHistoriesOperations + :vartype workflow_trigger_histories: azure.mgmt.logic.operations.WorkflowTriggerHistoriesOperations :ivar workflow_runs: WorkflowRuns operations - :vartype workflow_runs: .operations.WorkflowRunsOperations + :vartype workflow_runs: azure.mgmt.logic.operations.WorkflowRunsOperations :ivar workflow_run_actions: WorkflowRunActions operations - :vartype workflow_run_actions: .operations.WorkflowRunActionsOperations + :vartype workflow_run_actions: azure.mgmt.logic.operations.WorkflowRunActionsOperations + :ivar workflow_run_action_repetitions: WorkflowRunActionRepetitions operations + :vartype workflow_run_action_repetitions: azure.mgmt.logic.operations.WorkflowRunActionRepetitionsOperations + :ivar workflow_run_action_scoped_repetitions: WorkflowRunActionScopedRepetitions operations + :vartype workflow_run_action_scoped_repetitions: azure.mgmt.logic.operations.WorkflowRunActionScopedRepetitionsOperations + :ivar workflow_run_operations: WorkflowRunOperations operations + :vartype workflow_run_operations: azure.mgmt.logic.operations.WorkflowRunOperations :ivar integration_accounts: IntegrationAccounts operations - :vartype integration_accounts: .operations.IntegrationAccountsOperations + :vartype integration_accounts: azure.mgmt.logic.operations.IntegrationAccountsOperations + :ivar integration_account_assemblies: IntegrationAccountAssemblies operations + :vartype integration_account_assemblies: azure.mgmt.logic.operations.IntegrationAccountAssembliesOperations + :ivar integration_account_batch_configurations: IntegrationAccountBatchConfigurations operations + :vartype integration_account_batch_configurations: azure.mgmt.logic.operations.IntegrationAccountBatchConfigurationsOperations :ivar schemas: Schemas operations - :vartype schemas: .operations.SchemasOperations + :vartype schemas: azure.mgmt.logic.operations.SchemasOperations :ivar maps: Maps operations - :vartype maps: .operations.MapsOperations + :vartype maps: azure.mgmt.logic.operations.MapsOperations :ivar partners: Partners operations - :vartype partners: .operations.PartnersOperations + :vartype partners: azure.mgmt.logic.operations.PartnersOperations :ivar agreements: Agreements operations - :vartype agreements: .operations.AgreementsOperations + :vartype agreements: azure.mgmt.logic.operations.AgreementsOperations :ivar certificates: Certificates operations - :vartype certificates: .operations.CertificatesOperations + :vartype certificates: azure.mgmt.logic.operations.CertificatesOperations :ivar sessions: Sessions operations - :vartype sessions: .operations.SessionsOperations + :vartype sessions: azure.mgmt.logic.operations.SessionsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -111,7 +124,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = LogicManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(LogicManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '2016-06-01' @@ -130,8 +143,18 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.workflow_run_actions = WorkflowRunActionsOperations( self._client, self.config, self._serialize, self._deserialize) + self.workflow_run_action_repetitions = WorkflowRunActionRepetitionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workflow_run_action_scoped_repetitions = WorkflowRunActionScopedRepetitionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workflow_run_operations = WorkflowRunOperations( + self._client, self.config, self._serialize, self._deserialize) self.integration_accounts = IntegrationAccountsOperations( self._client, self.config, self._serialize, self._deserialize) + self.integration_account_assemblies = IntegrationAccountAssembliesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.integration_account_batch_configurations = IntegrationAccountBatchConfigurationsOperations( + self._client, self.config, self._serialize, self._deserialize) self.schemas = SchemasOperations( self._client, self.config, self._serialize, self._deserialize) self.maps = MapsOperations( @@ -154,8 +177,9 @@ def list_operations( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`OperationPaged - ` + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.logic.models.OperationPaged[~azure.mgmt.logic.models.Operation] :raises: :class:`ErrorResponseException` """ @@ -163,11 +187,11 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.Logic/operations' + url = self.list_operations.metadata['url'] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.config.api_version", self.config.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -186,7 +210,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -202,3 +226,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.Logic/operations'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py b/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py old mode 100755 new mode 100644 index 0bafc2513adf..3f5a248b0d14 --- a/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py @@ -9,107 +9,264 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource -from .sub_resource import SubResource -from .resource_reference import ResourceReference -from .sku import Sku -from .workflow_parameter import WorkflowParameter -from .workflow import Workflow -from .workflow_filter import WorkflowFilter -from .workflow_version import WorkflowVersion -from .recurrence_schedule_occurrence import RecurrenceScheduleOccurrence -from .recurrence_schedule import RecurrenceSchedule -from .workflow_trigger_recurrence import WorkflowTriggerRecurrence -from .workflow_trigger import WorkflowTrigger -from .workflow_trigger_filter import WorkflowTriggerFilter -from .workflow_trigger_list_callback_url_queries import WorkflowTriggerListCallbackUrlQueries -from .workflow_trigger_callback_url import WorkflowTriggerCallbackUrl -from .correlation import Correlation -from .content_hash import ContentHash -from .content_link import ContentLink -from .workflow_trigger_history import WorkflowTriggerHistory -from .workflow_trigger_history_filter import WorkflowTriggerHistoryFilter -from .workflow_run_trigger import WorkflowRunTrigger -from .workflow_output_parameter import WorkflowOutputParameter -from .workflow_run import WorkflowRun -from .workflow_run_filter import WorkflowRunFilter -from .error_properties import ErrorProperties -from .error_response import ErrorResponse, ErrorResponseException -from .retry_history import RetryHistory -from .workflow_run_action import WorkflowRunAction -from .workflow_run_action_filter import WorkflowRunActionFilter -from .regenerate_action_parameter import RegenerateActionParameter -from .generate_upgraded_definition_parameters import GenerateUpgradedDefinitionParameters -from .integration_account_sku import IntegrationAccountSku -from .integration_account import IntegrationAccount -from .get_callback_url_parameters import GetCallbackUrlParameters -from .callback_url import CallbackUrl -from .integration_account_schema import IntegrationAccountSchema -from .integration_account_schema_filter import IntegrationAccountSchemaFilter -from .integration_account_map_properties_parameters_schema import IntegrationAccountMapPropertiesParametersSchema -from .integration_account_map import IntegrationAccountMap -from .integration_account_map_filter import IntegrationAccountMapFilter -from .business_identity import BusinessIdentity -from .b2_bpartner_content import B2BPartnerContent -from .partner_content import PartnerContent -from .integration_account_partner import IntegrationAccountPartner -from .integration_account_partner_filter import IntegrationAccountPartnerFilter -from .as2_message_connection_settings import AS2MessageConnectionSettings -from .as2_acknowledgement_connection_settings import AS2AcknowledgementConnectionSettings -from .as2_mdn_settings import AS2MdnSettings -from .as2_security_settings import AS2SecuritySettings -from .as2_validation_settings import AS2ValidationSettings -from .as2_envelope_settings import AS2EnvelopeSettings -from .as2_error_settings import AS2ErrorSettings -from .as2_protocol_settings import AS2ProtocolSettings -from .as2_one_way_agreement import AS2OneWayAgreement -from .as2_agreement_content import AS2AgreementContent -from .x12_validation_settings import X12ValidationSettings -from .x12_framing_settings import X12FramingSettings -from .x12_envelope_settings import X12EnvelopeSettings -from .x12_acknowledgement_settings import X12AcknowledgementSettings -from .x12_message_filter import X12MessageFilter -from .x12_security_settings import X12SecuritySettings -from .x12_processing_settings import X12ProcessingSettings -from .x12_envelope_override import X12EnvelopeOverride -from .x12_validation_override import X12ValidationOverride -from .x12_message_identifier import X12MessageIdentifier -from .x12_schema_reference import X12SchemaReference -from .x12_delimiter_overrides import X12DelimiterOverrides -from .x12_protocol_settings import X12ProtocolSettings -from .x12_one_way_agreement import X12OneWayAgreement -from .x12_agreement_content import X12AgreementContent -from .edifact_validation_settings import EdifactValidationSettings -from .edifact_framing_settings import EdifactFramingSettings -from .edifact_envelope_settings import EdifactEnvelopeSettings -from .edifact_acknowledgement_settings import EdifactAcknowledgementSettings -from .edifact_message_filter import EdifactMessageFilter -from .edifact_processing_settings import EdifactProcessingSettings -from .edifact_envelope_override import EdifactEnvelopeOverride -from .edifact_message_identifier import EdifactMessageIdentifier -from .edifact_schema_reference import EdifactSchemaReference -from .edifact_validation_override import EdifactValidationOverride -from .edifact_delimiter_override import EdifactDelimiterOverride -from .edifact_protocol_settings import EdifactProtocolSettings -from .edifact_one_way_agreement import EdifactOneWayAgreement -from .edifact_agreement_content import EdifactAgreementContent -from .agreement_content import AgreementContent -from .integration_account_agreement import IntegrationAccountAgreement -from .integration_account_agreement_filter import IntegrationAccountAgreementFilter -from .key_vault_key_reference_key_vault import KeyVaultKeyReferenceKeyVault -from .key_vault_key_reference import KeyVaultKeyReference -from .integration_account_certificate import IntegrationAccountCertificate -from .integration_account_session_filter import IntegrationAccountSessionFilter -from .integration_account_session import IntegrationAccountSession -from .operation_display import OperationDisplay -from .operation import Operation +try: + from .resource_py3 import Resource + from .sub_resource_py3 import SubResource + from .resource_reference_py3 import ResourceReference + from .sku_py3 import Sku + from .workflow_parameter_py3 import WorkflowParameter + from .workflow_py3 import Workflow + from .workflow_filter_py3 import WorkflowFilter + from .workflow_version_py3 import WorkflowVersion + from .recurrence_schedule_occurrence_py3 import RecurrenceScheduleOccurrence + from .recurrence_schedule_py3 import RecurrenceSchedule + from .workflow_trigger_recurrence_py3 import WorkflowTriggerRecurrence + from .workflow_trigger_py3 import WorkflowTrigger + from .workflow_trigger_filter_py3 import WorkflowTriggerFilter + from .workflow_trigger_list_callback_url_queries_py3 import WorkflowTriggerListCallbackUrlQueries + from .workflow_trigger_callback_url_py3 import WorkflowTriggerCallbackUrl + from .correlation_py3 import Correlation + from .content_hash_py3 import ContentHash + from .content_link_py3 import ContentLink + from .workflow_trigger_history_py3 import WorkflowTriggerHistory + from .workflow_trigger_history_filter_py3 import WorkflowTriggerHistoryFilter + from .workflow_run_trigger_py3 import WorkflowRunTrigger + from .workflow_output_parameter_py3 import WorkflowOutputParameter + from .workflow_run_py3 import WorkflowRun + from .workflow_run_filter_py3 import WorkflowRunFilter + from .error_properties_py3 import ErrorProperties + from .error_response_py3 import ErrorResponse, ErrorResponseException + from .retry_history_py3 import RetryHistory + from .workflow_run_action_py3 import WorkflowRunAction + from .workflow_run_action_filter_py3 import WorkflowRunActionFilter + from .regenerate_action_parameter_py3 import RegenerateActionParameter + from .generate_upgraded_definition_parameters_py3 import GenerateUpgradedDefinitionParameters + from .integration_account_sku_py3 import IntegrationAccountSku + from .integration_account_py3 import IntegrationAccount + from .get_callback_url_parameters_py3 import GetCallbackUrlParameters + from .callback_url_py3 import CallbackUrl + from .integration_account_schema_py3 import IntegrationAccountSchema + from .integration_account_schema_filter_py3 import IntegrationAccountSchemaFilter + from .integration_account_map_properties_parameters_schema_py3 import IntegrationAccountMapPropertiesParametersSchema + from .integration_account_map_py3 import IntegrationAccountMap + from .integration_account_map_filter_py3 import IntegrationAccountMapFilter + from .business_identity_py3 import BusinessIdentity + from .b2_bpartner_content_py3 import B2BPartnerContent + from .partner_content_py3 import PartnerContent + from .integration_account_partner_py3 import IntegrationAccountPartner + from .integration_account_partner_filter_py3 import IntegrationAccountPartnerFilter + from .as2_message_connection_settings_py3 import AS2MessageConnectionSettings + from .as2_acknowledgement_connection_settings_py3 import AS2AcknowledgementConnectionSettings + from .as2_mdn_settings_py3 import AS2MdnSettings + from .as2_security_settings_py3 import AS2SecuritySettings + from .as2_validation_settings_py3 import AS2ValidationSettings + from .as2_envelope_settings_py3 import AS2EnvelopeSettings + from .as2_error_settings_py3 import AS2ErrorSettings + from .as2_protocol_settings_py3 import AS2ProtocolSettings + from .as2_one_way_agreement_py3 import AS2OneWayAgreement + from .as2_agreement_content_py3 import AS2AgreementContent + from .x12_validation_settings_py3 import X12ValidationSettings + from .x12_framing_settings_py3 import X12FramingSettings + from .x12_envelope_settings_py3 import X12EnvelopeSettings + from .x12_acknowledgement_settings_py3 import X12AcknowledgementSettings + from .x12_message_filter_py3 import X12MessageFilter + from .x12_security_settings_py3 import X12SecuritySettings + from .x12_processing_settings_py3 import X12ProcessingSettings + from .x12_envelope_override_py3 import X12EnvelopeOverride + from .x12_validation_override_py3 import X12ValidationOverride + from .x12_message_identifier_py3 import X12MessageIdentifier + from .x12_schema_reference_py3 import X12SchemaReference + from .x12_delimiter_overrides_py3 import X12DelimiterOverrides + from .x12_protocol_settings_py3 import X12ProtocolSettings + from .x12_one_way_agreement_py3 import X12OneWayAgreement + from .x12_agreement_content_py3 import X12AgreementContent + from .edifact_validation_settings_py3 import EdifactValidationSettings + from .edifact_framing_settings_py3 import EdifactFramingSettings + from .edifact_envelope_settings_py3 import EdifactEnvelopeSettings + from .edifact_acknowledgement_settings_py3 import EdifactAcknowledgementSettings + from .edifact_message_filter_py3 import EdifactMessageFilter + from .edifact_processing_settings_py3 import EdifactProcessingSettings + from .edifact_envelope_override_py3 import EdifactEnvelopeOverride + from .edifact_message_identifier_py3 import EdifactMessageIdentifier + from .edifact_schema_reference_py3 import EdifactSchemaReference + from .edifact_validation_override_py3 import EdifactValidationOverride + from .edifact_delimiter_override_py3 import EdifactDelimiterOverride + from .edifact_protocol_settings_py3 import EdifactProtocolSettings + from .edifact_one_way_agreement_py3 import EdifactOneWayAgreement + from .edifact_agreement_content_py3 import EdifactAgreementContent + from .agreement_content_py3 import AgreementContent + from .integration_account_agreement_py3 import IntegrationAccountAgreement + from .integration_account_agreement_filter_py3 import IntegrationAccountAgreementFilter + from .key_vault_key_reference_key_vault_py3 import KeyVaultKeyReferenceKeyVault + from .key_vault_key_reference_py3 import KeyVaultKeyReference + from .integration_account_certificate_py3 import IntegrationAccountCertificate + from .integration_account_session_filter_py3 import IntegrationAccountSessionFilter + from .integration_account_session_py3 import IntegrationAccountSession + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .key_vault_reference_py3 import KeyVaultReference + from .list_key_vault_keys_definition_py3 import ListKeyVaultKeysDefinition + from .key_vault_key_attributes_py3 import KeyVaultKeyAttributes + from .key_vault_key_py3 import KeyVaultKey + from .tracking_event_error_info_py3 import TrackingEventErrorInfo + from .tracking_event_py3 import TrackingEvent + from .tracking_events_definition_py3 import TrackingEventsDefinition + from .access_key_regenerate_action_definition_py3 import AccessKeyRegenerateActionDefinition + from .set_trigger_state_action_definition_py3 import SetTriggerStateActionDefinition + from .expression_root_py3 import ExpressionRoot + from .azure_resource_error_info_py3 import AzureResourceErrorInfo + from .expression_py3 import Expression + from .error_info_py3 import ErrorInfo + from .repetition_index_py3 import RepetitionIndex + from .workflow_run_action_repetition_definition_py3 import WorkflowRunActionRepetitionDefinition + from .workflow_run_action_repetition_definition_collection_py3 import WorkflowRunActionRepetitionDefinitionCollection + from .operation_result_py3 import OperationResult + from .run_action_correlation_py3 import RunActionCorrelation + from .operation_result_properties_py3 import OperationResultProperties + from .run_correlation_py3 import RunCorrelation + from .json_schema_py3 import JsonSchema + from .assembly_properties_py3 import AssemblyProperties + from .assembly_definition_py3 import AssemblyDefinition + from .artifact_content_properties_definition_py3 import ArtifactContentPropertiesDefinition + from .artifact_properties_py3 import ArtifactProperties + from .batch_release_criteria_py3 import BatchReleaseCriteria + from .batch_configuration_properties_py3 import BatchConfigurationProperties + from .batch_configuration_py3 import BatchConfiguration +except (SyntaxError, ImportError): + from .resource import Resource + from .sub_resource import SubResource + from .resource_reference import ResourceReference + from .sku import Sku + from .workflow_parameter import WorkflowParameter + from .workflow import Workflow + from .workflow_filter import WorkflowFilter + from .workflow_version import WorkflowVersion + from .recurrence_schedule_occurrence import RecurrenceScheduleOccurrence + from .recurrence_schedule import RecurrenceSchedule + from .workflow_trigger_recurrence import WorkflowTriggerRecurrence + from .workflow_trigger import WorkflowTrigger + from .workflow_trigger_filter import WorkflowTriggerFilter + from .workflow_trigger_list_callback_url_queries import WorkflowTriggerListCallbackUrlQueries + from .workflow_trigger_callback_url import WorkflowTriggerCallbackUrl + from .correlation import Correlation + from .content_hash import ContentHash + from .content_link import ContentLink + from .workflow_trigger_history import WorkflowTriggerHistory + from .workflow_trigger_history_filter import WorkflowTriggerHistoryFilter + from .workflow_run_trigger import WorkflowRunTrigger + from .workflow_output_parameter import WorkflowOutputParameter + from .workflow_run import WorkflowRun + from .workflow_run_filter import WorkflowRunFilter + from .error_properties import ErrorProperties + from .error_response import ErrorResponse, ErrorResponseException + from .retry_history import RetryHistory + from .workflow_run_action import WorkflowRunAction + from .workflow_run_action_filter import WorkflowRunActionFilter + from .regenerate_action_parameter import RegenerateActionParameter + from .generate_upgraded_definition_parameters import GenerateUpgradedDefinitionParameters + from .integration_account_sku import IntegrationAccountSku + from .integration_account import IntegrationAccount + from .get_callback_url_parameters import GetCallbackUrlParameters + from .callback_url import CallbackUrl + from .integration_account_schema import IntegrationAccountSchema + from .integration_account_schema_filter import IntegrationAccountSchemaFilter + from .integration_account_map_properties_parameters_schema import IntegrationAccountMapPropertiesParametersSchema + from .integration_account_map import IntegrationAccountMap + from .integration_account_map_filter import IntegrationAccountMapFilter + from .business_identity import BusinessIdentity + from .b2_bpartner_content import B2BPartnerContent + from .partner_content import PartnerContent + from .integration_account_partner import IntegrationAccountPartner + from .integration_account_partner_filter import IntegrationAccountPartnerFilter + from .as2_message_connection_settings import AS2MessageConnectionSettings + from .as2_acknowledgement_connection_settings import AS2AcknowledgementConnectionSettings + from .as2_mdn_settings import AS2MdnSettings + from .as2_security_settings import AS2SecuritySettings + from .as2_validation_settings import AS2ValidationSettings + from .as2_envelope_settings import AS2EnvelopeSettings + from .as2_error_settings import AS2ErrorSettings + from .as2_protocol_settings import AS2ProtocolSettings + from .as2_one_way_agreement import AS2OneWayAgreement + from .as2_agreement_content import AS2AgreementContent + from .x12_validation_settings import X12ValidationSettings + from .x12_framing_settings import X12FramingSettings + from .x12_envelope_settings import X12EnvelopeSettings + from .x12_acknowledgement_settings import X12AcknowledgementSettings + from .x12_message_filter import X12MessageFilter + from .x12_security_settings import X12SecuritySettings + from .x12_processing_settings import X12ProcessingSettings + from .x12_envelope_override import X12EnvelopeOverride + from .x12_validation_override import X12ValidationOverride + from .x12_message_identifier import X12MessageIdentifier + from .x12_schema_reference import X12SchemaReference + from .x12_delimiter_overrides import X12DelimiterOverrides + from .x12_protocol_settings import X12ProtocolSettings + from .x12_one_way_agreement import X12OneWayAgreement + from .x12_agreement_content import X12AgreementContent + from .edifact_validation_settings import EdifactValidationSettings + from .edifact_framing_settings import EdifactFramingSettings + from .edifact_envelope_settings import EdifactEnvelopeSettings + from .edifact_acknowledgement_settings import EdifactAcknowledgementSettings + from .edifact_message_filter import EdifactMessageFilter + from .edifact_processing_settings import EdifactProcessingSettings + from .edifact_envelope_override import EdifactEnvelopeOverride + from .edifact_message_identifier import EdifactMessageIdentifier + from .edifact_schema_reference import EdifactSchemaReference + from .edifact_validation_override import EdifactValidationOverride + from .edifact_delimiter_override import EdifactDelimiterOverride + from .edifact_protocol_settings import EdifactProtocolSettings + from .edifact_one_way_agreement import EdifactOneWayAgreement + from .edifact_agreement_content import EdifactAgreementContent + from .agreement_content import AgreementContent + from .integration_account_agreement import IntegrationAccountAgreement + from .integration_account_agreement_filter import IntegrationAccountAgreementFilter + from .key_vault_key_reference_key_vault import KeyVaultKeyReferenceKeyVault + from .key_vault_key_reference import KeyVaultKeyReference + from .integration_account_certificate import IntegrationAccountCertificate + from .integration_account_session_filter import IntegrationAccountSessionFilter + from .integration_account_session import IntegrationAccountSession + from .operation_display import OperationDisplay + from .operation import Operation + from .key_vault_reference import KeyVaultReference + from .list_key_vault_keys_definition import ListKeyVaultKeysDefinition + from .key_vault_key_attributes import KeyVaultKeyAttributes + from .key_vault_key import KeyVaultKey + from .tracking_event_error_info import TrackingEventErrorInfo + from .tracking_event import TrackingEvent + from .tracking_events_definition import TrackingEventsDefinition + from .access_key_regenerate_action_definition import AccessKeyRegenerateActionDefinition + from .set_trigger_state_action_definition import SetTriggerStateActionDefinition + from .expression_root import ExpressionRoot + from .azure_resource_error_info import AzureResourceErrorInfo + from .expression import Expression + from .error_info import ErrorInfo + from .repetition_index import RepetitionIndex + from .workflow_run_action_repetition_definition import WorkflowRunActionRepetitionDefinition + from .workflow_run_action_repetition_definition_collection import WorkflowRunActionRepetitionDefinitionCollection + from .operation_result import OperationResult + from .run_action_correlation import RunActionCorrelation + from .operation_result_properties import OperationResultProperties + from .run_correlation import RunCorrelation + from .json_schema import JsonSchema + from .assembly_properties import AssemblyProperties + from .assembly_definition import AssemblyDefinition + from .artifact_content_properties_definition import ArtifactContentPropertiesDefinition + from .artifact_properties import ArtifactProperties + from .batch_release_criteria import BatchReleaseCriteria + from .batch_configuration_properties import BatchConfigurationProperties + from .batch_configuration import BatchConfiguration from .workflow_paged import WorkflowPaged from .workflow_version_paged import WorkflowVersionPaged from .workflow_trigger_paged import WorkflowTriggerPaged from .workflow_trigger_history_paged import WorkflowTriggerHistoryPaged from .workflow_run_paged import WorkflowRunPaged from .workflow_run_action_paged import WorkflowRunActionPaged +from .expression_root_paged import ExpressionRootPaged +from .workflow_run_action_repetition_definition_paged import WorkflowRunActionRepetitionDefinitionPaged from .integration_account_paged import IntegrationAccountPaged +from .key_vault_key_paged import KeyVaultKeyPaged +from .assembly_definition_paged import AssemblyDefinitionPaged +from .batch_configuration_paged import BatchConfigurationPaged from .integration_account_schema_paged import IntegrationAccountSchemaPaged from .integration_account_map_paged import IntegrationAccountMapPaged from .integration_account_partner_paged import IntegrationAccountPartnerPaged @@ -145,6 +302,10 @@ MessageFilterType, EdifactCharacterSet, EdifactDecimalIndicator, + TrackEventsOperationOptions, + EventLevel, + TrackingRecordType, + AccessKeyType, ) __all__ = [ @@ -242,13 +403,46 @@ 'IntegrationAccountSession', 'OperationDisplay', 'Operation', + 'KeyVaultReference', + 'ListKeyVaultKeysDefinition', + 'KeyVaultKeyAttributes', + 'KeyVaultKey', + 'TrackingEventErrorInfo', + 'TrackingEvent', + 'TrackingEventsDefinition', + 'AccessKeyRegenerateActionDefinition', + 'SetTriggerStateActionDefinition', + 'ExpressionRoot', + 'AzureResourceErrorInfo', + 'Expression', + 'ErrorInfo', + 'RepetitionIndex', + 'WorkflowRunActionRepetitionDefinition', + 'WorkflowRunActionRepetitionDefinitionCollection', + 'OperationResult', + 'RunActionCorrelation', + 'OperationResultProperties', + 'RunCorrelation', + 'JsonSchema', + 'AssemblyProperties', + 'AssemblyDefinition', + 'ArtifactContentPropertiesDefinition', + 'ArtifactProperties', + 'BatchReleaseCriteria', + 'BatchConfigurationProperties', + 'BatchConfiguration', 'WorkflowPaged', 'WorkflowVersionPaged', 'WorkflowTriggerPaged', 'WorkflowTriggerHistoryPaged', 'WorkflowRunPaged', 'WorkflowRunActionPaged', + 'ExpressionRootPaged', + 'WorkflowRunActionRepetitionDefinitionPaged', 'IntegrationAccountPaged', + 'KeyVaultKeyPaged', + 'AssemblyDefinitionPaged', + 'BatchConfigurationPaged', 'IntegrationAccountSchemaPaged', 'IntegrationAccountMapPaged', 'IntegrationAccountPartnerPaged', @@ -283,4 +477,8 @@ 'MessageFilterType', 'EdifactCharacterSet', 'EdifactDecimalIndicator', + 'TrackEventsOperationOptions', + 'EventLevel', + 'TrackingRecordType', + 'AccessKeyType', ] diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/access_key_regenerate_action_definition.py b/azure-mgmt-logic/azure/mgmt/logic/models/access_key_regenerate_action_definition.py new file mode 100644 index 000000000000..6f254ed4b412 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/access_key_regenerate_action_definition.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccessKeyRegenerateActionDefinition(Model): + """AccessKeyRegenerateActionDefinition. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. Possible values include: 'NotSpecified', + 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.AccessKeyType + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'AccessKeyType'}, + } + + def __init__(self, **kwargs): + super(AccessKeyRegenerateActionDefinition, self).__init__(**kwargs) + self.key_type = kwargs.get('key_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/access_key_regenerate_action_definition_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/access_key_regenerate_action_definition_py3.py new file mode 100644 index 000000000000..f6fbd7cc2e32 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/access_key_regenerate_action_definition_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccessKeyRegenerateActionDefinition(Model): + """AccessKeyRegenerateActionDefinition. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. Possible values include: 'NotSpecified', + 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.AccessKeyType + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'AccessKeyType'}, + } + + def __init__(self, *, key_type, **kwargs) -> None: + super(AccessKeyRegenerateActionDefinition, self).__init__(**kwargs) + self.key_type = key_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content.py b/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content.py old mode 100755 new mode 100644 index a373da3ec776..a447ae65cea8 --- a/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content.py @@ -16,14 +16,11 @@ class AgreementContent(Model): """The integration account agreement content. :param a_s2: The AS2 agreement content. - :type a_s2: :class:`AS2AgreementContent - ` + :type a_s2: ~azure.mgmt.logic.models.AS2AgreementContent :param x12: The X12 agreement content. - :type x12: :class:`X12AgreementContent - ` + :type x12: ~azure.mgmt.logic.models.X12AgreementContent :param edifact: The EDIFACT agreement content. - :type edifact: :class:`EdifactAgreementContent - ` + :type edifact: ~azure.mgmt.logic.models.EdifactAgreementContent """ _attribute_map = { @@ -32,7 +29,8 @@ class AgreementContent(Model): 'edifact': {'key': 'edifact', 'type': 'EdifactAgreementContent'}, } - def __init__(self, a_s2=None, x12=None, edifact=None): - self.a_s2 = a_s2 - self.x12 = x12 - self.edifact = edifact + def __init__(self, **kwargs): + super(AgreementContent, self).__init__(**kwargs) + self.a_s2 = kwargs.get('a_s2', None) + self.x12 = kwargs.get('x12', None) + self.edifact = kwargs.get('edifact', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content_py3.py new file mode 100644 index 000000000000..a0b8c0c0868a --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AgreementContent(Model): + """The integration account agreement content. + + :param a_s2: The AS2 agreement content. + :type a_s2: ~azure.mgmt.logic.models.AS2AgreementContent + :param x12: The X12 agreement content. + :type x12: ~azure.mgmt.logic.models.X12AgreementContent + :param edifact: The EDIFACT agreement content. + :type edifact: ~azure.mgmt.logic.models.EdifactAgreementContent + """ + + _attribute_map = { + 'a_s2': {'key': 'aS2', 'type': 'AS2AgreementContent'}, + 'x12': {'key': 'x12', 'type': 'X12AgreementContent'}, + 'edifact': {'key': 'edifact', 'type': 'EdifactAgreementContent'}, + } + + def __init__(self, *, a_s2=None, x12=None, edifact=None, **kwargs) -> None: + super(AgreementContent, self).__init__(**kwargs) + self.a_s2 = a_s2 + self.x12 = x12 + self.edifact = edifact diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition.py b/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition.py new file mode 100644 index 000000000000..7a6e617e023b --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .artifact_properties import ArtifactProperties + + +class ArtifactContentPropertiesDefinition(ArtifactProperties): + """The artifact content properties definition. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param content: + :type content: object + :param content_type: The content type. + :type content_type: str + :param content_link: The content link. + :type content_link: ~azure.mgmt.logic.models.ContentLink + """ + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'content': {'key': 'content', 'type': 'object'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, + } + + def __init__(self, **kwargs): + super(ArtifactContentPropertiesDefinition, self).__init__(**kwargs) + self.content = kwargs.get('content', None) + self.content_type = kwargs.get('content_type', None) + self.content_link = kwargs.get('content_link', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition_py3.py new file mode 100644 index 000000000000..64690564073c --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .artifact_properties_py3 import ArtifactProperties + + +class ArtifactContentPropertiesDefinition(ArtifactProperties): + """The artifact content properties definition. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param content: + :type content: object + :param content_type: The content type. + :type content_type: str + :param content_link: The content link. + :type content_link: ~azure.mgmt.logic.models.ContentLink + """ + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'content': {'key': 'content', 'type': 'object'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, + } + + def __init__(self, *, created_time=None, changed_time=None, metadata=None, content=None, content_type: str=None, content_link=None, **kwargs) -> None: + super(ArtifactContentPropertiesDefinition, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, **kwargs) + self.content = content + self.content_type = content_type + self.content_link = content_link diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties.py b/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties.py new file mode 100644 index 000000000000..a2f3088a0fbf --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ArtifactProperties(Model): + """The artifact properties definition. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + """ + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ArtifactProperties, self).__init__(**kwargs) + self.created_time = kwargs.get('created_time', None) + self.changed_time = kwargs.get('changed_time', None) + self.metadata = kwargs.get('metadata', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties_py3.py new file mode 100644 index 000000000000..cf7381007c5b --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ArtifactProperties(Model): + """The artifact properties definition. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + """ + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + } + + def __init__(self, *, created_time=None, changed_time=None, metadata=None, **kwargs) -> None: + super(ArtifactProperties, self).__init__(**kwargs) + self.created_time = created_time + self.changed_time = changed_time + self.metadata = metadata diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings.py old mode 100755 new mode 100644 index a8e4633ab95b..ed3f318153d3 --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings.py @@ -13,19 +13,21 @@ class AS2AcknowledgementConnectionSettings(Model): - """The AS2 agreement acknowledegment connection settings. + """The AS2 agreement acknowledgement connection settings. - :param ignore_certificate_name_mismatch: The value indicating whether to - ignore mismatch in certificate name. + All required parameters must be populated in order to send to Azure. + + :param ignore_certificate_name_mismatch: Required. The value indicating + whether to ignore mismatch in certificate name. :type ignore_certificate_name_mismatch: bool - :param support_http_status_code_continue: The value indicating whether to - support HTTP status code 'CONTINUE'. + :param support_http_status_code_continue: Required. The value indicating + whether to support HTTP status code 'CONTINUE'. :type support_http_status_code_continue: bool - :param keep_http_connection_alive: The value indicating whether to keep - the connection alive. + :param keep_http_connection_alive: Required. The value indicating whether + to keep the connection alive. :type keep_http_connection_alive: bool - :param unfold_http_headers: The value indicating whether to unfold the - HTTP headers. + :param unfold_http_headers: Required. The value indicating whether to + unfold the HTTP headers. :type unfold_http_headers: bool """ @@ -43,8 +45,9 @@ class AS2AcknowledgementConnectionSettings(Model): 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, } - def __init__(self, ignore_certificate_name_mismatch, support_http_status_code_continue, keep_http_connection_alive, unfold_http_headers): - self.ignore_certificate_name_mismatch = ignore_certificate_name_mismatch - self.support_http_status_code_continue = support_http_status_code_continue - self.keep_http_connection_alive = keep_http_connection_alive - self.unfold_http_headers = unfold_http_headers + def __init__(self, **kwargs): + super(AS2AcknowledgementConnectionSettings, self).__init__(**kwargs) + self.ignore_certificate_name_mismatch = kwargs.get('ignore_certificate_name_mismatch', None) + self.support_http_status_code_continue = kwargs.get('support_http_status_code_continue', None) + self.keep_http_connection_alive = kwargs.get('keep_http_connection_alive', None) + self.unfold_http_headers = kwargs.get('unfold_http_headers', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings_py3.py new file mode 100644 index 000000000000..1b9fc2467be1 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AS2AcknowledgementConnectionSettings(Model): + """The AS2 agreement acknowledgement connection settings. + + All required parameters must be populated in order to send to Azure. + + :param ignore_certificate_name_mismatch: Required. The value indicating + whether to ignore mismatch in certificate name. + :type ignore_certificate_name_mismatch: bool + :param support_http_status_code_continue: Required. The value indicating + whether to support HTTP status code 'CONTINUE'. + :type support_http_status_code_continue: bool + :param keep_http_connection_alive: Required. The value indicating whether + to keep the connection alive. + :type keep_http_connection_alive: bool + :param unfold_http_headers: Required. The value indicating whether to + unfold the HTTP headers. + :type unfold_http_headers: bool + """ + + _validation = { + 'ignore_certificate_name_mismatch': {'required': True}, + 'support_http_status_code_continue': {'required': True}, + 'keep_http_connection_alive': {'required': True}, + 'unfold_http_headers': {'required': True}, + } + + _attribute_map = { + 'ignore_certificate_name_mismatch': {'key': 'ignoreCertificateNameMismatch', 'type': 'bool'}, + 'support_http_status_code_continue': {'key': 'supportHttpStatusCodeContinue', 'type': 'bool'}, + 'keep_http_connection_alive': {'key': 'keepHttpConnectionAlive', 'type': 'bool'}, + 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, + } + + def __init__(self, *, ignore_certificate_name_mismatch: bool, support_http_status_code_continue: bool, keep_http_connection_alive: bool, unfold_http_headers: bool, **kwargs) -> None: + super(AS2AcknowledgementConnectionSettings, self).__init__(**kwargs) + self.ignore_certificate_name_mismatch = ignore_certificate_name_mismatch + self.support_http_status_code_continue = support_http_status_code_continue + self.keep_http_connection_alive = keep_http_connection_alive + self.unfold_http_headers = unfold_http_headers diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content.py old mode 100755 new mode 100644 index 6506c6664331..933c916cf751 --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content.py @@ -15,12 +15,12 @@ class AS2AgreementContent(Model): """The integration account AS2 agreement content. - :param receive_agreement: The AS2 one-way receive agreement. - :type receive_agreement: :class:`AS2OneWayAgreement - ` - :param send_agreement: The AS2 one-way send agreement. - :type send_agreement: :class:`AS2OneWayAgreement - ` + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The AS2 one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement + :param send_agreement: Required. The AS2 one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement """ _validation = { @@ -33,6 +33,7 @@ class AS2AgreementContent(Model): 'send_agreement': {'key': 'sendAgreement', 'type': 'AS2OneWayAgreement'}, } - def __init__(self, receive_agreement, send_agreement): - self.receive_agreement = receive_agreement - self.send_agreement = send_agreement + def __init__(self, **kwargs): + super(AS2AgreementContent, self).__init__(**kwargs) + self.receive_agreement = kwargs.get('receive_agreement', None) + self.send_agreement = kwargs.get('send_agreement', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content_py3.py new file mode 100644 index 000000000000..2c20e5c4cc5d --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AS2AgreementContent(Model): + """The integration account AS2 agreement content. + + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The AS2 one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement + :param send_agreement: Required. The AS2 one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement + """ + + _validation = { + 'receive_agreement': {'required': True}, + 'send_agreement': {'required': True}, + } + + _attribute_map = { + 'receive_agreement': {'key': 'receiveAgreement', 'type': 'AS2OneWayAgreement'}, + 'send_agreement': {'key': 'sendAgreement', 'type': 'AS2OneWayAgreement'}, + } + + def __init__(self, *, receive_agreement, send_agreement, **kwargs) -> None: + super(AS2AgreementContent, self).__init__(**kwargs) + self.receive_agreement = receive_agreement + self.send_agreement = send_agreement diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings.py old mode 100755 new mode 100644 index 6f314391e677..1c912b9dfcdc --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings.py @@ -15,18 +15,20 @@ class AS2EnvelopeSettings(Model): """The AS2 agreement envelope settings. - :param message_content_type: The message content type. + All required parameters must be populated in order to send to Azure. + + :param message_content_type: Required. The message content type. :type message_content_type: str - :param transmit_file_name_in_mime_header: The value indicating whether to - transmit file name in mime header. + :param transmit_file_name_in_mime_header: Required. The value indicating + whether to transmit file name in mime header. :type transmit_file_name_in_mime_header: bool - :param file_name_template: The template for file name. + :param file_name_template: Required. The template for file name. :type file_name_template: str - :param suspend_message_on_file_name_generation_error: The value indicating - whether to suspend message on file name generation error. + :param suspend_message_on_file_name_generation_error: Required. The value + indicating whether to suspend message on file name generation error. :type suspend_message_on_file_name_generation_error: bool - :param autogenerate_file_name: The value indicating whether to auto - generate file name. + :param autogenerate_file_name: Required. The value indicating whether to + auto generate file name. :type autogenerate_file_name: bool """ @@ -46,9 +48,10 @@ class AS2EnvelopeSettings(Model): 'autogenerate_file_name': {'key': 'autogenerateFileName', 'type': 'bool'}, } - def __init__(self, message_content_type, transmit_file_name_in_mime_header, file_name_template, suspend_message_on_file_name_generation_error, autogenerate_file_name): - self.message_content_type = message_content_type - self.transmit_file_name_in_mime_header = transmit_file_name_in_mime_header - self.file_name_template = file_name_template - self.suspend_message_on_file_name_generation_error = suspend_message_on_file_name_generation_error - self.autogenerate_file_name = autogenerate_file_name + def __init__(self, **kwargs): + super(AS2EnvelopeSettings, self).__init__(**kwargs) + self.message_content_type = kwargs.get('message_content_type', None) + self.transmit_file_name_in_mime_header = kwargs.get('transmit_file_name_in_mime_header', None) + self.file_name_template = kwargs.get('file_name_template', None) + self.suspend_message_on_file_name_generation_error = kwargs.get('suspend_message_on_file_name_generation_error', None) + self.autogenerate_file_name = kwargs.get('autogenerate_file_name', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings_py3.py new file mode 100644 index 000000000000..a39fe640d9f6 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AS2EnvelopeSettings(Model): + """The AS2 agreement envelope settings. + + All required parameters must be populated in order to send to Azure. + + :param message_content_type: Required. The message content type. + :type message_content_type: str + :param transmit_file_name_in_mime_header: Required. The value indicating + whether to transmit file name in mime header. + :type transmit_file_name_in_mime_header: bool + :param file_name_template: Required. The template for file name. + :type file_name_template: str + :param suspend_message_on_file_name_generation_error: Required. The value + indicating whether to suspend message on file name generation error. + :type suspend_message_on_file_name_generation_error: bool + :param autogenerate_file_name: Required. The value indicating whether to + auto generate file name. + :type autogenerate_file_name: bool + """ + + _validation = { + 'message_content_type': {'required': True}, + 'transmit_file_name_in_mime_header': {'required': True}, + 'file_name_template': {'required': True}, + 'suspend_message_on_file_name_generation_error': {'required': True}, + 'autogenerate_file_name': {'required': True}, + } + + _attribute_map = { + 'message_content_type': {'key': 'messageContentType', 'type': 'str'}, + 'transmit_file_name_in_mime_header': {'key': 'transmitFileNameInMimeHeader', 'type': 'bool'}, + 'file_name_template': {'key': 'fileNameTemplate', 'type': 'str'}, + 'suspend_message_on_file_name_generation_error': {'key': 'suspendMessageOnFileNameGenerationError', 'type': 'bool'}, + 'autogenerate_file_name': {'key': 'autogenerateFileName', 'type': 'bool'}, + } + + def __init__(self, *, message_content_type: str, transmit_file_name_in_mime_header: bool, file_name_template: str, suspend_message_on_file_name_generation_error: bool, autogenerate_file_name: bool, **kwargs) -> None: + super(AS2EnvelopeSettings, self).__init__(**kwargs) + self.message_content_type = message_content_type + self.transmit_file_name_in_mime_header = transmit_file_name_in_mime_header + self.file_name_template = file_name_template + self.suspend_message_on_file_name_generation_error = suspend_message_on_file_name_generation_error + self.autogenerate_file_name = autogenerate_file_name diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings.py old mode 100755 new mode 100644 index 36ebbfc617cb..441d5e3bcb14 --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings.py @@ -15,11 +15,13 @@ class AS2ErrorSettings(Model): """The AS2 agreement error settings. - :param suspend_duplicate_message: The value indicating whether to suspend - duplicate message. + All required parameters must be populated in order to send to Azure. + + :param suspend_duplicate_message: Required. The value indicating whether + to suspend duplicate message. :type suspend_duplicate_message: bool - :param resend_if_mdn_not_received: The value indicating whether to resend - message If MDN is not received. + :param resend_if_mdn_not_received: Required. The value indicating whether + to resend message If MDN is not received. :type resend_if_mdn_not_received: bool """ @@ -33,6 +35,7 @@ class AS2ErrorSettings(Model): 'resend_if_mdn_not_received': {'key': 'resendIfMdnNotReceived', 'type': 'bool'}, } - def __init__(self, suspend_duplicate_message, resend_if_mdn_not_received): - self.suspend_duplicate_message = suspend_duplicate_message - self.resend_if_mdn_not_received = resend_if_mdn_not_received + def __init__(self, **kwargs): + super(AS2ErrorSettings, self).__init__(**kwargs) + self.suspend_duplicate_message = kwargs.get('suspend_duplicate_message', None) + self.resend_if_mdn_not_received = kwargs.get('resend_if_mdn_not_received', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings_py3.py new file mode 100644 index 000000000000..d35752c38381 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AS2ErrorSettings(Model): + """The AS2 agreement error settings. + + All required parameters must be populated in order to send to Azure. + + :param suspend_duplicate_message: Required. The value indicating whether + to suspend duplicate message. + :type suspend_duplicate_message: bool + :param resend_if_mdn_not_received: Required. The value indicating whether + to resend message If MDN is not received. + :type resend_if_mdn_not_received: bool + """ + + _validation = { + 'suspend_duplicate_message': {'required': True}, + 'resend_if_mdn_not_received': {'required': True}, + } + + _attribute_map = { + 'suspend_duplicate_message': {'key': 'suspendDuplicateMessage', 'type': 'bool'}, + 'resend_if_mdn_not_received': {'key': 'resendIfMdnNotReceived', 'type': 'bool'}, + } + + def __init__(self, *, suspend_duplicate_message: bool, resend_if_mdn_not_received: bool, **kwargs) -> None: + super(AS2ErrorSettings, self).__init__(**kwargs) + self.suspend_duplicate_message = suspend_duplicate_message + self.resend_if_mdn_not_received = resend_if_mdn_not_received diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings.py old mode 100755 new mode 100644 index 642e6990406e..fd804f91d8de --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings.py @@ -15,32 +15,35 @@ class AS2MdnSettings(Model): """The AS2 agreement mdn settings. - :param need_mdn: The value indicating whether to send or request a MDN. + All required parameters must be populated in order to send to Azure. + + :param need_mdn: Required. The value indicating whether to send or request + a MDN. :type need_mdn: bool - :param sign_mdn: The value indicating whether the MDN needs to be signed - or not. + :param sign_mdn: Required. The value indicating whether the MDN needs to + be signed or not. :type sign_mdn: bool - :param send_mdn_asynchronously: The value indicating whether to send the - asynchronous MDN. + :param send_mdn_asynchronously: Required. The value indicating whether to + send the asynchronous MDN. :type send_mdn_asynchronously: bool :param receipt_delivery_url: The receipt delivery URL. :type receipt_delivery_url: str :param disposition_notification_to: The disposition notification to header value. :type disposition_notification_to: str - :param sign_outbound_mdn_if_optional: The value indicating whether to sign - the outbound MDN if optional. + :param sign_outbound_mdn_if_optional: Required. The value indicating + whether to sign the outbound MDN if optional. :type sign_outbound_mdn_if_optional: bool :param mdn_text: The MDN text. :type mdn_text: str - :param send_inbound_mdn_to_message_box: The value indicating whether to - send inbound MDN to message box. + :param send_inbound_mdn_to_message_box: Required. The value indicating + whether to send inbound MDN to message box. :type send_inbound_mdn_to_message_box: bool - :param mic_hashing_algorithm: The signing or hashing algorithm. Possible - values include: 'NotSpecified', 'None', 'MD5', 'SHA1', 'SHA2256', + :param mic_hashing_algorithm: Required. The signing or hashing algorithm. + Possible values include: 'NotSpecified', 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - :type mic_hashing_algorithm: str or :class:`HashingAlgorithm - ` + :type mic_hashing_algorithm: str or + ~azure.mgmt.logic.models.HashingAlgorithm """ _validation = { @@ -64,13 +67,14 @@ class AS2MdnSettings(Model): 'mic_hashing_algorithm': {'key': 'micHashingAlgorithm', 'type': 'HashingAlgorithm'}, } - def __init__(self, need_mdn, sign_mdn, send_mdn_asynchronously, sign_outbound_mdn_if_optional, send_inbound_mdn_to_message_box, mic_hashing_algorithm, receipt_delivery_url=None, disposition_notification_to=None, mdn_text=None): - self.need_mdn = need_mdn - self.sign_mdn = sign_mdn - self.send_mdn_asynchronously = send_mdn_asynchronously - self.receipt_delivery_url = receipt_delivery_url - self.disposition_notification_to = disposition_notification_to - self.sign_outbound_mdn_if_optional = sign_outbound_mdn_if_optional - self.mdn_text = mdn_text - self.send_inbound_mdn_to_message_box = send_inbound_mdn_to_message_box - self.mic_hashing_algorithm = mic_hashing_algorithm + def __init__(self, **kwargs): + super(AS2MdnSettings, self).__init__(**kwargs) + self.need_mdn = kwargs.get('need_mdn', None) + self.sign_mdn = kwargs.get('sign_mdn', None) + self.send_mdn_asynchronously = kwargs.get('send_mdn_asynchronously', None) + self.receipt_delivery_url = kwargs.get('receipt_delivery_url', None) + self.disposition_notification_to = kwargs.get('disposition_notification_to', None) + self.sign_outbound_mdn_if_optional = kwargs.get('sign_outbound_mdn_if_optional', None) + self.mdn_text = kwargs.get('mdn_text', None) + self.send_inbound_mdn_to_message_box = kwargs.get('send_inbound_mdn_to_message_box', None) + self.mic_hashing_algorithm = kwargs.get('mic_hashing_algorithm', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings_py3.py new file mode 100644 index 000000000000..291be8730abe --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AS2MdnSettings(Model): + """The AS2 agreement mdn settings. + + All required parameters must be populated in order to send to Azure. + + :param need_mdn: Required. The value indicating whether to send or request + a MDN. + :type need_mdn: bool + :param sign_mdn: Required. The value indicating whether the MDN needs to + be signed or not. + :type sign_mdn: bool + :param send_mdn_asynchronously: Required. The value indicating whether to + send the asynchronous MDN. + :type send_mdn_asynchronously: bool + :param receipt_delivery_url: The receipt delivery URL. + :type receipt_delivery_url: str + :param disposition_notification_to: The disposition notification to header + value. + :type disposition_notification_to: str + :param sign_outbound_mdn_if_optional: Required. The value indicating + whether to sign the outbound MDN if optional. + :type sign_outbound_mdn_if_optional: bool + :param mdn_text: The MDN text. + :type mdn_text: str + :param send_inbound_mdn_to_message_box: Required. The value indicating + whether to send inbound MDN to message box. + :type send_inbound_mdn_to_message_box: bool + :param mic_hashing_algorithm: Required. The signing or hashing algorithm. + Possible values include: 'NotSpecified', 'None', 'MD5', 'SHA1', 'SHA2256', + 'SHA2384', 'SHA2512' + :type mic_hashing_algorithm: str or + ~azure.mgmt.logic.models.HashingAlgorithm + """ + + _validation = { + 'need_mdn': {'required': True}, + 'sign_mdn': {'required': True}, + 'send_mdn_asynchronously': {'required': True}, + 'sign_outbound_mdn_if_optional': {'required': True}, + 'send_inbound_mdn_to_message_box': {'required': True}, + 'mic_hashing_algorithm': {'required': True}, + } + + _attribute_map = { + 'need_mdn': {'key': 'needMdn', 'type': 'bool'}, + 'sign_mdn': {'key': 'signMdn', 'type': 'bool'}, + 'send_mdn_asynchronously': {'key': 'sendMdnAsynchronously', 'type': 'bool'}, + 'receipt_delivery_url': {'key': 'receiptDeliveryUrl', 'type': 'str'}, + 'disposition_notification_to': {'key': 'dispositionNotificationTo', 'type': 'str'}, + 'sign_outbound_mdn_if_optional': {'key': 'signOutboundMdnIfOptional', 'type': 'bool'}, + 'mdn_text': {'key': 'mdnText', 'type': 'str'}, + 'send_inbound_mdn_to_message_box': {'key': 'sendInboundMdnToMessageBox', 'type': 'bool'}, + 'mic_hashing_algorithm': {'key': 'micHashingAlgorithm', 'type': 'HashingAlgorithm'}, + } + + def __init__(self, *, need_mdn: bool, sign_mdn: bool, send_mdn_asynchronously: bool, sign_outbound_mdn_if_optional: bool, send_inbound_mdn_to_message_box: bool, mic_hashing_algorithm, receipt_delivery_url: str=None, disposition_notification_to: str=None, mdn_text: str=None, **kwargs) -> None: + super(AS2MdnSettings, self).__init__(**kwargs) + self.need_mdn = need_mdn + self.sign_mdn = sign_mdn + self.send_mdn_asynchronously = send_mdn_asynchronously + self.receipt_delivery_url = receipt_delivery_url + self.disposition_notification_to = disposition_notification_to + self.sign_outbound_mdn_if_optional = sign_outbound_mdn_if_optional + self.mdn_text = mdn_text + self.send_inbound_mdn_to_message_box = send_inbound_mdn_to_message_box + self.mic_hashing_algorithm = mic_hashing_algorithm diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings.py old mode 100755 new mode 100644 index 922615206fbd..887855c734f9 --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings.py @@ -15,17 +15,19 @@ class AS2MessageConnectionSettings(Model): """The AS2 agreement message connection settings. - :param ignore_certificate_name_mismatch: The value indicating whether to - ignore mismatch in certificate name. + All required parameters must be populated in order to send to Azure. + + :param ignore_certificate_name_mismatch: Required. The value indicating + whether to ignore mismatch in certificate name. :type ignore_certificate_name_mismatch: bool - :param support_http_status_code_continue: The value indicating whether to - support HTTP status code 'CONTINUE'. + :param support_http_status_code_continue: Required. The value indicating + whether to support HTTP status code 'CONTINUE'. :type support_http_status_code_continue: bool - :param keep_http_connection_alive: The value indicating whether to keep - the connection alive. + :param keep_http_connection_alive: Required. The value indicating whether + to keep the connection alive. :type keep_http_connection_alive: bool - :param unfold_http_headers: The value indicating whether to unfold the - HTTP headers. + :param unfold_http_headers: Required. The value indicating whether to + unfold the HTTP headers. :type unfold_http_headers: bool """ @@ -43,8 +45,9 @@ class AS2MessageConnectionSettings(Model): 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, } - def __init__(self, ignore_certificate_name_mismatch, support_http_status_code_continue, keep_http_connection_alive, unfold_http_headers): - self.ignore_certificate_name_mismatch = ignore_certificate_name_mismatch - self.support_http_status_code_continue = support_http_status_code_continue - self.keep_http_connection_alive = keep_http_connection_alive - self.unfold_http_headers = unfold_http_headers + def __init__(self, **kwargs): + super(AS2MessageConnectionSettings, self).__init__(**kwargs) + self.ignore_certificate_name_mismatch = kwargs.get('ignore_certificate_name_mismatch', None) + self.support_http_status_code_continue = kwargs.get('support_http_status_code_continue', None) + self.keep_http_connection_alive = kwargs.get('keep_http_connection_alive', None) + self.unfold_http_headers = kwargs.get('unfold_http_headers', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings_py3.py new file mode 100644 index 000000000000..377250f5802f --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AS2MessageConnectionSettings(Model): + """The AS2 agreement message connection settings. + + All required parameters must be populated in order to send to Azure. + + :param ignore_certificate_name_mismatch: Required. The value indicating + whether to ignore mismatch in certificate name. + :type ignore_certificate_name_mismatch: bool + :param support_http_status_code_continue: Required. The value indicating + whether to support HTTP status code 'CONTINUE'. + :type support_http_status_code_continue: bool + :param keep_http_connection_alive: Required. The value indicating whether + to keep the connection alive. + :type keep_http_connection_alive: bool + :param unfold_http_headers: Required. The value indicating whether to + unfold the HTTP headers. + :type unfold_http_headers: bool + """ + + _validation = { + 'ignore_certificate_name_mismatch': {'required': True}, + 'support_http_status_code_continue': {'required': True}, + 'keep_http_connection_alive': {'required': True}, + 'unfold_http_headers': {'required': True}, + } + + _attribute_map = { + 'ignore_certificate_name_mismatch': {'key': 'ignoreCertificateNameMismatch', 'type': 'bool'}, + 'support_http_status_code_continue': {'key': 'supportHttpStatusCodeContinue', 'type': 'bool'}, + 'keep_http_connection_alive': {'key': 'keepHttpConnectionAlive', 'type': 'bool'}, + 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, + } + + def __init__(self, *, ignore_certificate_name_mismatch: bool, support_http_status_code_continue: bool, keep_http_connection_alive: bool, unfold_http_headers: bool, **kwargs) -> None: + super(AS2MessageConnectionSettings, self).__init__(**kwargs) + self.ignore_certificate_name_mismatch = ignore_certificate_name_mismatch + self.support_http_status_code_continue = support_http_status_code_continue + self.keep_http_connection_alive = keep_http_connection_alive + self.unfold_http_headers = unfold_http_headers diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement.py old mode 100755 new mode 100644 index 11e6c03929f3..1f75e787d1da --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement.py @@ -13,17 +13,18 @@ class AS2OneWayAgreement(Model): - """The integration account AS2 oneway agreement. - - :param sender_business_identity: The sender business identity - :type sender_business_identity: :class:`BusinessIdentity - ` - :param receiver_business_identity: The receiver business identity - :type receiver_business_identity: :class:`BusinessIdentity - ` - :param protocol_settings: The AS2 protocol settings. - :type protocol_settings: :class:`AS2ProtocolSettings - ` + """The integration account AS2 one-way agreement. + + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The AS2 protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.AS2ProtocolSettings """ _validation = { @@ -38,7 +39,8 @@ class AS2OneWayAgreement(Model): 'protocol_settings': {'key': 'protocolSettings', 'type': 'AS2ProtocolSettings'}, } - def __init__(self, sender_business_identity, receiver_business_identity, protocol_settings): - self.sender_business_identity = sender_business_identity - self.receiver_business_identity = receiver_business_identity - self.protocol_settings = protocol_settings + def __init__(self, **kwargs): + super(AS2OneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = kwargs.get('sender_business_identity', None) + self.receiver_business_identity = kwargs.get('receiver_business_identity', None) + self.protocol_settings = kwargs.get('protocol_settings', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement_py3.py new file mode 100644 index 000000000000..54315da2006a --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AS2OneWayAgreement(Model): + """The integration account AS2 one-way agreement. + + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The AS2 protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.AS2ProtocolSettings + """ + + _validation = { + 'sender_business_identity': {'required': True}, + 'receiver_business_identity': {'required': True}, + 'protocol_settings': {'required': True}, + } + + _attribute_map = { + 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, + 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, + 'protocol_settings': {'key': 'protocolSettings', 'type': 'AS2ProtocolSettings'}, + } + + def __init__(self, *, sender_business_identity, receiver_business_identity, protocol_settings, **kwargs) -> None: + super(AS2OneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = sender_business_identity + self.receiver_business_identity = receiver_business_identity + self.protocol_settings = protocol_settings diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings.py old mode 100755 new mode 100644 index 33ee9fc10a55..1c79994dd5fd --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings.py @@ -15,29 +15,26 @@ class AS2ProtocolSettings(Model): """The AS2 agreement protocol settings. - :param message_connection_settings: The message connection settings. - :type message_connection_settings: :class:`AS2MessageConnectionSettings - ` - :param acknowledgement_connection_settings: The acknowledgement connection + All required parameters must be populated in order to send to Azure. + + :param message_connection_settings: Required. The message connection settings. + :type message_connection_settings: + ~azure.mgmt.logic.models.AS2MessageConnectionSettings + :param acknowledgement_connection_settings: Required. The acknowledgement + connection settings. :type acknowledgement_connection_settings: - :class:`AS2AcknowledgementConnectionSettings - ` - :param mdn_settings: The MDN settings. - :type mdn_settings: :class:`AS2MdnSettings - ` - :param security_settings: The security settings. - :type security_settings: :class:`AS2SecuritySettings - ` - :param validation_settings: The validation settings. - :type validation_settings: :class:`AS2ValidationSettings - ` - :param envelope_settings: The envelope settings. - :type envelope_settings: :class:`AS2EnvelopeSettings - ` - :param error_settings: The error settings. - :type error_settings: :class:`AS2ErrorSettings - ` + ~azure.mgmt.logic.models.AS2AcknowledgementConnectionSettings + :param mdn_settings: Required. The MDN settings. + :type mdn_settings: ~azure.mgmt.logic.models.AS2MdnSettings + :param security_settings: Required. The security settings. + :type security_settings: ~azure.mgmt.logic.models.AS2SecuritySettings + :param validation_settings: Required. The validation settings. + :type validation_settings: ~azure.mgmt.logic.models.AS2ValidationSettings + :param envelope_settings: Required. The envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.AS2EnvelopeSettings + :param error_settings: Required. The error settings. + :type error_settings: ~azure.mgmt.logic.models.AS2ErrorSettings """ _validation = { @@ -60,11 +57,12 @@ class AS2ProtocolSettings(Model): 'error_settings': {'key': 'errorSettings', 'type': 'AS2ErrorSettings'}, } - def __init__(self, message_connection_settings, acknowledgement_connection_settings, mdn_settings, security_settings, validation_settings, envelope_settings, error_settings): - self.message_connection_settings = message_connection_settings - self.acknowledgement_connection_settings = acknowledgement_connection_settings - self.mdn_settings = mdn_settings - self.security_settings = security_settings - self.validation_settings = validation_settings - self.envelope_settings = envelope_settings - self.error_settings = error_settings + def __init__(self, **kwargs): + super(AS2ProtocolSettings, self).__init__(**kwargs) + self.message_connection_settings = kwargs.get('message_connection_settings', None) + self.acknowledgement_connection_settings = kwargs.get('acknowledgement_connection_settings', None) + self.mdn_settings = kwargs.get('mdn_settings', None) + self.security_settings = kwargs.get('security_settings', None) + self.validation_settings = kwargs.get('validation_settings', None) + self.envelope_settings = kwargs.get('envelope_settings', None) + self.error_settings = kwargs.get('error_settings', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings_py3.py new file mode 100644 index 000000000000..217fdc55147d --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings_py3.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AS2ProtocolSettings(Model): + """The AS2 agreement protocol settings. + + All required parameters must be populated in order to send to Azure. + + :param message_connection_settings: Required. The message connection + settings. + :type message_connection_settings: + ~azure.mgmt.logic.models.AS2MessageConnectionSettings + :param acknowledgement_connection_settings: Required. The acknowledgement + connection settings. + :type acknowledgement_connection_settings: + ~azure.mgmt.logic.models.AS2AcknowledgementConnectionSettings + :param mdn_settings: Required. The MDN settings. + :type mdn_settings: ~azure.mgmt.logic.models.AS2MdnSettings + :param security_settings: Required. The security settings. + :type security_settings: ~azure.mgmt.logic.models.AS2SecuritySettings + :param validation_settings: Required. The validation settings. + :type validation_settings: ~azure.mgmt.logic.models.AS2ValidationSettings + :param envelope_settings: Required. The envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.AS2EnvelopeSettings + :param error_settings: Required. The error settings. + :type error_settings: ~azure.mgmt.logic.models.AS2ErrorSettings + """ + + _validation = { + 'message_connection_settings': {'required': True}, + 'acknowledgement_connection_settings': {'required': True}, + 'mdn_settings': {'required': True}, + 'security_settings': {'required': True}, + 'validation_settings': {'required': True}, + 'envelope_settings': {'required': True}, + 'error_settings': {'required': True}, + } + + _attribute_map = { + 'message_connection_settings': {'key': 'messageConnectionSettings', 'type': 'AS2MessageConnectionSettings'}, + 'acknowledgement_connection_settings': {'key': 'acknowledgementConnectionSettings', 'type': 'AS2AcknowledgementConnectionSettings'}, + 'mdn_settings': {'key': 'mdnSettings', 'type': 'AS2MdnSettings'}, + 'security_settings': {'key': 'securitySettings', 'type': 'AS2SecuritySettings'}, + 'validation_settings': {'key': 'validationSettings', 'type': 'AS2ValidationSettings'}, + 'envelope_settings': {'key': 'envelopeSettings', 'type': 'AS2EnvelopeSettings'}, + 'error_settings': {'key': 'errorSettings', 'type': 'AS2ErrorSettings'}, + } + + def __init__(self, *, message_connection_settings, acknowledgement_connection_settings, mdn_settings, security_settings, validation_settings, envelope_settings, error_settings, **kwargs) -> None: + super(AS2ProtocolSettings, self).__init__(**kwargs) + self.message_connection_settings = message_connection_settings + self.acknowledgement_connection_settings = acknowledgement_connection_settings + self.mdn_settings = mdn_settings + self.security_settings = security_settings + self.validation_settings = validation_settings + self.envelope_settings = envelope_settings + self.error_settings = error_settings diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings.py old mode 100755 new mode 100644 index 7194beb13170..c90158ada77e --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings.py @@ -15,31 +15,33 @@ class AS2SecuritySettings(Model): """The AS2 agreement security settings. - :param override_group_signing_certificate: The value indicating whether to - send or request a MDN. + All required parameters must be populated in order to send to Azure. + + :param override_group_signing_certificate: Required. The value indicating + whether to send or request a MDN. :type override_group_signing_certificate: bool :param signing_certificate_name: The name of the signing certificate. :type signing_certificate_name: str :param encryption_certificate_name: The name of the encryption certificate. :type encryption_certificate_name: str - :param enable_nrr_for_inbound_encoded_messages: The value indicating - whether to enable NRR for inbound encoded messages. + :param enable_nrr_for_inbound_encoded_messages: Required. The value + indicating whether to enable NRR for inbound encoded messages. :type enable_nrr_for_inbound_encoded_messages: bool - :param enable_nrr_for_inbound_decoded_messages: The value indicating - whether to enable NRR for inbound decoded messages. + :param enable_nrr_for_inbound_decoded_messages: Required. The value + indicating whether to enable NRR for inbound decoded messages. :type enable_nrr_for_inbound_decoded_messages: bool - :param enable_nrr_for_outbound_mdn: The value indicating whether to enable - NRR for outbound MDN. + :param enable_nrr_for_outbound_mdn: Required. The value indicating whether + to enable NRR for outbound MDN. :type enable_nrr_for_outbound_mdn: bool - :param enable_nrr_for_outbound_encoded_messages: The value indicating - whether to enable NRR for outbound encoded messages. + :param enable_nrr_for_outbound_encoded_messages: Required. The value + indicating whether to enable NRR for outbound encoded messages. :type enable_nrr_for_outbound_encoded_messages: bool - :param enable_nrr_for_outbound_decoded_messages: The value indicating - whether to enable NRR for outbound decoded messages. + :param enable_nrr_for_outbound_decoded_messages: Required. The value + indicating whether to enable NRR for outbound decoded messages. :type enable_nrr_for_outbound_decoded_messages: bool - :param enable_nrr_for_inbound_mdn: The value indicating whether to enable - NRR for inbound MDN. + :param enable_nrr_for_inbound_mdn: Required. The value indicating whether + to enable NRR for inbound MDN. :type enable_nrr_for_inbound_mdn: bool :param sha2_algorithm_format: The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, ShaHyphenHashSize, Sha2UnderscoreHashSize. @@ -69,14 +71,15 @@ class AS2SecuritySettings(Model): 'sha2_algorithm_format': {'key': 'sha2AlgorithmFormat', 'type': 'str'}, } - def __init__(self, override_group_signing_certificate, enable_nrr_for_inbound_encoded_messages, enable_nrr_for_inbound_decoded_messages, enable_nrr_for_outbound_mdn, enable_nrr_for_outbound_encoded_messages, enable_nrr_for_outbound_decoded_messages, enable_nrr_for_inbound_mdn, signing_certificate_name=None, encryption_certificate_name=None, sha2_algorithm_format=None): - self.override_group_signing_certificate = override_group_signing_certificate - self.signing_certificate_name = signing_certificate_name - self.encryption_certificate_name = encryption_certificate_name - self.enable_nrr_for_inbound_encoded_messages = enable_nrr_for_inbound_encoded_messages - self.enable_nrr_for_inbound_decoded_messages = enable_nrr_for_inbound_decoded_messages - self.enable_nrr_for_outbound_mdn = enable_nrr_for_outbound_mdn - self.enable_nrr_for_outbound_encoded_messages = enable_nrr_for_outbound_encoded_messages - self.enable_nrr_for_outbound_decoded_messages = enable_nrr_for_outbound_decoded_messages - self.enable_nrr_for_inbound_mdn = enable_nrr_for_inbound_mdn - self.sha2_algorithm_format = sha2_algorithm_format + def __init__(self, **kwargs): + super(AS2SecuritySettings, self).__init__(**kwargs) + self.override_group_signing_certificate = kwargs.get('override_group_signing_certificate', None) + self.signing_certificate_name = kwargs.get('signing_certificate_name', None) + self.encryption_certificate_name = kwargs.get('encryption_certificate_name', None) + self.enable_nrr_for_inbound_encoded_messages = kwargs.get('enable_nrr_for_inbound_encoded_messages', None) + self.enable_nrr_for_inbound_decoded_messages = kwargs.get('enable_nrr_for_inbound_decoded_messages', None) + self.enable_nrr_for_outbound_mdn = kwargs.get('enable_nrr_for_outbound_mdn', None) + self.enable_nrr_for_outbound_encoded_messages = kwargs.get('enable_nrr_for_outbound_encoded_messages', None) + self.enable_nrr_for_outbound_decoded_messages = kwargs.get('enable_nrr_for_outbound_decoded_messages', None) + self.enable_nrr_for_inbound_mdn = kwargs.get('enable_nrr_for_inbound_mdn', None) + self.sha2_algorithm_format = kwargs.get('sha2_algorithm_format', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings_py3.py new file mode 100644 index 000000000000..3dc2473c7ff8 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings_py3.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AS2SecuritySettings(Model): + """The AS2 agreement security settings. + + All required parameters must be populated in order to send to Azure. + + :param override_group_signing_certificate: Required. The value indicating + whether to send or request a MDN. + :type override_group_signing_certificate: bool + :param signing_certificate_name: The name of the signing certificate. + :type signing_certificate_name: str + :param encryption_certificate_name: The name of the encryption + certificate. + :type encryption_certificate_name: str + :param enable_nrr_for_inbound_encoded_messages: Required. The value + indicating whether to enable NRR for inbound encoded messages. + :type enable_nrr_for_inbound_encoded_messages: bool + :param enable_nrr_for_inbound_decoded_messages: Required. The value + indicating whether to enable NRR for inbound decoded messages. + :type enable_nrr_for_inbound_decoded_messages: bool + :param enable_nrr_for_outbound_mdn: Required. The value indicating whether + to enable NRR for outbound MDN. + :type enable_nrr_for_outbound_mdn: bool + :param enable_nrr_for_outbound_encoded_messages: Required. The value + indicating whether to enable NRR for outbound encoded messages. + :type enable_nrr_for_outbound_encoded_messages: bool + :param enable_nrr_for_outbound_decoded_messages: Required. The value + indicating whether to enable NRR for outbound decoded messages. + :type enable_nrr_for_outbound_decoded_messages: bool + :param enable_nrr_for_inbound_mdn: Required. The value indicating whether + to enable NRR for inbound MDN. + :type enable_nrr_for_inbound_mdn: bool + :param sha2_algorithm_format: The Sha2 algorithm format. Valid values are + Sha2, ShaHashSize, ShaHyphenHashSize, Sha2UnderscoreHashSize. + :type sha2_algorithm_format: str + """ + + _validation = { + 'override_group_signing_certificate': {'required': True}, + 'enable_nrr_for_inbound_encoded_messages': {'required': True}, + 'enable_nrr_for_inbound_decoded_messages': {'required': True}, + 'enable_nrr_for_outbound_mdn': {'required': True}, + 'enable_nrr_for_outbound_encoded_messages': {'required': True}, + 'enable_nrr_for_outbound_decoded_messages': {'required': True}, + 'enable_nrr_for_inbound_mdn': {'required': True}, + } + + _attribute_map = { + 'override_group_signing_certificate': {'key': 'overrideGroupSigningCertificate', 'type': 'bool'}, + 'signing_certificate_name': {'key': 'signingCertificateName', 'type': 'str'}, + 'encryption_certificate_name': {'key': 'encryptionCertificateName', 'type': 'str'}, + 'enable_nrr_for_inbound_encoded_messages': {'key': 'enableNrrForInboundEncodedMessages', 'type': 'bool'}, + 'enable_nrr_for_inbound_decoded_messages': {'key': 'enableNrrForInboundDecodedMessages', 'type': 'bool'}, + 'enable_nrr_for_outbound_mdn': {'key': 'enableNrrForOutboundMdn', 'type': 'bool'}, + 'enable_nrr_for_outbound_encoded_messages': {'key': 'enableNrrForOutboundEncodedMessages', 'type': 'bool'}, + 'enable_nrr_for_outbound_decoded_messages': {'key': 'enableNrrForOutboundDecodedMessages', 'type': 'bool'}, + 'enable_nrr_for_inbound_mdn': {'key': 'enableNrrForInboundMdn', 'type': 'bool'}, + 'sha2_algorithm_format': {'key': 'sha2AlgorithmFormat', 'type': 'str'}, + } + + def __init__(self, *, override_group_signing_certificate: bool, enable_nrr_for_inbound_encoded_messages: bool, enable_nrr_for_inbound_decoded_messages: bool, enable_nrr_for_outbound_mdn: bool, enable_nrr_for_outbound_encoded_messages: bool, enable_nrr_for_outbound_decoded_messages: bool, enable_nrr_for_inbound_mdn: bool, signing_certificate_name: str=None, encryption_certificate_name: str=None, sha2_algorithm_format: str=None, **kwargs) -> None: + super(AS2SecuritySettings, self).__init__(**kwargs) + self.override_group_signing_certificate = override_group_signing_certificate + self.signing_certificate_name = signing_certificate_name + self.encryption_certificate_name = encryption_certificate_name + self.enable_nrr_for_inbound_encoded_messages = enable_nrr_for_inbound_encoded_messages + self.enable_nrr_for_inbound_decoded_messages = enable_nrr_for_inbound_decoded_messages + self.enable_nrr_for_outbound_mdn = enable_nrr_for_outbound_mdn + self.enable_nrr_for_outbound_encoded_messages = enable_nrr_for_outbound_encoded_messages + self.enable_nrr_for_outbound_decoded_messages = enable_nrr_for_outbound_decoded_messages + self.enable_nrr_for_inbound_mdn = enable_nrr_for_inbound_mdn + self.sha2_algorithm_format = sha2_algorithm_format diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings.py old mode 100755 new mode 100644 index f1950b7ced38..42acb57ff48a --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings.py @@ -15,39 +15,40 @@ class AS2ValidationSettings(Model): """The AS2 agreement validation settings. - :param override_message_properties: The value indicating whether to - override incoming message properties with those in agreement. + All required parameters must be populated in order to send to Azure. + + :param override_message_properties: Required. The value indicating whether + to override incoming message properties with those in agreement. :type override_message_properties: bool - :param encrypt_message: The value indicating whether the message has to be - encrypted. + :param encrypt_message: Required. The value indicating whether the message + has to be encrypted. :type encrypt_message: bool - :param sign_message: The value indicating whether the message has to be - signed. + :param sign_message: Required. The value indicating whether the message + has to be signed. :type sign_message: bool - :param compress_message: The value indicating whether the message has to - be compressed. + :param compress_message: Required. The value indicating whether the + message has to be compressed. :type compress_message: bool - :param check_duplicate_message: The value indicating whether to check for - duplicate message. + :param check_duplicate_message: Required. The value indicating whether to + check for duplicate message. :type check_duplicate_message: bool - :param interchange_duplicates_validity_days: The number of days to look - back for duplicate interchange. + :param interchange_duplicates_validity_days: Required. The number of days + to look back for duplicate interchange. :type interchange_duplicates_validity_days: int - :param check_certificate_revocation_list_on_send: The value indicating - whether to check for certificate revocation list on send. + :param check_certificate_revocation_list_on_send: Required. The value + indicating whether to check for certificate revocation list on send. :type check_certificate_revocation_list_on_send: bool - :param check_certificate_revocation_list_on_receive: The value indicating - whether to check for certificate revocation list on receive. + :param check_certificate_revocation_list_on_receive: Required. The value + indicating whether to check for certificate revocation list on receive. :type check_certificate_revocation_list_on_receive: bool - :param encryption_algorithm: The encryption algorithm. Possible values - include: 'NotSpecified', 'None', 'DES3', 'RC2', 'AES128', 'AES192', + :param encryption_algorithm: Required. The encryption algorithm. Possible + values include: 'NotSpecified', 'None', 'DES3', 'RC2', 'AES128', 'AES192', 'AES256' - :type encryption_algorithm: str or :class:`EncryptionAlgorithm - ` + :type encryption_algorithm: str or + ~azure.mgmt.logic.models.EncryptionAlgorithm :param signing_algorithm: The signing algorithm. Possible values include: 'NotSpecified', 'Default', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - :type signing_algorithm: str or :class:`SigningAlgorithm - ` + :type signing_algorithm: str or ~azure.mgmt.logic.models.SigningAlgorithm """ _validation = { @@ -75,14 +76,15 @@ class AS2ValidationSettings(Model): 'signing_algorithm': {'key': 'signingAlgorithm', 'type': 'str'}, } - def __init__(self, override_message_properties, encrypt_message, sign_message, compress_message, check_duplicate_message, interchange_duplicates_validity_days, check_certificate_revocation_list_on_send, check_certificate_revocation_list_on_receive, encryption_algorithm, signing_algorithm=None): - self.override_message_properties = override_message_properties - self.encrypt_message = encrypt_message - self.sign_message = sign_message - self.compress_message = compress_message - self.check_duplicate_message = check_duplicate_message - self.interchange_duplicates_validity_days = interchange_duplicates_validity_days - self.check_certificate_revocation_list_on_send = check_certificate_revocation_list_on_send - self.check_certificate_revocation_list_on_receive = check_certificate_revocation_list_on_receive - self.encryption_algorithm = encryption_algorithm - self.signing_algorithm = signing_algorithm + def __init__(self, **kwargs): + super(AS2ValidationSettings, self).__init__(**kwargs) + self.override_message_properties = kwargs.get('override_message_properties', None) + self.encrypt_message = kwargs.get('encrypt_message', None) + self.sign_message = kwargs.get('sign_message', None) + self.compress_message = kwargs.get('compress_message', None) + self.check_duplicate_message = kwargs.get('check_duplicate_message', None) + self.interchange_duplicates_validity_days = kwargs.get('interchange_duplicates_validity_days', None) + self.check_certificate_revocation_list_on_send = kwargs.get('check_certificate_revocation_list_on_send', None) + self.check_certificate_revocation_list_on_receive = kwargs.get('check_certificate_revocation_list_on_receive', None) + self.encryption_algorithm = kwargs.get('encryption_algorithm', None) + self.signing_algorithm = kwargs.get('signing_algorithm', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings_py3.py new file mode 100644 index 000000000000..d56c1d9ce95f --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings_py3.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AS2ValidationSettings(Model): + """The AS2 agreement validation settings. + + All required parameters must be populated in order to send to Azure. + + :param override_message_properties: Required. The value indicating whether + to override incoming message properties with those in agreement. + :type override_message_properties: bool + :param encrypt_message: Required. The value indicating whether the message + has to be encrypted. + :type encrypt_message: bool + :param sign_message: Required. The value indicating whether the message + has to be signed. + :type sign_message: bool + :param compress_message: Required. The value indicating whether the + message has to be compressed. + :type compress_message: bool + :param check_duplicate_message: Required. The value indicating whether to + check for duplicate message. + :type check_duplicate_message: bool + :param interchange_duplicates_validity_days: Required. The number of days + to look back for duplicate interchange. + :type interchange_duplicates_validity_days: int + :param check_certificate_revocation_list_on_send: Required. The value + indicating whether to check for certificate revocation list on send. + :type check_certificate_revocation_list_on_send: bool + :param check_certificate_revocation_list_on_receive: Required. The value + indicating whether to check for certificate revocation list on receive. + :type check_certificate_revocation_list_on_receive: bool + :param encryption_algorithm: Required. The encryption algorithm. Possible + values include: 'NotSpecified', 'None', 'DES3', 'RC2', 'AES128', 'AES192', + 'AES256' + :type encryption_algorithm: str or + ~azure.mgmt.logic.models.EncryptionAlgorithm + :param signing_algorithm: The signing algorithm. Possible values include: + 'NotSpecified', 'Default', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' + :type signing_algorithm: str or ~azure.mgmt.logic.models.SigningAlgorithm + """ + + _validation = { + 'override_message_properties': {'required': True}, + 'encrypt_message': {'required': True}, + 'sign_message': {'required': True}, + 'compress_message': {'required': True}, + 'check_duplicate_message': {'required': True}, + 'interchange_duplicates_validity_days': {'required': True}, + 'check_certificate_revocation_list_on_send': {'required': True}, + 'check_certificate_revocation_list_on_receive': {'required': True}, + 'encryption_algorithm': {'required': True}, + } + + _attribute_map = { + 'override_message_properties': {'key': 'overrideMessageProperties', 'type': 'bool'}, + 'encrypt_message': {'key': 'encryptMessage', 'type': 'bool'}, + 'sign_message': {'key': 'signMessage', 'type': 'bool'}, + 'compress_message': {'key': 'compressMessage', 'type': 'bool'}, + 'check_duplicate_message': {'key': 'checkDuplicateMessage', 'type': 'bool'}, + 'interchange_duplicates_validity_days': {'key': 'interchangeDuplicatesValidityDays', 'type': 'int'}, + 'check_certificate_revocation_list_on_send': {'key': 'checkCertificateRevocationListOnSend', 'type': 'bool'}, + 'check_certificate_revocation_list_on_receive': {'key': 'checkCertificateRevocationListOnReceive', 'type': 'bool'}, + 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'EncryptionAlgorithm'}, + 'signing_algorithm': {'key': 'signingAlgorithm', 'type': 'str'}, + } + + def __init__(self, *, override_message_properties: bool, encrypt_message: bool, sign_message: bool, compress_message: bool, check_duplicate_message: bool, interchange_duplicates_validity_days: int, check_certificate_revocation_list_on_send: bool, check_certificate_revocation_list_on_receive: bool, encryption_algorithm, signing_algorithm=None, **kwargs) -> None: + super(AS2ValidationSettings, self).__init__(**kwargs) + self.override_message_properties = override_message_properties + self.encrypt_message = encrypt_message + self.sign_message = sign_message + self.compress_message = compress_message + self.check_duplicate_message = check_duplicate_message + self.interchange_duplicates_validity_days = interchange_duplicates_validity_days + self.check_certificate_revocation_list_on_send = check_certificate_revocation_list_on_send + self.check_certificate_revocation_list_on_receive = check_certificate_revocation_list_on_receive + self.encryption_algorithm = encryption_algorithm + self.signing_algorithm = signing_algorithm diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition.py b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition.py new file mode 100644 index 000000000000..0332e1a65491 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class AssemblyDefinition(Resource): + """The assembly definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: Required. The assembly properties. + :type properties: ~azure.mgmt.logic.models.AssemblyProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'AssemblyProperties'}, + } + + def __init__(self, **kwargs): + super(AssemblyDefinition, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_paged.py new file mode 100644 index 000000000000..fbe3cc995683 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class AssemblyDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`AssemblyDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AssemblyDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(AssemblyDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_py3.py new file mode 100644 index 000000000000..e30c214c6a87 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class AssemblyDefinition(Resource): + """The assembly definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: Required. The assembly properties. + :type properties: ~azure.mgmt.logic.models.AssemblyProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'AssemblyProperties'}, + } + + def __init__(self, *, properties, location: str=None, tags=None, **kwargs) -> None: + super(AssemblyDefinition, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties.py b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties.py new file mode 100644 index 000000000000..e6ec176ecf0a --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .artifact_content_properties_definition import ArtifactContentPropertiesDefinition + + +class AssemblyProperties(ArtifactContentPropertiesDefinition): + """The assembly properties definition. + + All required parameters must be populated in order to send to Azure. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param content: + :type content: object + :param content_type: The content type. + :type content_type: str + :param content_link: The content link. + :type content_link: ~azure.mgmt.logic.models.ContentLink + :param assembly_name: Required. The assembly name. + :type assembly_name: str + :param assembly_version: The assembly version. + :type assembly_version: str + :param assembly_culture: The assembly culture. + :type assembly_culture: str + :param assembly_public_key_token: The assembly public key token. + :type assembly_public_key_token: str + """ + + _validation = { + 'assembly_name': {'required': True}, + } + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'content': {'key': 'content', 'type': 'object'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, + 'assembly_name': {'key': 'assemblyName', 'type': 'str'}, + 'assembly_version': {'key': 'assemblyVersion', 'type': 'str'}, + 'assembly_culture': {'key': 'assemblyCulture', 'type': 'str'}, + 'assembly_public_key_token': {'key': 'assemblyPublicKeyToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AssemblyProperties, self).__init__(**kwargs) + self.assembly_name = kwargs.get('assembly_name', None) + self.assembly_version = kwargs.get('assembly_version', None) + self.assembly_culture = kwargs.get('assembly_culture', None) + self.assembly_public_key_token = kwargs.get('assembly_public_key_token', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties_py3.py new file mode 100644 index 000000000000..a0676a264c9d --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .artifact_content_properties_definition_py3 import ArtifactContentPropertiesDefinition + + +class AssemblyProperties(ArtifactContentPropertiesDefinition): + """The assembly properties definition. + + All required parameters must be populated in order to send to Azure. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param content: + :type content: object + :param content_type: The content type. + :type content_type: str + :param content_link: The content link. + :type content_link: ~azure.mgmt.logic.models.ContentLink + :param assembly_name: Required. The assembly name. + :type assembly_name: str + :param assembly_version: The assembly version. + :type assembly_version: str + :param assembly_culture: The assembly culture. + :type assembly_culture: str + :param assembly_public_key_token: The assembly public key token. + :type assembly_public_key_token: str + """ + + _validation = { + 'assembly_name': {'required': True}, + } + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'content': {'key': 'content', 'type': 'object'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, + 'assembly_name': {'key': 'assemblyName', 'type': 'str'}, + 'assembly_version': {'key': 'assemblyVersion', 'type': 'str'}, + 'assembly_culture': {'key': 'assemblyCulture', 'type': 'str'}, + 'assembly_public_key_token': {'key': 'assemblyPublicKeyToken', 'type': 'str'}, + } + + def __init__(self, *, assembly_name: str, created_time=None, changed_time=None, metadata=None, content=None, content_type: str=None, content_link=None, assembly_version: str=None, assembly_culture: str=None, assembly_public_key_token: str=None, **kwargs) -> None: + super(AssemblyProperties, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, content=content, content_type=content_type, content_link=content_link, **kwargs) + self.assembly_name = assembly_name + self.assembly_version = assembly_version + self.assembly_culture = assembly_culture + self.assembly_public_key_token = assembly_public_key_token diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info.py b/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info.py new file mode 100644 index 000000000000..ecec1dd28437 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .error_info import ErrorInfo + + +class AzureResourceErrorInfo(ErrorInfo): + """The azure resource error info. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. The error code. + :type code: str + :param message: Required. The error message. + :type message: str + :param details: The error details. + :type details: list[~azure.mgmt.logic.models.AzureResourceErrorInfo] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[AzureResourceErrorInfo]'}, + } + + def __init__(self, **kwargs): + super(AzureResourceErrorInfo, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info_py3.py new file mode 100644 index 000000000000..cd39d5f68870 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .error_info_py3 import ErrorInfo + + +class AzureResourceErrorInfo(ErrorInfo): + """The azure resource error info. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. The error code. + :type code: str + :param message: Required. The error message. + :type message: str + :param details: The error details. + :type details: list[~azure.mgmt.logic.models.AzureResourceErrorInfo] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[AzureResourceErrorInfo]'}, + } + + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(AzureResourceErrorInfo, self).__init__(code=code, **kwargs) + self.message = message + self.details = details diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content.py b/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content.py old mode 100755 new mode 100644 index 1703eff7cd3e..ede9238ab529 --- a/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content.py @@ -16,13 +16,13 @@ class B2BPartnerContent(Model): """The B2B partner content. :param business_identities: The list of partner business identities. - :type business_identities: list of :class:`BusinessIdentity - ` + :type business_identities: list[~azure.mgmt.logic.models.BusinessIdentity] """ _attribute_map = { 'business_identities': {'key': 'businessIdentities', 'type': '[BusinessIdentity]'}, } - def __init__(self, business_identities=None): - self.business_identities = business_identities + def __init__(self, **kwargs): + super(B2BPartnerContent, self).__init__(**kwargs) + self.business_identities = kwargs.get('business_identities', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content_py3.py new file mode 100644 index 000000000000..7563514fe683 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class B2BPartnerContent(Model): + """The B2B partner content. + + :param business_identities: The list of partner business identities. + :type business_identities: list[~azure.mgmt.logic.models.BusinessIdentity] + """ + + _attribute_map = { + 'business_identities': {'key': 'businessIdentities', 'type': '[BusinessIdentity]'}, + } + + def __init__(self, *, business_identities=None, **kwargs) -> None: + super(B2BPartnerContent, self).__init__(**kwargs) + self.business_identities = business_identities diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration.py b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration.py new file mode 100644 index 000000000000..12920895e108 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class BatchConfiguration(Resource): + """The batch configuration resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: Required. The batch configuration properties. + :type properties: ~azure.mgmt.logic.models.BatchConfigurationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'BatchConfigurationProperties'}, + } + + def __init__(self, **kwargs): + super(BatchConfiguration, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_paged.py new file mode 100644 index 000000000000..965308916323 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class BatchConfigurationPaged(Paged): + """ + A paging container for iterating over a list of :class:`BatchConfiguration ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BatchConfiguration]'} + } + + def __init__(self, *args, **kwargs): + + super(BatchConfigurationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties.py b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties.py new file mode 100644 index 000000000000..8b3038836ccb --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .artifact_properties import ArtifactProperties + + +class BatchConfigurationProperties(ArtifactProperties): + """The batch configuration properties definition. + + All required parameters must be populated in order to send to Azure. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param batch_group_name: Required. The name of the batch group. + :type batch_group_name: str + :param release_criteria: Required. The batch release criteria. + :type release_criteria: ~azure.mgmt.logic.models.BatchReleaseCriteria + """ + + _validation = { + 'batch_group_name': {'required': True}, + 'release_criteria': {'required': True}, + } + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'batch_group_name': {'key': 'batchGroupName', 'type': 'str'}, + 'release_criteria': {'key': 'releaseCriteria', 'type': 'BatchReleaseCriteria'}, + } + + def __init__(self, **kwargs): + super(BatchConfigurationProperties, self).__init__(**kwargs) + self.batch_group_name = kwargs.get('batch_group_name', None) + self.release_criteria = kwargs.get('release_criteria', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties_py3.py new file mode 100644 index 000000000000..5729113a66f3 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .artifact_properties_py3 import ArtifactProperties + + +class BatchConfigurationProperties(ArtifactProperties): + """The batch configuration properties definition. + + All required parameters must be populated in order to send to Azure. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param batch_group_name: Required. The name of the batch group. + :type batch_group_name: str + :param release_criteria: Required. The batch release criteria. + :type release_criteria: ~azure.mgmt.logic.models.BatchReleaseCriteria + """ + + _validation = { + 'batch_group_name': {'required': True}, + 'release_criteria': {'required': True}, + } + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'batch_group_name': {'key': 'batchGroupName', 'type': 'str'}, + 'release_criteria': {'key': 'releaseCriteria', 'type': 'BatchReleaseCriteria'}, + } + + def __init__(self, *, batch_group_name: str, release_criteria, created_time=None, changed_time=None, metadata=None, **kwargs) -> None: + super(BatchConfigurationProperties, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, **kwargs) + self.batch_group_name = batch_group_name + self.release_criteria = release_criteria diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_py3.py new file mode 100644 index 000000000000..19dc6458274d --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class BatchConfiguration(Resource): + """The batch configuration resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: Required. The batch configuration properties. + :type properties: ~azure.mgmt.logic.models.BatchConfigurationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'BatchConfigurationProperties'}, + } + + def __init__(self, *, properties, location: str=None, tags=None, **kwargs) -> None: + super(BatchConfiguration, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria.py b/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria.py new file mode 100644 index 000000000000..55217abd6e46 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BatchReleaseCriteria(Model): + """The batch release criteria. + + :param message_count: The message count. + :type message_count: int + :param batch_size: The batch size in bytes. + :type batch_size: int + :param recurrence: The recurrence. + :type recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence + """ + + _attribute_map = { + 'message_count': {'key': 'messageCount', 'type': 'int'}, + 'batch_size': {'key': 'batchSize', 'type': 'int'}, + 'recurrence': {'key': 'recurrence', 'type': 'WorkflowTriggerRecurrence'}, + } + + def __init__(self, **kwargs): + super(BatchReleaseCriteria, self).__init__(**kwargs) + self.message_count = kwargs.get('message_count', None) + self.batch_size = kwargs.get('batch_size', None) + self.recurrence = kwargs.get('recurrence', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria_py3.py new file mode 100644 index 000000000000..33d596dc902c --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BatchReleaseCriteria(Model): + """The batch release criteria. + + :param message_count: The message count. + :type message_count: int + :param batch_size: The batch size in bytes. + :type batch_size: int + :param recurrence: The recurrence. + :type recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence + """ + + _attribute_map = { + 'message_count': {'key': 'messageCount', 'type': 'int'}, + 'batch_size': {'key': 'batchSize', 'type': 'int'}, + 'recurrence': {'key': 'recurrence', 'type': 'WorkflowTriggerRecurrence'}, + } + + def __init__(self, *, message_count: int=None, batch_size: int=None, recurrence=None, **kwargs) -> None: + super(BatchReleaseCriteria, self).__init__(**kwargs) + self.message_count = message_count + self.batch_size = batch_size + self.recurrence = recurrence diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/business_identity.py b/azure-mgmt-logic/azure/mgmt/logic/models/business_identity.py old mode 100755 new mode 100644 index 951bf116a5fe..f3ece263cff5 --- a/azure-mgmt-logic/azure/mgmt/logic/models/business_identity.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/business_identity.py @@ -15,10 +15,12 @@ class BusinessIdentity(Model): """The integration account partner's business identity. - :param qualifier: The business identity qualifier e.g. as2identity, ZZ, - ZZZ, 31, 32 + All required parameters must be populated in order to send to Azure. + + :param qualifier: Required. The business identity qualifier e.g. + as2identity, ZZ, ZZZ, 31, 32 :type qualifier: str - :param value: The user defined business identity value. + :param value: Required. The user defined business identity value. :type value: str """ @@ -32,6 +34,7 @@ class BusinessIdentity(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, qualifier, value): - self.qualifier = qualifier - self.value = value + def __init__(self, **kwargs): + super(BusinessIdentity, self).__init__(**kwargs) + self.qualifier = kwargs.get('qualifier', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/business_identity_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/business_identity_py3.py new file mode 100644 index 000000000000..41c27a99d299 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/business_identity_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BusinessIdentity(Model): + """The integration account partner's business identity. + + All required parameters must be populated in order to send to Azure. + + :param qualifier: Required. The business identity qualifier e.g. + as2identity, ZZ, ZZZ, 31, 32 + :type qualifier: str + :param value: Required. The user defined business identity value. + :type value: str + """ + + _validation = { + 'qualifier': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'qualifier': {'key': 'qualifier', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, qualifier: str, value: str, **kwargs) -> None: + super(BusinessIdentity, self).__init__(**kwargs) + self.qualifier = qualifier + self.value = value diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/callback_url.py b/azure-mgmt-logic/azure/mgmt/logic/models/callback_url.py old mode 100755 new mode 100644 index ea64eda116d8..0fe1f3a30647 --- a/azure-mgmt-logic/azure/mgmt/logic/models/callback_url.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/callback_url.py @@ -23,5 +23,6 @@ class CallbackUrl(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, value=None): - self.value = value + def __init__(self, **kwargs): + super(CallbackUrl, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/callback_url_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/callback_url_py3.py new file mode 100644 index 000000000000..fd8271657bef --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/callback_url_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CallbackUrl(Model): + """The callback url. + + :param value: The URL value. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, **kwargs) -> None: + super(CallbackUrl, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/content_hash.py b/azure-mgmt-logic/azure/mgmt/logic/models/content_hash.py old mode 100755 new mode 100644 index ec6b433e371c..a67e06aafa7d --- a/azure-mgmt-logic/azure/mgmt/logic/models/content_hash.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/content_hash.py @@ -26,6 +26,7 @@ class ContentHash(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, algorithm=None, value=None): - self.algorithm = algorithm - self.value = value + def __init__(self, **kwargs): + super(ContentHash, self).__init__(**kwargs) + self.algorithm = kwargs.get('algorithm', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/content_hash_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/content_hash_py3.py new file mode 100644 index 000000000000..868bfe2ba5f2 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/content_hash_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContentHash(Model): + """The content hash. + + :param algorithm: The algorithm of the content hash. + :type algorithm: str + :param value: The value of the content hash. + :type value: str + """ + + _attribute_map = { + 'algorithm': {'key': 'algorithm', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, algorithm: str=None, value: str=None, **kwargs) -> None: + super(ContentHash, self).__init__(**kwargs) + self.algorithm = algorithm + self.value = value diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/content_link.py b/azure-mgmt-logic/azure/mgmt/logic/models/content_link.py old mode 100755 new mode 100644 index 0410c028144c..cbbdefd771bf --- a/azure-mgmt-logic/azure/mgmt/logic/models/content_link.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/content_link.py @@ -22,8 +22,7 @@ class ContentLink(Model): :param content_size: The content size. :type content_size: long :param content_hash: The content hash. - :type content_hash: :class:`ContentHash - ` + :type content_hash: ~azure.mgmt.logic.models.ContentHash :param metadata: The metadata. :type metadata: object """ @@ -36,9 +35,10 @@ class ContentLink(Model): 'metadata': {'key': 'metadata', 'type': 'object'}, } - def __init__(self, uri=None, content_version=None, content_size=None, content_hash=None, metadata=None): - self.uri = uri - self.content_version = content_version - self.content_size = content_size - self.content_hash = content_hash - self.metadata = metadata + def __init__(self, **kwargs): + super(ContentLink, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + self.content_version = kwargs.get('content_version', None) + self.content_size = kwargs.get('content_size', None) + self.content_hash = kwargs.get('content_hash', None) + self.metadata = kwargs.get('metadata', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/content_link_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/content_link_py3.py new file mode 100644 index 000000000000..1af59960aad2 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/content_link_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContentLink(Model): + """The content link. + + :param uri: The content link URI. + :type uri: str + :param content_version: The content version. + :type content_version: str + :param content_size: The content size. + :type content_size: long + :param content_hash: The content hash. + :type content_hash: ~azure.mgmt.logic.models.ContentHash + :param metadata: The metadata. + :type metadata: object + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + 'content_version': {'key': 'contentVersion', 'type': 'str'}, + 'content_size': {'key': 'contentSize', 'type': 'long'}, + 'content_hash': {'key': 'contentHash', 'type': 'ContentHash'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + } + + def __init__(self, *, uri: str=None, content_version: str=None, content_size: int=None, content_hash=None, metadata=None, **kwargs) -> None: + super(ContentLink, self).__init__(**kwargs) + self.uri = uri + self.content_version = content_version + self.content_size = content_size + self.content_hash = content_hash + self.metadata = metadata diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/correlation.py b/azure-mgmt-logic/azure/mgmt/logic/models/correlation.py old mode 100755 new mode 100644 index 0855fec8b196..6712f294b086 --- a/azure-mgmt-logic/azure/mgmt/logic/models/correlation.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/correlation.py @@ -23,5 +23,6 @@ class Correlation(Model): 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, } - def __init__(self, client_tracking_id=None): - self.client_tracking_id = client_tracking_id + def __init__(self, **kwargs): + super(Correlation, self).__init__(**kwargs) + self.client_tracking_id = kwargs.get('client_tracking_id', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/correlation_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/correlation_py3.py new file mode 100644 index 000000000000..8f4a03eef0f7 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/correlation_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Correlation(Model): + """The correlation property. + + :param client_tracking_id: The client tracking id. + :type client_tracking_id: str + """ + + _attribute_map = { + 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, + } + + def __init__(self, *, client_tracking_id: str=None, **kwargs) -> None: + super(Correlation, self).__init__(**kwargs) + self.client_tracking_id = client_tracking_id diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings.py old mode 100755 new mode 100644 index 82a0b98a0522..bf32720e1ab6 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings.py @@ -15,23 +15,25 @@ class EdifactAcknowledgementSettings(Model): """The Edifact agreement acknowledgement settings. - :param need_technical_acknowledgement: The value indicating whether - technical acknowledgement is needed. + All required parameters must be populated in order to send to Azure. + + :param need_technical_acknowledgement: Required. The value indicating + whether technical acknowledgement is needed. :type need_technical_acknowledgement: bool - :param batch_technical_acknowledgements: The value indicating whether to - batch the technical acknowledgements. + :param batch_technical_acknowledgements: Required. The value indicating + whether to batch the technical acknowledgements. :type batch_technical_acknowledgements: bool - :param need_functional_acknowledgement: The value indicating whether - functional acknowledgement is needed. + :param need_functional_acknowledgement: Required. The value indicating + whether functional acknowledgement is needed. :type need_functional_acknowledgement: bool - :param batch_functional_acknowledgements: The value indicating whether to - batch functional acknowledgements. + :param batch_functional_acknowledgements: Required. The value indicating + whether to batch functional acknowledgements. :type batch_functional_acknowledgements: bool - :param need_loop_for_valid_messages: The value indicating whether a loop - is needed for valid messages. + :param need_loop_for_valid_messages: Required. The value indicating + whether a loop is needed for valid messages. :type need_loop_for_valid_messages: bool - :param send_synchronous_acknowledgement: The value indicating whether to - send synchronous acknowledgement. + :param send_synchronous_acknowledgement: Required. The value indicating + whether to send synchronous acknowledgement. :type send_synchronous_acknowledgement: bool :param acknowledgement_control_number_prefix: The acknowledgement control number prefix. @@ -39,14 +41,14 @@ class EdifactAcknowledgementSettings(Model): :param acknowledgement_control_number_suffix: The acknowledgement control number suffix. :type acknowledgement_control_number_suffix: str - :param acknowledgement_control_number_lower_bound: The acknowledgement - control number lower bound. + :param acknowledgement_control_number_lower_bound: Required. The + acknowledgement control number lower bound. :type acknowledgement_control_number_lower_bound: int - :param acknowledgement_control_number_upper_bound: The acknowledgement - control number upper bound. + :param acknowledgement_control_number_upper_bound: Required. The + acknowledgement control number upper bound. :type acknowledgement_control_number_upper_bound: int - :param rollover_acknowledgement_control_number: The value indicating - whether to rollover acknowledgement control number. + :param rollover_acknowledgement_control_number: Required. The value + indicating whether to rollover acknowledgement control number. :type rollover_acknowledgement_control_number: bool """ @@ -76,15 +78,16 @@ class EdifactAcknowledgementSettings(Model): 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, } - def __init__(self, need_technical_acknowledgement, batch_technical_acknowledgements, need_functional_acknowledgement, batch_functional_acknowledgements, need_loop_for_valid_messages, send_synchronous_acknowledgement, acknowledgement_control_number_lower_bound, acknowledgement_control_number_upper_bound, rollover_acknowledgement_control_number, acknowledgement_control_number_prefix=None, acknowledgement_control_number_suffix=None): - self.need_technical_acknowledgement = need_technical_acknowledgement - self.batch_technical_acknowledgements = batch_technical_acknowledgements - self.need_functional_acknowledgement = need_functional_acknowledgement - self.batch_functional_acknowledgements = batch_functional_acknowledgements - self.need_loop_for_valid_messages = need_loop_for_valid_messages - self.send_synchronous_acknowledgement = send_synchronous_acknowledgement - self.acknowledgement_control_number_prefix = acknowledgement_control_number_prefix - self.acknowledgement_control_number_suffix = acknowledgement_control_number_suffix - self.acknowledgement_control_number_lower_bound = acknowledgement_control_number_lower_bound - self.acknowledgement_control_number_upper_bound = acknowledgement_control_number_upper_bound - self.rollover_acknowledgement_control_number = rollover_acknowledgement_control_number + def __init__(self, **kwargs): + super(EdifactAcknowledgementSettings, self).__init__(**kwargs) + self.need_technical_acknowledgement = kwargs.get('need_technical_acknowledgement', None) + self.batch_technical_acknowledgements = kwargs.get('batch_technical_acknowledgements', None) + self.need_functional_acknowledgement = kwargs.get('need_functional_acknowledgement', None) + self.batch_functional_acknowledgements = kwargs.get('batch_functional_acknowledgements', None) + self.need_loop_for_valid_messages = kwargs.get('need_loop_for_valid_messages', None) + self.send_synchronous_acknowledgement = kwargs.get('send_synchronous_acknowledgement', None) + self.acknowledgement_control_number_prefix = kwargs.get('acknowledgement_control_number_prefix', None) + self.acknowledgement_control_number_suffix = kwargs.get('acknowledgement_control_number_suffix', None) + self.acknowledgement_control_number_lower_bound = kwargs.get('acknowledgement_control_number_lower_bound', None) + self.acknowledgement_control_number_upper_bound = kwargs.get('acknowledgement_control_number_upper_bound', None) + self.rollover_acknowledgement_control_number = kwargs.get('rollover_acknowledgement_control_number', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings_py3.py new file mode 100644 index 000000000000..3242b1565b47 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings_py3.py @@ -0,0 +1,93 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EdifactAcknowledgementSettings(Model): + """The Edifact agreement acknowledgement settings. + + All required parameters must be populated in order to send to Azure. + + :param need_technical_acknowledgement: Required. The value indicating + whether technical acknowledgement is needed. + :type need_technical_acknowledgement: bool + :param batch_technical_acknowledgements: Required. The value indicating + whether to batch the technical acknowledgements. + :type batch_technical_acknowledgements: bool + :param need_functional_acknowledgement: Required. The value indicating + whether functional acknowledgement is needed. + :type need_functional_acknowledgement: bool + :param batch_functional_acknowledgements: Required. The value indicating + whether to batch functional acknowledgements. + :type batch_functional_acknowledgements: bool + :param need_loop_for_valid_messages: Required. The value indicating + whether a loop is needed for valid messages. + :type need_loop_for_valid_messages: bool + :param send_synchronous_acknowledgement: Required. The value indicating + whether to send synchronous acknowledgement. + :type send_synchronous_acknowledgement: bool + :param acknowledgement_control_number_prefix: The acknowledgement control + number prefix. + :type acknowledgement_control_number_prefix: str + :param acknowledgement_control_number_suffix: The acknowledgement control + number suffix. + :type acknowledgement_control_number_suffix: str + :param acknowledgement_control_number_lower_bound: Required. The + acknowledgement control number lower bound. + :type acknowledgement_control_number_lower_bound: int + :param acknowledgement_control_number_upper_bound: Required. The + acknowledgement control number upper bound. + :type acknowledgement_control_number_upper_bound: int + :param rollover_acknowledgement_control_number: Required. The value + indicating whether to rollover acknowledgement control number. + :type rollover_acknowledgement_control_number: bool + """ + + _validation = { + 'need_technical_acknowledgement': {'required': True}, + 'batch_technical_acknowledgements': {'required': True}, + 'need_functional_acknowledgement': {'required': True}, + 'batch_functional_acknowledgements': {'required': True}, + 'need_loop_for_valid_messages': {'required': True}, + 'send_synchronous_acknowledgement': {'required': True}, + 'acknowledgement_control_number_lower_bound': {'required': True}, + 'acknowledgement_control_number_upper_bound': {'required': True}, + 'rollover_acknowledgement_control_number': {'required': True}, + } + + _attribute_map = { + 'need_technical_acknowledgement': {'key': 'needTechnicalAcknowledgement', 'type': 'bool'}, + 'batch_technical_acknowledgements': {'key': 'batchTechnicalAcknowledgements', 'type': 'bool'}, + 'need_functional_acknowledgement': {'key': 'needFunctionalAcknowledgement', 'type': 'bool'}, + 'batch_functional_acknowledgements': {'key': 'batchFunctionalAcknowledgements', 'type': 'bool'}, + 'need_loop_for_valid_messages': {'key': 'needLoopForValidMessages', 'type': 'bool'}, + 'send_synchronous_acknowledgement': {'key': 'sendSynchronousAcknowledgement', 'type': 'bool'}, + 'acknowledgement_control_number_prefix': {'key': 'acknowledgementControlNumberPrefix', 'type': 'str'}, + 'acknowledgement_control_number_suffix': {'key': 'acknowledgementControlNumberSuffix', 'type': 'str'}, + 'acknowledgement_control_number_lower_bound': {'key': 'acknowledgementControlNumberLowerBound', 'type': 'int'}, + 'acknowledgement_control_number_upper_bound': {'key': 'acknowledgementControlNumberUpperBound', 'type': 'int'}, + 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, + } + + def __init__(self, *, need_technical_acknowledgement: bool, batch_technical_acknowledgements: bool, need_functional_acknowledgement: bool, batch_functional_acknowledgements: bool, need_loop_for_valid_messages: bool, send_synchronous_acknowledgement: bool, acknowledgement_control_number_lower_bound: int, acknowledgement_control_number_upper_bound: int, rollover_acknowledgement_control_number: bool, acknowledgement_control_number_prefix: str=None, acknowledgement_control_number_suffix: str=None, **kwargs) -> None: + super(EdifactAcknowledgementSettings, self).__init__(**kwargs) + self.need_technical_acknowledgement = need_technical_acknowledgement + self.batch_technical_acknowledgements = batch_technical_acknowledgements + self.need_functional_acknowledgement = need_functional_acknowledgement + self.batch_functional_acknowledgements = batch_functional_acknowledgements + self.need_loop_for_valid_messages = need_loop_for_valid_messages + self.send_synchronous_acknowledgement = send_synchronous_acknowledgement + self.acknowledgement_control_number_prefix = acknowledgement_control_number_prefix + self.acknowledgement_control_number_suffix = acknowledgement_control_number_suffix + self.acknowledgement_control_number_lower_bound = acknowledgement_control_number_lower_bound + self.acknowledgement_control_number_upper_bound = acknowledgement_control_number_upper_bound + self.rollover_acknowledgement_control_number = rollover_acknowledgement_control_number diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content.py old mode 100755 new mode 100644 index ebda85454d9c..e3c0bd495180 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content.py @@ -15,12 +15,12 @@ class EdifactAgreementContent(Model): """The Edifact agreement content. - :param receive_agreement: The EDIFACT one-way receive agreement. - :type receive_agreement: :class:`EdifactOneWayAgreement - ` - :param send_agreement: The EDIFACT one-way send agreement. - :type send_agreement: :class:`EdifactOneWayAgreement - ` + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The EDIFACT one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + :param send_agreement: Required. The EDIFACT one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement """ _validation = { @@ -33,6 +33,7 @@ class EdifactAgreementContent(Model): 'send_agreement': {'key': 'sendAgreement', 'type': 'EdifactOneWayAgreement'}, } - def __init__(self, receive_agreement, send_agreement): - self.receive_agreement = receive_agreement - self.send_agreement = send_agreement + def __init__(self, **kwargs): + super(EdifactAgreementContent, self).__init__(**kwargs) + self.receive_agreement = kwargs.get('receive_agreement', None) + self.send_agreement = kwargs.get('send_agreement', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content_py3.py new file mode 100644 index 000000000000..2a19f44a6fa3 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EdifactAgreementContent(Model): + """The Edifact agreement content. + + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The EDIFACT one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + :param send_agreement: Required. The EDIFACT one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + """ + + _validation = { + 'receive_agreement': {'required': True}, + 'send_agreement': {'required': True}, + } + + _attribute_map = { + 'receive_agreement': {'key': 'receiveAgreement', 'type': 'EdifactOneWayAgreement'}, + 'send_agreement': {'key': 'sendAgreement', 'type': 'EdifactOneWayAgreement'}, + } + + def __init__(self, *, receive_agreement, send_agreement, **kwargs) -> None: + super(EdifactAgreementContent, self).__init__(**kwargs) + self.receive_agreement = receive_agreement + self.send_agreement = send_agreement diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override.py old mode 100755 new mode 100644 index 88dee2d9f461..9cab599afb9a --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override.py @@ -15,29 +15,31 @@ class EdifactDelimiterOverride(Model): """The Edifact delimiter override settings. + All required parameters must be populated in order to send to Azure. + :param message_id: The message id. :type message_id: str :param message_version: The message version. :type message_version: str - :param message_release: The message releaseversion. + :param message_release: The message release. :type message_release: str - :param data_element_separator: The data element separator. + :param data_element_separator: Required. The data element separator. :type data_element_separator: int - :param component_separator: The component separator. + :param component_separator: Required. The component separator. :type component_separator: int - :param segment_terminator: The segment terminator. + :param segment_terminator: Required. The segment terminator. :type segment_terminator: int - :param repetition_separator: The repetition separator. + :param repetition_separator: Required. The repetition separator. :type repetition_separator: int - :param segment_terminator_suffix: The segment terminator suffix. Possible - values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - :type segment_terminator_suffix: str or :class:`SegmentTerminatorSuffix - ` - :param decimal_point_indicator: The decimal point indicator. Possible - values include: 'NotSpecified', 'Comma', 'Decimal' - :type decimal_point_indicator: str or :class:`EdifactDecimalIndicator - ` - :param release_indicator: The release indicator. + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :param decimal_point_indicator: Required. The decimal point indicator. + Possible values include: 'NotSpecified', 'Comma', 'Decimal' + :type decimal_point_indicator: str or + ~azure.mgmt.logic.models.EdifactDecimalIndicator + :param release_indicator: Required. The release indicator. :type release_indicator: int :param message_association_assigned_code: The message association assigned code. @@ -72,16 +74,17 @@ class EdifactDelimiterOverride(Model): 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, } - def __init__(self, data_element_separator, component_separator, segment_terminator, repetition_separator, segment_terminator_suffix, decimal_point_indicator, release_indicator, message_id=None, message_version=None, message_release=None, message_association_assigned_code=None, target_namespace=None): - self.message_id = message_id - self.message_version = message_version - self.message_release = message_release - self.data_element_separator = data_element_separator - self.component_separator = component_separator - self.segment_terminator = segment_terminator - self.repetition_separator = repetition_separator - self.segment_terminator_suffix = segment_terminator_suffix - self.decimal_point_indicator = decimal_point_indicator - self.release_indicator = release_indicator - self.message_association_assigned_code = message_association_assigned_code - self.target_namespace = target_namespace + def __init__(self, **kwargs): + super(EdifactDelimiterOverride, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.message_version = kwargs.get('message_version', None) + self.message_release = kwargs.get('message_release', None) + self.data_element_separator = kwargs.get('data_element_separator', None) + self.component_separator = kwargs.get('component_separator', None) + self.segment_terminator = kwargs.get('segment_terminator', None) + self.repetition_separator = kwargs.get('repetition_separator', None) + self.segment_terminator_suffix = kwargs.get('segment_terminator_suffix', None) + self.decimal_point_indicator = kwargs.get('decimal_point_indicator', None) + self.release_indicator = kwargs.get('release_indicator', None) + self.message_association_assigned_code = kwargs.get('message_association_assigned_code', None) + self.target_namespace = kwargs.get('target_namespace', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override_py3.py new file mode 100644 index 000000000000..3d35e5e000a6 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override_py3.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EdifactDelimiterOverride(Model): + """The Edifact delimiter override settings. + + All required parameters must be populated in order to send to Azure. + + :param message_id: The message id. + :type message_id: str + :param message_version: The message version. + :type message_version: str + :param message_release: The message release. + :type message_release: str + :param data_element_separator: Required. The data element separator. + :type data_element_separator: int + :param component_separator: Required. The component separator. + :type component_separator: int + :param segment_terminator: Required. The segment terminator. + :type segment_terminator: int + :param repetition_separator: Required. The repetition separator. + :type repetition_separator: int + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :param decimal_point_indicator: Required. The decimal point indicator. + Possible values include: 'NotSpecified', 'Comma', 'Decimal' + :type decimal_point_indicator: str or + ~azure.mgmt.logic.models.EdifactDecimalIndicator + :param release_indicator: Required. The release indicator. + :type release_indicator: int + :param message_association_assigned_code: The message association assigned + code. + :type message_association_assigned_code: str + :param target_namespace: The target namespace on which this delimiter + settings has to be applied. + :type target_namespace: str + """ + + _validation = { + 'data_element_separator': {'required': True}, + 'component_separator': {'required': True}, + 'segment_terminator': {'required': True}, + 'repetition_separator': {'required': True}, + 'segment_terminator_suffix': {'required': True}, + 'decimal_point_indicator': {'required': True}, + 'release_indicator': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'message_version': {'key': 'messageVersion', 'type': 'str'}, + 'message_release': {'key': 'messageRelease', 'type': 'str'}, + 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, + 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, + 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, + 'repetition_separator': {'key': 'repetitionSeparator', 'type': 'int'}, + 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, + 'decimal_point_indicator': {'key': 'decimalPointIndicator', 'type': 'EdifactDecimalIndicator'}, + 'release_indicator': {'key': 'releaseIndicator', 'type': 'int'}, + 'message_association_assigned_code': {'key': 'messageAssociationAssignedCode', 'type': 'str'}, + 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, + } + + def __init__(self, *, data_element_separator: int, component_separator: int, segment_terminator: int, repetition_separator: int, segment_terminator_suffix, decimal_point_indicator, release_indicator: int, message_id: str=None, message_version: str=None, message_release: str=None, message_association_assigned_code: str=None, target_namespace: str=None, **kwargs) -> None: + super(EdifactDelimiterOverride, self).__init__(**kwargs) + self.message_id = message_id + self.message_version = message_version + self.message_release = message_release + self.data_element_separator = data_element_separator + self.component_separator = component_separator + self.segment_terminator = segment_terminator + self.repetition_separator = repetition_separator + self.segment_terminator_suffix = segment_terminator_suffix + self.decimal_point_indicator = decimal_point_indicator + self.release_indicator = release_indicator + self.message_association_assigned_code = message_association_assigned_code + self.target_namespace = target_namespace diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override.py old mode 100755 new mode 100644 index 2d71b902f285..2b82b5560ed7 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override.py @@ -13,7 +13,7 @@ class EdifactEnvelopeOverride(Model): - """The Edifact enevlope override settings. + """The Edifact envelope override settings. :param message_id: The message id on which this envelope settings has to be applied. @@ -70,19 +70,20 @@ class EdifactEnvelopeOverride(Model): 'application_password': {'key': 'applicationPassword', 'type': 'str'}, } - def __init__(self, message_id=None, message_version=None, message_release=None, message_association_assigned_code=None, target_namespace=None, functional_group_id=None, sender_application_qualifier=None, sender_application_id=None, receiver_application_qualifier=None, receiver_application_id=None, controlling_agency_code=None, group_header_message_version=None, group_header_message_release=None, association_assigned_code=None, application_password=None): - self.message_id = message_id - self.message_version = message_version - self.message_release = message_release - self.message_association_assigned_code = message_association_assigned_code - self.target_namespace = target_namespace - self.functional_group_id = functional_group_id - self.sender_application_qualifier = sender_application_qualifier - self.sender_application_id = sender_application_id - self.receiver_application_qualifier = receiver_application_qualifier - self.receiver_application_id = receiver_application_id - self.controlling_agency_code = controlling_agency_code - self.group_header_message_version = group_header_message_version - self.group_header_message_release = group_header_message_release - self.association_assigned_code = association_assigned_code - self.application_password = application_password + def __init__(self, **kwargs): + super(EdifactEnvelopeOverride, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.message_version = kwargs.get('message_version', None) + self.message_release = kwargs.get('message_release', None) + self.message_association_assigned_code = kwargs.get('message_association_assigned_code', None) + self.target_namespace = kwargs.get('target_namespace', None) + self.functional_group_id = kwargs.get('functional_group_id', None) + self.sender_application_qualifier = kwargs.get('sender_application_qualifier', None) + self.sender_application_id = kwargs.get('sender_application_id', None) + self.receiver_application_qualifier = kwargs.get('receiver_application_qualifier', None) + self.receiver_application_id = kwargs.get('receiver_application_id', None) + self.controlling_agency_code = kwargs.get('controlling_agency_code', None) + self.group_header_message_version = kwargs.get('group_header_message_version', None) + self.group_header_message_release = kwargs.get('group_header_message_release', None) + self.association_assigned_code = kwargs.get('association_assigned_code', None) + self.application_password = kwargs.get('application_password', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override_py3.py new file mode 100644 index 000000000000..77fed1d1e51e --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override_py3.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EdifactEnvelopeOverride(Model): + """The Edifact envelope override settings. + + :param message_id: The message id on which this envelope settings has to + be applied. + :type message_id: str + :param message_version: The message version on which this envelope + settings has to be applied. + :type message_version: str + :param message_release: The message release version on which this envelope + settings has to be applied. + :type message_release: str + :param message_association_assigned_code: The message association assigned + code. + :type message_association_assigned_code: str + :param target_namespace: The target namespace on which this envelope + settings has to be applied. + :type target_namespace: str + :param functional_group_id: The functional group id. + :type functional_group_id: str + :param sender_application_qualifier: The sender application qualifier. + :type sender_application_qualifier: str + :param sender_application_id: The sender application id. + :type sender_application_id: str + :param receiver_application_qualifier: The receiver application qualifier. + :type receiver_application_qualifier: str + :param receiver_application_id: The receiver application id. + :type receiver_application_id: str + :param controlling_agency_code: The controlling agency code. + :type controlling_agency_code: str + :param group_header_message_version: The group header message version. + :type group_header_message_version: str + :param group_header_message_release: The group header message release. + :type group_header_message_release: str + :param association_assigned_code: The association assigned code. + :type association_assigned_code: str + :param application_password: The application password. + :type application_password: str + """ + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'message_version': {'key': 'messageVersion', 'type': 'str'}, + 'message_release': {'key': 'messageRelease', 'type': 'str'}, + 'message_association_assigned_code': {'key': 'messageAssociationAssignedCode', 'type': 'str'}, + 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, + 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, + 'sender_application_qualifier': {'key': 'senderApplicationQualifier', 'type': 'str'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'receiver_application_qualifier': {'key': 'receiverApplicationQualifier', 'type': 'str'}, + 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, + 'controlling_agency_code': {'key': 'controllingAgencyCode', 'type': 'str'}, + 'group_header_message_version': {'key': 'groupHeaderMessageVersion', 'type': 'str'}, + 'group_header_message_release': {'key': 'groupHeaderMessageRelease', 'type': 'str'}, + 'association_assigned_code': {'key': 'associationAssignedCode', 'type': 'str'}, + 'application_password': {'key': 'applicationPassword', 'type': 'str'}, + } + + def __init__(self, *, message_id: str=None, message_version: str=None, message_release: str=None, message_association_assigned_code: str=None, target_namespace: str=None, functional_group_id: str=None, sender_application_qualifier: str=None, sender_application_id: str=None, receiver_application_qualifier: str=None, receiver_application_id: str=None, controlling_agency_code: str=None, group_header_message_version: str=None, group_header_message_release: str=None, association_assigned_code: str=None, application_password: str=None, **kwargs) -> None: + super(EdifactEnvelopeOverride, self).__init__(**kwargs) + self.message_id = message_id + self.message_version = message_version + self.message_release = message_release + self.message_association_assigned_code = message_association_assigned_code + self.target_namespace = target_namespace + self.functional_group_id = functional_group_id + self.sender_application_qualifier = sender_application_qualifier + self.sender_application_id = sender_application_id + self.receiver_application_qualifier = receiver_application_qualifier + self.receiver_application_id = receiver_application_id + self.controlling_agency_code = controlling_agency_code + self.group_header_message_version = group_header_message_version + self.group_header_message_release = group_header_message_release + self.association_assigned_code = association_assigned_code + self.application_password = application_password diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings.py old mode 100755 new mode 100644 index 57ce39e8804c..7ea218a53f18 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings.py @@ -15,19 +15,21 @@ class EdifactEnvelopeSettings(Model): """The Edifact agreement envelope settings. + All required parameters must be populated in order to send to Azure. + :param group_association_assigned_code: The group association assigned code. :type group_association_assigned_code: str :param communication_agreement_id: The communication agreement id. :type communication_agreement_id: str - :param apply_delimiter_string_advice: The value indicating whether to - apply delimiter string advice. + :param apply_delimiter_string_advice: Required. The value indicating + whether to apply delimiter string advice. :type apply_delimiter_string_advice: bool - :param create_grouping_segments: The value indicating whether to create - grouping segments. + :param create_grouping_segments: Required. The value indicating whether to + create grouping segments. :type create_grouping_segments: bool - :param enable_default_group_headers: The value indicating whether to - enable default group headers. + :param enable_default_group_headers: Required. The value indicating + whether to enable default group headers. :type enable_default_group_headers: bool :param recipient_reference_password_value: The recipient reference password value. @@ -39,14 +41,14 @@ class EdifactEnvelopeSettings(Model): :type application_reference_id: str :param processing_priority_code: The processing priority code. :type processing_priority_code: str - :param interchange_control_number_lower_bound: The interchange control - number lower bound. + :param interchange_control_number_lower_bound: Required. The interchange + control number lower bound. :type interchange_control_number_lower_bound: long - :param interchange_control_number_upper_bound: The interchange control - number upper bound. + :param interchange_control_number_upper_bound: Required. The interchange + control number upper bound. :type interchange_control_number_upper_bound: long - :param rollover_interchange_control_number: The value indicating whether - to rollover interchange control number. + :param rollover_interchange_control_number: Required. The value indicating + whether to rollover interchange control number. :type rollover_interchange_control_number: bool :param interchange_control_number_prefix: The interchange control number prefix. @@ -67,14 +69,14 @@ class EdifactEnvelopeSettings(Model): :type group_message_version: str :param group_message_release: The group message release. :type group_message_release: str - :param group_control_number_lower_bound: The group control number lower - bound. + :param group_control_number_lower_bound: Required. The group control + number lower bound. :type group_control_number_lower_bound: long - :param group_control_number_upper_bound: The group control number upper - bound. + :param group_control_number_upper_bound: Required. The group control + number upper bound. :type group_control_number_upper_bound: long - :param rollover_group_control_number: The value indicating whether to - rollover group control number. + :param rollover_group_control_number: Required. The value indicating + whether to rollover group control number. :type rollover_group_control_number: bool :param group_control_number_prefix: The group control number prefix. :type group_control_number_prefix: str @@ -92,8 +94,9 @@ class EdifactEnvelopeSettings(Model): :type group_application_sender_id: str :param group_application_password: The group application password. :type group_application_password: str - :param overwrite_existing_transaction_set_control_number: The value - indicating whether to overwrite existing transaction set control number. + :param overwrite_existing_transaction_set_control_number: Required. The + value indicating whether to overwrite existing transaction set control + number. :type overwrite_existing_transaction_set_control_number: bool :param transaction_set_control_number_prefix: The transaction set control number prefix. @@ -101,17 +104,17 @@ class EdifactEnvelopeSettings(Model): :param transaction_set_control_number_suffix: The transaction set control number suffix. :type transaction_set_control_number_suffix: str - :param transaction_set_control_number_lower_bound: The transaction set - control number lower bound. + :param transaction_set_control_number_lower_bound: Required. The + transaction set control number lower bound. :type transaction_set_control_number_lower_bound: long - :param transaction_set_control_number_upper_bound: The transaction set - control number upper bound. + :param transaction_set_control_number_upper_bound: Required. The + transaction set control number upper bound. :type transaction_set_control_number_upper_bound: long - :param rollover_transaction_set_control_number: The value indicating - whether to rollover transaction set control number. + :param rollover_transaction_set_control_number: Required. The value + indicating whether to rollover transaction set control number. :type rollover_transaction_set_control_number: bool - :param is_test_interchange: The value indicating whether the message is a - test interchange. + :param is_test_interchange: Required. The value indicating whether the + message is a test interchange. :type is_test_interchange: bool :param sender_internal_identification: The sender internal identification. :type sender_internal_identification: str @@ -187,45 +190,46 @@ class EdifactEnvelopeSettings(Model): 'receiver_internal_sub_identification': {'key': 'receiverInternalSubIdentification', 'type': 'str'}, } - def __init__(self, apply_delimiter_string_advice, create_grouping_segments, enable_default_group_headers, interchange_control_number_lower_bound, interchange_control_number_upper_bound, rollover_interchange_control_number, group_control_number_lower_bound, group_control_number_upper_bound, rollover_group_control_number, overwrite_existing_transaction_set_control_number, transaction_set_control_number_lower_bound, transaction_set_control_number_upper_bound, rollover_transaction_set_control_number, is_test_interchange, group_association_assigned_code=None, communication_agreement_id=None, recipient_reference_password_value=None, recipient_reference_password_qualifier=None, application_reference_id=None, processing_priority_code=None, interchange_control_number_prefix=None, interchange_control_number_suffix=None, sender_reverse_routing_address=None, receiver_reverse_routing_address=None, functional_group_id=None, group_controlling_agency_code=None, group_message_version=None, group_message_release=None, group_control_number_prefix=None, group_control_number_suffix=None, group_application_receiver_qualifier=None, group_application_receiver_id=None, group_application_sender_qualifier=None, group_application_sender_id=None, group_application_password=None, transaction_set_control_number_prefix=None, transaction_set_control_number_suffix=None, sender_internal_identification=None, sender_internal_sub_identification=None, receiver_internal_identification=None, receiver_internal_sub_identification=None): - self.group_association_assigned_code = group_association_assigned_code - self.communication_agreement_id = communication_agreement_id - self.apply_delimiter_string_advice = apply_delimiter_string_advice - self.create_grouping_segments = create_grouping_segments - self.enable_default_group_headers = enable_default_group_headers - self.recipient_reference_password_value = recipient_reference_password_value - self.recipient_reference_password_qualifier = recipient_reference_password_qualifier - self.application_reference_id = application_reference_id - self.processing_priority_code = processing_priority_code - self.interchange_control_number_lower_bound = interchange_control_number_lower_bound - self.interchange_control_number_upper_bound = interchange_control_number_upper_bound - self.rollover_interchange_control_number = rollover_interchange_control_number - self.interchange_control_number_prefix = interchange_control_number_prefix - self.interchange_control_number_suffix = interchange_control_number_suffix - self.sender_reverse_routing_address = sender_reverse_routing_address - self.receiver_reverse_routing_address = receiver_reverse_routing_address - self.functional_group_id = functional_group_id - self.group_controlling_agency_code = group_controlling_agency_code - self.group_message_version = group_message_version - self.group_message_release = group_message_release - self.group_control_number_lower_bound = group_control_number_lower_bound - self.group_control_number_upper_bound = group_control_number_upper_bound - self.rollover_group_control_number = rollover_group_control_number - self.group_control_number_prefix = group_control_number_prefix - self.group_control_number_suffix = group_control_number_suffix - self.group_application_receiver_qualifier = group_application_receiver_qualifier - self.group_application_receiver_id = group_application_receiver_id - self.group_application_sender_qualifier = group_application_sender_qualifier - self.group_application_sender_id = group_application_sender_id - self.group_application_password = group_application_password - self.overwrite_existing_transaction_set_control_number = overwrite_existing_transaction_set_control_number - self.transaction_set_control_number_prefix = transaction_set_control_number_prefix - self.transaction_set_control_number_suffix = transaction_set_control_number_suffix - self.transaction_set_control_number_lower_bound = transaction_set_control_number_lower_bound - self.transaction_set_control_number_upper_bound = transaction_set_control_number_upper_bound - self.rollover_transaction_set_control_number = rollover_transaction_set_control_number - self.is_test_interchange = is_test_interchange - self.sender_internal_identification = sender_internal_identification - self.sender_internal_sub_identification = sender_internal_sub_identification - self.receiver_internal_identification = receiver_internal_identification - self.receiver_internal_sub_identification = receiver_internal_sub_identification + def __init__(self, **kwargs): + super(EdifactEnvelopeSettings, self).__init__(**kwargs) + self.group_association_assigned_code = kwargs.get('group_association_assigned_code', None) + self.communication_agreement_id = kwargs.get('communication_agreement_id', None) + self.apply_delimiter_string_advice = kwargs.get('apply_delimiter_string_advice', None) + self.create_grouping_segments = kwargs.get('create_grouping_segments', None) + self.enable_default_group_headers = kwargs.get('enable_default_group_headers', None) + self.recipient_reference_password_value = kwargs.get('recipient_reference_password_value', None) + self.recipient_reference_password_qualifier = kwargs.get('recipient_reference_password_qualifier', None) + self.application_reference_id = kwargs.get('application_reference_id', None) + self.processing_priority_code = kwargs.get('processing_priority_code', None) + self.interchange_control_number_lower_bound = kwargs.get('interchange_control_number_lower_bound', None) + self.interchange_control_number_upper_bound = kwargs.get('interchange_control_number_upper_bound', None) + self.rollover_interchange_control_number = kwargs.get('rollover_interchange_control_number', None) + self.interchange_control_number_prefix = kwargs.get('interchange_control_number_prefix', None) + self.interchange_control_number_suffix = kwargs.get('interchange_control_number_suffix', None) + self.sender_reverse_routing_address = kwargs.get('sender_reverse_routing_address', None) + self.receiver_reverse_routing_address = kwargs.get('receiver_reverse_routing_address', None) + self.functional_group_id = kwargs.get('functional_group_id', None) + self.group_controlling_agency_code = kwargs.get('group_controlling_agency_code', None) + self.group_message_version = kwargs.get('group_message_version', None) + self.group_message_release = kwargs.get('group_message_release', None) + self.group_control_number_lower_bound = kwargs.get('group_control_number_lower_bound', None) + self.group_control_number_upper_bound = kwargs.get('group_control_number_upper_bound', None) + self.rollover_group_control_number = kwargs.get('rollover_group_control_number', None) + self.group_control_number_prefix = kwargs.get('group_control_number_prefix', None) + self.group_control_number_suffix = kwargs.get('group_control_number_suffix', None) + self.group_application_receiver_qualifier = kwargs.get('group_application_receiver_qualifier', None) + self.group_application_receiver_id = kwargs.get('group_application_receiver_id', None) + self.group_application_sender_qualifier = kwargs.get('group_application_sender_qualifier', None) + self.group_application_sender_id = kwargs.get('group_application_sender_id', None) + self.group_application_password = kwargs.get('group_application_password', None) + self.overwrite_existing_transaction_set_control_number = kwargs.get('overwrite_existing_transaction_set_control_number', None) + self.transaction_set_control_number_prefix = kwargs.get('transaction_set_control_number_prefix', None) + self.transaction_set_control_number_suffix = kwargs.get('transaction_set_control_number_suffix', None) + self.transaction_set_control_number_lower_bound = kwargs.get('transaction_set_control_number_lower_bound', None) + self.transaction_set_control_number_upper_bound = kwargs.get('transaction_set_control_number_upper_bound', None) + self.rollover_transaction_set_control_number = kwargs.get('rollover_transaction_set_control_number', None) + self.is_test_interchange = kwargs.get('is_test_interchange', None) + self.sender_internal_identification = kwargs.get('sender_internal_identification', None) + self.sender_internal_sub_identification = kwargs.get('sender_internal_sub_identification', None) + self.receiver_internal_identification = kwargs.get('receiver_internal_identification', None) + self.receiver_internal_sub_identification = kwargs.get('receiver_internal_sub_identification', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings_py3.py new file mode 100644 index 000000000000..9c771ca5150f --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings_py3.py @@ -0,0 +1,235 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EdifactEnvelopeSettings(Model): + """The Edifact agreement envelope settings. + + All required parameters must be populated in order to send to Azure. + + :param group_association_assigned_code: The group association assigned + code. + :type group_association_assigned_code: str + :param communication_agreement_id: The communication agreement id. + :type communication_agreement_id: str + :param apply_delimiter_string_advice: Required. The value indicating + whether to apply delimiter string advice. + :type apply_delimiter_string_advice: bool + :param create_grouping_segments: Required. The value indicating whether to + create grouping segments. + :type create_grouping_segments: bool + :param enable_default_group_headers: Required. The value indicating + whether to enable default group headers. + :type enable_default_group_headers: bool + :param recipient_reference_password_value: The recipient reference + password value. + :type recipient_reference_password_value: str + :param recipient_reference_password_qualifier: The recipient reference + password qualifier. + :type recipient_reference_password_qualifier: str + :param application_reference_id: The application reference id. + :type application_reference_id: str + :param processing_priority_code: The processing priority code. + :type processing_priority_code: str + :param interchange_control_number_lower_bound: Required. The interchange + control number lower bound. + :type interchange_control_number_lower_bound: long + :param interchange_control_number_upper_bound: Required. The interchange + control number upper bound. + :type interchange_control_number_upper_bound: long + :param rollover_interchange_control_number: Required. The value indicating + whether to rollover interchange control number. + :type rollover_interchange_control_number: bool + :param interchange_control_number_prefix: The interchange control number + prefix. + :type interchange_control_number_prefix: str + :param interchange_control_number_suffix: The interchange control number + suffix. + :type interchange_control_number_suffix: str + :param sender_reverse_routing_address: The sender reverse routing address. + :type sender_reverse_routing_address: str + :param receiver_reverse_routing_address: The receiver reverse routing + address. + :type receiver_reverse_routing_address: str + :param functional_group_id: The functional group id. + :type functional_group_id: str + :param group_controlling_agency_code: The group controlling agency code. + :type group_controlling_agency_code: str + :param group_message_version: The group message version. + :type group_message_version: str + :param group_message_release: The group message release. + :type group_message_release: str + :param group_control_number_lower_bound: Required. The group control + number lower bound. + :type group_control_number_lower_bound: long + :param group_control_number_upper_bound: Required. The group control + number upper bound. + :type group_control_number_upper_bound: long + :param rollover_group_control_number: Required. The value indicating + whether to rollover group control number. + :type rollover_group_control_number: bool + :param group_control_number_prefix: The group control number prefix. + :type group_control_number_prefix: str + :param group_control_number_suffix: The group control number suffix. + :type group_control_number_suffix: str + :param group_application_receiver_qualifier: The group application + receiver qualifier. + :type group_application_receiver_qualifier: str + :param group_application_receiver_id: The group application receiver id. + :type group_application_receiver_id: str + :param group_application_sender_qualifier: The group application sender + qualifier. + :type group_application_sender_qualifier: str + :param group_application_sender_id: The group application sender id. + :type group_application_sender_id: str + :param group_application_password: The group application password. + :type group_application_password: str + :param overwrite_existing_transaction_set_control_number: Required. The + value indicating whether to overwrite existing transaction set control + number. + :type overwrite_existing_transaction_set_control_number: bool + :param transaction_set_control_number_prefix: The transaction set control + number prefix. + :type transaction_set_control_number_prefix: str + :param transaction_set_control_number_suffix: The transaction set control + number suffix. + :type transaction_set_control_number_suffix: str + :param transaction_set_control_number_lower_bound: Required. The + transaction set control number lower bound. + :type transaction_set_control_number_lower_bound: long + :param transaction_set_control_number_upper_bound: Required. The + transaction set control number upper bound. + :type transaction_set_control_number_upper_bound: long + :param rollover_transaction_set_control_number: Required. The value + indicating whether to rollover transaction set control number. + :type rollover_transaction_set_control_number: bool + :param is_test_interchange: Required. The value indicating whether the + message is a test interchange. + :type is_test_interchange: bool + :param sender_internal_identification: The sender internal identification. + :type sender_internal_identification: str + :param sender_internal_sub_identification: The sender internal sub + identification. + :type sender_internal_sub_identification: str + :param receiver_internal_identification: The receiver internal + identification. + :type receiver_internal_identification: str + :param receiver_internal_sub_identification: The receiver internal sub + identification. + :type receiver_internal_sub_identification: str + """ + + _validation = { + 'apply_delimiter_string_advice': {'required': True}, + 'create_grouping_segments': {'required': True}, + 'enable_default_group_headers': {'required': True}, + 'interchange_control_number_lower_bound': {'required': True}, + 'interchange_control_number_upper_bound': {'required': True}, + 'rollover_interchange_control_number': {'required': True}, + 'group_control_number_lower_bound': {'required': True}, + 'group_control_number_upper_bound': {'required': True}, + 'rollover_group_control_number': {'required': True}, + 'overwrite_existing_transaction_set_control_number': {'required': True}, + 'transaction_set_control_number_lower_bound': {'required': True}, + 'transaction_set_control_number_upper_bound': {'required': True}, + 'rollover_transaction_set_control_number': {'required': True}, + 'is_test_interchange': {'required': True}, + } + + _attribute_map = { + 'group_association_assigned_code': {'key': 'groupAssociationAssignedCode', 'type': 'str'}, + 'communication_agreement_id': {'key': 'communicationAgreementId', 'type': 'str'}, + 'apply_delimiter_string_advice': {'key': 'applyDelimiterStringAdvice', 'type': 'bool'}, + 'create_grouping_segments': {'key': 'createGroupingSegments', 'type': 'bool'}, + 'enable_default_group_headers': {'key': 'enableDefaultGroupHeaders', 'type': 'bool'}, + 'recipient_reference_password_value': {'key': 'recipientReferencePasswordValue', 'type': 'str'}, + 'recipient_reference_password_qualifier': {'key': 'recipientReferencePasswordQualifier', 'type': 'str'}, + 'application_reference_id': {'key': 'applicationReferenceId', 'type': 'str'}, + 'processing_priority_code': {'key': 'processingPriorityCode', 'type': 'str'}, + 'interchange_control_number_lower_bound': {'key': 'interchangeControlNumberLowerBound', 'type': 'long'}, + 'interchange_control_number_upper_bound': {'key': 'interchangeControlNumberUpperBound', 'type': 'long'}, + 'rollover_interchange_control_number': {'key': 'rolloverInterchangeControlNumber', 'type': 'bool'}, + 'interchange_control_number_prefix': {'key': 'interchangeControlNumberPrefix', 'type': 'str'}, + 'interchange_control_number_suffix': {'key': 'interchangeControlNumberSuffix', 'type': 'str'}, + 'sender_reverse_routing_address': {'key': 'senderReverseRoutingAddress', 'type': 'str'}, + 'receiver_reverse_routing_address': {'key': 'receiverReverseRoutingAddress', 'type': 'str'}, + 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, + 'group_controlling_agency_code': {'key': 'groupControllingAgencyCode', 'type': 'str'}, + 'group_message_version': {'key': 'groupMessageVersion', 'type': 'str'}, + 'group_message_release': {'key': 'groupMessageRelease', 'type': 'str'}, + 'group_control_number_lower_bound': {'key': 'groupControlNumberLowerBound', 'type': 'long'}, + 'group_control_number_upper_bound': {'key': 'groupControlNumberUpperBound', 'type': 'long'}, + 'rollover_group_control_number': {'key': 'rolloverGroupControlNumber', 'type': 'bool'}, + 'group_control_number_prefix': {'key': 'groupControlNumberPrefix', 'type': 'str'}, + 'group_control_number_suffix': {'key': 'groupControlNumberSuffix', 'type': 'str'}, + 'group_application_receiver_qualifier': {'key': 'groupApplicationReceiverQualifier', 'type': 'str'}, + 'group_application_receiver_id': {'key': 'groupApplicationReceiverId', 'type': 'str'}, + 'group_application_sender_qualifier': {'key': 'groupApplicationSenderQualifier', 'type': 'str'}, + 'group_application_sender_id': {'key': 'groupApplicationSenderId', 'type': 'str'}, + 'group_application_password': {'key': 'groupApplicationPassword', 'type': 'str'}, + 'overwrite_existing_transaction_set_control_number': {'key': 'overwriteExistingTransactionSetControlNumber', 'type': 'bool'}, + 'transaction_set_control_number_prefix': {'key': 'transactionSetControlNumberPrefix', 'type': 'str'}, + 'transaction_set_control_number_suffix': {'key': 'transactionSetControlNumberSuffix', 'type': 'str'}, + 'transaction_set_control_number_lower_bound': {'key': 'transactionSetControlNumberLowerBound', 'type': 'long'}, + 'transaction_set_control_number_upper_bound': {'key': 'transactionSetControlNumberUpperBound', 'type': 'long'}, + 'rollover_transaction_set_control_number': {'key': 'rolloverTransactionSetControlNumber', 'type': 'bool'}, + 'is_test_interchange': {'key': 'isTestInterchange', 'type': 'bool'}, + 'sender_internal_identification': {'key': 'senderInternalIdentification', 'type': 'str'}, + 'sender_internal_sub_identification': {'key': 'senderInternalSubIdentification', 'type': 'str'}, + 'receiver_internal_identification': {'key': 'receiverInternalIdentification', 'type': 'str'}, + 'receiver_internal_sub_identification': {'key': 'receiverInternalSubIdentification', 'type': 'str'}, + } + + def __init__(self, *, apply_delimiter_string_advice: bool, create_grouping_segments: bool, enable_default_group_headers: bool, interchange_control_number_lower_bound: int, interchange_control_number_upper_bound: int, rollover_interchange_control_number: bool, group_control_number_lower_bound: int, group_control_number_upper_bound: int, rollover_group_control_number: bool, overwrite_existing_transaction_set_control_number: bool, transaction_set_control_number_lower_bound: int, transaction_set_control_number_upper_bound: int, rollover_transaction_set_control_number: bool, is_test_interchange: bool, group_association_assigned_code: str=None, communication_agreement_id: str=None, recipient_reference_password_value: str=None, recipient_reference_password_qualifier: str=None, application_reference_id: str=None, processing_priority_code: str=None, interchange_control_number_prefix: str=None, interchange_control_number_suffix: str=None, sender_reverse_routing_address: str=None, receiver_reverse_routing_address: str=None, functional_group_id: str=None, group_controlling_agency_code: str=None, group_message_version: str=None, group_message_release: str=None, group_control_number_prefix: str=None, group_control_number_suffix: str=None, group_application_receiver_qualifier: str=None, group_application_receiver_id: str=None, group_application_sender_qualifier: str=None, group_application_sender_id: str=None, group_application_password: str=None, transaction_set_control_number_prefix: str=None, transaction_set_control_number_suffix: str=None, sender_internal_identification: str=None, sender_internal_sub_identification: str=None, receiver_internal_identification: str=None, receiver_internal_sub_identification: str=None, **kwargs) -> None: + super(EdifactEnvelopeSettings, self).__init__(**kwargs) + self.group_association_assigned_code = group_association_assigned_code + self.communication_agreement_id = communication_agreement_id + self.apply_delimiter_string_advice = apply_delimiter_string_advice + self.create_grouping_segments = create_grouping_segments + self.enable_default_group_headers = enable_default_group_headers + self.recipient_reference_password_value = recipient_reference_password_value + self.recipient_reference_password_qualifier = recipient_reference_password_qualifier + self.application_reference_id = application_reference_id + self.processing_priority_code = processing_priority_code + self.interchange_control_number_lower_bound = interchange_control_number_lower_bound + self.interchange_control_number_upper_bound = interchange_control_number_upper_bound + self.rollover_interchange_control_number = rollover_interchange_control_number + self.interchange_control_number_prefix = interchange_control_number_prefix + self.interchange_control_number_suffix = interchange_control_number_suffix + self.sender_reverse_routing_address = sender_reverse_routing_address + self.receiver_reverse_routing_address = receiver_reverse_routing_address + self.functional_group_id = functional_group_id + self.group_controlling_agency_code = group_controlling_agency_code + self.group_message_version = group_message_version + self.group_message_release = group_message_release + self.group_control_number_lower_bound = group_control_number_lower_bound + self.group_control_number_upper_bound = group_control_number_upper_bound + self.rollover_group_control_number = rollover_group_control_number + self.group_control_number_prefix = group_control_number_prefix + self.group_control_number_suffix = group_control_number_suffix + self.group_application_receiver_qualifier = group_application_receiver_qualifier + self.group_application_receiver_id = group_application_receiver_id + self.group_application_sender_qualifier = group_application_sender_qualifier + self.group_application_sender_id = group_application_sender_id + self.group_application_password = group_application_password + self.overwrite_existing_transaction_set_control_number = overwrite_existing_transaction_set_control_number + self.transaction_set_control_number_prefix = transaction_set_control_number_prefix + self.transaction_set_control_number_suffix = transaction_set_control_number_suffix + self.transaction_set_control_number_lower_bound = transaction_set_control_number_lower_bound + self.transaction_set_control_number_upper_bound = transaction_set_control_number_upper_bound + self.rollover_transaction_set_control_number = rollover_transaction_set_control_number + self.is_test_interchange = is_test_interchange + self.sender_internal_identification = sender_internal_identification + self.sender_internal_sub_identification = sender_internal_sub_identification + self.receiver_internal_identification = receiver_internal_identification + self.receiver_internal_sub_identification = receiver_internal_sub_identification diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings.py old mode 100755 new mode 100644 index 59bfcf4c3c91..f3e4c22b1e45 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings.py @@ -15,37 +15,40 @@ class EdifactFramingSettings(Model): """The Edifact agreement framing settings. + All required parameters must be populated in order to send to Azure. + :param service_code_list_directory_version: The service code list directory version. :type service_code_list_directory_version: str :param character_encoding: The character encoding. :type character_encoding: str - :param protocol_version: The protocol version. + :param protocol_version: Required. The protocol version. :type protocol_version: int - :param data_element_separator: The data element separator. + :param data_element_separator: Required. The data element separator. :type data_element_separator: int - :param component_separator: The component separator. + :param component_separator: Required. The component separator. :type component_separator: int - :param segment_terminator: The segment terminator. + :param segment_terminator: Required. The segment terminator. :type segment_terminator: int - :param release_indicator: The release indicator. + :param release_indicator: Required. The release indicator. :type release_indicator: int - :param repetition_separator: The repetition separator. + :param repetition_separator: Required. The repetition separator. :type repetition_separator: int - :param character_set: The EDIFACT frame setting characterSet. Possible - values include: 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', 'UNOE', - 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', 'KECA' - :type character_set: str or :class:`EdifactCharacterSet - ` - :param decimal_point_indicator: The EDIFACT frame setting decimal - indicator. Possible values include: 'NotSpecified', 'Comma', 'Decimal' - :type decimal_point_indicator: str or :class:`EdifactDecimalIndicator - ` - :param segment_terminator_suffix: The EDIFACT frame setting segment - terminator suffix. Possible values include: 'NotSpecified', 'None', 'CR', - 'LF', 'CRLF' - :type segment_terminator_suffix: str or :class:`SegmentTerminatorSuffix - ` + :param character_set: Required. The EDIFACT frame setting characterSet. + Possible values include: 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', + 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', + 'KECA' + :type character_set: str or ~azure.mgmt.logic.models.EdifactCharacterSet + :param decimal_point_indicator: Required. The EDIFACT frame setting + decimal indicator. Possible values include: 'NotSpecified', 'Comma', + 'Decimal' + :type decimal_point_indicator: str or + ~azure.mgmt.logic.models.EdifactDecimalIndicator + :param segment_terminator_suffix: Required. The EDIFACT frame setting + segment terminator suffix. Possible values include: 'NotSpecified', + 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix """ _validation = { @@ -74,15 +77,16 @@ class EdifactFramingSettings(Model): 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, } - def __init__(self, protocol_version, data_element_separator, component_separator, segment_terminator, release_indicator, repetition_separator, character_set, decimal_point_indicator, segment_terminator_suffix, service_code_list_directory_version=None, character_encoding=None): - self.service_code_list_directory_version = service_code_list_directory_version - self.character_encoding = character_encoding - self.protocol_version = protocol_version - self.data_element_separator = data_element_separator - self.component_separator = component_separator - self.segment_terminator = segment_terminator - self.release_indicator = release_indicator - self.repetition_separator = repetition_separator - self.character_set = character_set - self.decimal_point_indicator = decimal_point_indicator - self.segment_terminator_suffix = segment_terminator_suffix + def __init__(self, **kwargs): + super(EdifactFramingSettings, self).__init__(**kwargs) + self.service_code_list_directory_version = kwargs.get('service_code_list_directory_version', None) + self.character_encoding = kwargs.get('character_encoding', None) + self.protocol_version = kwargs.get('protocol_version', None) + self.data_element_separator = kwargs.get('data_element_separator', None) + self.component_separator = kwargs.get('component_separator', None) + self.segment_terminator = kwargs.get('segment_terminator', None) + self.release_indicator = kwargs.get('release_indicator', None) + self.repetition_separator = kwargs.get('repetition_separator', None) + self.character_set = kwargs.get('character_set', None) + self.decimal_point_indicator = kwargs.get('decimal_point_indicator', None) + self.segment_terminator_suffix = kwargs.get('segment_terminator_suffix', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings_py3.py new file mode 100644 index 000000000000..18db9195a80f --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings_py3.py @@ -0,0 +1,92 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EdifactFramingSettings(Model): + """The Edifact agreement framing settings. + + All required parameters must be populated in order to send to Azure. + + :param service_code_list_directory_version: The service code list + directory version. + :type service_code_list_directory_version: str + :param character_encoding: The character encoding. + :type character_encoding: str + :param protocol_version: Required. The protocol version. + :type protocol_version: int + :param data_element_separator: Required. The data element separator. + :type data_element_separator: int + :param component_separator: Required. The component separator. + :type component_separator: int + :param segment_terminator: Required. The segment terminator. + :type segment_terminator: int + :param release_indicator: Required. The release indicator. + :type release_indicator: int + :param repetition_separator: Required. The repetition separator. + :type repetition_separator: int + :param character_set: Required. The EDIFACT frame setting characterSet. + Possible values include: 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', + 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', + 'KECA' + :type character_set: str or ~azure.mgmt.logic.models.EdifactCharacterSet + :param decimal_point_indicator: Required. The EDIFACT frame setting + decimal indicator. Possible values include: 'NotSpecified', 'Comma', + 'Decimal' + :type decimal_point_indicator: str or + ~azure.mgmt.logic.models.EdifactDecimalIndicator + :param segment_terminator_suffix: Required. The EDIFACT frame setting + segment terminator suffix. Possible values include: 'NotSpecified', + 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + """ + + _validation = { + 'protocol_version': {'required': True}, + 'data_element_separator': {'required': True}, + 'component_separator': {'required': True}, + 'segment_terminator': {'required': True}, + 'release_indicator': {'required': True}, + 'repetition_separator': {'required': True}, + 'character_set': {'required': True}, + 'decimal_point_indicator': {'required': True}, + 'segment_terminator_suffix': {'required': True}, + } + + _attribute_map = { + 'service_code_list_directory_version': {'key': 'serviceCodeListDirectoryVersion', 'type': 'str'}, + 'character_encoding': {'key': 'characterEncoding', 'type': 'str'}, + 'protocol_version': {'key': 'protocolVersion', 'type': 'int'}, + 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, + 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, + 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, + 'release_indicator': {'key': 'releaseIndicator', 'type': 'int'}, + 'repetition_separator': {'key': 'repetitionSeparator', 'type': 'int'}, + 'character_set': {'key': 'characterSet', 'type': 'EdifactCharacterSet'}, + 'decimal_point_indicator': {'key': 'decimalPointIndicator', 'type': 'EdifactDecimalIndicator'}, + 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, + } + + def __init__(self, *, protocol_version: int, data_element_separator: int, component_separator: int, segment_terminator: int, release_indicator: int, repetition_separator: int, character_set, decimal_point_indicator, segment_terminator_suffix, service_code_list_directory_version: str=None, character_encoding: str=None, **kwargs) -> None: + super(EdifactFramingSettings, self).__init__(**kwargs) + self.service_code_list_directory_version = service_code_list_directory_version + self.character_encoding = character_encoding + self.protocol_version = protocol_version + self.data_element_separator = data_element_separator + self.component_separator = component_separator + self.segment_terminator = segment_terminator + self.release_indicator = release_indicator + self.repetition_separator = repetition_separator + self.character_set = character_set + self.decimal_point_indicator = decimal_point_indicator + self.segment_terminator_suffix = segment_terminator_suffix diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter.py old mode 100755 new mode 100644 index cdaaf318444b..7eb3d9865ef6 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter.py @@ -15,10 +15,12 @@ class EdifactMessageFilter(Model): """The Edifact message filter for odata query. - :param message_filter_type: The message filter type. Possible values - include: 'NotSpecified', 'Include', 'Exclude' - :type message_filter_type: str or :class:`MessageFilterType - ` + All required parameters must be populated in order to send to Azure. + + :param message_filter_type: Required. The message filter type. Possible + values include: 'NotSpecified', 'Include', 'Exclude' + :type message_filter_type: str or + ~azure.mgmt.logic.models.MessageFilterType """ _validation = { @@ -29,5 +31,6 @@ class EdifactMessageFilter(Model): 'message_filter_type': {'key': 'messageFilterType', 'type': 'MessageFilterType'}, } - def __init__(self, message_filter_type): - self.message_filter_type = message_filter_type + def __init__(self, **kwargs): + super(EdifactMessageFilter, self).__init__(**kwargs) + self.message_filter_type = kwargs.get('message_filter_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter_py3.py new file mode 100644 index 000000000000..bcfcfd3c6a44 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EdifactMessageFilter(Model): + """The Edifact message filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param message_filter_type: Required. The message filter type. Possible + values include: 'NotSpecified', 'Include', 'Exclude' + :type message_filter_type: str or + ~azure.mgmt.logic.models.MessageFilterType + """ + + _validation = { + 'message_filter_type': {'required': True}, + } + + _attribute_map = { + 'message_filter_type': {'key': 'messageFilterType', 'type': 'MessageFilterType'}, + } + + def __init__(self, *, message_filter_type, **kwargs) -> None: + super(EdifactMessageFilter, self).__init__(**kwargs) + self.message_filter_type = message_filter_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier.py old mode 100755 new mode 100644 index cfd53f36a79f..1aac0d7f82cc --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier.py @@ -15,8 +15,10 @@ class EdifactMessageIdentifier(Model): """The Edifact message identifier. - :param message_id: The message id on which this envelope settings has to - be applied. + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which this envelope + settings has to be applied. :type message_id: str """ @@ -28,5 +30,6 @@ class EdifactMessageIdentifier(Model): 'message_id': {'key': 'messageId', 'type': 'str'}, } - def __init__(self, message_id): - self.message_id = message_id + def __init__(self, **kwargs): + super(EdifactMessageIdentifier, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier_py3.py new file mode 100644 index 000000000000..022f6017ace9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EdifactMessageIdentifier(Model): + """The Edifact message identifier. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which this envelope + settings has to be applied. + :type message_id: str + """ + + _validation = { + 'message_id': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + } + + def __init__(self, *, message_id: str, **kwargs) -> None: + super(EdifactMessageIdentifier, self).__init__(**kwargs) + self.message_id = message_id diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement.py old mode 100755 new mode 100644 index 043c4a35e706..f5e2e18b2562 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement.py @@ -15,15 +15,16 @@ class EdifactOneWayAgreement(Model): """The Edifact one way agreement. - :param sender_business_identity: The sender business identity - :type sender_business_identity: :class:`BusinessIdentity - ` - :param receiver_business_identity: The receiver business identity - :type receiver_business_identity: :class:`BusinessIdentity - ` - :param protocol_settings: The EDIFACT protocol settings. - :type protocol_settings: :class:`EdifactProtocolSettings - ` + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The EDIFACT protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.EdifactProtocolSettings """ _validation = { @@ -38,7 +39,8 @@ class EdifactOneWayAgreement(Model): 'protocol_settings': {'key': 'protocolSettings', 'type': 'EdifactProtocolSettings'}, } - def __init__(self, sender_business_identity, receiver_business_identity, protocol_settings): - self.sender_business_identity = sender_business_identity - self.receiver_business_identity = receiver_business_identity - self.protocol_settings = protocol_settings + def __init__(self, **kwargs): + super(EdifactOneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = kwargs.get('sender_business_identity', None) + self.receiver_business_identity = kwargs.get('receiver_business_identity', None) + self.protocol_settings = kwargs.get('protocol_settings', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement_py3.py new file mode 100644 index 000000000000..81fbd5025ec9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EdifactOneWayAgreement(Model): + """The Edifact one way agreement. + + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The EDIFACT protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.EdifactProtocolSettings + """ + + _validation = { + 'sender_business_identity': {'required': True}, + 'receiver_business_identity': {'required': True}, + 'protocol_settings': {'required': True}, + } + + _attribute_map = { + 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, + 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, + 'protocol_settings': {'key': 'protocolSettings', 'type': 'EdifactProtocolSettings'}, + } + + def __init__(self, *, sender_business_identity, receiver_business_identity, protocol_settings, **kwargs) -> None: + super(EdifactOneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = sender_business_identity + self.receiver_business_identity = receiver_business_identity + self.protocol_settings = protocol_settings diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings.py old mode 100755 new mode 100644 index 5b9c401dc31c..c1ee11a2f226 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings.py @@ -15,20 +15,22 @@ class EdifactProcessingSettings(Model): """The Edifact agreement protocol settings. - :param mask_security_info: The value indicating whether to mask security - information. + All required parameters must be populated in order to send to Azure. + + :param mask_security_info: Required. The value indicating whether to mask + security information. :type mask_security_info: bool - :param preserve_interchange: The value indicating whether to preserve - interchange. + :param preserve_interchange: Required. The value indicating whether to + preserve interchange. :type preserve_interchange: bool - :param suspend_interchange_on_error: The value indicating whether to - suspend interchange on error. + :param suspend_interchange_on_error: Required. The value indicating + whether to suspend interchange on error. :type suspend_interchange_on_error: bool - :param create_empty_xml_tags_for_trailing_separators: The value indicating - whether to create empty xml tags for trailing separators. + :param create_empty_xml_tags_for_trailing_separators: Required. The value + indicating whether to create empty xml tags for trailing separators. :type create_empty_xml_tags_for_trailing_separators: bool - :param use_dot_as_decimal_separator: The value indicating whether to use - dot as decimal separator. + :param use_dot_as_decimal_separator: Required. The value indicating + whether to use dot as decimal separator. :type use_dot_as_decimal_separator: bool """ @@ -48,9 +50,10 @@ class EdifactProcessingSettings(Model): 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, } - def __init__(self, mask_security_info, preserve_interchange, suspend_interchange_on_error, create_empty_xml_tags_for_trailing_separators, use_dot_as_decimal_separator): - self.mask_security_info = mask_security_info - self.preserve_interchange = preserve_interchange - self.suspend_interchange_on_error = suspend_interchange_on_error - self.create_empty_xml_tags_for_trailing_separators = create_empty_xml_tags_for_trailing_separators - self.use_dot_as_decimal_separator = use_dot_as_decimal_separator + def __init__(self, **kwargs): + super(EdifactProcessingSettings, self).__init__(**kwargs) + self.mask_security_info = kwargs.get('mask_security_info', None) + self.preserve_interchange = kwargs.get('preserve_interchange', None) + self.suspend_interchange_on_error = kwargs.get('suspend_interchange_on_error', None) + self.create_empty_xml_tags_for_trailing_separators = kwargs.get('create_empty_xml_tags_for_trailing_separators', None) + self.use_dot_as_decimal_separator = kwargs.get('use_dot_as_decimal_separator', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings_py3.py new file mode 100644 index 000000000000..5beb418ea9c9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EdifactProcessingSettings(Model): + """The Edifact agreement protocol settings. + + All required parameters must be populated in order to send to Azure. + + :param mask_security_info: Required. The value indicating whether to mask + security information. + :type mask_security_info: bool + :param preserve_interchange: Required. The value indicating whether to + preserve interchange. + :type preserve_interchange: bool + :param suspend_interchange_on_error: Required. The value indicating + whether to suspend interchange on error. + :type suspend_interchange_on_error: bool + :param create_empty_xml_tags_for_trailing_separators: Required. The value + indicating whether to create empty xml tags for trailing separators. + :type create_empty_xml_tags_for_trailing_separators: bool + :param use_dot_as_decimal_separator: Required. The value indicating + whether to use dot as decimal separator. + :type use_dot_as_decimal_separator: bool + """ + + _validation = { + 'mask_security_info': {'required': True}, + 'preserve_interchange': {'required': True}, + 'suspend_interchange_on_error': {'required': True}, + 'create_empty_xml_tags_for_trailing_separators': {'required': True}, + 'use_dot_as_decimal_separator': {'required': True}, + } + + _attribute_map = { + 'mask_security_info': {'key': 'maskSecurityInfo', 'type': 'bool'}, + 'preserve_interchange': {'key': 'preserveInterchange', 'type': 'bool'}, + 'suspend_interchange_on_error': {'key': 'suspendInterchangeOnError', 'type': 'bool'}, + 'create_empty_xml_tags_for_trailing_separators': {'key': 'createEmptyXmlTagsForTrailingSeparators', 'type': 'bool'}, + 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, + } + + def __init__(self, *, mask_security_info: bool, preserve_interchange: bool, suspend_interchange_on_error: bool, create_empty_xml_tags_for_trailing_separators: bool, use_dot_as_decimal_separator: bool, **kwargs) -> None: + super(EdifactProcessingSettings, self).__init__(**kwargs) + self.mask_security_info = mask_security_info + self.preserve_interchange = preserve_interchange + self.suspend_interchange_on_error = suspend_interchange_on_error + self.create_empty_xml_tags_for_trailing_separators = create_empty_xml_tags_for_trailing_separators + self.use_dot_as_decimal_separator = use_dot_as_decimal_separator diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings.py old mode 100755 new mode 100644 index cbdcef7445d0..e61786f11f26 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings.py @@ -15,41 +15,40 @@ class EdifactProtocolSettings(Model): """The Edifact agreement protocol settings. - :param validation_settings: The EDIFACT validation settings. - :type validation_settings: :class:`EdifactValidationSettings - ` - :param framing_settings: The EDIFACT framing settings. - :type framing_settings: :class:`EdifactFramingSettings - ` - :param envelope_settings: The EDIFACT envelope settings. - :type envelope_settings: :class:`EdifactEnvelopeSettings - ` - :param acknowledgement_settings: The EDIFACT acknowledgement settings. - :type acknowledgement_settings: :class:`EdifactAcknowledgementSettings - ` - :param message_filter: The EDIFACT message filter. - :type message_filter: :class:`EdifactMessageFilter - ` - :param processing_settings: The EDIFACT processing Settings. - :type processing_settings: :class:`EdifactProcessingSettings - ` + All required parameters must be populated in order to send to Azure. + + :param validation_settings: Required. The EDIFACT validation settings. + :type validation_settings: + ~azure.mgmt.logic.models.EdifactValidationSettings + :param framing_settings: Required. The EDIFACT framing settings. + :type framing_settings: ~azure.mgmt.logic.models.EdifactFramingSettings + :param envelope_settings: Required. The EDIFACT envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.EdifactEnvelopeSettings + :param acknowledgement_settings: Required. The EDIFACT acknowledgement + settings. + :type acknowledgement_settings: + ~azure.mgmt.logic.models.EdifactAcknowledgementSettings + :param message_filter: Required. The EDIFACT message filter. + :type message_filter: ~azure.mgmt.logic.models.EdifactMessageFilter + :param processing_settings: Required. The EDIFACT processing Settings. + :type processing_settings: + ~azure.mgmt.logic.models.EdifactProcessingSettings :param envelope_overrides: The EDIFACT envelope override settings. - :type envelope_overrides: list of :class:`EdifactEnvelopeOverride - ` + :type envelope_overrides: + list[~azure.mgmt.logic.models.EdifactEnvelopeOverride] :param message_filter_list: The EDIFACT message filter list. - :type message_filter_list: list of :class:`EdifactMessageIdentifier - ` - :param schema_references: The EDIFACT schema references. - :type schema_references: list of :class:`EdifactSchemaReference - ` + :type message_filter_list: + list[~azure.mgmt.logic.models.EdifactMessageIdentifier] + :param schema_references: Required. The EDIFACT schema references. + :type schema_references: + list[~azure.mgmt.logic.models.EdifactSchemaReference] :param validation_overrides: The EDIFACT validation override settings. - :type validation_overrides: list of :class:`EdifactValidationOverride - ` + :type validation_overrides: + list[~azure.mgmt.logic.models.EdifactValidationOverride] :param edifact_delimiter_overrides: The EDIFACT delimiter override settings. - :type edifact_delimiter_overrides: list of - :class:`EdifactDelimiterOverride - ` + :type edifact_delimiter_overrides: + list[~azure.mgmt.logic.models.EdifactDelimiterOverride] """ _validation = { @@ -76,15 +75,16 @@ class EdifactProtocolSettings(Model): 'edifact_delimiter_overrides': {'key': 'edifactDelimiterOverrides', 'type': '[EdifactDelimiterOverride]'}, } - def __init__(self, validation_settings, framing_settings, envelope_settings, acknowledgement_settings, message_filter, processing_settings, schema_references, envelope_overrides=None, message_filter_list=None, validation_overrides=None, edifact_delimiter_overrides=None): - self.validation_settings = validation_settings - self.framing_settings = framing_settings - self.envelope_settings = envelope_settings - self.acknowledgement_settings = acknowledgement_settings - self.message_filter = message_filter - self.processing_settings = processing_settings - self.envelope_overrides = envelope_overrides - self.message_filter_list = message_filter_list - self.schema_references = schema_references - self.validation_overrides = validation_overrides - self.edifact_delimiter_overrides = edifact_delimiter_overrides + def __init__(self, **kwargs): + super(EdifactProtocolSettings, self).__init__(**kwargs) + self.validation_settings = kwargs.get('validation_settings', None) + self.framing_settings = kwargs.get('framing_settings', None) + self.envelope_settings = kwargs.get('envelope_settings', None) + self.acknowledgement_settings = kwargs.get('acknowledgement_settings', None) + self.message_filter = kwargs.get('message_filter', None) + self.processing_settings = kwargs.get('processing_settings', None) + self.envelope_overrides = kwargs.get('envelope_overrides', None) + self.message_filter_list = kwargs.get('message_filter_list', None) + self.schema_references = kwargs.get('schema_references', None) + self.validation_overrides = kwargs.get('validation_overrides', None) + self.edifact_delimiter_overrides = kwargs.get('edifact_delimiter_overrides', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings_py3.py new file mode 100644 index 000000000000..37e81aeb0f3c --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings_py3.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EdifactProtocolSettings(Model): + """The Edifact agreement protocol settings. + + All required parameters must be populated in order to send to Azure. + + :param validation_settings: Required. The EDIFACT validation settings. + :type validation_settings: + ~azure.mgmt.logic.models.EdifactValidationSettings + :param framing_settings: Required. The EDIFACT framing settings. + :type framing_settings: ~azure.mgmt.logic.models.EdifactFramingSettings + :param envelope_settings: Required. The EDIFACT envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.EdifactEnvelopeSettings + :param acknowledgement_settings: Required. The EDIFACT acknowledgement + settings. + :type acknowledgement_settings: + ~azure.mgmt.logic.models.EdifactAcknowledgementSettings + :param message_filter: Required. The EDIFACT message filter. + :type message_filter: ~azure.mgmt.logic.models.EdifactMessageFilter + :param processing_settings: Required. The EDIFACT processing Settings. + :type processing_settings: + ~azure.mgmt.logic.models.EdifactProcessingSettings + :param envelope_overrides: The EDIFACT envelope override settings. + :type envelope_overrides: + list[~azure.mgmt.logic.models.EdifactEnvelopeOverride] + :param message_filter_list: The EDIFACT message filter list. + :type message_filter_list: + list[~azure.mgmt.logic.models.EdifactMessageIdentifier] + :param schema_references: Required. The EDIFACT schema references. + :type schema_references: + list[~azure.mgmt.logic.models.EdifactSchemaReference] + :param validation_overrides: The EDIFACT validation override settings. + :type validation_overrides: + list[~azure.mgmt.logic.models.EdifactValidationOverride] + :param edifact_delimiter_overrides: The EDIFACT delimiter override + settings. + :type edifact_delimiter_overrides: + list[~azure.mgmt.logic.models.EdifactDelimiterOverride] + """ + + _validation = { + 'validation_settings': {'required': True}, + 'framing_settings': {'required': True}, + 'envelope_settings': {'required': True}, + 'acknowledgement_settings': {'required': True}, + 'message_filter': {'required': True}, + 'processing_settings': {'required': True}, + 'schema_references': {'required': True}, + } + + _attribute_map = { + 'validation_settings': {'key': 'validationSettings', 'type': 'EdifactValidationSettings'}, + 'framing_settings': {'key': 'framingSettings', 'type': 'EdifactFramingSettings'}, + 'envelope_settings': {'key': 'envelopeSettings', 'type': 'EdifactEnvelopeSettings'}, + 'acknowledgement_settings': {'key': 'acknowledgementSettings', 'type': 'EdifactAcknowledgementSettings'}, + 'message_filter': {'key': 'messageFilter', 'type': 'EdifactMessageFilter'}, + 'processing_settings': {'key': 'processingSettings', 'type': 'EdifactProcessingSettings'}, + 'envelope_overrides': {'key': 'envelopeOverrides', 'type': '[EdifactEnvelopeOverride]'}, + 'message_filter_list': {'key': 'messageFilterList', 'type': '[EdifactMessageIdentifier]'}, + 'schema_references': {'key': 'schemaReferences', 'type': '[EdifactSchemaReference]'}, + 'validation_overrides': {'key': 'validationOverrides', 'type': '[EdifactValidationOverride]'}, + 'edifact_delimiter_overrides': {'key': 'edifactDelimiterOverrides', 'type': '[EdifactDelimiterOverride]'}, + } + + def __init__(self, *, validation_settings, framing_settings, envelope_settings, acknowledgement_settings, message_filter, processing_settings, schema_references, envelope_overrides=None, message_filter_list=None, validation_overrides=None, edifact_delimiter_overrides=None, **kwargs) -> None: + super(EdifactProtocolSettings, self).__init__(**kwargs) + self.validation_settings = validation_settings + self.framing_settings = framing_settings + self.envelope_settings = envelope_settings + self.acknowledgement_settings = acknowledgement_settings + self.message_filter = message_filter + self.processing_settings = processing_settings + self.envelope_overrides = envelope_overrides + self.message_filter_list = message_filter_list + self.schema_references = schema_references + self.validation_overrides = validation_overrides + self.edifact_delimiter_overrides = edifact_delimiter_overrides diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference.py old mode 100755 new mode 100644 index 21056933f385..7e994ce7fe52 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference.py @@ -15,11 +15,13 @@ class EdifactSchemaReference(Model): """The Edifact schema reference. - :param message_id: The message id. + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. :type message_id: str - :param message_version: The message version. + :param message_version: Required. The message version. :type message_version: str - :param message_release: The message release version. + :param message_release: Required. The message release version. :type message_release: str :param sender_application_id: The sender application id. :type sender_application_id: str @@ -27,7 +29,7 @@ class EdifactSchemaReference(Model): :type sender_application_qualifier: str :param association_assigned_code: The association assigned code. :type association_assigned_code: str - :param schema_name: The schema name. + :param schema_name: Required. The schema name. :type schema_name: str """ @@ -48,11 +50,12 @@ class EdifactSchemaReference(Model): 'schema_name': {'key': 'schemaName', 'type': 'str'}, } - def __init__(self, message_id, message_version, message_release, schema_name, sender_application_id=None, sender_application_qualifier=None, association_assigned_code=None): - self.message_id = message_id - self.message_version = message_version - self.message_release = message_release - self.sender_application_id = sender_application_id - self.sender_application_qualifier = sender_application_qualifier - self.association_assigned_code = association_assigned_code - self.schema_name = schema_name + def __init__(self, **kwargs): + super(EdifactSchemaReference, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.message_version = kwargs.get('message_version', None) + self.message_release = kwargs.get('message_release', None) + self.sender_application_id = kwargs.get('sender_application_id', None) + self.sender_application_qualifier = kwargs.get('sender_application_qualifier', None) + self.association_assigned_code = kwargs.get('association_assigned_code', None) + self.schema_name = kwargs.get('schema_name', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference_py3.py new file mode 100644 index 000000000000..5f282f5e5a7e --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EdifactSchemaReference(Model): + """The Edifact schema reference. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. + :type message_id: str + :param message_version: Required. The message version. + :type message_version: str + :param message_release: Required. The message release version. + :type message_release: str + :param sender_application_id: The sender application id. + :type sender_application_id: str + :param sender_application_qualifier: The sender application qualifier. + :type sender_application_qualifier: str + :param association_assigned_code: The association assigned code. + :type association_assigned_code: str + :param schema_name: Required. The schema name. + :type schema_name: str + """ + + _validation = { + 'message_id': {'required': True}, + 'message_version': {'required': True}, + 'message_release': {'required': True}, + 'schema_name': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'message_version': {'key': 'messageVersion', 'type': 'str'}, + 'message_release': {'key': 'messageRelease', 'type': 'str'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'sender_application_qualifier': {'key': 'senderApplicationQualifier', 'type': 'str'}, + 'association_assigned_code': {'key': 'associationAssignedCode', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + } + + def __init__(self, *, message_id: str, message_version: str, message_release: str, schema_name: str, sender_application_id: str=None, sender_application_qualifier: str=None, association_assigned_code: str=None, **kwargs) -> None: + super(EdifactSchemaReference, self).__init__(**kwargs) + self.message_id = message_id + self.message_version = message_version + self.message_release = message_release + self.sender_application_id = sender_application_id + self.sender_application_qualifier = sender_application_qualifier + self.association_assigned_code = association_assigned_code + self.schema_name = schema_name diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override.py old mode 100755 new mode 100644 index 154deeeb7ca9..15044485db2c --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override.py @@ -15,27 +15,30 @@ class EdifactValidationOverride(Model): """The Edifact validation override settings. - :param message_id: The message id on which the validation settings has to - be applied. + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which the validation + settings has to be applied. :type message_id: str - :param enforce_character_set: The value indicating whether to validate - character Set. + :param enforce_character_set: Required. The value indicating whether to + validate character Set. :type enforce_character_set: bool - :param validate_edi_types: The value indicating whether to validate EDI - types. + :param validate_edi_types: Required. The value indicating whether to + validate EDI types. :type validate_edi_types: bool - :param validate_xsd_types: The value indicating whether to validate XSD - types. + :param validate_xsd_types: Required. The value indicating whether to + validate XSD types. :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: The value indicating - whether to allow leading and trailing spaces and zeroes. + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: The trailing separator policy. Possible - values include: 'NotSpecified', 'NotAllowed', 'Optional', 'Mandatory' - :type trailing_separator_policy: str or :class:`TrailingSeparatorPolicy - ` - :param trim_leading_and_trailing_spaces_and_zeroes: The value indicating - whether to trim leading and trailing spaces and zeroes. + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. :type trim_leading_and_trailing_spaces_and_zeroes: bool """ @@ -59,11 +62,12 @@ class EdifactValidationOverride(Model): 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, } - def __init__(self, message_id, enforce_character_set, validate_edi_types, validate_xsd_types, allow_leading_and_trailing_spaces_and_zeroes, trailing_separator_policy, trim_leading_and_trailing_spaces_and_zeroes): - self.message_id = message_id - self.enforce_character_set = enforce_character_set - self.validate_edi_types = validate_edi_types - self.validate_xsd_types = validate_xsd_types - self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes - self.trailing_separator_policy = trailing_separator_policy - self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes + def __init__(self, **kwargs): + super(EdifactValidationOverride, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.enforce_character_set = kwargs.get('enforce_character_set', None) + self.validate_edi_types = kwargs.get('validate_edi_types', None) + self.validate_xsd_types = kwargs.get('validate_xsd_types', None) + self.allow_leading_and_trailing_spaces_and_zeroes = kwargs.get('allow_leading_and_trailing_spaces_and_zeroes', None) + self.trailing_separator_policy = kwargs.get('trailing_separator_policy', None) + self.trim_leading_and_trailing_spaces_and_zeroes = kwargs.get('trim_leading_and_trailing_spaces_and_zeroes', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override_py3.py new file mode 100644 index 000000000000..e7a62672e8d0 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override_py3.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EdifactValidationOverride(Model): + """The Edifact validation override settings. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which the validation + settings has to be applied. + :type message_id: str + :param enforce_character_set: Required. The value indicating whether to + validate character Set. + :type enforce_character_set: bool + :param validate_edi_types: Required. The value indicating whether to + validate EDI types. + :type validate_edi_types: bool + :param validate_xsd_types: Required. The value indicating whether to + validate XSD types. + :type validate_xsd_types: bool + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. + :type allow_leading_and_trailing_spaces_and_zeroes: bool + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. + :type trim_leading_and_trailing_spaces_and_zeroes: bool + """ + + _validation = { + 'message_id': {'required': True}, + 'enforce_character_set': {'required': True}, + 'validate_edi_types': {'required': True}, + 'validate_xsd_types': {'required': True}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trailing_separator_policy': {'required': True}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'enforce_character_set': {'key': 'enforceCharacterSet', 'type': 'bool'}, + 'validate_edi_types': {'key': 'validateEdiTypes', 'type': 'bool'}, + 'validate_xsd_types': {'key': 'validateXsdTypes', 'type': 'bool'}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'TrailingSeparatorPolicy'}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + } + + def __init__(self, *, message_id: str, enforce_character_set: bool, validate_edi_types: bool, validate_xsd_types: bool, allow_leading_and_trailing_spaces_and_zeroes: bool, trailing_separator_policy, trim_leading_and_trailing_spaces_and_zeroes: bool, **kwargs) -> None: + super(EdifactValidationOverride, self).__init__(**kwargs) + self.message_id = message_id + self.enforce_character_set = enforce_character_set + self.validate_edi_types = validate_edi_types + self.validate_xsd_types = validate_xsd_types + self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes + self.trailing_separator_policy = trailing_separator_policy + self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings.py old mode 100755 new mode 100644 index 94eb228aad27..3918a817ef43 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings.py @@ -15,37 +15,40 @@ class EdifactValidationSettings(Model): """The Edifact agreement validation settings. - :param validate_character_set: The value indicating whether to validate - character set in the message. + All required parameters must be populated in order to send to Azure. + + :param validate_character_set: Required. The value indicating whether to + validate character set in the message. :type validate_character_set: bool - :param check_duplicate_interchange_control_number: The value indicating - whether to check for duplicate interchange control number. + :param check_duplicate_interchange_control_number: Required. The value + indicating whether to check for duplicate interchange control number. :type check_duplicate_interchange_control_number: bool - :param interchange_control_number_validity_days: The validity period of - interchange control number. + :param interchange_control_number_validity_days: Required. The validity + period of interchange control number. :type interchange_control_number_validity_days: int - :param check_duplicate_group_control_number: The value indicating whether - to check for duplicate group control number. + :param check_duplicate_group_control_number: Required. The value + indicating whether to check for duplicate group control number. :type check_duplicate_group_control_number: bool - :param check_duplicate_transaction_set_control_number: The value + :param check_duplicate_transaction_set_control_number: Required. The value indicating whether to check for duplicate transaction set control number. :type check_duplicate_transaction_set_control_number: bool - :param validate_edi_types: The value indicating whether to Whether to - validate EDI types. + :param validate_edi_types: Required. The value indicating whether to + Whether to validate EDI types. :type validate_edi_types: bool - :param validate_xsd_types: The value indicating whether to Whether to - validate XSD types. + :param validate_xsd_types: Required. The value indicating whether to + Whether to validate XSD types. :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: The value indicating - whether to allow leading and trailing spaces and zeroes. + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trim_leading_and_trailing_spaces_and_zeroes: The value indicating - whether to trim leading and trailing spaces and zeroes. + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: The trailing separator policy. Possible - values include: 'NotSpecified', 'NotAllowed', 'Optional', 'Mandatory' - :type trailing_separator_policy: str or :class:`TrailingSeparatorPolicy - ` + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy """ _validation = { @@ -74,14 +77,15 @@ class EdifactValidationSettings(Model): 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'TrailingSeparatorPolicy'}, } - def __init__(self, validate_character_set, check_duplicate_interchange_control_number, interchange_control_number_validity_days, check_duplicate_group_control_number, check_duplicate_transaction_set_control_number, validate_edi_types, validate_xsd_types, allow_leading_and_trailing_spaces_and_zeroes, trim_leading_and_trailing_spaces_and_zeroes, trailing_separator_policy): - self.validate_character_set = validate_character_set - self.check_duplicate_interchange_control_number = check_duplicate_interchange_control_number - self.interchange_control_number_validity_days = interchange_control_number_validity_days - self.check_duplicate_group_control_number = check_duplicate_group_control_number - self.check_duplicate_transaction_set_control_number = check_duplicate_transaction_set_control_number - self.validate_edi_types = validate_edi_types - self.validate_xsd_types = validate_xsd_types - self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes - self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes - self.trailing_separator_policy = trailing_separator_policy + def __init__(self, **kwargs): + super(EdifactValidationSettings, self).__init__(**kwargs) + self.validate_character_set = kwargs.get('validate_character_set', None) + self.check_duplicate_interchange_control_number = kwargs.get('check_duplicate_interchange_control_number', None) + self.interchange_control_number_validity_days = kwargs.get('interchange_control_number_validity_days', None) + self.check_duplicate_group_control_number = kwargs.get('check_duplicate_group_control_number', None) + self.check_duplicate_transaction_set_control_number = kwargs.get('check_duplicate_transaction_set_control_number', None) + self.validate_edi_types = kwargs.get('validate_edi_types', None) + self.validate_xsd_types = kwargs.get('validate_xsd_types', None) + self.allow_leading_and_trailing_spaces_and_zeroes = kwargs.get('allow_leading_and_trailing_spaces_and_zeroes', None) + self.trim_leading_and_trailing_spaces_and_zeroes = kwargs.get('trim_leading_and_trailing_spaces_and_zeroes', None) + self.trailing_separator_policy = kwargs.get('trailing_separator_policy', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings_py3.py new file mode 100644 index 000000000000..42d2215721ab --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings_py3.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EdifactValidationSettings(Model): + """The Edifact agreement validation settings. + + All required parameters must be populated in order to send to Azure. + + :param validate_character_set: Required. The value indicating whether to + validate character set in the message. + :type validate_character_set: bool + :param check_duplicate_interchange_control_number: Required. The value + indicating whether to check for duplicate interchange control number. + :type check_duplicate_interchange_control_number: bool + :param interchange_control_number_validity_days: Required. The validity + period of interchange control number. + :type interchange_control_number_validity_days: int + :param check_duplicate_group_control_number: Required. The value + indicating whether to check for duplicate group control number. + :type check_duplicate_group_control_number: bool + :param check_duplicate_transaction_set_control_number: Required. The value + indicating whether to check for duplicate transaction set control number. + :type check_duplicate_transaction_set_control_number: bool + :param validate_edi_types: Required. The value indicating whether to + Whether to validate EDI types. + :type validate_edi_types: bool + :param validate_xsd_types: Required. The value indicating whether to + Whether to validate XSD types. + :type validate_xsd_types: bool + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. + :type allow_leading_and_trailing_spaces_and_zeroes: bool + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. + :type trim_leading_and_trailing_spaces_and_zeroes: bool + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + """ + + _validation = { + 'validate_character_set': {'required': True}, + 'check_duplicate_interchange_control_number': {'required': True}, + 'interchange_control_number_validity_days': {'required': True}, + 'check_duplicate_group_control_number': {'required': True}, + 'check_duplicate_transaction_set_control_number': {'required': True}, + 'validate_edi_types': {'required': True}, + 'validate_xsd_types': {'required': True}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trailing_separator_policy': {'required': True}, + } + + _attribute_map = { + 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, + 'check_duplicate_interchange_control_number': {'key': 'checkDuplicateInterchangeControlNumber', 'type': 'bool'}, + 'interchange_control_number_validity_days': {'key': 'interchangeControlNumberValidityDays', 'type': 'int'}, + 'check_duplicate_group_control_number': {'key': 'checkDuplicateGroupControlNumber', 'type': 'bool'}, + 'check_duplicate_transaction_set_control_number': {'key': 'checkDuplicateTransactionSetControlNumber', 'type': 'bool'}, + 'validate_edi_types': {'key': 'validateEdiTypes', 'type': 'bool'}, + 'validate_xsd_types': {'key': 'validateXsdTypes', 'type': 'bool'}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'TrailingSeparatorPolicy'}, + } + + def __init__(self, *, validate_character_set: bool, check_duplicate_interchange_control_number: bool, interchange_control_number_validity_days: int, check_duplicate_group_control_number: bool, check_duplicate_transaction_set_control_number: bool, validate_edi_types: bool, validate_xsd_types: bool, allow_leading_and_trailing_spaces_and_zeroes: bool, trim_leading_and_trailing_spaces_and_zeroes: bool, trailing_separator_policy, **kwargs) -> None: + super(EdifactValidationSettings, self).__init__(**kwargs) + self.validate_character_set = validate_character_set + self.check_duplicate_interchange_control_number = check_duplicate_interchange_control_number + self.interchange_control_number_validity_days = interchange_control_number_validity_days + self.check_duplicate_group_control_number = check_duplicate_group_control_number + self.check_duplicate_transaction_set_control_number = check_duplicate_transaction_set_control_number + self.validate_edi_types = validate_edi_types + self.validate_xsd_types = validate_xsd_types + self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes + self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes + self.trailing_separator_policy = trailing_separator_policy diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/error_info.py b/azure-mgmt-logic/azure/mgmt/logic/models/error_info.py new file mode 100644 index 000000000000..4e9b48e2796c --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/error_info.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorInfo(Model): + """The error info. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. The error code. + :type code: str + """ + + _validation = { + 'code': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorInfo, self).__init__(**kwargs) + self.code = kwargs.get('code', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/error_info_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/error_info_py3.py new file mode 100644 index 000000000000..e3c4ec9958ab --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/error_info_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorInfo(Model): + """The error info. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. The error code. + :type code: str + """ + + _validation = { + 'code': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__(self, *, code: str, **kwargs) -> None: + super(ErrorInfo, self).__init__(**kwargs) + self.code = code diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/error_properties.py b/azure-mgmt-logic/azure/mgmt/logic/models/error_properties.py old mode 100755 new mode 100644 index 36a74596df39..f774797075e0 --- a/azure-mgmt-logic/azure/mgmt/logic/models/error_properties.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/error_properties.py @@ -27,6 +27,7 @@ class ErrorProperties(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, code=None, message=None): - self.code = code - self.message = message + def __init__(self, **kwargs): + super(ErrorProperties, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/error_properties_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/error_properties_py3.py new file mode 100644 index 000000000000..333f2a770740 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/error_properties_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorProperties(Model): + """Error properties indicate why the Logic service was not able to process the + incoming request. The reason is provided in the error message. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorProperties, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/error_response.py b/azure-mgmt-logic/azure/mgmt/logic/models/error_response.py old mode 100755 new mode 100644 index da6fc7aa456e..76a7e8315595 --- a/azure-mgmt-logic/azure/mgmt/logic/models/error_response.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/error_response.py @@ -14,20 +14,20 @@ class ErrorResponse(Model): - """Error reponse indicates Logic service is not able to process the incoming + """Error response indicates Logic service is not able to process the incoming request. The error property contains the error details. :param error: The error properties. - :type error: :class:`ErrorProperties - ` + :type error: ~azure.mgmt.logic.models.ErrorProperties """ _attribute_map = { 'error': {'key': 'error', 'type': 'ErrorProperties'}, } - def __init__(self, error=None): - self.error = error + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) class ErrorResponseException(HttpOperationError): diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/error_response_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/error_response_py3.py new file mode 100644 index 000000000000..8e081b09a2b0 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/error_response_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error response indicates Logic service is not able to process the incoming + request. The error property contains the error details. + + :param error: The error properties. + :type error: ~azure.mgmt.logic.models.ErrorProperties + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorProperties'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/expression.py b/azure-mgmt-logic/azure/mgmt/logic/models/expression.py new file mode 100644 index 000000000000..a67ba97cfc33 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/expression.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Expression(Model): + """Expression. + + :param text: + :type text: str + :param value: + :type value: object + :param subexpressions: + :type subexpressions: list[~azure.mgmt.logic.models.Expression] + :param error: + :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, + 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, + } + + def __init__(self, **kwargs): + super(Expression, self).__init__(**kwargs) + self.text = kwargs.get('text', None) + self.value = kwargs.get('value', None) + self.subexpressions = kwargs.get('subexpressions', None) + self.error = kwargs.get('error', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/expression_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/expression_py3.py new file mode 100644 index 000000000000..d2e00042a929 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/expression_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Expression(Model): + """Expression. + + :param text: + :type text: str + :param value: + :type value: object + :param subexpressions: + :type subexpressions: list[~azure.mgmt.logic.models.Expression] + :param error: + :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, + 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, + } + + def __init__(self, *, text: str=None, value=None, subexpressions=None, error=None, **kwargs) -> None: + super(Expression, self).__init__(**kwargs) + self.text = text + self.value = value + self.subexpressions = subexpressions + self.error = error diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/expression_root.py b/azure-mgmt-logic/azure/mgmt/logic/models/expression_root.py new file mode 100644 index 000000000000..45a9253fce15 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/expression_root.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .expression import Expression + + +class ExpressionRoot(Expression): + """ExpressionRoot. + + :param text: + :type text: str + :param value: + :type value: object + :param subexpressions: + :type subexpressions: list[~azure.mgmt.logic.models.Expression] + :param error: + :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + :param path: The path. + :type path: str + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, + 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExpressionRoot, self).__init__(**kwargs) + self.path = kwargs.get('path', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_paged.py new file mode 100644 index 000000000000..d32646b4a1d8 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ExpressionRootPaged(Paged): + """ + A paging container for iterating over a list of :class:`ExpressionRoot ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'inputs', 'type': '[ExpressionRoot]'} + } + + def __init__(self, *args, **kwargs): + + super(ExpressionRootPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_py3.py new file mode 100644 index 000000000000..6463b1607310 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .expression_py3 import Expression + + +class ExpressionRoot(Expression): + """ExpressionRoot. + + :param text: + :type text: str + :param value: + :type value: object + :param subexpressions: + :type subexpressions: list[~azure.mgmt.logic.models.Expression] + :param error: + :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + :param path: The path. + :type path: str + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, + 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__(self, *, text: str=None, value=None, subexpressions=None, error=None, path: str=None, **kwargs) -> None: + super(ExpressionRoot, self).__init__(text=text, value=value, subexpressions=subexpressions, error=error, **kwargs) + self.path = path diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters.py b/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters.py old mode 100755 new mode 100644 index bd61d96944ec..fbab264f0c56 --- a/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters.py @@ -23,5 +23,6 @@ class GenerateUpgradedDefinitionParameters(Model): 'target_schema_version': {'key': 'targetSchemaVersion', 'type': 'str'}, } - def __init__(self, target_schema_version=None): - self.target_schema_version = target_schema_version + def __init__(self, **kwargs): + super(GenerateUpgradedDefinitionParameters, self).__init__(**kwargs) + self.target_schema_version = kwargs.get('target_schema_version', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters_py3.py new file mode 100644 index 000000000000..fe3f6bcf11cb --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GenerateUpgradedDefinitionParameters(Model): + """The parameters to generate upgraded definition. + + :param target_schema_version: The target schema version. + :type target_schema_version: str + """ + + _attribute_map = { + 'target_schema_version': {'key': 'targetSchemaVersion', 'type': 'str'}, + } + + def __init__(self, *, target_schema_version: str=None, **kwargs) -> None: + super(GenerateUpgradedDefinitionParameters, self).__init__(**kwargs) + self.target_schema_version = target_schema_version diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters.py b/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters.py old mode 100755 new mode 100644 index a2423d9accb3..0c5c2dacc767 --- a/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters.py @@ -19,7 +19,7 @@ class GetCallbackUrlParameters(Model): :type not_after: datetime :param key_type: The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or :class:`KeyType ` + :type key_type: str or ~azure.mgmt.logic.models.KeyType """ _attribute_map = { @@ -27,6 +27,7 @@ class GetCallbackUrlParameters(Model): 'key_type': {'key': 'keyType', 'type': 'KeyType'}, } - def __init__(self, not_after=None, key_type=None): - self.not_after = not_after - self.key_type = key_type + def __init__(self, **kwargs): + super(GetCallbackUrlParameters, self).__init__(**kwargs) + self.not_after = kwargs.get('not_after', None) + self.key_type = kwargs.get('key_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters_py3.py new file mode 100644 index 000000000000..0eb2275adef3 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GetCallbackUrlParameters(Model): + """The callback url parameters. + + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: 'NotSpecified', + 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + """ + + _attribute_map = { + 'not_after': {'key': 'notAfter', 'type': 'iso-8601'}, + 'key_type': {'key': 'keyType', 'type': 'KeyType'}, + } + + def __init__(self, *, not_after=None, key_type=None, **kwargs) -> None: + super(GetCallbackUrlParameters, self).__init__(**kwargs) + self.not_after = not_after + self.key_type = key_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account.py old mode 100755 new mode 100644 index 6c6afa235fd2..b29acb017b92 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account.py @@ -27,12 +27,11 @@ class IntegrationAccount(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict + :type tags: dict[str, str] :param properties: The integration account properties. :type properties: object :param sku: The sku. - :type sku: :class:`IntegrationAccountSku - ` + :type sku: ~azure.mgmt.logic.models.IntegrationAccountSku """ _validation = { @@ -51,7 +50,7 @@ class IntegrationAccount(Resource): 'sku': {'key': 'sku', 'type': 'IntegrationAccountSku'}, } - def __init__(self, location=None, tags=None, properties=None, sku=None): - super(IntegrationAccount, self).__init__(location=location, tags=tags) - self.properties = properties - self.sku = sku + def __init__(self, **kwargs): + super(IntegrationAccount, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement.py old mode 100755 new mode 100644 index 2fe646232820..5fad800c2ade --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement.py @@ -18,6 +18,8 @@ class IntegrationAccountAgreement(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 id: The resource id. :vartype id: str :ivar name: Gets the resource name. @@ -27,32 +29,29 @@ class IntegrationAccountAgreement(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict + :type tags: dict[str, str] :ivar created_time: The created time. :vartype created_time: datetime :ivar changed_time: The changed time. :vartype changed_time: datetime :param metadata: The metadata. :type metadata: object - :param agreement_type: The agreement type. Possible values include: - 'NotSpecified', 'AS2', 'X12', 'Edifact' - :type agreement_type: str or :class:`AgreementType - ` - :param host_partner: The integration account partner that is set as host - partner for this agreement. + :param agreement_type: Required. The agreement type. Possible values + include: 'NotSpecified', 'AS2', 'X12', 'Edifact' + :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType + :param host_partner: Required. The integration account partner that is set + as host partner for this agreement. :type host_partner: str - :param guest_partner: The integration account partner that is set as guest - partner for this agreement. + :param guest_partner: Required. The integration account partner that is + set as guest partner for this agreement. :type guest_partner: str - :param host_identity: The business identity of the host partner. - :type host_identity: :class:`BusinessIdentity - ` - :param guest_identity: The business identity of the guest partner. - :type guest_identity: :class:`BusinessIdentity - ` - :param content: The agreement content. - :type content: :class:`AgreementContent - ` + :param host_identity: Required. The business identity of the host partner. + :type host_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param guest_identity: Required. The business identity of the guest + partner. + :type guest_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param content: Required. The agreement content. + :type content: ~azure.mgmt.logic.models.AgreementContent """ _validation = { @@ -86,14 +85,14 @@ class IntegrationAccountAgreement(Resource): 'content': {'key': 'properties.content', 'type': 'AgreementContent'}, } - def __init__(self, agreement_type, host_partner, guest_partner, host_identity, guest_identity, content, location=None, tags=None, metadata=None): - super(IntegrationAccountAgreement, self).__init__(location=location, tags=tags) + def __init__(self, **kwargs): + super(IntegrationAccountAgreement, self).__init__(**kwargs) self.created_time = None self.changed_time = None - self.metadata = metadata - self.agreement_type = agreement_type - self.host_partner = host_partner - self.guest_partner = guest_partner - self.host_identity = host_identity - self.guest_identity = guest_identity - self.content = content + self.metadata = kwargs.get('metadata', None) + self.agreement_type = kwargs.get('agreement_type', None) + self.host_partner = kwargs.get('host_partner', None) + self.guest_partner = kwargs.get('guest_partner', None) + self.host_identity = kwargs.get('host_identity', None) + self.guest_identity = kwargs.get('guest_identity', None) + self.content = kwargs.get('content', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter.py old mode 100755 new mode 100644 index 0a00f603754e..ed00ee6cf955 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter.py @@ -15,11 +15,12 @@ class IntegrationAccountAgreementFilter(Model): """The integration account agreement filter for odata query. - :param agreement_type: The agreement type of integration account + All required parameters must be populated in order to send to Azure. + + :param agreement_type: Required. The agreement type of integration account agreement. Possible values include: 'NotSpecified', 'AS2', 'X12', 'Edifact' - :type agreement_type: str or :class:`AgreementType - ` + :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType """ _validation = { @@ -30,5 +31,6 @@ class IntegrationAccountAgreementFilter(Model): 'agreement_type': {'key': 'agreementType', 'type': 'AgreementType'}, } - def __init__(self, agreement_type): - self.agreement_type = agreement_type + def __init__(self, **kwargs): + super(IntegrationAccountAgreementFilter, self).__init__(**kwargs) + self.agreement_type = kwargs.get('agreement_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter_py3.py new file mode 100644 index 000000000000..aa7b65c825aa --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IntegrationAccountAgreementFilter(Model): + """The integration account agreement filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param agreement_type: Required. The agreement type of integration account + agreement. Possible values include: 'NotSpecified', 'AS2', 'X12', + 'Edifact' + :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType + """ + + _validation = { + 'agreement_type': {'required': True}, + } + + _attribute_map = { + 'agreement_type': {'key': 'agreementType', 'type': 'AgreementType'}, + } + + def __init__(self, *, agreement_type, **kwargs) -> None: + super(IntegrationAccountAgreementFilter, self).__init__(**kwargs) + self.agreement_type = agreement_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_paged.py old mode 100755 new mode 100644 index e34f0a44af56..dab33964358e --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_paged.py @@ -14,7 +14,7 @@ class IntegrationAccountAgreementPaged(Paged): """ - A paging container for iterating over a list of IntegrationAccountAgreement object + A paging container for iterating over a list of :class:`IntegrationAccountAgreement ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_py3.py new file mode 100644 index 000000000000..4f6d7c00bb25 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_py3.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class IntegrationAccountAgreement(Resource): + """The integration account agreement. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param metadata: The metadata. + :type metadata: object + :param agreement_type: Required. The agreement type. Possible values + include: 'NotSpecified', 'AS2', 'X12', 'Edifact' + :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType + :param host_partner: Required. The integration account partner that is set + as host partner for this agreement. + :type host_partner: str + :param guest_partner: Required. The integration account partner that is + set as guest partner for this agreement. + :type guest_partner: str + :param host_identity: Required. The business identity of the host partner. + :type host_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param guest_identity: Required. The business identity of the guest + partner. + :type guest_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param content: Required. The agreement content. + :type content: ~azure.mgmt.logic.models.AgreementContent + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'agreement_type': {'required': True}, + 'host_partner': {'required': True}, + 'guest_partner': {'required': True}, + 'host_identity': {'required': True}, + 'guest_identity': {'required': True}, + 'content': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'agreement_type': {'key': 'properties.agreementType', 'type': 'AgreementType'}, + 'host_partner': {'key': 'properties.hostPartner', 'type': 'str'}, + 'guest_partner': {'key': 'properties.guestPartner', 'type': 'str'}, + 'host_identity': {'key': 'properties.hostIdentity', 'type': 'BusinessIdentity'}, + 'guest_identity': {'key': 'properties.guestIdentity', 'type': 'BusinessIdentity'}, + 'content': {'key': 'properties.content', 'type': 'AgreementContent'}, + } + + def __init__(self, *, agreement_type, host_partner: str, guest_partner: str, host_identity, guest_identity, content, location: str=None, tags=None, metadata=None, **kwargs) -> None: + super(IntegrationAccountAgreement, self).__init__(location=location, tags=tags, **kwargs) + self.created_time = None + self.changed_time = None + self.metadata = metadata + self.agreement_type = agreement_type + self.host_partner = host_partner + self.guest_partner = guest_partner + self.host_identity = host_identity + self.guest_identity = guest_identity + self.content = content diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate.py old mode 100755 new mode 100644 index f9e19c566267..d6345949d649 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate.py @@ -27,7 +27,7 @@ class IntegrationAccountCertificate(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict + :type tags: dict[str, str] :ivar created_time: The created time. :vartype created_time: datetime :ivar changed_time: The changed time. @@ -35,8 +35,7 @@ class IntegrationAccountCertificate(Resource): :param metadata: The metadata. :type metadata: object :param key: The key details in the key vault. - :type key: :class:`KeyVaultKeyReference - ` + :type key: ~azure.mgmt.logic.models.KeyVaultKeyReference :param public_certificate: The public certificate. :type public_certificate: str """ @@ -62,10 +61,10 @@ class IntegrationAccountCertificate(Resource): 'public_certificate': {'key': 'properties.publicCertificate', 'type': 'str'}, } - def __init__(self, location=None, tags=None, metadata=None, key=None, public_certificate=None): - super(IntegrationAccountCertificate, self).__init__(location=location, tags=tags) + def __init__(self, **kwargs): + super(IntegrationAccountCertificate, self).__init__(**kwargs) self.created_time = None self.changed_time = None - self.metadata = metadata - self.key = key - self.public_certificate = public_certificate + self.metadata = kwargs.get('metadata', None) + self.key = kwargs.get('key', None) + self.public_certificate = kwargs.get('public_certificate', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_paged.py old mode 100755 new mode 100644 index 2145a818e6ab..a428c4a54112 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_paged.py @@ -14,7 +14,7 @@ class IntegrationAccountCertificatePaged(Paged): """ - A paging container for iterating over a list of IntegrationAccountCertificate object + A paging container for iterating over a list of :class:`IntegrationAccountCertificate ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_py3.py new file mode 100644 index 000000000000..84a426fb109e --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class IntegrationAccountCertificate(Resource): + """The integration account certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param metadata: The metadata. + :type metadata: object + :param key: The key details in the key vault. + :type key: ~azure.mgmt.logic.models.KeyVaultKeyReference + :param public_certificate: The public certificate. + :type public_certificate: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'key': {'key': 'properties.key', 'type': 'KeyVaultKeyReference'}, + 'public_certificate': {'key': 'properties.publicCertificate', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, metadata=None, key=None, public_certificate: str=None, **kwargs) -> None: + super(IntegrationAccountCertificate, self).__init__(location=location, tags=tags, **kwargs) + self.created_time = None + self.changed_time = None + self.metadata = metadata + self.key = key + self.public_certificate = public_certificate diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map.py old mode 100755 new mode 100644 index 2faaaf028e56..eca7358d918e --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map.py @@ -18,6 +18,8 @@ class IntegrationAccountMap(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 id: The resource id. :vartype id: str :ivar name: Gets the resource name. @@ -27,15 +29,14 @@ class IntegrationAccountMap(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict - :param map_type: The map type. Possible values include: 'NotSpecified', - 'Xslt' - :type map_type: str or :class:`MapType ` + :type tags: dict[str, str] + :param map_type: Required. The map type. Possible values include: + 'NotSpecified', 'Xslt' + :type map_type: str or ~azure.mgmt.logic.models.MapType :param parameters_schema: The parameters schema of integration account map. :type parameters_schema: - :class:`IntegrationAccountMapPropertiesParametersSchema - ` + ~azure.mgmt.logic.models.IntegrationAccountMapPropertiesParametersSchema :ivar created_time: The created time. :vartype created_time: datetime :ivar changed_time: The changed time. @@ -45,8 +46,7 @@ class IntegrationAccountMap(Resource): :param content_type: The content type. :type content_type: str :ivar content_link: The content link. - :vartype content_link: :class:`ContentLink - ` + :vartype content_link: ~azure.mgmt.logic.models.ContentLink :param metadata: The metadata. :type metadata: object """ @@ -77,13 +77,13 @@ class IntegrationAccountMap(Resource): 'metadata': {'key': 'properties.metadata', 'type': 'object'}, } - def __init__(self, map_type, location=None, tags=None, parameters_schema=None, content=None, content_type=None, metadata=None): - super(IntegrationAccountMap, self).__init__(location=location, tags=tags) - self.map_type = map_type - self.parameters_schema = parameters_schema + def __init__(self, **kwargs): + super(IntegrationAccountMap, self).__init__(**kwargs) + self.map_type = kwargs.get('map_type', None) + self.parameters_schema = kwargs.get('parameters_schema', None) self.created_time = None self.changed_time = None - self.content = content - self.content_type = content_type + self.content = kwargs.get('content', None) + self.content_type = kwargs.get('content_type', None) self.content_link = None - self.metadata = metadata + self.metadata = kwargs.get('metadata', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter.py old mode 100755 new mode 100644 index 2ebb56fcce5e..0854c1f78a89 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter.py @@ -15,9 +15,11 @@ class IntegrationAccountMapFilter(Model): """The integration account map filter for odata query. - :param map_type: The map type of integration account map. Possible values - include: 'NotSpecified', 'Xslt' - :type map_type: str or :class:`MapType ` + All required parameters must be populated in order to send to Azure. + + :param map_type: Required. The map type of integration account map. + Possible values include: 'NotSpecified', 'Xslt' + :type map_type: str or ~azure.mgmt.logic.models.MapType """ _validation = { @@ -28,5 +30,6 @@ class IntegrationAccountMapFilter(Model): 'map_type': {'key': 'mapType', 'type': 'MapType'}, } - def __init__(self, map_type): - self.map_type = map_type + def __init__(self, **kwargs): + super(IntegrationAccountMapFilter, self).__init__(**kwargs) + self.map_type = kwargs.get('map_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter_py3.py new file mode 100644 index 000000000000..94e1aaf938f2 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IntegrationAccountMapFilter(Model): + """The integration account map filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param map_type: Required. The map type of integration account map. + Possible values include: 'NotSpecified', 'Xslt' + :type map_type: str or ~azure.mgmt.logic.models.MapType + """ + + _validation = { + 'map_type': {'required': True}, + } + + _attribute_map = { + 'map_type': {'key': 'mapType', 'type': 'MapType'}, + } + + def __init__(self, *, map_type, **kwargs) -> None: + super(IntegrationAccountMapFilter, self).__init__(**kwargs) + self.map_type = map_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_paged.py old mode 100755 new mode 100644 index 9efb38f2b9f2..993fc034cef6 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_paged.py @@ -14,7 +14,7 @@ class IntegrationAccountMapPaged(Paged): """ - A paging container for iterating over a list of IntegrationAccountMap object + A paging container for iterating over a list of :class:`IntegrationAccountMap ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema.py old mode 100755 new mode 100644 index 7c4ebc8950d1..4d2b083b084a --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema.py @@ -23,5 +23,6 @@ class IntegrationAccountMapPropertiesParametersSchema(Model): 'ref': {'key': 'ref', 'type': 'str'}, } - def __init__(self, ref=None): - self.ref = ref + def __init__(self, **kwargs): + super(IntegrationAccountMapPropertiesParametersSchema, self).__init__(**kwargs) + self.ref = kwargs.get('ref', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema_py3.py new file mode 100644 index 000000000000..35d9a7ce410a --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IntegrationAccountMapPropertiesParametersSchema(Model): + """The parameters schema of integration account map. + + :param ref: The reference name. + :type ref: str + """ + + _attribute_map = { + 'ref': {'key': 'ref', 'type': 'str'}, + } + + def __init__(self, *, ref: str=None, **kwargs) -> None: + super(IntegrationAccountMapPropertiesParametersSchema, self).__init__(**kwargs) + self.ref = ref diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_py3.py new file mode 100644 index 000000000000..27f4da9281b7 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_py3.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class IntegrationAccountMap(Resource): + """The integration account map. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param map_type: Required. The map type. Possible values include: + 'NotSpecified', 'Xslt' + :type map_type: str or ~azure.mgmt.logic.models.MapType + :param parameters_schema: The parameters schema of integration account + map. + :type parameters_schema: + ~azure.mgmt.logic.models.IntegrationAccountMapPropertiesParametersSchema + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param content: The content. + :type content: str + :param content_type: The content type. + :type content_type: str + :ivar content_link: The content link. + :vartype content_link: ~azure.mgmt.logic.models.ContentLink + :param metadata: The metadata. + :type metadata: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'map_type': {'required': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'content_link': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'map_type': {'key': 'properties.mapType', 'type': 'MapType'}, + 'parameters_schema': {'key': 'properties.parametersSchema', 'type': 'IntegrationAccountMapPropertiesParametersSchema'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'content': {'key': 'properties.content', 'type': 'str'}, + 'content_type': {'key': 'properties.contentType', 'type': 'str'}, + 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + } + + def __init__(self, *, map_type, location: str=None, tags=None, parameters_schema=None, content: str=None, content_type: str=None, metadata=None, **kwargs) -> None: + super(IntegrationAccountMap, self).__init__(location=location, tags=tags, **kwargs) + self.map_type = map_type + self.parameters_schema = parameters_schema + self.created_time = None + self.changed_time = None + self.content = content + self.content_type = content_type + self.content_link = None + self.metadata = metadata diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_paged.py old mode 100755 new mode 100644 index ed94ff07b1ae..33bf18e0fd8d --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_paged.py @@ -14,7 +14,7 @@ class IntegrationAccountPaged(Paged): """ - A paging container for iterating over a list of IntegrationAccount object + A paging container for iterating over a list of :class:`IntegrationAccount ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner.py old mode 100755 new mode 100644 index 247611dac555..27abb6538309 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner.py @@ -18,6 +18,8 @@ class IntegrationAccountPartner(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 id: The resource id. :vartype id: str :ivar name: Gets the resource name. @@ -27,20 +29,18 @@ class IntegrationAccountPartner(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict - :param partner_type: The partner type. Possible values include: + :type tags: dict[str, str] + :param partner_type: Required. The partner type. Possible values include: 'NotSpecified', 'B2B' - :type partner_type: str or :class:`PartnerType - ` + :type partner_type: str or ~azure.mgmt.logic.models.PartnerType :ivar created_time: The created time. :vartype created_time: datetime :ivar changed_time: The changed time. :vartype changed_time: datetime :param metadata: The metadata. :type metadata: object - :param content: The partner content. - :type content: :class:`PartnerContent - ` + :param content: Required. The partner content. + :type content: ~azure.mgmt.logic.models.PartnerContent """ _validation = { @@ -66,10 +66,10 @@ class IntegrationAccountPartner(Resource): 'content': {'key': 'properties.content', 'type': 'PartnerContent'}, } - def __init__(self, partner_type, content, location=None, tags=None, metadata=None): - super(IntegrationAccountPartner, self).__init__(location=location, tags=tags) - self.partner_type = partner_type + def __init__(self, **kwargs): + super(IntegrationAccountPartner, self).__init__(**kwargs) + self.partner_type = kwargs.get('partner_type', None) self.created_time = None self.changed_time = None - self.metadata = metadata - self.content = content + self.metadata = kwargs.get('metadata', None) + self.content = kwargs.get('content', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter.py old mode 100755 new mode 100644 index 13559708d272..97e127714cf1 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter.py @@ -15,10 +15,11 @@ class IntegrationAccountPartnerFilter(Model): """The integration account partner filter for odata query. - :param partner_type: The partner type of integration account partner. - Possible values include: 'NotSpecified', 'B2B' - :type partner_type: str or :class:`PartnerType - ` + All required parameters must be populated in order to send to Azure. + + :param partner_type: Required. The partner type of integration account + partner. Possible values include: 'NotSpecified', 'B2B' + :type partner_type: str or ~azure.mgmt.logic.models.PartnerType """ _validation = { @@ -29,5 +30,6 @@ class IntegrationAccountPartnerFilter(Model): 'partner_type': {'key': 'partnerType', 'type': 'PartnerType'}, } - def __init__(self, partner_type): - self.partner_type = partner_type + def __init__(self, **kwargs): + super(IntegrationAccountPartnerFilter, self).__init__(**kwargs) + self.partner_type = kwargs.get('partner_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter_py3.py new file mode 100644 index 000000000000..e96805f485b6 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IntegrationAccountPartnerFilter(Model): + """The integration account partner filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param partner_type: Required. The partner type of integration account + partner. Possible values include: 'NotSpecified', 'B2B' + :type partner_type: str or ~azure.mgmt.logic.models.PartnerType + """ + + _validation = { + 'partner_type': {'required': True}, + } + + _attribute_map = { + 'partner_type': {'key': 'partnerType', 'type': 'PartnerType'}, + } + + def __init__(self, *, partner_type, **kwargs) -> None: + super(IntegrationAccountPartnerFilter, self).__init__(**kwargs) + self.partner_type = partner_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_paged.py old mode 100755 new mode 100644 index 456113f5c30b..36bcc35e62dd --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_paged.py @@ -14,7 +14,7 @@ class IntegrationAccountPartnerPaged(Paged): """ - A paging container for iterating over a list of IntegrationAccountPartner object + A paging container for iterating over a list of :class:`IntegrationAccountPartner ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_py3.py new file mode 100644 index 000000000000..7c6af813aa42 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_py3.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class IntegrationAccountPartner(Resource): + """The integration account partner. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param partner_type: Required. The partner type. Possible values include: + 'NotSpecified', 'B2B' + :type partner_type: str or ~azure.mgmt.logic.models.PartnerType + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param metadata: The metadata. + :type metadata: object + :param content: Required. The partner content. + :type content: ~azure.mgmt.logic.models.PartnerContent + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'partner_type': {'required': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'content': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'partner_type': {'key': 'properties.partnerType', 'type': 'PartnerType'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'content': {'key': 'properties.content', 'type': 'PartnerContent'}, + } + + def __init__(self, *, partner_type, content, location: str=None, tags=None, metadata=None, **kwargs) -> None: + super(IntegrationAccountPartner, self).__init__(location=location, tags=tags, **kwargs) + self.partner_type = partner_type + self.created_time = None + self.changed_time = None + self.metadata = metadata + self.content = content diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_py3.py new file mode 100644 index 000000000000..ef2bc107d386 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class IntegrationAccount(Resource): + """The integration account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: The integration account properties. + :type properties: object + :param sku: The sku. + :type sku: ~azure.mgmt.logic.models.IntegrationAccountSku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'sku': {'key': 'sku', 'type': 'IntegrationAccountSku'}, + } + + def __init__(self, *, location: str=None, tags=None, properties=None, sku=None, **kwargs) -> None: + super(IntegrationAccount, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties + self.sku = sku diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema.py old mode 100755 new mode 100644 index 40235fb07405..e528830cdb2e --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema.py @@ -18,6 +18,8 @@ class IntegrationAccountSchema(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 id: The resource id. :vartype id: str :ivar name: Gets the resource name. @@ -27,11 +29,10 @@ class IntegrationAccountSchema(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict - :param schema_type: The schema type. Possible values include: + :type tags: dict[str, str] + :param schema_type: Required. The schema type. Possible values include: 'NotSpecified', 'Xml' - :type schema_type: str or :class:`SchemaType - ` + :type schema_type: str or ~azure.mgmt.logic.models.SchemaType :param target_namespace: The target namespace of the schema. :type target_namespace: str :param document_name: The document name. @@ -49,8 +50,7 @@ class IntegrationAccountSchema(Resource): :param content_type: The content type. :type content_type: str :ivar content_link: The content link. - :vartype content_link: :class:`ContentLink - ` + :vartype content_link: ~azure.mgmt.logic.models.ContentLink """ _validation = { @@ -81,15 +81,15 @@ class IntegrationAccountSchema(Resource): 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, } - def __init__(self, schema_type, location=None, tags=None, target_namespace=None, document_name=None, file_name=None, metadata=None, content=None, content_type=None): - super(IntegrationAccountSchema, self).__init__(location=location, tags=tags) - self.schema_type = schema_type - self.target_namespace = target_namespace - self.document_name = document_name - self.file_name = file_name + def __init__(self, **kwargs): + super(IntegrationAccountSchema, self).__init__(**kwargs) + self.schema_type = kwargs.get('schema_type', None) + self.target_namespace = kwargs.get('target_namespace', None) + self.document_name = kwargs.get('document_name', None) + self.file_name = kwargs.get('file_name', None) self.created_time = None self.changed_time = None - self.metadata = metadata - self.content = content - self.content_type = content_type + self.metadata = kwargs.get('metadata', None) + self.content = kwargs.get('content', None) + self.content_type = kwargs.get('content_type', None) self.content_link = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter.py old mode 100755 new mode 100644 index 71b43b3feafd..96d624e2ac45 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter.py @@ -15,10 +15,11 @@ class IntegrationAccountSchemaFilter(Model): """The integration account schema filter for odata query. - :param schema_type: The schema type of integration account schema. - Possible values include: 'NotSpecified', 'Xml' - :type schema_type: str or :class:`SchemaType - ` + All required parameters must be populated in order to send to Azure. + + :param schema_type: Required. The schema type of integration account + schema. Possible values include: 'NotSpecified', 'Xml' + :type schema_type: str or ~azure.mgmt.logic.models.SchemaType """ _validation = { @@ -29,5 +30,6 @@ class IntegrationAccountSchemaFilter(Model): 'schema_type': {'key': 'schemaType', 'type': 'SchemaType'}, } - def __init__(self, schema_type): - self.schema_type = schema_type + def __init__(self, **kwargs): + super(IntegrationAccountSchemaFilter, self).__init__(**kwargs) + self.schema_type = kwargs.get('schema_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter_py3.py new file mode 100644 index 000000000000..17303ce6eac2 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IntegrationAccountSchemaFilter(Model): + """The integration account schema filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param schema_type: Required. The schema type of integration account + schema. Possible values include: 'NotSpecified', 'Xml' + :type schema_type: str or ~azure.mgmt.logic.models.SchemaType + """ + + _validation = { + 'schema_type': {'required': True}, + } + + _attribute_map = { + 'schema_type': {'key': 'schemaType', 'type': 'SchemaType'}, + } + + def __init__(self, *, schema_type, **kwargs) -> None: + super(IntegrationAccountSchemaFilter, self).__init__(**kwargs) + self.schema_type = schema_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_paged.py old mode 100755 new mode 100644 index 5c9d15b38823..778d81bab195 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_paged.py @@ -14,7 +14,7 @@ class IntegrationAccountSchemaPaged(Paged): """ - A paging container for iterating over a list of IntegrationAccountSchema object + A paging container for iterating over a list of :class:`IntegrationAccountSchema ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_py3.py new file mode 100644 index 000000000000..e6b6b3bcd072 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_py3.py @@ -0,0 +1,95 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class IntegrationAccountSchema(Resource): + """The integration account schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param schema_type: Required. The schema type. Possible values include: + 'NotSpecified', 'Xml' + :type schema_type: str or ~azure.mgmt.logic.models.SchemaType + :param target_namespace: The target namespace of the schema. + :type target_namespace: str + :param document_name: The document name. + :type document_name: str + :param file_name: The file name. + :type file_name: str + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param metadata: The metadata. + :type metadata: object + :param content: The content. + :type content: str + :param content_type: The content type. + :type content_type: str + :ivar content_link: The content link. + :vartype content_link: ~azure.mgmt.logic.models.ContentLink + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'schema_type': {'required': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'content_link': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'schema_type': {'key': 'properties.schemaType', 'type': 'SchemaType'}, + 'target_namespace': {'key': 'properties.targetNamespace', 'type': 'str'}, + 'document_name': {'key': 'properties.documentName', 'type': 'str'}, + 'file_name': {'key': 'properties.fileName', 'type': 'str'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'content': {'key': 'properties.content', 'type': 'str'}, + 'content_type': {'key': 'properties.contentType', 'type': 'str'}, + 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, + } + + def __init__(self, *, schema_type, location: str=None, tags=None, target_namespace: str=None, document_name: str=None, file_name: str=None, metadata=None, content: str=None, content_type: str=None, **kwargs) -> None: + super(IntegrationAccountSchema, self).__init__(location=location, tags=tags, **kwargs) + self.schema_type = schema_type + self.target_namespace = target_namespace + self.document_name = document_name + self.file_name = file_name + self.created_time = None + self.changed_time = None + self.metadata = metadata + self.content = content + self.content_type = content_type + self.content_link = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session.py old mode 100755 new mode 100644 index 6015069c6ef8..e779bc551406 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session.py @@ -27,7 +27,7 @@ class IntegrationAccountSession(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict + :type tags: dict[str, str] :ivar created_time: The created time. :vartype created_time: datetime :ivar changed_time: The changed time. @@ -55,8 +55,8 @@ class IntegrationAccountSession(Resource): 'content': {'key': 'properties.content', 'type': 'object'}, } - def __init__(self, location=None, tags=None, content=None): - super(IntegrationAccountSession, self).__init__(location=location, tags=tags) + def __init__(self, **kwargs): + super(IntegrationAccountSession, self).__init__(**kwargs) self.created_time = None self.changed_time = None - self.content = content + self.content = kwargs.get('content', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter.py old mode 100755 new mode 100644 index b6f55a6e0212..5c4b92f81245 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter.py @@ -15,7 +15,10 @@ class IntegrationAccountSessionFilter(Model): """The integration account session filter. - :param changed_time: The changed time of integration account sessions. + All required parameters must be populated in order to send to Azure. + + :param changed_time: Required. The changed time of integration account + sessions. :type changed_time: datetime """ @@ -27,5 +30,6 @@ class IntegrationAccountSessionFilter(Model): 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, } - def __init__(self, changed_time): - self.changed_time = changed_time + def __init__(self, **kwargs): + super(IntegrationAccountSessionFilter, self).__init__(**kwargs) + self.changed_time = kwargs.get('changed_time', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter_py3.py new file mode 100644 index 000000000000..cc860f372c00 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IntegrationAccountSessionFilter(Model): + """The integration account session filter. + + All required parameters must be populated in order to send to Azure. + + :param changed_time: Required. The changed time of integration account + sessions. + :type changed_time: datetime + """ + + _validation = { + 'changed_time': {'required': True}, + } + + _attribute_map = { + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, changed_time, **kwargs) -> None: + super(IntegrationAccountSessionFilter, self).__init__(**kwargs) + self.changed_time = changed_time diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_paged.py old mode 100755 new mode 100644 index 470a6d9b8434..8e29ebfe24cd --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_paged.py @@ -14,7 +14,7 @@ class IntegrationAccountSessionPaged(Paged): """ - A paging container for iterating over a list of IntegrationAccountSession object + A paging container for iterating over a list of :class:`IntegrationAccountSession ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_py3.py new file mode 100644 index 000000000000..91d024d47d75 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class IntegrationAccountSession(Resource): + """The integration account session. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param content: The session content. + :type content: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'content': {'key': 'properties.content', 'type': 'object'}, + } + + def __init__(self, *, location: str=None, tags=None, content=None, **kwargs) -> None: + super(IntegrationAccountSession, self).__init__(location=location, tags=tags, **kwargs) + self.created_time = None + self.changed_time = None + self.content = content diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku.py old mode 100755 new mode 100644 index b8ae8fe1e190..9701f9b19f3e --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku.py @@ -15,10 +15,11 @@ class IntegrationAccountSku(Model): """The integration account sku. - :param name: The sku name. Possible values include: 'NotSpecified', - 'Free', 'Standard' - :type name: str or :class:`IntegrationAccountSkuName - ` + All required parameters must be populated in order to send to Azure. + + :param name: Required. The sku name. Possible values include: + 'NotSpecified', 'Free', 'Standard' + :type name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName """ _validation = { @@ -29,5 +30,6 @@ class IntegrationAccountSku(Model): 'name': {'key': 'name', 'type': 'IntegrationAccountSkuName'}, } - def __init__(self, name): - self.name = name + def __init__(self, **kwargs): + super(IntegrationAccountSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku_py3.py new file mode 100644 index 000000000000..a7eeab01946b --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IntegrationAccountSku(Model): + """The integration account sku. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The sku name. Possible values include: + 'NotSpecified', 'Free', 'Standard' + :type name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'IntegrationAccountSkuName'}, + } + + def __init__(self, *, name, **kwargs) -> None: + super(IntegrationAccountSku, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/json_schema.py b/azure-mgmt-logic/azure/mgmt/logic/models/json_schema.py new file mode 100644 index 000000000000..4d9fc567f826 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/json_schema.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JsonSchema(Model): + """The JSON schema. + + :param title: The JSON title. + :type title: str + :param content: The JSON content. + :type content: str + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JsonSchema, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.content = kwargs.get('content', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/json_schema_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/json_schema_py3.py new file mode 100644 index 000000000000..edaaa76244cc --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/json_schema_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JsonSchema(Model): + """The JSON schema. + + :param title: The JSON title. + :type title: str + :param content: The JSON content. + :type content: str + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, *, title: str=None, content: str=None, **kwargs) -> None: + super(JsonSchema, self).__init__(**kwargs) + self.title = title + self.content = content diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key.py new file mode 100644 index 000000000000..6e337eda6dcb --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyVaultKey(Model): + """The key vault key. + + :param kid: The key id. + :type kid: str + :param attributes: The key attributes. + :type attributes: ~azure.mgmt.logic.models.KeyVaultKeyAttributes + """ + + _attribute_map = { + 'kid': {'key': 'kid', 'type': 'str'}, + 'attributes': {'key': 'attributes', 'type': 'KeyVaultKeyAttributes'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKey, self).__init__(**kwargs) + self.kid = kwargs.get('kid', None) + self.attributes = kwargs.get('attributes', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes.py new file mode 100644 index 000000000000..715d92ab0af1 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyVaultKeyAttributes(Model): + """The key attributes. + + :param enabled: Whether the key is enabled or not. + :type enabled: bool + :param created: When the key was created. + :type created: long + :param updated: When the key was updated. + :type updated: long + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'long'}, + 'updated': {'key': 'updated', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyAttributes, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.created = kwargs.get('created', None) + self.updated = kwargs.get('updated', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes_py3.py new file mode 100644 index 000000000000..fa14881da122 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyVaultKeyAttributes(Model): + """The key attributes. + + :param enabled: Whether the key is enabled or not. + :type enabled: bool + :param created: When the key was created. + :type created: long + :param updated: When the key was updated. + :type updated: long + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'long'}, + 'updated': {'key': 'updated', 'type': 'long'}, + } + + def __init__(self, *, enabled: bool=None, created: int=None, updated: int=None, **kwargs) -> None: + super(KeyVaultKeyAttributes, self).__init__(**kwargs) + self.enabled = enabled + self.created = created + self.updated = updated diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_paged.py new file mode 100644 index 000000000000..8384bd46af02 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class KeyVaultKeyPaged(Paged): + """ + A paging container for iterating over a list of :class:`KeyVaultKey ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[KeyVaultKey]'} + } + + def __init__(self, *args, **kwargs): + + super(KeyVaultKeyPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_py3.py new file mode 100644 index 000000000000..3c55470665a4 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyVaultKey(Model): + """The key vault key. + + :param kid: The key id. + :type kid: str + :param attributes: The key attributes. + :type attributes: ~azure.mgmt.logic.models.KeyVaultKeyAttributes + """ + + _attribute_map = { + 'kid': {'key': 'kid', 'type': 'str'}, + 'attributes': {'key': 'attributes', 'type': 'KeyVaultKeyAttributes'}, + } + + def __init__(self, *, kid: str=None, attributes=None, **kwargs) -> None: + super(KeyVaultKey, self).__init__(**kwargs) + self.kid = kid + self.attributes = attributes diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference.py old mode 100755 new mode 100644 index 08f7e0f759d5..509822e7a4dc --- a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference.py @@ -15,10 +15,11 @@ class KeyVaultKeyReference(Model): """The reference to the key vault key. - :param key_vault: The key vault reference. - :type key_vault: :class:`KeyVaultKeyReferenceKeyVault - ` - :param key_name: The private key name in key vault. + All required parameters must be populated in order to send to Azure. + + :param key_vault: Required. The key vault reference. + :type key_vault: ~azure.mgmt.logic.models.KeyVaultKeyReferenceKeyVault + :param key_name: Required. The private key name in key vault. :type key_name: str :param key_version: The private key version in key vault. :type key_version: str @@ -35,7 +36,8 @@ class KeyVaultKeyReference(Model): 'key_version': {'key': 'keyVersion', 'type': 'str'}, } - def __init__(self, key_vault, key_name, key_version=None): - self.key_vault = key_vault - self.key_name = key_name - self.key_version = key_version + def __init__(self, **kwargs): + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_vault = kwargs.get('key_vault', None) + self.key_name = kwargs.get('key_name', None) + self.key_version = kwargs.get('key_version', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault.py old mode 100755 new mode 100644 index 9caa8bc94e97..d1d4bda43dbb --- a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault.py @@ -37,7 +37,8 @@ class KeyVaultKeyReferenceKeyVault(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, id=None): - self.id = id + def __init__(self, **kwargs): + super(KeyVaultKeyReferenceKeyVault, self).__init__(**kwargs) + self.id = kwargs.get('id', None) self.name = None self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault_py3.py new file mode 100644 index 000000000000..71b65da492e9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyVaultKeyReferenceKeyVault(Model): + """The key vault reference. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: The resource id. + :type id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(KeyVaultKeyReferenceKeyVault, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_py3.py new file mode 100644 index 000000000000..c46fba8a4a4b --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyVaultKeyReference(Model): + """The reference to the key vault key. + + All required parameters must be populated in order to send to Azure. + + :param key_vault: Required. The key vault reference. + :type key_vault: ~azure.mgmt.logic.models.KeyVaultKeyReferenceKeyVault + :param key_name: Required. The private key name in key vault. + :type key_name: str + :param key_version: The private key version in key vault. + :type key_version: str + """ + + _validation = { + 'key_vault': {'required': True}, + 'key_name': {'required': True}, + } + + _attribute_map = { + 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultKeyReferenceKeyVault'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__(self, *, key_vault, key_name: str, key_version: str=None, **kwargs) -> None: + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_vault = key_vault + self.key_name = key_name + self.key_version = key_version diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference.py new file mode 100644 index 000000000000..7ce542e92b0c --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_reference import ResourceReference + + +class KeyVaultReference(ResourceReference): + """The key vault reference. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultReference, self).__init__(**kwargs) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference_py3.py new file mode 100644 index 000000000000..bfcd7a433416 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_reference_py3 import ResourceReference + + +class KeyVaultReference(ResourceReference): + """The key vault reference. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyVaultReference, self).__init__(**kwargs) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition.py b/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition.py new file mode 100644 index 000000000000..7b989c66c6b5 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListKeyVaultKeysDefinition(Model): + """The list key vault keys definition. + + All required parameters must be populated in order to send to Azure. + + :param key_vault: Required. The key vault reference. + :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference + :param skip_token: The skip token. + :type skip_token: str + """ + + _validation = { + 'key_vault': {'required': True}, + } + + _attribute_map = { + 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultReference'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ListKeyVaultKeysDefinition, self).__init__(**kwargs) + self.key_vault = kwargs.get('key_vault', None) + self.skip_token = kwargs.get('skip_token', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition_py3.py new file mode 100644 index 000000000000..6e726e777df9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListKeyVaultKeysDefinition(Model): + """The list key vault keys definition. + + All required parameters must be populated in order to send to Azure. + + :param key_vault: Required. The key vault reference. + :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference + :param skip_token: The skip token. + :type skip_token: str + """ + + _validation = { + 'key_vault': {'required': True}, + } + + _attribute_map = { + 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultReference'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__(self, *, key_vault, skip_token: str=None, **kwargs) -> None: + super(ListKeyVaultKeysDefinition, self).__init__(**kwargs) + self.key_vault = key_vault + self.skip_token = skip_token diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/logic_management_client_enums.py b/azure-mgmt-logic/azure/mgmt/logic/models/logic_management_client_enums.py old mode 100755 new mode 100644 index 780c7bac1f92..285aeb025198 --- a/azure-mgmt-logic/azure/mgmt/logic/models/logic_management_client_enums.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/logic_management_client_enums.py @@ -12,7 +12,7 @@ from enum import Enum -class WorkflowProvisioningState(Enum): +class WorkflowProvisioningState(str, Enum): not_specified = "NotSpecified" accepted = "Accepted" @@ -34,7 +34,7 @@ class WorkflowProvisioningState(Enum): completed = "Completed" -class WorkflowState(Enum): +class WorkflowState(str, Enum): not_specified = "NotSpecified" completed = "Completed" @@ -44,7 +44,7 @@ class WorkflowState(Enum): suspended = "Suspended" -class SkuName(Enum): +class SkuName(str, Enum): not_specified = "NotSpecified" free = "Free" @@ -54,7 +54,7 @@ class SkuName(Enum): premium = "Premium" -class ParameterType(Enum): +class ParameterType(str, Enum): not_specified = "NotSpecified" string = "String" @@ -67,7 +67,7 @@ class ParameterType(Enum): secure_object = "SecureObject" -class WorkflowTriggerProvisioningState(Enum): +class WorkflowTriggerProvisioningState(str, Enum): not_specified = "NotSpecified" accepted = "Accepted" @@ -89,7 +89,7 @@ class WorkflowTriggerProvisioningState(Enum): completed = "Completed" -class WorkflowStatus(Enum): +class WorkflowStatus(str, Enum): not_specified = "NotSpecified" paused = "Paused" @@ -106,7 +106,7 @@ class WorkflowStatus(Enum): ignored = "Ignored" -class RecurrenceFrequency(Enum): +class RecurrenceFrequency(str, Enum): not_specified = "NotSpecified" second = "Second" @@ -118,7 +118,7 @@ class RecurrenceFrequency(Enum): year = "Year" -class DaysOfWeek(Enum): +class DaysOfWeek(str, Enum): sunday = "Sunday" monday = "Monday" @@ -129,7 +129,7 @@ class DaysOfWeek(Enum): saturday = "Saturday" -class DayOfWeek(Enum): +class DayOfWeek(str, Enum): sunday = "Sunday" monday = "Monday" @@ -140,39 +140,39 @@ class DayOfWeek(Enum): saturday = "Saturday" -class KeyType(Enum): +class KeyType(str, Enum): not_specified = "NotSpecified" primary = "Primary" secondary = "Secondary" -class IntegrationAccountSkuName(Enum): +class IntegrationAccountSkuName(str, Enum): not_specified = "NotSpecified" free = "Free" standard = "Standard" -class SchemaType(Enum): +class SchemaType(str, Enum): not_specified = "NotSpecified" xml = "Xml" -class MapType(Enum): +class MapType(str, Enum): not_specified = "NotSpecified" xslt = "Xslt" -class PartnerType(Enum): +class PartnerType(str, Enum): not_specified = "NotSpecified" b2_b = "B2B" -class AgreementType(Enum): +class AgreementType(str, Enum): not_specified = "NotSpecified" as2 = "AS2" @@ -180,7 +180,7 @@ class AgreementType(Enum): edifact = "Edifact" -class HashingAlgorithm(Enum): +class HashingAlgorithm(str, Enum): not_specified = "NotSpecified" none = "None" @@ -191,7 +191,7 @@ class HashingAlgorithm(Enum): sha2512 = "SHA2512" -class EncryptionAlgorithm(Enum): +class EncryptionAlgorithm(str, Enum): not_specified = "NotSpecified" none = "None" @@ -202,7 +202,7 @@ class EncryptionAlgorithm(Enum): aes256 = "AES256" -class SigningAlgorithm(Enum): +class SigningAlgorithm(str, Enum): not_specified = "NotSpecified" default = "Default" @@ -212,7 +212,7 @@ class SigningAlgorithm(Enum): sha2512 = "SHA2512" -class TrailingSeparatorPolicy(Enum): +class TrailingSeparatorPolicy(str, Enum): not_specified = "NotSpecified" not_allowed = "NotAllowed" @@ -220,7 +220,7 @@ class TrailingSeparatorPolicy(Enum): mandatory = "Mandatory" -class X12CharacterSet(Enum): +class X12CharacterSet(str, Enum): not_specified = "NotSpecified" basic = "Basic" @@ -228,7 +228,7 @@ class X12CharacterSet(Enum): utf8 = "UTF8" -class SegmentTerminatorSuffix(Enum): +class SegmentTerminatorSuffix(str, Enum): not_specified = "NotSpecified" none = "None" @@ -237,14 +237,14 @@ class SegmentTerminatorSuffix(Enum): crlf = "CRLF" -class X12DateFormat(Enum): +class X12DateFormat(str, Enum): not_specified = "NotSpecified" ccyymmdd = "CCYYMMDD" yymmdd = "YYMMDD" -class X12TimeFormat(Enum): +class X12TimeFormat(str, Enum): not_specified = "NotSpecified" hhmm = "HHMM" @@ -253,7 +253,7 @@ class X12TimeFormat(Enum): hhmms_sd = "HHMMSSd" -class UsageIndicator(Enum): +class UsageIndicator(str, Enum): not_specified = "NotSpecified" test = "Test" @@ -261,14 +261,14 @@ class UsageIndicator(Enum): production = "Production" -class MessageFilterType(Enum): +class MessageFilterType(str, Enum): not_specified = "NotSpecified" include = "Include" exclude = "Exclude" -class EdifactCharacterSet(Enum): +class EdifactCharacterSet(str, Enum): not_specified = "NotSpecified" unob = "UNOB" @@ -287,8 +287,51 @@ class EdifactCharacterSet(Enum): keca = "KECA" -class EdifactDecimalIndicator(Enum): +class EdifactDecimalIndicator(str, Enum): not_specified = "NotSpecified" comma = "Comma" decimal_enum = "Decimal" + + +class TrackEventsOperationOptions(str, Enum): + + none = "None" + disable_source_info_enrich = "DisableSourceInfoEnrich" + + +class EventLevel(str, Enum): + + log_always = "LogAlways" + critical = "Critical" + error = "Error" + warning = "Warning" + informational = "Informational" + verbose = "Verbose" + + +class TrackingRecordType(str, Enum): + + not_specified = "NotSpecified" + custom = "Custom" + as2_message = "AS2Message" + as2_mdn = "AS2MDN" + x12_interchange = "X12Interchange" + x12_functional_group = "X12FunctionalGroup" + x12_transaction_set = "X12TransactionSet" + x12_interchange_acknowledgment = "X12InterchangeAcknowledgment" + x12_functional_group_acknowledgment = "X12FunctionalGroupAcknowledgment" + x12_transaction_set_acknowledgment = "X12TransactionSetAcknowledgment" + edifact_interchange = "EdifactInterchange" + edifact_functional_group = "EdifactFunctionalGroup" + edifact_transaction_set = "EdifactTransactionSet" + edifact_interchange_acknowledgment = "EdifactInterchangeAcknowledgment" + edifact_functional_group_acknowledgment = "EdifactFunctionalGroupAcknowledgment" + edifact_transaction_set_acknowledgment = "EdifactTransactionSetAcknowledgment" + + +class AccessKeyType(str, Enum): + + not_specified = "NotSpecified" + primary = "Primary" + secondary = "Secondary" diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/operation.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation.py old mode 100755 new mode 100644 index bd908f8b12b6..24f4765fbb64 --- a/azure-mgmt-logic/azure/mgmt/logic/models/operation.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation.py @@ -18,8 +18,7 @@ class Operation(Model): :param name: Operation name: {provider}/{resource}/{operation} :type name: str :param display: The object that represents the operation. - :type display: :class:`OperationDisplay - ` + :type display: ~azure.mgmt.logic.models.OperationDisplay """ _attribute_map = { @@ -27,6 +26,7 @@ class Operation(Model): 'display': {'key': 'display', 'type': 'OperationDisplay'}, } - def __init__(self, name=None, display=None): - self.name = name - self.display = display + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/operation_display.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation_display.py old mode 100755 new mode 100644 index c451fec8ae87..dde4fd1e3b5b --- a/azure-mgmt-logic/azure/mgmt/logic/models/operation_display.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation_display.py @@ -30,7 +30,8 @@ class OperationDisplay(Model): 'operation': {'key': 'operation', 'type': 'str'}, } - def __init__(self, provider=None, resource=None, operation=None): - self.provider = provider - self.resource = resource - self.operation = operation + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/operation_display_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation_display_py3.py new file mode 100644 index 000000000000..0b35f13673cb --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation_display_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.Logic + :type provider: str + :param resource: Resource on which the operation is performed: Profile, + endpoint, etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/operation_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation_paged.py old mode 100755 new mode 100644 index 09def13d5ae2..d5a86908d4dc --- a/azure-mgmt-logic/azure/mgmt/logic/models/operation_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation_paged.py @@ -14,7 +14,7 @@ class OperationPaged(Paged): """ - A paging container for iterating over a list of Operation object + A paging container for iterating over a list of :class:`Operation ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/operation_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation_py3.py new file mode 100644 index 000000000000..c528c6c5a046 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Logic REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.logic.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/operation_result.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation_result.py new file mode 100644 index 000000000000..6906151ab408 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation_result.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .operation_result_properties import OperationResultProperties + + +class OperationResult(OperationResultProperties): + """The operation result definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :ivar inputs: Gets the inputs. + :vartype inputs: object + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs: Gets the outputs. + :vartype outputs: object + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + :param retry_history: Gets the retry histories. + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :param iteration_count: + :type iteration_count: int + """ + + _validation = { + 'tracking_id': {'readonly': True}, + 'inputs': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'code', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': 'object'}, + 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, + 'outputs': {'key': 'outputs', 'type': 'object'}, + 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, + 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, + 'retry_history': {'key': 'retryHistory', 'type': '[RetryHistory]'}, + 'iteration_count': {'key': 'iterationCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(OperationResult, self).__init__(**kwargs) + self.tracking_id = None + self.inputs = None + self.inputs_link = None + self.outputs = None + self.outputs_link = None + self.tracked_properties = None + self.retry_history = kwargs.get('retry_history', None) + self.iteration_count = kwargs.get('iteration_count', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties.py new file mode 100644 index 000000000000..9e65b94ae7b9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationResultProperties(Model): + """The run operation result properties. + + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'code', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(OperationResultProperties, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.correlation = kwargs.get('correlation', None) + self.status = kwargs.get('status', None) + self.code = kwargs.get('code', None) + self.error = kwargs.get('error', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties_py3.py new file mode 100644 index 000000000000..33aa9fdbebcf --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationResultProperties(Model): + """The run operation result properties. + + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'code', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + } + + def __init__(self, *, start_time=None, end_time=None, correlation=None, status=None, code: str=None, error=None, **kwargs) -> None: + super(OperationResultProperties, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.correlation = correlation + self.status = status + self.code = code + self.error = error diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_py3.py new file mode 100644 index 000000000000..f853db10b4e6 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_py3.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .operation_result_properties_py3 import OperationResultProperties + + +class OperationResult(OperationResultProperties): + """The operation result definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :ivar inputs: Gets the inputs. + :vartype inputs: object + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs: Gets the outputs. + :vartype outputs: object + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + :param retry_history: Gets the retry histories. + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :param iteration_count: + :type iteration_count: int + """ + + _validation = { + 'tracking_id': {'readonly': True}, + 'inputs': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'code', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': 'object'}, + 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, + 'outputs': {'key': 'outputs', 'type': 'object'}, + 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, + 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, + 'retry_history': {'key': 'retryHistory', 'type': '[RetryHistory]'}, + 'iteration_count': {'key': 'iterationCount', 'type': 'int'}, + } + + def __init__(self, *, start_time=None, end_time=None, correlation=None, status=None, code: str=None, error=None, retry_history=None, iteration_count: int=None, **kwargs) -> None: + super(OperationResult, self).__init__(start_time=start_time, end_time=end_time, correlation=correlation, status=status, code=code, error=error, **kwargs) + self.tracking_id = None + self.inputs = None + self.inputs_link = None + self.outputs = None + self.outputs_link = None + self.tracked_properties = None + self.retry_history = retry_history + self.iteration_count = iteration_count diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/partner_content.py b/azure-mgmt-logic/azure/mgmt/logic/models/partner_content.py old mode 100755 new mode 100644 index 8907c61d87f7..8e6050a643d9 --- a/azure-mgmt-logic/azure/mgmt/logic/models/partner_content.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/partner_content.py @@ -16,13 +16,13 @@ class PartnerContent(Model): """The integration account partner content. :param b2b: The B2B partner content. - :type b2b: :class:`B2BPartnerContent - ` + :type b2b: ~azure.mgmt.logic.models.B2BPartnerContent """ _attribute_map = { 'b2b': {'key': 'b2b', 'type': 'B2BPartnerContent'}, } - def __init__(self, b2b=None): - self.b2b = b2b + def __init__(self, **kwargs): + super(PartnerContent, self).__init__(**kwargs) + self.b2b = kwargs.get('b2b', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/partner_content_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/partner_content_py3.py new file mode 100644 index 000000000000..16398395e0b4 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/partner_content_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartnerContent(Model): + """The integration account partner content. + + :param b2b: The B2B partner content. + :type b2b: ~azure.mgmt.logic.models.B2BPartnerContent + """ + + _attribute_map = { + 'b2b': {'key': 'b2b', 'type': 'B2BPartnerContent'}, + } + + def __init__(self, *, b2b=None, **kwargs) -> None: + super(PartnerContent, self).__init__(**kwargs) + self.b2b = b2b diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule.py b/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule.py old mode 100755 new mode 100644 index 1ca81ecd7090..7fdfd3fb5d71 --- a/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule.py @@ -16,17 +16,16 @@ class RecurrenceSchedule(Model): """The recurrence schedule. :param minutes: The minutes. - :type minutes: list of int + :type minutes: list[int] :param hours: The hours. - :type hours: list of int + :type hours: list[int] :param week_days: The days of the week. - :type week_days: list of str or :class:`DaysOfWeek - ` + :type week_days: list[str or ~azure.mgmt.logic.models.DaysOfWeek] :param month_days: The month days. - :type month_days: list of int + :type month_days: list[int] :param monthly_occurrences: The monthly occurrences. - :type monthly_occurrences: list of :class:`RecurrenceScheduleOccurrence - ` + :type monthly_occurrences: + list[~azure.mgmt.logic.models.RecurrenceScheduleOccurrence] """ _attribute_map = { @@ -37,9 +36,10 @@ class RecurrenceSchedule(Model): 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, } - def __init__(self, minutes=None, hours=None, week_days=None, month_days=None, monthly_occurrences=None): - self.minutes = minutes - self.hours = hours - self.week_days = week_days - self.month_days = month_days - self.monthly_occurrences = monthly_occurrences + def __init__(self, **kwargs): + super(RecurrenceSchedule, self).__init__(**kwargs) + self.minutes = kwargs.get('minutes', None) + self.hours = kwargs.get('hours', None) + self.week_days = kwargs.get('week_days', None) + self.month_days = kwargs.get('month_days', None) + self.monthly_occurrences = kwargs.get('monthly_occurrences', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence.py b/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence.py old mode 100755 new mode 100644 index 647d99342d43..b32dbc67e712 --- a/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence.py @@ -13,11 +13,11 @@ class RecurrenceScheduleOccurrence(Model): - """The recurrence schedule occurence. + """The recurrence schedule occurrence. :param day: The day of the week. Possible values include: 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' - :type day: str or :class:`DayOfWeek ` + :type day: str or ~azure.mgmt.logic.models.DayOfWeek :param occurrence: The occurrence. :type occurrence: int """ @@ -27,6 +27,7 @@ class RecurrenceScheduleOccurrence(Model): 'occurrence': {'key': 'occurrence', 'type': 'int'}, } - def __init__(self, day=None, occurrence=None): - self.day = day - self.occurrence = occurrence + def __init__(self, **kwargs): + super(RecurrenceScheduleOccurrence, self).__init__(**kwargs) + self.day = kwargs.get('day', None) + self.occurrence = kwargs.get('occurrence', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence_py3.py new file mode 100644 index 000000000000..1bdaee939cc9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RecurrenceScheduleOccurrence(Model): + """The recurrence schedule occurrence. + + :param day: The day of the week. Possible values include: 'Sunday', + 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' + :type day: str or ~azure.mgmt.logic.models.DayOfWeek + :param occurrence: The occurrence. + :type occurrence: int + """ + + _attribute_map = { + 'day': {'key': 'day', 'type': 'DayOfWeek'}, + 'occurrence': {'key': 'occurrence', 'type': 'int'}, + } + + def __init__(self, *, day=None, occurrence: int=None, **kwargs) -> None: + super(RecurrenceScheduleOccurrence, self).__init__(**kwargs) + self.day = day + self.occurrence = occurrence diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_py3.py new file mode 100644 index 000000000000..68c42503da65 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RecurrenceSchedule(Model): + """The recurrence schedule. + + :param minutes: The minutes. + :type minutes: list[int] + :param hours: The hours. + :type hours: list[int] + :param week_days: The days of the week. + :type week_days: list[str or ~azure.mgmt.logic.models.DaysOfWeek] + :param month_days: The month days. + :type month_days: list[int] + :param monthly_occurrences: The monthly occurrences. + :type monthly_occurrences: + list[~azure.mgmt.logic.models.RecurrenceScheduleOccurrence] + """ + + _attribute_map = { + 'minutes': {'key': 'minutes', 'type': '[int]'}, + 'hours': {'key': 'hours', 'type': '[int]'}, + 'week_days': {'key': 'weekDays', 'type': '[DaysOfWeek]'}, + 'month_days': {'key': 'monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, + } + + def __init__(self, *, minutes=None, hours=None, week_days=None, month_days=None, monthly_occurrences=None, **kwargs) -> None: + super(RecurrenceSchedule, self).__init__(**kwargs) + self.minutes = minutes + self.hours = hours + self.week_days = week_days + self.month_days = month_days + self.monthly_occurrences = monthly_occurrences diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter.py b/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter.py old mode 100755 new mode 100644 index cf8e283c57dd..3538c5b92b6c --- a/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter.py @@ -17,12 +17,13 @@ class RegenerateActionParameter(Model): :param key_type: The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or :class:`KeyType ` + :type key_type: str or ~azure.mgmt.logic.models.KeyType """ _attribute_map = { 'key_type': {'key': 'keyType', 'type': 'KeyType'}, } - def __init__(self, key_type=None): - self.key_type = key_type + def __init__(self, **kwargs): + super(RegenerateActionParameter, self).__init__(**kwargs) + self.key_type = kwargs.get('key_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter_py3.py new file mode 100644 index 000000000000..3594196789eb --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RegenerateActionParameter(Model): + """The access key regenerate action content. + + :param key_type: The key type. Possible values include: 'NotSpecified', + 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + """ + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'KeyType'}, + } + + def __init__(self, *, key_type=None, **kwargs) -> None: + super(RegenerateActionParameter, self).__init__(**kwargs) + self.key_type = key_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index.py b/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index.py new file mode 100644 index 000000000000..d929e8f1fd2e --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepetitionIndex(Model): + """The workflow run action repetition index. + + All required parameters must be populated in order to send to Azure. + + :param scope_name: The scope. + :type scope_name: str + :param item_index: Required. The index. + :type item_index: int + """ + + _validation = { + 'item_index': {'required': True}, + } + + _attribute_map = { + 'scope_name': {'key': 'scopeName', 'type': 'str'}, + 'item_index': {'key': 'itemIndex', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RepetitionIndex, self).__init__(**kwargs) + self.scope_name = kwargs.get('scope_name', None) + self.item_index = kwargs.get('item_index', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index_py3.py new file mode 100644 index 000000000000..8672b59d3c20 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepetitionIndex(Model): + """The workflow run action repetition index. + + All required parameters must be populated in order to send to Azure. + + :param scope_name: The scope. + :type scope_name: str + :param item_index: Required. The index. + :type item_index: int + """ + + _validation = { + 'item_index': {'required': True}, + } + + _attribute_map = { + 'scope_name': {'key': 'scopeName', 'type': 'str'}, + 'item_index': {'key': 'itemIndex', 'type': 'int'}, + } + + def __init__(self, *, item_index: int, scope_name: str=None, **kwargs) -> None: + super(RepetitionIndex, self).__init__(**kwargs) + self.scope_name = scope_name + self.item_index = item_index diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/resource.py b/azure-mgmt-logic/azure/mgmt/logic/models/resource.py old mode 100755 new mode 100644 index 92415fd319ee..dc4a59ade8fd --- a/azure-mgmt-logic/azure/mgmt/logic/models/resource.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/resource.py @@ -27,7 +27,7 @@ class Resource(Model): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict + :type tags: dict[str, str] """ _validation = { @@ -44,9 +44,10 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, location=None, tags=None): + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = location - self.tags = tags + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/resource_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/resource_py3.py new file mode 100644 index 000000000000..f081ebac6ded --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/resource_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """The base resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference.py b/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference.py old mode 100755 new mode 100644 index 3b7a7a6b1939..4d809125c873 --- a/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference.py @@ -38,7 +38,8 @@ class ResourceReference(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self): + def __init__(self, **kwargs): + super(ResourceReference, self).__init__(**kwargs) self.id = None self.name = None self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference_py3.py new file mode 100644 index 000000000000..371ae58efb0e --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceReference(Model): + """The resource reference. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceReference, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/retry_history.py b/azure-mgmt-logic/azure/mgmt/logic/models/retry_history.py old mode 100755 new mode 100644 index 437514f6df40..462db65034cb --- a/azure-mgmt-logic/azure/mgmt/logic/models/retry_history.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/retry_history.py @@ -26,8 +26,7 @@ class RetryHistory(Model): :param service_request_id: Gets the service request Id. :type service_request_id: str :param error: Gets the error response. - :type error: :class:`ErrorResponse - ` + :type error: ~azure.mgmt.logic.models.ErrorResponse """ _attribute_map = { @@ -39,10 +38,11 @@ class RetryHistory(Model): 'error': {'key': 'error', 'type': 'ErrorResponse'}, } - def __init__(self, start_time=None, end_time=None, code=None, client_request_id=None, service_request_id=None, error=None): - self.start_time = start_time - self.end_time = end_time - self.code = code - self.client_request_id = client_request_id - self.service_request_id = service_request_id - self.error = error + def __init__(self, **kwargs): + super(RetryHistory, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.code = kwargs.get('code', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.service_request_id = kwargs.get('service_request_id', None) + self.error = kwargs.get('error', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/retry_history_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/retry_history_py3.py new file mode 100644 index 000000000000..543926ea2398 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/retry_history_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RetryHistory(Model): + """The retry history. + + :param start_time: Gets the start time. + :type start_time: datetime + :param end_time: Gets the end time. + :type end_time: datetime + :param code: Gets the status code. + :type code: str + :param client_request_id: Gets the client request Id. + :type client_request_id: str + :param service_request_id: Gets the service request Id. + :type service_request_id: str + :param error: Gets the error response. + :type error: ~azure.mgmt.logic.models.ErrorResponse + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'code': {'key': 'code', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'service_request_id': {'key': 'serviceRequestId', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, *, start_time=None, end_time=None, code: str=None, client_request_id: str=None, service_request_id: str=None, error=None, **kwargs) -> None: + super(RetryHistory, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.code = code + self.client_request_id = client_request_id + self.service_request_id = service_request_id + self.error = error diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation.py b/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation.py new file mode 100644 index 000000000000..0eefdd86e0a1 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .run_correlation import RunCorrelation + + +class RunActionCorrelation(RunCorrelation): + """The workflow run action correlation properties. + + :param client_tracking_id: The client tracking identifier. + :type client_tracking_id: str + :param client_keywords: The client keywords. + :type client_keywords: list[str] + :param action_tracking_id: The action tracking identifier. + :type action_tracking_id: str + """ + + _attribute_map = { + 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, + 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, + 'action_tracking_id': {'key': 'actionTrackingId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunActionCorrelation, self).__init__(**kwargs) + self.action_tracking_id = kwargs.get('action_tracking_id', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation_py3.py new file mode 100644 index 000000000000..cd46a9dc3d81 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .run_correlation_py3 import RunCorrelation + + +class RunActionCorrelation(RunCorrelation): + """The workflow run action correlation properties. + + :param client_tracking_id: The client tracking identifier. + :type client_tracking_id: str + :param client_keywords: The client keywords. + :type client_keywords: list[str] + :param action_tracking_id: The action tracking identifier. + :type action_tracking_id: str + """ + + _attribute_map = { + 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, + 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, + 'action_tracking_id': {'key': 'actionTrackingId', 'type': 'str'}, + } + + def __init__(self, *, client_tracking_id: str=None, client_keywords=None, action_tracking_id: str=None, **kwargs) -> None: + super(RunActionCorrelation, self).__init__(client_tracking_id=client_tracking_id, client_keywords=client_keywords, **kwargs) + self.action_tracking_id = action_tracking_id diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation.py b/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation.py new file mode 100644 index 000000000000..20463c7ae904 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RunCorrelation(Model): + """The correlation properties. + + :param client_tracking_id: The client tracking identifier. + :type client_tracking_id: str + :param client_keywords: The client keywords. + :type client_keywords: list[str] + """ + + _attribute_map = { + 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, + 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(RunCorrelation, self).__init__(**kwargs) + self.client_tracking_id = kwargs.get('client_tracking_id', None) + self.client_keywords = kwargs.get('client_keywords', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation_py3.py new file mode 100644 index 000000000000..f4c5a7e9f2fa --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RunCorrelation(Model): + """The correlation properties. + + :param client_tracking_id: The client tracking identifier. + :type client_tracking_id: str + :param client_keywords: The client keywords. + :type client_keywords: list[str] + """ + + _attribute_map = { + 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, + 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, + } + + def __init__(self, *, client_tracking_id: str=None, client_keywords=None, **kwargs) -> None: + super(RunCorrelation, self).__init__(**kwargs) + self.client_tracking_id = client_tracking_id + self.client_keywords = client_keywords diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition.py b/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition.py new file mode 100644 index 000000000000..526aa19de353 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SetTriggerStateActionDefinition(Model): + """SetTriggerStateActionDefinition. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. + :type source: ~azure.mgmt.logic.models.WorkflowTrigger + """ + + _validation = { + 'source': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'WorkflowTrigger'}, + } + + def __init__(self, **kwargs): + super(SetTriggerStateActionDefinition, self).__init__(**kwargs) + self.source = kwargs.get('source', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition_py3.py new file mode 100644 index 000000000000..7a1cea7f3c86 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SetTriggerStateActionDefinition(Model): + """SetTriggerStateActionDefinition. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. + :type source: ~azure.mgmt.logic.models.WorkflowTrigger + """ + + _validation = { + 'source': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'WorkflowTrigger'}, + } + + def __init__(self, *, source, **kwargs) -> None: + super(SetTriggerStateActionDefinition, self).__init__(**kwargs) + self.source = source diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/sku.py b/azure-mgmt-logic/azure/mgmt/logic/models/sku.py old mode 100755 new mode 100644 index 6a1122711978..6f430383280c --- a/azure-mgmt-logic/azure/mgmt/logic/models/sku.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/sku.py @@ -15,12 +15,13 @@ class Sku(Model): """The sku type. - :param name: The name. Possible values include: 'NotSpecified', 'Free', - 'Shared', 'Basic', 'Standard', 'Premium' - :type name: str or :class:`SkuName ` + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name. Possible values include: 'NotSpecified', + 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + :type name: str or ~azure.mgmt.logic.models.SkuName :param plan: The reference to plan. - :type plan: :class:`ResourceReference - ` + :type plan: ~azure.mgmt.logic.models.ResourceReference """ _validation = { @@ -32,6 +33,7 @@ class Sku(Model): 'plan': {'key': 'plan', 'type': 'ResourceReference'}, } - def __init__(self, name, plan=None): - self.name = name - self.plan = plan + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.plan = kwargs.get('plan', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/sku_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/sku_py3.py new file mode 100644 index 000000000000..750447b6cdc2 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/sku_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """The sku type. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name. Possible values include: 'NotSpecified', + 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + :type name: str or ~azure.mgmt.logic.models.SkuName + :param plan: The reference to plan. + :type plan: ~azure.mgmt.logic.models.ResourceReference + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuName'}, + 'plan': {'key': 'plan', 'type': 'ResourceReference'}, + } + + def __init__(self, *, name, plan=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.plan = plan diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource.py b/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource.py old mode 100755 new mode 100644 index 8d6c477fb8f6..1e47e072835d --- a/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource.py @@ -30,5 +30,6 @@ class SubResource(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self): + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) self.id = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource_py3.py new file mode 100644 index 000000000000..5654b9bf9a14 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubResource(Model): + """The sub resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event.py b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event.py new file mode 100644 index 000000000000..0148f09bddf3 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TrackingEvent(Model): + """TrackingEvent. + + All required parameters must be populated in order to send to Azure. + + :param event_level: Required. Possible values include: 'LogAlways', + 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' + :type event_level: str or ~azure.mgmt.logic.models.EventLevel + :param event_time: Required. + :type event_time: datetime + :param record_type: Required. Possible values include: 'NotSpecified', + 'Custom', 'AS2Message', 'AS2MDN', 'X12Interchange', 'X12FunctionalGroup', + 'X12TransactionSet', 'X12InterchangeAcknowledgment', + 'X12FunctionalGroupAcknowledgment', 'X12TransactionSetAcknowledgment', + 'EdifactInterchange', 'EdifactFunctionalGroup', 'EdifactTransactionSet', + 'EdifactInterchangeAcknowledgment', + 'EdifactFunctionalGroupAcknowledgment', + 'EdifactTransactionSetAcknowledgment' + :type record_type: str or ~azure.mgmt.logic.models.TrackingRecordType + :param error: + :type error: ~azure.mgmt.logic.models.TrackingEventErrorInfo + """ + + _validation = { + 'event_level': {'required': True}, + 'event_time': {'required': True}, + 'record_type': {'required': True}, + } + + _attribute_map = { + 'event_level': {'key': 'eventLevel', 'type': 'EventLevel'}, + 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, + 'record_type': {'key': 'recordType', 'type': 'TrackingRecordType'}, + 'error': {'key': 'error', 'type': 'TrackingEventErrorInfo'}, + } + + def __init__(self, **kwargs): + super(TrackingEvent, self).__init__(**kwargs) + self.event_level = kwargs.get('event_level', None) + self.event_time = kwargs.get('event_time', None) + self.record_type = kwargs.get('record_type', None) + self.error = kwargs.get('error', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info.py b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info.py new file mode 100644 index 000000000000..c48b9766013d --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TrackingEventErrorInfo(Model): + """TrackingEventErrorInfo. + + :param message: + :type message: str + :param code: + :type code: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackingEventErrorInfo, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.code = kwargs.get('code', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info_py3.py new file mode 100644 index 000000000000..1f32ee71cf18 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TrackingEventErrorInfo(Model): + """TrackingEventErrorInfo. + + :param message: + :type message: str + :param code: + :type code: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__(self, *, message: str=None, code: str=None, **kwargs) -> None: + super(TrackingEventErrorInfo, self).__init__(**kwargs) + self.message = message + self.code = code diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_py3.py new file mode 100644 index 000000000000..ba57b9107f57 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TrackingEvent(Model): + """TrackingEvent. + + All required parameters must be populated in order to send to Azure. + + :param event_level: Required. Possible values include: 'LogAlways', + 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' + :type event_level: str or ~azure.mgmt.logic.models.EventLevel + :param event_time: Required. + :type event_time: datetime + :param record_type: Required. Possible values include: 'NotSpecified', + 'Custom', 'AS2Message', 'AS2MDN', 'X12Interchange', 'X12FunctionalGroup', + 'X12TransactionSet', 'X12InterchangeAcknowledgment', + 'X12FunctionalGroupAcknowledgment', 'X12TransactionSetAcknowledgment', + 'EdifactInterchange', 'EdifactFunctionalGroup', 'EdifactTransactionSet', + 'EdifactInterchangeAcknowledgment', + 'EdifactFunctionalGroupAcknowledgment', + 'EdifactTransactionSetAcknowledgment' + :type record_type: str or ~azure.mgmt.logic.models.TrackingRecordType + :param error: + :type error: ~azure.mgmt.logic.models.TrackingEventErrorInfo + """ + + _validation = { + 'event_level': {'required': True}, + 'event_time': {'required': True}, + 'record_type': {'required': True}, + } + + _attribute_map = { + 'event_level': {'key': 'eventLevel', 'type': 'EventLevel'}, + 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, + 'record_type': {'key': 'recordType', 'type': 'TrackingRecordType'}, + 'error': {'key': 'error', 'type': 'TrackingEventErrorInfo'}, + } + + def __init__(self, *, event_level, event_time, record_type, error=None, **kwargs) -> None: + super(TrackingEvent, self).__init__(**kwargs) + self.event_level = event_level + self.event_time = event_time + self.record_type = record_type + self.error = error diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition.py b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition.py new file mode 100644 index 000000000000..7ac2420546cc --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TrackingEventsDefinition(Model): + """TrackingEventsDefinition. + + All required parameters must be populated in order to send to Azure. + + :param source_type: Required. + :type source_type: str + :param track_events_options: Possible values include: 'None', + 'DisableSourceInfoEnrich' + :type track_events_options: str or + ~azure.mgmt.logic.models.TrackEventsOperationOptions + :param events: Required. + :type events: list[~azure.mgmt.logic.models.TrackingEvent] + """ + + _validation = { + 'source_type': {'required': True}, + 'events': {'required': True}, + } + + _attribute_map = { + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'track_events_options': {'key': 'trackEventsOptions', 'type': 'TrackEventsOperationOptions'}, + 'events': {'key': 'events', 'type': '[TrackingEvent]'}, + } + + def __init__(self, **kwargs): + super(TrackingEventsDefinition, self).__init__(**kwargs) + self.source_type = kwargs.get('source_type', None) + self.track_events_options = kwargs.get('track_events_options', None) + self.events = kwargs.get('events', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition_py3.py new file mode 100644 index 000000000000..97819d3dc968 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TrackingEventsDefinition(Model): + """TrackingEventsDefinition. + + All required parameters must be populated in order to send to Azure. + + :param source_type: Required. + :type source_type: str + :param track_events_options: Possible values include: 'None', + 'DisableSourceInfoEnrich' + :type track_events_options: str or + ~azure.mgmt.logic.models.TrackEventsOperationOptions + :param events: Required. + :type events: list[~azure.mgmt.logic.models.TrackingEvent] + """ + + _validation = { + 'source_type': {'required': True}, + 'events': {'required': True}, + } + + _attribute_map = { + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'track_events_options': {'key': 'trackEventsOptions', 'type': 'TrackEventsOperationOptions'}, + 'events': {'key': 'events', 'type': '[TrackingEvent]'}, + } + + def __init__(self, *, source_type: str, events, track_events_options=None, **kwargs) -> None: + super(TrackingEventsDefinition, self).__init__(**kwargs) + self.source_type = source_type + self.track_events_options = track_events_options + self.events = events diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow.py old mode 100755 new mode 100644 index bcf25b58be16..6ba75fdbaead --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow.py @@ -27,35 +27,33 @@ class Workflow(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict + :type tags: dict[str, str] :ivar provisioning_state: Gets the provisioning state. Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', 'Unregistered', 'Completed' - :vartype provisioning_state: str or :class:`WorkflowProvisioningState - ` + :vartype provisioning_state: str or + ~azure.mgmt.logic.models.WorkflowProvisioningState :ivar created_time: Gets the created time. :vartype created_time: datetime :ivar changed_time: Gets the changed time. :vartype changed_time: datetime :param state: The state. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :type state: str or :class:`WorkflowState - ` + :type state: str or ~azure.mgmt.logic.models.WorkflowState :ivar version: Gets the version. :vartype version: str :ivar access_endpoint: Gets the access endpoint. :vartype access_endpoint: str :param sku: The sku. - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.logic.models.Sku :param integration_account: The integration account. - :type integration_account: :class:`ResourceReference - ` + :type integration_account: ~azure.mgmt.logic.models.ResourceReference :param definition: The definition. :type definition: object :param parameters: The parameters. - :type parameters: dict + :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] """ _validation = { @@ -87,15 +85,15 @@ class Workflow(Resource): 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, } - def __init__(self, location=None, tags=None, state=None, sku=None, integration_account=None, definition=None, parameters=None): - super(Workflow, self).__init__(location=location, tags=tags) + def __init__(self, **kwargs): + super(Workflow, self).__init__(**kwargs) self.provisioning_state = None self.created_time = None self.changed_time = None - self.state = state + self.state = kwargs.get('state', None) self.version = None self.access_endpoint = None - self.sku = sku - self.integration_account = integration_account - self.definition = definition - self.parameters = parameters + self.sku = kwargs.get('sku', None) + self.integration_account = kwargs.get('integration_account', None) + self.definition = kwargs.get('definition', None) + self.parameters = kwargs.get('parameters', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter.py old mode 100755 new mode 100644 index c2aad0f66f76..0175b536c69b --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter.py @@ -17,13 +17,13 @@ class WorkflowFilter(Model): :param state: The state of workflows. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :type state: str or :class:`WorkflowState - ` + :type state: str or ~azure.mgmt.logic.models.WorkflowState """ _attribute_map = { 'state': {'key': 'state', 'type': 'WorkflowState'}, } - def __init__(self, state=None): - self.state = state + def __init__(self, **kwargs): + super(WorkflowFilter, self).__init__(**kwargs) + self.state = kwargs.get('state', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter_py3.py new file mode 100644 index 000000000000..7efc6c47d063 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkflowFilter(Model): + """The workflow filter. + + :param state: The state of workflows. Possible values include: + 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :type state: str or ~azure.mgmt.logic.models.WorkflowState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'WorkflowState'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(WorkflowFilter, self).__init__(**kwargs) + self.state = state diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter.py old mode 100755 new mode 100644 index 240d886ab136..cb568ef000f2 --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter.py @@ -20,8 +20,7 @@ class WorkflowOutputParameter(WorkflowParameter): :param type: The type. Possible values include: 'NotSpecified', 'String', 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', 'SecureObject' - :type type: str or :class:`ParameterType - ` + :type type: str or ~azure.mgmt.logic.models.ParameterType :param value: The value. :type value: object :param metadata: The metadata. @@ -44,6 +43,6 @@ class WorkflowOutputParameter(WorkflowParameter): 'error': {'key': 'error', 'type': 'object'}, } - def __init__(self, type=None, value=None, metadata=None, description=None): - super(WorkflowOutputParameter, self).__init__(type=type, value=value, metadata=metadata, description=description) + def __init__(self, **kwargs): + super(WorkflowOutputParameter, self).__init__(**kwargs) self.error = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter_py3.py new file mode 100644 index 000000000000..56d6c1a336f5 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .workflow_parameter_py3 import WorkflowParameter + + +class WorkflowOutputParameter(WorkflowParameter): + """The workflow output parameter. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param type: The type. Possible values include: 'NotSpecified', 'String', + 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', 'SecureObject' + :type type: str or ~azure.mgmt.logic.models.ParameterType + :param value: The value. + :type value: object + :param metadata: The metadata. + :type metadata: object + :param description: The description. + :type description: str + :ivar error: Gets the error. + :vartype error: object + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ParameterType'}, + 'value': {'key': 'value', 'type': 'object'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'description': {'key': 'description', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + } + + def __init__(self, *, type=None, value=None, metadata=None, description: str=None, **kwargs) -> None: + super(WorkflowOutputParameter, self).__init__(type=type, value=value, metadata=metadata, description=description, **kwargs) + self.error = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_paged.py old mode 100755 new mode 100644 index 1c178f528481..8b19166fae8b --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_paged.py @@ -14,7 +14,7 @@ class WorkflowPaged(Paged): """ - A paging container for iterating over a list of Workflow object + A paging container for iterating over a list of :class:`Workflow ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter.py old mode 100755 new mode 100644 index 84e620b343f9..14c6c49ec41f --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter.py @@ -17,8 +17,7 @@ class WorkflowParameter(Model): :param type: The type. Possible values include: 'NotSpecified', 'String', 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', 'SecureObject' - :type type: str or :class:`ParameterType - ` + :type type: str or ~azure.mgmt.logic.models.ParameterType :param value: The value. :type value: object :param metadata: The metadata. @@ -34,8 +33,9 @@ class WorkflowParameter(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, type=None, value=None, metadata=None, description=None): - self.type = type - self.value = value - self.metadata = metadata - self.description = description + def __init__(self, **kwargs): + super(WorkflowParameter, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.value = kwargs.get('value', None) + self.metadata = kwargs.get('metadata', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter_py3.py new file mode 100644 index 000000000000..f40a0753d708 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkflowParameter(Model): + """The workflow parameters. + + :param type: The type. Possible values include: 'NotSpecified', 'String', + 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', 'SecureObject' + :type type: str or ~azure.mgmt.logic.models.ParameterType + :param value: The value. + :type value: object + :param metadata: The metadata. + :type metadata: object + :param description: The description. + :type description: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ParameterType'}, + 'value': {'key': 'value', 'type': 'object'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, type=None, value=None, metadata=None, description: str=None, **kwargs) -> None: + super(WorkflowParameter, self).__init__(**kwargs) + self.type = type + self.value = value + self.metadata = metadata + self.description = description diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_py3.py new file mode 100644 index 000000000000..2183f7ec9e8e --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_py3.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class Workflow(Resource): + """The workflow type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: Gets the provisioning state. Possible values + include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', + 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', + 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', + 'Unregistered', 'Completed' + :vartype provisioning_state: str or + ~azure.mgmt.logic.models.WorkflowProvisioningState + :ivar created_time: Gets the created time. + :vartype created_time: datetime + :ivar changed_time: Gets the changed time. + :vartype changed_time: datetime + :param state: The state. Possible values include: 'NotSpecified', + 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :type state: str or ~azure.mgmt.logic.models.WorkflowState + :ivar version: Gets the version. + :vartype version: str + :ivar access_endpoint: Gets the access endpoint. + :vartype access_endpoint: str + :param sku: The sku. + :type sku: ~azure.mgmt.logic.models.Sku + :param integration_account: The integration account. + :type integration_account: ~azure.mgmt.logic.models.ResourceReference + :param definition: The definition. + :type definition: object + :param parameters: The parameters. + :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'version': {'readonly': True}, + 'access_endpoint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'WorkflowProvisioningState'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'WorkflowState'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'access_endpoint': {'key': 'properties.accessEndpoint', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'integration_account': {'key': 'properties.integrationAccount', 'type': 'ResourceReference'}, + 'definition': {'key': 'properties.definition', 'type': 'object'}, + 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, + } + + def __init__(self, *, location: str=None, tags=None, state=None, sku=None, integration_account=None, definition=None, parameters=None, **kwargs) -> None: + super(Workflow, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.created_time = None + self.changed_time = None + self.state = state + self.version = None + self.access_endpoint = None + self.sku = sku + self.integration_account = integration_account + self.definition = definition + self.parameters = parameters diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run.py old mode 100755 new mode 100644 index 6a03dc149b72..29b942f78095 --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run.py @@ -20,6 +20,8 @@ class WorkflowRun(SubResource): :ivar id: The resource id. :vartype id: str + :ivar wait_end_time: Gets the wait end time. + :vartype wait_end_time: datetime :ivar start_time: Gets the start time. :vartype start_time: datetime :ivar end_time: Gets the end time. @@ -27,8 +29,7 @@ class WorkflowRun(SubResource): :ivar status: Gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or :class:`WorkflowStatus - ` + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus :ivar code: Gets the code. :vartype code: str :ivar error: Gets the error. @@ -36,19 +37,16 @@ class WorkflowRun(SubResource): :ivar correlation_id: Gets the correlation id. :vartype correlation_id: str :param correlation: The run correlation. - :type correlation: :class:`Correlation - ` + :type correlation: ~azure.mgmt.logic.models.Correlation :ivar workflow: Gets the reference to workflow version. - :vartype workflow: :class:`ResourceReference - ` + :vartype workflow: ~azure.mgmt.logic.models.ResourceReference :ivar trigger: Gets the fired trigger. - :vartype trigger: :class:`WorkflowRunTrigger - ` + :vartype trigger: ~azure.mgmt.logic.models.WorkflowRunTrigger :ivar outputs: Gets the outputs. - :vartype outputs: dict + :vartype outputs: dict[str, + ~azure.mgmt.logic.models.WorkflowOutputParameter] :ivar response: Gets the response of the flow run. - :vartype response: :class:`WorkflowRunTrigger - ` + :vartype response: ~azure.mgmt.logic.models.WorkflowRunTrigger :ivar name: Gets the workflow run name. :vartype name: str :ivar type: Gets the workflow run type. @@ -57,6 +55,7 @@ class WorkflowRun(SubResource): _validation = { 'id': {'readonly': True}, + 'wait_end_time': {'readonly': True}, 'start_time': {'readonly': True}, 'end_time': {'readonly': True}, 'status': {'readonly': True}, @@ -73,6 +72,7 @@ class WorkflowRun(SubResource): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'wait_end_time': {'key': 'properties.waitEndTime', 'type': 'iso-8601'}, 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, 'status': {'key': 'properties.status', 'type': 'WorkflowStatus'}, @@ -88,15 +88,16 @@ class WorkflowRun(SubResource): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, correlation=None): - super(WorkflowRun, self).__init__() + def __init__(self, **kwargs): + super(WorkflowRun, self).__init__(**kwargs) + self.wait_end_time = None self.start_time = None self.end_time = None self.status = None self.code = None self.error = None self.correlation_id = None - self.correlation = correlation + self.correlation = kwargs.get('correlation', None) self.workflow = None self.trigger = None self.outputs = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action.py old mode 100755 new mode 100644 index 6691ac2a175d..109e7abd552a --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action.py @@ -27,8 +27,7 @@ class WorkflowRunAction(SubResource): :ivar status: Gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or :class:`WorkflowStatus - ` + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus :ivar code: Gets the code. :vartype code: str :ivar error: Gets the error. @@ -36,19 +35,15 @@ class WorkflowRunAction(SubResource): :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str :param correlation: The correlation properties. - :type correlation: :class:`Correlation - ` + :type correlation: ~azure.mgmt.logic.models.Correlation :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: :class:`ContentLink - ` + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: :class:`ContentLink - ` + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink :ivar tracked_properties: Gets the tracked properties. :vartype tracked_properties: object :param retry_history: Gets the retry histories. - :type retry_history: list of :class:`RetryHistory - ` + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] :ivar name: Gets the workflow run action name. :vartype name: str :ivar type: Gets the workflow run action type. @@ -87,18 +82,18 @@ class WorkflowRunAction(SubResource): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, correlation=None, retry_history=None): - super(WorkflowRunAction, self).__init__() + def __init__(self, **kwargs): + super(WorkflowRunAction, self).__init__(**kwargs) self.start_time = None self.end_time = None self.status = None self.code = None self.error = None self.tracking_id = None - self.correlation = correlation + self.correlation = kwargs.get('correlation', None) self.inputs_link = None self.outputs_link = None self.tracked_properties = None - self.retry_history = retry_history + self.retry_history = kwargs.get('retry_history', None) self.name = None self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter.py old mode 100755 new mode 100644 index 99e1240f58d5..ae0f4aea8ea1 --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter.py @@ -19,13 +19,13 @@ class WorkflowRunActionFilter(Model): 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :type status: str or :class:`WorkflowStatus - ` + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus """ _attribute_map = { 'status': {'key': 'status', 'type': 'WorkflowStatus'}, } - def __init__(self, status=None): - self.status = status + def __init__(self, **kwargs): + super(WorkflowRunActionFilter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter_py3.py new file mode 100644 index 000000000000..a2bdf89cd7f1 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter_py3.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkflowRunActionFilter(Model): + """The workflow run action filter. + + :param status: The status of workflow run action. Possible values include: + 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', + 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'WorkflowStatus'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(WorkflowRunActionFilter, self).__init__(**kwargs) + self.status = status diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_paged.py old mode 100755 new mode 100644 index fa92d01ae335..4f541f4f2d8e --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_paged.py @@ -14,7 +14,7 @@ class WorkflowRunActionPaged(Paged): """ - A paging container for iterating over a list of WorkflowRunAction object + A paging container for iterating over a list of :class:`WorkflowRunAction ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_py3.py new file mode 100644 index 000000000000..c2bdbc2c31ef --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_py3.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_resource_py3 import SubResource + + +class WorkflowRunAction(SubResource): + """The workflow run action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar start_time: Gets the start time. + :vartype start_time: datetime + :ivar end_time: Gets the end time. + :vartype end_time: datetime + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar code: Gets the code. + :vartype code: str + :ivar error: Gets the error. + :vartype error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + :param retry_history: Gets the retry histories. + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :ivar name: Gets the workflow run action name. + :vartype name: str + :ivar type: Gets the workflow run action type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'status': {'readonly': True}, + 'code': {'readonly': True}, + 'error': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, + 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, + 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, + 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, + 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, + 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, correlation=None, retry_history=None, **kwargs) -> None: + super(WorkflowRunAction, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.status = None + self.code = None + self.error = None + self.tracking_id = None + self.correlation = correlation + self.inputs_link = None + self.outputs_link = None + self.tracked_properties = None + self.retry_history = retry_history + self.name = None + self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition.py new file mode 100644 index 000000000000..0c66a57624a2 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class WorkflowRunActionRepetitionDefinition(Resource): + """The workflow run action repetition definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :ivar inputs: Gets the inputs. + :vartype inputs: object + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs: Gets the outputs. + :vartype outputs: object + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + :param retry_history: Gets the retry histories. + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :param iteration_count: + :type iteration_count: int + :param repetition_indexes: The repetition indexes. + :type repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'inputs': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'properties.correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'properties.status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, + 'inputs': {'key': 'properties.inputs', 'type': 'object'}, + 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, + 'outputs': {'key': 'properties.outputs', 'type': 'object'}, + 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, + 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, + 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, + 'iteration_count': {'key': 'properties.iterationCount', 'type': 'int'}, + 'repetition_indexes': {'key': 'properties.repetitionIndexes', 'type': '[RepetitionIndex]'}, + } + + def __init__(self, **kwargs): + super(WorkflowRunActionRepetitionDefinition, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.correlation = kwargs.get('correlation', None) + self.status = kwargs.get('status', None) + self.code = kwargs.get('code', None) + self.error = kwargs.get('error', None) + self.tracking_id = None + self.inputs = None + self.inputs_link = None + self.outputs = None + self.outputs_link = None + self.tracked_properties = None + self.retry_history = kwargs.get('retry_history', None) + self.iteration_count = kwargs.get('iteration_count', None) + self.repetition_indexes = kwargs.get('repetition_indexes', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection.py new file mode 100644 index 000000000000..2579dd8d91d5 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkflowRunActionRepetitionDefinitionCollection(Model): + """A collection of workflow run action repetitions. + + :param value: + :type value: + list[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WorkflowRunActionRepetitionDefinition]'}, + } + + def __init__(self, **kwargs): + super(WorkflowRunActionRepetitionDefinitionCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection_py3.py new file mode 100644 index 000000000000..8e91a4d9e493 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkflowRunActionRepetitionDefinitionCollection(Model): + """A collection of workflow run action repetitions. + + :param value: + :type value: + list[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WorkflowRunActionRepetitionDefinition]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(WorkflowRunActionRepetitionDefinitionCollection, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_paged.py new file mode 100644 index 000000000000..edb3bdb62a07 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class WorkflowRunActionRepetitionDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkflowRunActionRepetitionDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkflowRunActionRepetitionDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkflowRunActionRepetitionDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_py3.py new file mode 100644 index 000000000000..d2f922d27aef --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_py3.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class WorkflowRunActionRepetitionDefinition(Resource): + """The workflow run action repetition definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :ivar inputs: Gets the inputs. + :vartype inputs: object + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs: Gets the outputs. + :vartype outputs: object + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + :param retry_history: Gets the retry histories. + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :param iteration_count: + :type iteration_count: int + :param repetition_indexes: The repetition indexes. + :type repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'inputs': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'properties.correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'properties.status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, + 'inputs': {'key': 'properties.inputs', 'type': 'object'}, + 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, + 'outputs': {'key': 'properties.outputs', 'type': 'object'}, + 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, + 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, + 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, + 'iteration_count': {'key': 'properties.iterationCount', 'type': 'int'}, + 'repetition_indexes': {'key': 'properties.repetitionIndexes', 'type': '[RepetitionIndex]'}, + } + + def __init__(self, *, location: str=None, tags=None, start_time=None, end_time=None, correlation=None, status=None, code: str=None, error=None, retry_history=None, iteration_count: int=None, repetition_indexes=None, **kwargs) -> None: + super(WorkflowRunActionRepetitionDefinition, self).__init__(location=location, tags=tags, **kwargs) + self.start_time = start_time + self.end_time = end_time + self.correlation = correlation + self.status = status + self.code = code + self.error = error + self.tracking_id = None + self.inputs = None + self.inputs_link = None + self.outputs = None + self.outputs_link = None + self.tracked_properties = None + self.retry_history = retry_history + self.iteration_count = iteration_count + self.repetition_indexes = repetition_indexes diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter.py old mode 100755 new mode 100644 index 8f0c070b3b9a..99f92563b4a8 --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter.py @@ -19,13 +19,13 @@ class WorkflowRunFilter(Model): 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :type status: str or :class:`WorkflowStatus - ` + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus """ _attribute_map = { 'status': {'key': 'status', 'type': 'WorkflowStatus'}, } - def __init__(self, status=None): - self.status = status + def __init__(self, **kwargs): + super(WorkflowRunFilter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter_py3.py new file mode 100644 index 000000000000..b118d686766e --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter_py3.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkflowRunFilter(Model): + """The workflow run filter. + + :param status: The status of workflow run. Possible values include: + 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', + 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'WorkflowStatus'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(WorkflowRunFilter, self).__init__(**kwargs) + self.status = status diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_paged.py old mode 100755 new mode 100644 index f9f54e39856b..877053124bea --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_paged.py @@ -14,7 +14,7 @@ class WorkflowRunPaged(Paged): """ - A paging container for iterating over a list of WorkflowRun object + A paging container for iterating over a list of :class:`WorkflowRun ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_py3.py new file mode 100644 index 000000000000..4346f0b4550a --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_py3.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_resource_py3 import SubResource + + +class WorkflowRun(SubResource): + """The workflow run. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar wait_end_time: Gets the wait end time. + :vartype wait_end_time: datetime + :ivar start_time: Gets the start time. + :vartype start_time: datetime + :ivar end_time: Gets the end time. + :vartype end_time: datetime + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar code: Gets the code. + :vartype code: str + :ivar error: Gets the error. + :vartype error: object + :ivar correlation_id: Gets the correlation id. + :vartype correlation_id: str + :param correlation: The run correlation. + :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar workflow: Gets the reference to workflow version. + :vartype workflow: ~azure.mgmt.logic.models.ResourceReference + :ivar trigger: Gets the fired trigger. + :vartype trigger: ~azure.mgmt.logic.models.WorkflowRunTrigger + :ivar outputs: Gets the outputs. + :vartype outputs: dict[str, + ~azure.mgmt.logic.models.WorkflowOutputParameter] + :ivar response: Gets the response of the flow run. + :vartype response: ~azure.mgmt.logic.models.WorkflowRunTrigger + :ivar name: Gets the workflow run name. + :vartype name: str + :ivar type: Gets the workflow run type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'wait_end_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'status': {'readonly': True}, + 'code': {'readonly': True}, + 'error': {'readonly': True}, + 'correlation_id': {'readonly': True}, + 'workflow': {'readonly': True}, + 'trigger': {'readonly': True}, + 'outputs': {'readonly': True}, + 'response': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'wait_end_time': {'key': 'properties.waitEndTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'correlation_id': {'key': 'properties.correlationId', 'type': 'str'}, + 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, + 'workflow': {'key': 'properties.workflow', 'type': 'ResourceReference'}, + 'trigger': {'key': 'properties.trigger', 'type': 'WorkflowRunTrigger'}, + 'outputs': {'key': 'properties.outputs', 'type': '{WorkflowOutputParameter}'}, + 'response': {'key': 'properties.response', 'type': 'WorkflowRunTrigger'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, correlation=None, **kwargs) -> None: + super(WorkflowRun, self).__init__(**kwargs) + self.wait_end_time = None + self.start_time = None + self.end_time = None + self.status = None + self.code = None + self.error = None + self.correlation_id = None + self.correlation = correlation + self.workflow = None + self.trigger = None + self.outputs = None + self.response = None + self.name = None + self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger.py old mode 100755 new mode 100644 index 8d44f8a3c007..5601c36ac0ed --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger.py @@ -23,13 +23,13 @@ class WorkflowRunTrigger(Model): :ivar inputs: Gets the inputs. :vartype inputs: object :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: :class:`ContentLink - ` + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink :ivar outputs: Gets the outputs. :vartype outputs: object :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: :class:`ContentLink - ` + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar scheduled_time: Gets the scheduled time. + :vartype scheduled_time: datetime :ivar start_time: Gets the start time. :vartype start_time: datetime :ivar end_time: Gets the end time. @@ -37,15 +37,13 @@ class WorkflowRunTrigger(Model): :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str :param correlation: The run correlation. - :type correlation: :class:`Correlation - ` + :type correlation: ~azure.mgmt.logic.models.Correlation :ivar code: Gets the code. :vartype code: str :ivar status: Gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or :class:`WorkflowStatus - ` + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus :ivar error: Gets the error. :vartype error: object :ivar tracked_properties: Gets the tracked properties. @@ -58,6 +56,7 @@ class WorkflowRunTrigger(Model): 'inputs_link': {'readonly': True}, 'outputs': {'readonly': True}, 'outputs_link': {'readonly': True}, + 'scheduled_time': {'readonly': True}, 'start_time': {'readonly': True}, 'end_time': {'readonly': True}, 'tracking_id': {'readonly': True}, @@ -73,6 +72,7 @@ class WorkflowRunTrigger(Model): 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, 'outputs': {'key': 'outputs', 'type': 'object'}, 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, + 'scheduled_time': {'key': 'scheduledTime', 'type': 'iso-8601'}, 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, 'tracking_id': {'key': 'trackingId', 'type': 'str'}, @@ -83,16 +83,18 @@ class WorkflowRunTrigger(Model): 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, } - def __init__(self, correlation=None): + def __init__(self, **kwargs): + super(WorkflowRunTrigger, self).__init__(**kwargs) self.name = None self.inputs = None self.inputs_link = None self.outputs = None self.outputs_link = None + self.scheduled_time = None self.start_time = None self.end_time = None self.tracking_id = None - self.correlation = correlation + self.correlation = kwargs.get('correlation', None) self.code = None self.status = None self.error = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger_py3.py new file mode 100644 index 000000000000..eae9e8073abb --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger_py3.py @@ -0,0 +1,101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkflowRunTrigger(Model): + """The workflow run trigger. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Gets the name. + :vartype name: str + :ivar inputs: Gets the inputs. + :vartype inputs: object + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs: Gets the outputs. + :vartype outputs: object + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar scheduled_time: Gets the scheduled time. + :vartype scheduled_time: datetime + :ivar start_time: Gets the start time. + :vartype start_time: datetime + :ivar end_time: Gets the end time. + :vartype end_time: datetime + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :param correlation: The run correlation. + :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar code: Gets the code. + :vartype code: str + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar error: Gets the error. + :vartype error: object + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + """ + + _validation = { + 'name': {'readonly': True}, + 'inputs': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'scheduled_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'code': {'readonly': True}, + 'status': {'readonly': True}, + 'error': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': 'object'}, + 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, + 'outputs': {'key': 'outputs', 'type': 'object'}, + 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, + 'scheduled_time': {'key': 'scheduledTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'correlation': {'key': 'correlation', 'type': 'Correlation'}, + 'code': {'key': 'code', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'WorkflowStatus'}, + 'error': {'key': 'error', 'type': 'object'}, + 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, + } + + def __init__(self, *, correlation=None, **kwargs) -> None: + super(WorkflowRunTrigger, self).__init__(**kwargs) + self.name = None + self.inputs = None + self.inputs_link = None + self.outputs = None + self.outputs_link = None + self.scheduled_time = None + self.start_time = None + self.end_time = None + self.tracking_id = None + self.correlation = correlation + self.code = None + self.status = None + self.error = None + self.tracked_properties = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger.py old mode 100755 new mode 100644 index 138b372983e0..2555cd97ca74 --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger.py @@ -26,31 +26,26 @@ class WorkflowTrigger(SubResource): 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', 'Unregistered', 'Completed' :vartype provisioning_state: str or - :class:`WorkflowTriggerProvisioningState - ` + ~azure.mgmt.logic.models.WorkflowTriggerProvisioningState :ivar created_time: Gets the created time. :vartype created_time: datetime :ivar changed_time: Gets the changed time. :vartype changed_time: datetime :ivar state: Gets the state. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :vartype state: str or :class:`WorkflowState - ` + :vartype state: str or ~azure.mgmt.logic.models.WorkflowState :ivar status: Gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or :class:`WorkflowStatus - ` + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus :ivar last_execution_time: Gets the last execution time. :vartype last_execution_time: datetime :ivar next_execution_time: Gets the next execution time. :vartype next_execution_time: datetime :ivar recurrence: Gets the workflow trigger recurrence. - :vartype recurrence: :class:`WorkflowTriggerRecurrence - ` + :vartype recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence :ivar workflow: Gets the reference to workflow. - :vartype workflow: :class:`ResourceReference - ` + :vartype workflow: ~azure.mgmt.logic.models.ResourceReference :ivar name: Gets the workflow trigger name. :vartype name: str :ivar type: Gets the workflow trigger type. @@ -87,8 +82,8 @@ class WorkflowTrigger(SubResource): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self): - super(WorkflowTrigger, self).__init__() + def __init__(self, **kwargs): + super(WorkflowTrigger, self).__init__(**kwargs) self.provisioning_state = None self.created_time = None self.changed_time = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url.py old mode 100755 new mode 100644 index e2d2b9f9b624..77e7b4cdc13e --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url.py @@ -28,10 +28,10 @@ class WorkflowTriggerCallbackUrl(Model): :vartype relative_path: str :param relative_path_parameters: Gets the workflow trigger callback URL relative path parameters. - :type relative_path_parameters: list of str + :type relative_path_parameters: list[str] :param queries: Gets the workflow trigger callback URL query parameters. - :type queries: :class:`WorkflowTriggerListCallbackUrlQueries - ` + :type queries: + ~azure.mgmt.logic.models.WorkflowTriggerListCallbackUrlQueries """ _validation = { @@ -50,10 +50,11 @@ class WorkflowTriggerCallbackUrl(Model): 'queries': {'key': 'queries', 'type': 'WorkflowTriggerListCallbackUrlQueries'}, } - def __init__(self, relative_path_parameters=None, queries=None): + def __init__(self, **kwargs): + super(WorkflowTriggerCallbackUrl, self).__init__(**kwargs) self.value = None self.method = None self.base_path = None self.relative_path = None - self.relative_path_parameters = relative_path_parameters - self.queries = queries + self.relative_path_parameters = kwargs.get('relative_path_parameters', None) + self.queries = kwargs.get('queries', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url_py3.py new file mode 100644 index 000000000000..99f6c9c7f080 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkflowTriggerCallbackUrl(Model): + """The workflow trigger callback URL. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Gets the workflow trigger callback URL. + :vartype value: str + :ivar method: Gets the workflow trigger callback URL HTTP method. + :vartype method: str + :ivar base_path: Gets the workflow trigger callback URL base path. + :vartype base_path: str + :ivar relative_path: Gets the workflow trigger callback URL relative path. + :vartype relative_path: str + :param relative_path_parameters: Gets the workflow trigger callback URL + relative path parameters. + :type relative_path_parameters: list[str] + :param queries: Gets the workflow trigger callback URL query parameters. + :type queries: + ~azure.mgmt.logic.models.WorkflowTriggerListCallbackUrlQueries + """ + + _validation = { + 'value': {'readonly': True}, + 'method': {'readonly': True}, + 'base_path': {'readonly': True}, + 'relative_path': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'base_path': {'key': 'basePath', 'type': 'str'}, + 'relative_path': {'key': 'relativePath', 'type': 'str'}, + 'relative_path_parameters': {'key': 'relativePathParameters', 'type': '[str]'}, + 'queries': {'key': 'queries', 'type': 'WorkflowTriggerListCallbackUrlQueries'}, + } + + def __init__(self, *, relative_path_parameters=None, queries=None, **kwargs) -> None: + super(WorkflowTriggerCallbackUrl, self).__init__(**kwargs) + self.value = None + self.method = None + self.base_path = None + self.relative_path = None + self.relative_path_parameters = relative_path_parameters + self.queries = queries diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter.py old mode 100755 new mode 100644 index 30ddf75393ee..7ea79307eccf --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter.py @@ -17,13 +17,13 @@ class WorkflowTriggerFilter(Model): :param state: The state of workflow trigger. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :type state: str or :class:`WorkflowState - ` + :type state: str or ~azure.mgmt.logic.models.WorkflowState """ _attribute_map = { 'state': {'key': 'state', 'type': 'WorkflowState'}, } - def __init__(self, state=None): - self.state = state + def __init__(self, **kwargs): + super(WorkflowTriggerFilter, self).__init__(**kwargs) + self.state = kwargs.get('state', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter_py3.py new file mode 100644 index 000000000000..2a321508bebb --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkflowTriggerFilter(Model): + """The workflow trigger filter. + + :param state: The state of workflow trigger. Possible values include: + 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :type state: str or ~azure.mgmt.logic.models.WorkflowState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'WorkflowState'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(WorkflowTriggerFilter, self).__init__(**kwargs) + self.state = state diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history.py old mode 100755 new mode 100644 index d6fbc396a876..1ff54dbeaf1b --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history.py @@ -27,8 +27,7 @@ class WorkflowTriggerHistory(SubResource): :ivar status: Gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or :class:`WorkflowStatus - ` + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus :ivar code: Gets the code. :vartype code: str :ivar error: Gets the error. @@ -36,19 +35,15 @@ class WorkflowTriggerHistory(SubResource): :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str :param correlation: The run correlation. - :type correlation: :class:`Correlation - ` + :type correlation: ~azure.mgmt.logic.models.Correlation :ivar inputs_link: Gets the link to input parameters. - :vartype inputs_link: :class:`ContentLink - ` + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink :ivar outputs_link: Gets the link to output parameters. - :vartype outputs_link: :class:`ContentLink - ` + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink :ivar fired: Gets a value indicating whether trigger was fired. :vartype fired: bool :ivar run: Gets the reference to workflow run. - :vartype run: :class:`ResourceReference - ` + :vartype run: ~azure.mgmt.logic.models.ResourceReference :ivar name: Gets the workflow trigger history name. :vartype name: str :ivar type: Gets the workflow trigger history type. @@ -88,15 +83,15 @@ class WorkflowTriggerHistory(SubResource): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, correlation=None): - super(WorkflowTriggerHistory, self).__init__() + def __init__(self, **kwargs): + super(WorkflowTriggerHistory, self).__init__(**kwargs) self.start_time = None self.end_time = None self.status = None self.code = None self.error = None self.tracking_id = None - self.correlation = correlation + self.correlation = kwargs.get('correlation', None) self.inputs_link = None self.outputs_link = None self.fired = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter.py old mode 100755 new mode 100644 index 49fc022d99e2..082b1dfd11bf --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter.py @@ -19,13 +19,13 @@ class WorkflowTriggerHistoryFilter(Model): include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :type status: str or :class:`WorkflowStatus - ` + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus """ _attribute_map = { 'status': {'key': 'status', 'type': 'WorkflowStatus'}, } - def __init__(self, status=None): - self.status = status + def __init__(self, **kwargs): + super(WorkflowTriggerHistoryFilter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter_py3.py new file mode 100644 index 000000000000..e696821bfff2 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter_py3.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkflowTriggerHistoryFilter(Model): + """The workflow trigger history filter. + + :param status: The status of workflow trigger history. Possible values + include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', + 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', + 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'WorkflowStatus'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(WorkflowTriggerHistoryFilter, self).__init__(**kwargs) + self.status = status diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_paged.py old mode 100755 new mode 100644 index d52e650406f2..87124d3bd7f6 --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_paged.py @@ -14,7 +14,7 @@ class WorkflowTriggerHistoryPaged(Paged): """ - A paging container for iterating over a list of WorkflowTriggerHistory object + A paging container for iterating over a list of :class:`WorkflowTriggerHistory ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_py3.py new file mode 100644 index 000000000000..315faa696b02 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_py3.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_resource_py3 import SubResource + + +class WorkflowTriggerHistory(SubResource): + """The workflow trigger history. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar start_time: Gets the start time. + :vartype start_time: datetime + :ivar end_time: Gets the end time. + :vartype end_time: datetime + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar code: Gets the code. + :vartype code: str + :ivar error: Gets the error. + :vartype error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :param correlation: The run correlation. + :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar inputs_link: Gets the link to input parameters. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs_link: Gets the link to output parameters. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar fired: Gets a value indicating whether trigger was fired. + :vartype fired: bool + :ivar run: Gets the reference to workflow run. + :vartype run: ~azure.mgmt.logic.models.ResourceReference + :ivar name: Gets the workflow trigger history name. + :vartype name: str + :ivar type: Gets the workflow trigger history type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'status': {'readonly': True}, + 'code': {'readonly': True}, + 'error': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'fired': {'readonly': True}, + 'run': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, + 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, + 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, + 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, + 'fired': {'key': 'properties.fired', 'type': 'bool'}, + 'run': {'key': 'properties.run', 'type': 'ResourceReference'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, correlation=None, **kwargs) -> None: + super(WorkflowTriggerHistory, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.status = None + self.code = None + self.error = None + self.tracking_id = None + self.correlation = correlation + self.inputs_link = None + self.outputs_link = None + self.fired = None + self.run = None + self.name = None + self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries.py old mode 100755 new mode 100644 index 87c9086bf449..99ed8eac51b9 --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries.py @@ -23,6 +23,8 @@ class WorkflowTriggerListCallbackUrlQueries(Model): :type sv: str :param sig: The SAS signature. :type sig: str + :param se: The SAS timestamp. + :type se: str """ _attribute_map = { @@ -30,10 +32,13 @@ class WorkflowTriggerListCallbackUrlQueries(Model): 'sp': {'key': 'sp', 'type': 'str'}, 'sv': {'key': 'sv', 'type': 'str'}, 'sig': {'key': 'sig', 'type': 'str'}, + 'se': {'key': 'se', 'type': 'str'}, } - def __init__(self, api_version=None, sp=None, sv=None, sig=None): - self.api_version = api_version - self.sp = sp - self.sv = sv - self.sig = sig + def __init__(self, **kwargs): + super(WorkflowTriggerListCallbackUrlQueries, self).__init__(**kwargs) + self.api_version = kwargs.get('api_version', None) + self.sp = kwargs.get('sp', None) + self.sv = kwargs.get('sv', None) + self.sig = kwargs.get('sig', None) + self.se = kwargs.get('se', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries_py3.py new file mode 100644 index 000000000000..e87101e2da19 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkflowTriggerListCallbackUrlQueries(Model): + """Gets the workflow trigger callback URL query parameters. + + :param api_version: The api version. + :type api_version: str + :param sp: The SAS permissions. + :type sp: str + :param sv: The SAS version. + :type sv: str + :param sig: The SAS signature. + :type sig: str + :param se: The SAS timestamp. + :type se: str + """ + + _attribute_map = { + 'api_version': {'key': 'api-version', 'type': 'str'}, + 'sp': {'key': 'sp', 'type': 'str'}, + 'sv': {'key': 'sv', 'type': 'str'}, + 'sig': {'key': 'sig', 'type': 'str'}, + 'se': {'key': 'se', 'type': 'str'}, + } + + def __init__(self, *, api_version: str=None, sp: str=None, sv: str=None, sig: str=None, se: str=None, **kwargs) -> None: + super(WorkflowTriggerListCallbackUrlQueries, self).__init__(**kwargs) + self.api_version = api_version + self.sp = sp + self.sv = sv + self.sig = sig + self.se = se diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_paged.py old mode 100755 new mode 100644 index 2bc137a1f644..b433baa67e6e --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_paged.py @@ -14,7 +14,7 @@ class WorkflowTriggerPaged(Paged): """ - A paging container for iterating over a list of WorkflowTrigger object + A paging container for iterating over a list of :class:`WorkflowTrigger ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_py3.py new file mode 100644 index 000000000000..361c7a1a45a2 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_py3.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_resource_py3 import SubResource + + +class WorkflowTrigger(SubResource): + """The workflow trigger. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar provisioning_state: Gets the provisioning state. Possible values + include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', + 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', + 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', + 'Unregistered', 'Completed' + :vartype provisioning_state: str or + ~azure.mgmt.logic.models.WorkflowTriggerProvisioningState + :ivar created_time: Gets the created time. + :vartype created_time: datetime + :ivar changed_time: Gets the changed time. + :vartype changed_time: datetime + :ivar state: Gets the state. Possible values include: 'NotSpecified', + 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :vartype state: str or ~azure.mgmt.logic.models.WorkflowState + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar last_execution_time: Gets the last execution time. + :vartype last_execution_time: datetime + :ivar next_execution_time: Gets the next execution time. + :vartype next_execution_time: datetime + :ivar recurrence: Gets the workflow trigger recurrence. + :vartype recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence + :ivar workflow: Gets the reference to workflow. + :vartype workflow: ~azure.mgmt.logic.models.ResourceReference + :ivar name: Gets the workflow trigger name. + :vartype name: str + :ivar type: Gets the workflow trigger type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'state': {'readonly': True}, + 'status': {'readonly': True}, + 'last_execution_time': {'readonly': True}, + 'next_execution_time': {'readonly': True}, + 'recurrence': {'readonly': True}, + 'workflow': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'WorkflowTriggerProvisioningState'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'WorkflowState'}, + 'status': {'key': 'properties.status', 'type': 'WorkflowStatus'}, + 'last_execution_time': {'key': 'properties.lastExecutionTime', 'type': 'iso-8601'}, + 'next_execution_time': {'key': 'properties.nextExecutionTime', 'type': 'iso-8601'}, + 'recurrence': {'key': 'properties.recurrence', 'type': 'WorkflowTriggerRecurrence'}, + 'workflow': {'key': 'properties.workflow', 'type': 'ResourceReference'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(WorkflowTrigger, self).__init__(**kwargs) + self.provisioning_state = None + self.created_time = None + self.changed_time = None + self.state = None + self.status = None + self.last_execution_time = None + self.next_execution_time = None + self.recurrence = None + self.workflow = None + self.name = None + self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence.py old mode 100755 new mode 100644 index 77007c330ca7..36bc585fbfff --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence.py @@ -17,34 +17,33 @@ class WorkflowTriggerRecurrence(Model): :param frequency: The frequency. Possible values include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' - :type frequency: str or :class:`RecurrenceFrequency - ` + :type frequency: str or ~azure.mgmt.logic.models.RecurrenceFrequency :param interval: The interval. :type interval: int :param start_time: The start time. - :type start_time: datetime + :type start_time: str :param end_time: The end time. - :type end_time: datetime + :type end_time: str :param time_zone: The time zone. :type time_zone: str :param schedule: The recurrence schedule. - :type schedule: :class:`RecurrenceSchedule - ` + :type schedule: ~azure.mgmt.logic.models.RecurrenceSchedule """ _attribute_map = { 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, 'interval': {'key': 'interval', 'type': 'int'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, 'time_zone': {'key': 'timeZone', 'type': 'str'}, 'schedule': {'key': 'schedule', 'type': 'RecurrenceSchedule'}, } - def __init__(self, frequency=None, interval=None, start_time=None, end_time=None, time_zone=None, schedule=None): - self.frequency = frequency - self.interval = interval - self.start_time = start_time - self.end_time = end_time - self.time_zone = time_zone - self.schedule = schedule + def __init__(self, **kwargs): + super(WorkflowTriggerRecurrence, self).__init__(**kwargs) + self.frequency = kwargs.get('frequency', None) + self.interval = kwargs.get('interval', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.time_zone = kwargs.get('time_zone', None) + self.schedule = kwargs.get('schedule', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence_py3.py new file mode 100644 index 000000000000..b437623a94f6 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkflowTriggerRecurrence(Model): + """The workflow trigger recurrence. + + :param frequency: The frequency. Possible values include: 'NotSpecified', + 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' + :type frequency: str or ~azure.mgmt.logic.models.RecurrenceFrequency + :param interval: The interval. + :type interval: int + :param start_time: The start time. + :type start_time: str + :param end_time: The end time. + :type end_time: str + :param time_zone: The time zone. + :type time_zone: str + :param schedule: The recurrence schedule. + :type schedule: ~azure.mgmt.logic.models.RecurrenceSchedule + """ + + _attribute_map = { + 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, + 'interval': {'key': 'interval', 'type': 'int'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'RecurrenceSchedule'}, + } + + def __init__(self, *, frequency=None, interval: int=None, start_time: str=None, end_time: str=None, time_zone: str=None, schedule=None, **kwargs) -> None: + super(WorkflowTriggerRecurrence, self).__init__(**kwargs) + self.frequency = frequency + self.interval = interval + self.start_time = start_time + self.end_time = end_time + self.time_zone = time_zone + self.schedule = schedule diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version.py old mode 100755 new mode 100644 index d2f092ce7117..dfff86d6a134 --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version.py @@ -27,28 +27,26 @@ class WorkflowVersion(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict + :type tags: dict[str, str] :ivar created_time: Gets the created time. :vartype created_time: datetime :ivar changed_time: Gets the changed time. :vartype changed_time: datetime :param state: The state. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :type state: str or :class:`WorkflowState - ` + :type state: str or ~azure.mgmt.logic.models.WorkflowState :ivar version: Gets the version. :vartype version: str :ivar access_endpoint: Gets the access endpoint. :vartype access_endpoint: str :param sku: The sku. - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.logic.models.Sku :param integration_account: The integration account. - :type integration_account: :class:`ResourceReference - ` + :type integration_account: ~azure.mgmt.logic.models.ResourceReference :param definition: The definition. :type definition: object :param parameters: The parameters. - :type parameters: dict + :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] """ _validation = { @@ -78,14 +76,14 @@ class WorkflowVersion(Resource): 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, } - def __init__(self, location=None, tags=None, state=None, sku=None, integration_account=None, definition=None, parameters=None): - super(WorkflowVersion, self).__init__(location=location, tags=tags) + def __init__(self, **kwargs): + super(WorkflowVersion, self).__init__(**kwargs) self.created_time = None self.changed_time = None - self.state = state + self.state = kwargs.get('state', None) self.version = None self.access_endpoint = None - self.sku = sku - self.integration_account = integration_account - self.definition = definition - self.parameters = parameters + self.sku = kwargs.get('sku', None) + self.integration_account = kwargs.get('integration_account', None) + self.definition = kwargs.get('definition', None) + self.parameters = kwargs.get('parameters', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_paged.py old mode 100755 new mode 100644 index 5dd0c479f322..10cc6a74589d --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_paged.py @@ -14,7 +14,7 @@ class WorkflowVersionPaged(Paged): """ - A paging container for iterating over a list of WorkflowVersion object + A paging container for iterating over a list of :class:`WorkflowVersion ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_py3.py new file mode 100644 index 000000000000..dfc3e8d65951 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_py3.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class WorkflowVersion(Resource): + """The workflow version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar created_time: Gets the created time. + :vartype created_time: datetime + :ivar changed_time: Gets the changed time. + :vartype changed_time: datetime + :param state: The state. Possible values include: 'NotSpecified', + 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :type state: str or ~azure.mgmt.logic.models.WorkflowState + :ivar version: Gets the version. + :vartype version: str + :ivar access_endpoint: Gets the access endpoint. + :vartype access_endpoint: str + :param sku: The sku. + :type sku: ~azure.mgmt.logic.models.Sku + :param integration_account: The integration account. + :type integration_account: ~azure.mgmt.logic.models.ResourceReference + :param definition: The definition. + :type definition: object + :param parameters: The parameters. + :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'version': {'readonly': True}, + 'access_endpoint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'WorkflowState'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'access_endpoint': {'key': 'properties.accessEndpoint', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'integration_account': {'key': 'properties.integrationAccount', 'type': 'ResourceReference'}, + 'definition': {'key': 'properties.definition', 'type': 'object'}, + 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, + } + + def __init__(self, *, location: str=None, tags=None, state=None, sku=None, integration_account=None, definition=None, parameters=None, **kwargs) -> None: + super(WorkflowVersion, self).__init__(location=location, tags=tags, **kwargs) + self.created_time = None + self.changed_time = None + self.state = state + self.version = None + self.access_endpoint = None + self.sku = sku + self.integration_account = integration_account + self.definition = definition + self.parameters = parameters diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings.py old mode 100755 new mode 100644 index 23c78d9db55a..f3dd83d1ac68 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings.py @@ -15,35 +15,37 @@ class X12AcknowledgementSettings(Model): """The X12 agreement acknowledgement settings. - :param need_technical_acknowledgement: The value indicating whether - technical acknowledgement is needed. + All required parameters must be populated in order to send to Azure. + + :param need_technical_acknowledgement: Required. The value indicating + whether technical acknowledgement is needed. :type need_technical_acknowledgement: bool - :param batch_technical_acknowledgements: The value indicating whether to - batch the technical acknowledgements. + :param batch_technical_acknowledgements: Required. The value indicating + whether to batch the technical acknowledgements. :type batch_technical_acknowledgements: bool - :param need_functional_acknowledgement: The value indicating whether - functional acknowledgement is needed. + :param need_functional_acknowledgement: Required. The value indicating + whether functional acknowledgement is needed. :type need_functional_acknowledgement: bool :param functional_acknowledgement_version: The functional acknowledgement version. :type functional_acknowledgement_version: str - :param batch_functional_acknowledgements: The value indicating whether to - batch functional acknowledgements. + :param batch_functional_acknowledgements: Required. The value indicating + whether to batch functional acknowledgements. :type batch_functional_acknowledgements: bool - :param need_implementation_acknowledgement: The value indicating whether - implementation acknowledgement is needed. + :param need_implementation_acknowledgement: Required. The value indicating + whether implementation acknowledgement is needed. :type need_implementation_acknowledgement: bool :param implementation_acknowledgement_version: The implementation acknowledgement version. :type implementation_acknowledgement_version: str - :param batch_implementation_acknowledgements: The value indicating whether - to batch implementation acknowledgements. + :param batch_implementation_acknowledgements: Required. The value + indicating whether to batch implementation acknowledgements. :type batch_implementation_acknowledgements: bool - :param need_loop_for_valid_messages: The value indicating whether a loop - is needed for valid messages. + :param need_loop_for_valid_messages: Required. The value indicating + whether a loop is needed for valid messages. :type need_loop_for_valid_messages: bool - :param send_synchronous_acknowledgement: The value indicating whether to - send synchronous acknowledgement. + :param send_synchronous_acknowledgement: Required. The value indicating + whether to send synchronous acknowledgement. :type send_synchronous_acknowledgement: bool :param acknowledgement_control_number_prefix: The acknowledgement control number prefix. @@ -51,14 +53,14 @@ class X12AcknowledgementSettings(Model): :param acknowledgement_control_number_suffix: The acknowledgement control number suffix. :type acknowledgement_control_number_suffix: str - :param acknowledgement_control_number_lower_bound: The acknowledgement - control number lower bound. + :param acknowledgement_control_number_lower_bound: Required. The + acknowledgement control number lower bound. :type acknowledgement_control_number_lower_bound: int - :param acknowledgement_control_number_upper_bound: The acknowledgement - control number upper bound. + :param acknowledgement_control_number_upper_bound: Required. The + acknowledgement control number upper bound. :type acknowledgement_control_number_upper_bound: int - :param rollover_acknowledgement_control_number: The value indicating - whether to rollover acknowledgement control number. + :param rollover_acknowledgement_control_number: Required. The value + indicating whether to rollover acknowledgement control number. :type rollover_acknowledgement_control_number: bool """ @@ -94,19 +96,20 @@ class X12AcknowledgementSettings(Model): 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, } - def __init__(self, need_technical_acknowledgement, batch_technical_acknowledgements, need_functional_acknowledgement, batch_functional_acknowledgements, need_implementation_acknowledgement, batch_implementation_acknowledgements, need_loop_for_valid_messages, send_synchronous_acknowledgement, acknowledgement_control_number_lower_bound, acknowledgement_control_number_upper_bound, rollover_acknowledgement_control_number, functional_acknowledgement_version=None, implementation_acknowledgement_version=None, acknowledgement_control_number_prefix=None, acknowledgement_control_number_suffix=None): - self.need_technical_acknowledgement = need_technical_acknowledgement - self.batch_technical_acknowledgements = batch_technical_acknowledgements - self.need_functional_acknowledgement = need_functional_acknowledgement - self.functional_acknowledgement_version = functional_acknowledgement_version - self.batch_functional_acknowledgements = batch_functional_acknowledgements - self.need_implementation_acknowledgement = need_implementation_acknowledgement - self.implementation_acknowledgement_version = implementation_acknowledgement_version - self.batch_implementation_acknowledgements = batch_implementation_acknowledgements - self.need_loop_for_valid_messages = need_loop_for_valid_messages - self.send_synchronous_acknowledgement = send_synchronous_acknowledgement - self.acknowledgement_control_number_prefix = acknowledgement_control_number_prefix - self.acknowledgement_control_number_suffix = acknowledgement_control_number_suffix - self.acknowledgement_control_number_lower_bound = acknowledgement_control_number_lower_bound - self.acknowledgement_control_number_upper_bound = acknowledgement_control_number_upper_bound - self.rollover_acknowledgement_control_number = rollover_acknowledgement_control_number + def __init__(self, **kwargs): + super(X12AcknowledgementSettings, self).__init__(**kwargs) + self.need_technical_acknowledgement = kwargs.get('need_technical_acknowledgement', None) + self.batch_technical_acknowledgements = kwargs.get('batch_technical_acknowledgements', None) + self.need_functional_acknowledgement = kwargs.get('need_functional_acknowledgement', None) + self.functional_acknowledgement_version = kwargs.get('functional_acknowledgement_version', None) + self.batch_functional_acknowledgements = kwargs.get('batch_functional_acknowledgements', None) + self.need_implementation_acknowledgement = kwargs.get('need_implementation_acknowledgement', None) + self.implementation_acknowledgement_version = kwargs.get('implementation_acknowledgement_version', None) + self.batch_implementation_acknowledgements = kwargs.get('batch_implementation_acknowledgements', None) + self.need_loop_for_valid_messages = kwargs.get('need_loop_for_valid_messages', None) + self.send_synchronous_acknowledgement = kwargs.get('send_synchronous_acknowledgement', None) + self.acknowledgement_control_number_prefix = kwargs.get('acknowledgement_control_number_prefix', None) + self.acknowledgement_control_number_suffix = kwargs.get('acknowledgement_control_number_suffix', None) + self.acknowledgement_control_number_lower_bound = kwargs.get('acknowledgement_control_number_lower_bound', None) + self.acknowledgement_control_number_upper_bound = kwargs.get('acknowledgement_control_number_upper_bound', None) + self.rollover_acknowledgement_control_number = kwargs.get('rollover_acknowledgement_control_number', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings_py3.py new file mode 100644 index 000000000000..6e81eb7728e1 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings_py3.py @@ -0,0 +1,115 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class X12AcknowledgementSettings(Model): + """The X12 agreement acknowledgement settings. + + All required parameters must be populated in order to send to Azure. + + :param need_technical_acknowledgement: Required. The value indicating + whether technical acknowledgement is needed. + :type need_technical_acknowledgement: bool + :param batch_technical_acknowledgements: Required. The value indicating + whether to batch the technical acknowledgements. + :type batch_technical_acknowledgements: bool + :param need_functional_acknowledgement: Required. The value indicating + whether functional acknowledgement is needed. + :type need_functional_acknowledgement: bool + :param functional_acknowledgement_version: The functional acknowledgement + version. + :type functional_acknowledgement_version: str + :param batch_functional_acknowledgements: Required. The value indicating + whether to batch functional acknowledgements. + :type batch_functional_acknowledgements: bool + :param need_implementation_acknowledgement: Required. The value indicating + whether implementation acknowledgement is needed. + :type need_implementation_acknowledgement: bool + :param implementation_acknowledgement_version: The implementation + acknowledgement version. + :type implementation_acknowledgement_version: str + :param batch_implementation_acknowledgements: Required. The value + indicating whether to batch implementation acknowledgements. + :type batch_implementation_acknowledgements: bool + :param need_loop_for_valid_messages: Required. The value indicating + whether a loop is needed for valid messages. + :type need_loop_for_valid_messages: bool + :param send_synchronous_acknowledgement: Required. The value indicating + whether to send synchronous acknowledgement. + :type send_synchronous_acknowledgement: bool + :param acknowledgement_control_number_prefix: The acknowledgement control + number prefix. + :type acknowledgement_control_number_prefix: str + :param acknowledgement_control_number_suffix: The acknowledgement control + number suffix. + :type acknowledgement_control_number_suffix: str + :param acknowledgement_control_number_lower_bound: Required. The + acknowledgement control number lower bound. + :type acknowledgement_control_number_lower_bound: int + :param acknowledgement_control_number_upper_bound: Required. The + acknowledgement control number upper bound. + :type acknowledgement_control_number_upper_bound: int + :param rollover_acknowledgement_control_number: Required. The value + indicating whether to rollover acknowledgement control number. + :type rollover_acknowledgement_control_number: bool + """ + + _validation = { + 'need_technical_acknowledgement': {'required': True}, + 'batch_technical_acknowledgements': {'required': True}, + 'need_functional_acknowledgement': {'required': True}, + 'batch_functional_acknowledgements': {'required': True}, + 'need_implementation_acknowledgement': {'required': True}, + 'batch_implementation_acknowledgements': {'required': True}, + 'need_loop_for_valid_messages': {'required': True}, + 'send_synchronous_acknowledgement': {'required': True}, + 'acknowledgement_control_number_lower_bound': {'required': True}, + 'acknowledgement_control_number_upper_bound': {'required': True}, + 'rollover_acknowledgement_control_number': {'required': True}, + } + + _attribute_map = { + 'need_technical_acknowledgement': {'key': 'needTechnicalAcknowledgement', 'type': 'bool'}, + 'batch_technical_acknowledgements': {'key': 'batchTechnicalAcknowledgements', 'type': 'bool'}, + 'need_functional_acknowledgement': {'key': 'needFunctionalAcknowledgement', 'type': 'bool'}, + 'functional_acknowledgement_version': {'key': 'functionalAcknowledgementVersion', 'type': 'str'}, + 'batch_functional_acknowledgements': {'key': 'batchFunctionalAcknowledgements', 'type': 'bool'}, + 'need_implementation_acknowledgement': {'key': 'needImplementationAcknowledgement', 'type': 'bool'}, + 'implementation_acknowledgement_version': {'key': 'implementationAcknowledgementVersion', 'type': 'str'}, + 'batch_implementation_acknowledgements': {'key': 'batchImplementationAcknowledgements', 'type': 'bool'}, + 'need_loop_for_valid_messages': {'key': 'needLoopForValidMessages', 'type': 'bool'}, + 'send_synchronous_acknowledgement': {'key': 'sendSynchronousAcknowledgement', 'type': 'bool'}, + 'acknowledgement_control_number_prefix': {'key': 'acknowledgementControlNumberPrefix', 'type': 'str'}, + 'acknowledgement_control_number_suffix': {'key': 'acknowledgementControlNumberSuffix', 'type': 'str'}, + 'acknowledgement_control_number_lower_bound': {'key': 'acknowledgementControlNumberLowerBound', 'type': 'int'}, + 'acknowledgement_control_number_upper_bound': {'key': 'acknowledgementControlNumberUpperBound', 'type': 'int'}, + 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, + } + + def __init__(self, *, need_technical_acknowledgement: bool, batch_technical_acknowledgements: bool, need_functional_acknowledgement: bool, batch_functional_acknowledgements: bool, need_implementation_acknowledgement: bool, batch_implementation_acknowledgements: bool, need_loop_for_valid_messages: bool, send_synchronous_acknowledgement: bool, acknowledgement_control_number_lower_bound: int, acknowledgement_control_number_upper_bound: int, rollover_acknowledgement_control_number: bool, functional_acknowledgement_version: str=None, implementation_acknowledgement_version: str=None, acknowledgement_control_number_prefix: str=None, acknowledgement_control_number_suffix: str=None, **kwargs) -> None: + super(X12AcknowledgementSettings, self).__init__(**kwargs) + self.need_technical_acknowledgement = need_technical_acknowledgement + self.batch_technical_acknowledgements = batch_technical_acknowledgements + self.need_functional_acknowledgement = need_functional_acknowledgement + self.functional_acknowledgement_version = functional_acknowledgement_version + self.batch_functional_acknowledgements = batch_functional_acknowledgements + self.need_implementation_acknowledgement = need_implementation_acknowledgement + self.implementation_acknowledgement_version = implementation_acknowledgement_version + self.batch_implementation_acknowledgements = batch_implementation_acknowledgements + self.need_loop_for_valid_messages = need_loop_for_valid_messages + self.send_synchronous_acknowledgement = send_synchronous_acknowledgement + self.acknowledgement_control_number_prefix = acknowledgement_control_number_prefix + self.acknowledgement_control_number_suffix = acknowledgement_control_number_suffix + self.acknowledgement_control_number_lower_bound = acknowledgement_control_number_lower_bound + self.acknowledgement_control_number_upper_bound = acknowledgement_control_number_upper_bound + self.rollover_acknowledgement_control_number = rollover_acknowledgement_control_number diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content.py old mode 100755 new mode 100644 index 8029801f5125..0daa2f398e66 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content.py @@ -15,12 +15,12 @@ class X12AgreementContent(Model): """The X12 agreement content. - :param receive_agreement: The X12 one-way receive agreement. - :type receive_agreement: :class:`X12OneWayAgreement - ` - :param send_agreement: The X12 one-way send agreement. - :type send_agreement: :class:`X12OneWayAgreement - ` + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The X12 one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + :param send_agreement: Required. The X12 one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement """ _validation = { @@ -33,6 +33,7 @@ class X12AgreementContent(Model): 'send_agreement': {'key': 'sendAgreement', 'type': 'X12OneWayAgreement'}, } - def __init__(self, receive_agreement, send_agreement): - self.receive_agreement = receive_agreement - self.send_agreement = send_agreement + def __init__(self, **kwargs): + super(X12AgreementContent, self).__init__(**kwargs) + self.receive_agreement = kwargs.get('receive_agreement', None) + self.send_agreement = kwargs.get('send_agreement', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content_py3.py new file mode 100644 index 000000000000..7ddf670913ea --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class X12AgreementContent(Model): + """The X12 agreement content. + + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The X12 one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + :param send_agreement: Required. The X12 one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + """ + + _validation = { + 'receive_agreement': {'required': True}, + 'send_agreement': {'required': True}, + } + + _attribute_map = { + 'receive_agreement': {'key': 'receiveAgreement', 'type': 'X12OneWayAgreement'}, + 'send_agreement': {'key': 'sendAgreement', 'type': 'X12OneWayAgreement'}, + } + + def __init__(self, *, receive_agreement, send_agreement, **kwargs) -> None: + super(X12AgreementContent, self).__init__(**kwargs) + self.receive_agreement = receive_agreement + self.send_agreement = send_agreement diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides.py old mode 100755 new mode 100644 index 3ebdd18493c5..ee545215c677 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides.py @@ -15,24 +15,26 @@ class X12DelimiterOverrides(Model): """The X12 delimiter override settings. + All required parameters must be populated in order to send to Azure. + :param protocol_version: The protocol version. :type protocol_version: str :param message_id: The message id. :type message_id: str - :param data_element_separator: The data element separator. + :param data_element_separator: Required. The data element separator. :type data_element_separator: int - :param component_separator: The component separator. + :param component_separator: Required. The component separator. :type component_separator: int - :param segment_terminator: The segment terminator. + :param segment_terminator: Required. The segment terminator. :type segment_terminator: int - :param segment_terminator_suffix: The segment terminator suffix. Possible - values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - :type segment_terminator_suffix: str or :class:`SegmentTerminatorSuffix - ` - :param replace_character: The replacement character. + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :param replace_character: Required. The replacement character. :type replace_character: int - :param replace_separators_in_payload: The value indicating whether to - replace separators in payload. + :param replace_separators_in_payload: Required. The value indicating + whether to replace separators in payload. :type replace_separators_in_payload: bool :param target_namespace: The target namespace on which this delimiter settings has to be applied. @@ -60,13 +62,14 @@ class X12DelimiterOverrides(Model): 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, } - def __init__(self, data_element_separator, component_separator, segment_terminator, segment_terminator_suffix, replace_character, replace_separators_in_payload, protocol_version=None, message_id=None, target_namespace=None): - self.protocol_version = protocol_version - self.message_id = message_id - self.data_element_separator = data_element_separator - self.component_separator = component_separator - self.segment_terminator = segment_terminator - self.segment_terminator_suffix = segment_terminator_suffix - self.replace_character = replace_character - self.replace_separators_in_payload = replace_separators_in_payload - self.target_namespace = target_namespace + def __init__(self, **kwargs): + super(X12DelimiterOverrides, self).__init__(**kwargs) + self.protocol_version = kwargs.get('protocol_version', None) + self.message_id = kwargs.get('message_id', None) + self.data_element_separator = kwargs.get('data_element_separator', None) + self.component_separator = kwargs.get('component_separator', None) + self.segment_terminator = kwargs.get('segment_terminator', None) + self.segment_terminator_suffix = kwargs.get('segment_terminator_suffix', None) + self.replace_character = kwargs.get('replace_character', None) + self.replace_separators_in_payload = kwargs.get('replace_separators_in_payload', None) + self.target_namespace = kwargs.get('target_namespace', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides_py3.py new file mode 100644 index 000000000000..c2333de8a794 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides_py3.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class X12DelimiterOverrides(Model): + """The X12 delimiter override settings. + + All required parameters must be populated in order to send to Azure. + + :param protocol_version: The protocol version. + :type protocol_version: str + :param message_id: The message id. + :type message_id: str + :param data_element_separator: Required. The data element separator. + :type data_element_separator: int + :param component_separator: Required. The component separator. + :type component_separator: int + :param segment_terminator: Required. The segment terminator. + :type segment_terminator: int + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :param replace_character: Required. The replacement character. + :type replace_character: int + :param replace_separators_in_payload: Required. The value indicating + whether to replace separators in payload. + :type replace_separators_in_payload: bool + :param target_namespace: The target namespace on which this delimiter + settings has to be applied. + :type target_namespace: str + """ + + _validation = { + 'data_element_separator': {'required': True}, + 'component_separator': {'required': True}, + 'segment_terminator': {'required': True}, + 'segment_terminator_suffix': {'required': True}, + 'replace_character': {'required': True}, + 'replace_separators_in_payload': {'required': True}, + } + + _attribute_map = { + 'protocol_version': {'key': 'protocolVersion', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, + 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, + 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, + 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, + 'replace_character': {'key': 'replaceCharacter', 'type': 'int'}, + 'replace_separators_in_payload': {'key': 'replaceSeparatorsInPayload', 'type': 'bool'}, + 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, + } + + def __init__(self, *, data_element_separator: int, component_separator: int, segment_terminator: int, segment_terminator_suffix, replace_character: int, replace_separators_in_payload: bool, protocol_version: str=None, message_id: str=None, target_namespace: str=None, **kwargs) -> None: + super(X12DelimiterOverrides, self).__init__(**kwargs) + self.protocol_version = protocol_version + self.message_id = message_id + self.data_element_separator = data_element_separator + self.component_separator = component_separator + self.segment_terminator = segment_terminator + self.segment_terminator_suffix = segment_terminator_suffix + self.replace_character = replace_character + self.replace_separators_in_payload = replace_separators_in_payload + self.target_namespace = target_namespace diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override.py old mode 100755 new mode 100644 index 78659ec17db7..fe2bc38c8ed3 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override.py @@ -15,33 +15,33 @@ class X12EnvelopeOverride(Model): """The X12 envelope override settings. - :param target_namespace: The target namespace on which this envelope - settings has to be applied. + All required parameters must be populated in order to send to Azure. + + :param target_namespace: Required. The target namespace on which this + envelope settings has to be applied. :type target_namespace: str - :param protocol_version: The protocol version on which this envelope - settings has to be applied. + :param protocol_version: Required. The protocol version on which this + envelope settings has to be applied. :type protocol_version: str - :param message_id: The message id on which this envelope settings has to - be applied. + :param message_id: Required. The message id on which this envelope + settings has to be applied. :type message_id: str - :param responsible_agency_code: The responsible agency code. + :param responsible_agency_code: Required. The responsible agency code. :type responsible_agency_code: str - :param header_version: The header version. + :param header_version: Required. The header version. :type header_version: str - :param sender_application_id: The sender application id. + :param sender_application_id: Required. The sender application id. :type sender_application_id: str - :param receiver_application_id: The receiver application id. + :param receiver_application_id: Required. The receiver application id. :type receiver_application_id: str :param functional_identifier_code: The functional identifier code. :type functional_identifier_code: str - :param date_format: The date format. Possible values include: + :param date_format: Required. The date format. Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' - :type date_format: str or :class:`X12DateFormat - ` - :param time_format: The time format. Possible values include: + :type date_format: str or ~azure.mgmt.logic.models.X12DateFormat + :param time_format: Required. The time format. Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - :type time_format: str or :class:`X12TimeFormat - ` + :type time_format: str or ~azure.mgmt.logic.models.X12TimeFormat """ _validation = { @@ -69,14 +69,15 @@ class X12EnvelopeOverride(Model): 'time_format': {'key': 'timeFormat', 'type': 'X12TimeFormat'}, } - def __init__(self, target_namespace, protocol_version, message_id, responsible_agency_code, header_version, sender_application_id, receiver_application_id, date_format, time_format, functional_identifier_code=None): - self.target_namespace = target_namespace - self.protocol_version = protocol_version - self.message_id = message_id - self.responsible_agency_code = responsible_agency_code - self.header_version = header_version - self.sender_application_id = sender_application_id - self.receiver_application_id = receiver_application_id - self.functional_identifier_code = functional_identifier_code - self.date_format = date_format - self.time_format = time_format + def __init__(self, **kwargs): + super(X12EnvelopeOverride, self).__init__(**kwargs) + self.target_namespace = kwargs.get('target_namespace', None) + self.protocol_version = kwargs.get('protocol_version', None) + self.message_id = kwargs.get('message_id', None) + self.responsible_agency_code = kwargs.get('responsible_agency_code', None) + self.header_version = kwargs.get('header_version', None) + self.sender_application_id = kwargs.get('sender_application_id', None) + self.receiver_application_id = kwargs.get('receiver_application_id', None) + self.functional_identifier_code = kwargs.get('functional_identifier_code', None) + self.date_format = kwargs.get('date_format', None) + self.time_format = kwargs.get('time_format', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override_py3.py new file mode 100644 index 000000000000..4c25df099fef --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override_py3.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class X12EnvelopeOverride(Model): + """The X12 envelope override settings. + + All required parameters must be populated in order to send to Azure. + + :param target_namespace: Required. The target namespace on which this + envelope settings has to be applied. + :type target_namespace: str + :param protocol_version: Required. The protocol version on which this + envelope settings has to be applied. + :type protocol_version: str + :param message_id: Required. The message id on which this envelope + settings has to be applied. + :type message_id: str + :param responsible_agency_code: Required. The responsible agency code. + :type responsible_agency_code: str + :param header_version: Required. The header version. + :type header_version: str + :param sender_application_id: Required. The sender application id. + :type sender_application_id: str + :param receiver_application_id: Required. The receiver application id. + :type receiver_application_id: str + :param functional_identifier_code: The functional identifier code. + :type functional_identifier_code: str + :param date_format: Required. The date format. Possible values include: + 'NotSpecified', 'CCYYMMDD', 'YYMMDD' + :type date_format: str or ~azure.mgmt.logic.models.X12DateFormat + :param time_format: Required. The time format. Possible values include: + 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' + :type time_format: str or ~azure.mgmt.logic.models.X12TimeFormat + """ + + _validation = { + 'target_namespace': {'required': True}, + 'protocol_version': {'required': True}, + 'message_id': {'required': True}, + 'responsible_agency_code': {'required': True}, + 'header_version': {'required': True}, + 'sender_application_id': {'required': True}, + 'receiver_application_id': {'required': True}, + 'date_format': {'required': True}, + 'time_format': {'required': True}, + } + + _attribute_map = { + 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, + 'protocol_version': {'key': 'protocolVersion', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'responsible_agency_code': {'key': 'responsibleAgencyCode', 'type': 'str'}, + 'header_version': {'key': 'headerVersion', 'type': 'str'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, + 'functional_identifier_code': {'key': 'functionalIdentifierCode', 'type': 'str'}, + 'date_format': {'key': 'dateFormat', 'type': 'X12DateFormat'}, + 'time_format': {'key': 'timeFormat', 'type': 'X12TimeFormat'}, + } + + def __init__(self, *, target_namespace: str, protocol_version: str, message_id: str, responsible_agency_code: str, header_version: str, sender_application_id: str, receiver_application_id: str, date_format, time_format, functional_identifier_code: str=None, **kwargs) -> None: + super(X12EnvelopeOverride, self).__init__(**kwargs) + self.target_namespace = target_namespace + self.protocol_version = protocol_version + self.message_id = message_id + self.responsible_agency_code = responsible_agency_code + self.header_version = header_version + self.sender_application_id = sender_application_id + self.receiver_application_id = receiver_application_id + self.functional_identifier_code = functional_identifier_code + self.date_format = date_format + self.time_format = time_format diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings.py old mode 100755 new mode 100644 index 1259b7910a80..135261790cb2 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings.py @@ -15,52 +15,55 @@ class X12EnvelopeSettings(Model): """The X12 agreement envelope settings. - :param control_standards_id: The controls standards id. + All required parameters must be populated in order to send to Azure. + + :param control_standards_id: Required. The controls standards id. :type control_standards_id: int - :param use_control_standards_id_as_repetition_character: The value - indicating whether to use control standards id as repetition character. + :param use_control_standards_id_as_repetition_character: Required. The + value indicating whether to use control standards id as repetition + character. :type use_control_standards_id_as_repetition_character: bool - :param sender_application_id: The sender application id. + :param sender_application_id: Required. The sender application id. :type sender_application_id: str - :param receiver_application_id: The receiver application id. + :param receiver_application_id: Required. The receiver application id. :type receiver_application_id: str - :param control_version_number: The control version number. + :param control_version_number: Required. The control version number. :type control_version_number: str - :param interchange_control_number_lower_bound: The interchange control - number lower bound. + :param interchange_control_number_lower_bound: Required. The interchange + control number lower bound. :type interchange_control_number_lower_bound: int - :param interchange_control_number_upper_bound: The interchange control - number upper bound. + :param interchange_control_number_upper_bound: Required. The interchange + control number upper bound. :type interchange_control_number_upper_bound: int - :param rollover_interchange_control_number: The value indicating whether - to rollover interchange control number. + :param rollover_interchange_control_number: Required. The value indicating + whether to rollover interchange control number. :type rollover_interchange_control_number: bool - :param enable_default_group_headers: The value indicating whether to - enable default group headers. + :param enable_default_group_headers: Required. The value indicating + whether to enable default group headers. :type enable_default_group_headers: bool :param functional_group_id: The functional group id. :type functional_group_id: str - :param group_control_number_lower_bound: The group control number lower - bound. + :param group_control_number_lower_bound: Required. The group control + number lower bound. :type group_control_number_lower_bound: int - :param group_control_number_upper_bound: The group control number upper - bound. + :param group_control_number_upper_bound: Required. The group control + number upper bound. :type group_control_number_upper_bound: int - :param rollover_group_control_number: The value indicating whether to - rollover group control number. + :param rollover_group_control_number: Required. The value indicating + whether to rollover group control number. :type rollover_group_control_number: bool - :param group_header_agency_code: The group header agency code. + :param group_header_agency_code: Required. The group header agency code. :type group_header_agency_code: str - :param group_header_version: The group header version. + :param group_header_version: Required. The group header version. :type group_header_version: str - :param transaction_set_control_number_lower_bound: The transaction set - control number lower bound. + :param transaction_set_control_number_lower_bound: Required. The + transaction set control number lower bound. :type transaction_set_control_number_lower_bound: int - :param transaction_set_control_number_upper_bound: The transaction set - control number upper bound. + :param transaction_set_control_number_upper_bound: Required. The + transaction set control number upper bound. :type transaction_set_control_number_upper_bound: int - :param rollover_transaction_set_control_number: The value indicating - whether to rollover transaction set control number. + :param rollover_transaction_set_control_number: Required. The value + indicating whether to rollover transaction set control number. :type rollover_transaction_set_control_number: bool :param transaction_set_control_number_prefix: The transaction set control number prefix. @@ -68,21 +71,22 @@ class X12EnvelopeSettings(Model): :param transaction_set_control_number_suffix: The transaction set control number suffix. :type transaction_set_control_number_suffix: str - :param overwrite_existing_transaction_set_control_number: The value - indicating whether to overwrite existing transaction set control number. + :param overwrite_existing_transaction_set_control_number: Required. The + value indicating whether to overwrite existing transaction set control + number. :type overwrite_existing_transaction_set_control_number: bool - :param group_header_date_format: The group header date format. Possible - values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' - :type group_header_date_format: str or :class:`X12DateFormat - ` - :param group_header_time_format: The group header time format. Possible - values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - :type group_header_time_format: str or :class:`X12TimeFormat - ` - :param usage_indicator: The usage indicator. Possible values include: - 'NotSpecified', 'Test', 'Information', 'Production' - :type usage_indicator: str or :class:`UsageIndicator - ` + :param group_header_date_format: Required. The group header date format. + Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' + :type group_header_date_format: str or + ~azure.mgmt.logic.models.X12DateFormat + :param group_header_time_format: Required. The group header time format. + Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', + 'HHMMSSd' + :type group_header_time_format: str or + ~azure.mgmt.logic.models.X12TimeFormat + :param usage_indicator: Required. The usage indicator. Possible values + include: 'NotSpecified', 'Test', 'Information', 'Production' + :type usage_indicator: str or ~azure.mgmt.logic.models.UsageIndicator """ _validation = { @@ -136,28 +140,29 @@ class X12EnvelopeSettings(Model): 'usage_indicator': {'key': 'usageIndicator', 'type': 'UsageIndicator'}, } - def __init__(self, control_standards_id, use_control_standards_id_as_repetition_character, sender_application_id, receiver_application_id, control_version_number, interchange_control_number_lower_bound, interchange_control_number_upper_bound, rollover_interchange_control_number, enable_default_group_headers, group_control_number_lower_bound, group_control_number_upper_bound, rollover_group_control_number, group_header_agency_code, group_header_version, transaction_set_control_number_lower_bound, transaction_set_control_number_upper_bound, rollover_transaction_set_control_number, overwrite_existing_transaction_set_control_number, group_header_date_format, group_header_time_format, usage_indicator, functional_group_id=None, transaction_set_control_number_prefix=None, transaction_set_control_number_suffix=None): - self.control_standards_id = control_standards_id - self.use_control_standards_id_as_repetition_character = use_control_standards_id_as_repetition_character - self.sender_application_id = sender_application_id - self.receiver_application_id = receiver_application_id - self.control_version_number = control_version_number - self.interchange_control_number_lower_bound = interchange_control_number_lower_bound - self.interchange_control_number_upper_bound = interchange_control_number_upper_bound - self.rollover_interchange_control_number = rollover_interchange_control_number - self.enable_default_group_headers = enable_default_group_headers - self.functional_group_id = functional_group_id - self.group_control_number_lower_bound = group_control_number_lower_bound - self.group_control_number_upper_bound = group_control_number_upper_bound - self.rollover_group_control_number = rollover_group_control_number - self.group_header_agency_code = group_header_agency_code - self.group_header_version = group_header_version - self.transaction_set_control_number_lower_bound = transaction_set_control_number_lower_bound - self.transaction_set_control_number_upper_bound = transaction_set_control_number_upper_bound - self.rollover_transaction_set_control_number = rollover_transaction_set_control_number - self.transaction_set_control_number_prefix = transaction_set_control_number_prefix - self.transaction_set_control_number_suffix = transaction_set_control_number_suffix - self.overwrite_existing_transaction_set_control_number = overwrite_existing_transaction_set_control_number - self.group_header_date_format = group_header_date_format - self.group_header_time_format = group_header_time_format - self.usage_indicator = usage_indicator + def __init__(self, **kwargs): + super(X12EnvelopeSettings, self).__init__(**kwargs) + self.control_standards_id = kwargs.get('control_standards_id', None) + self.use_control_standards_id_as_repetition_character = kwargs.get('use_control_standards_id_as_repetition_character', None) + self.sender_application_id = kwargs.get('sender_application_id', None) + self.receiver_application_id = kwargs.get('receiver_application_id', None) + self.control_version_number = kwargs.get('control_version_number', None) + self.interchange_control_number_lower_bound = kwargs.get('interchange_control_number_lower_bound', None) + self.interchange_control_number_upper_bound = kwargs.get('interchange_control_number_upper_bound', None) + self.rollover_interchange_control_number = kwargs.get('rollover_interchange_control_number', None) + self.enable_default_group_headers = kwargs.get('enable_default_group_headers', None) + self.functional_group_id = kwargs.get('functional_group_id', None) + self.group_control_number_lower_bound = kwargs.get('group_control_number_lower_bound', None) + self.group_control_number_upper_bound = kwargs.get('group_control_number_upper_bound', None) + self.rollover_group_control_number = kwargs.get('rollover_group_control_number', None) + self.group_header_agency_code = kwargs.get('group_header_agency_code', None) + self.group_header_version = kwargs.get('group_header_version', None) + self.transaction_set_control_number_lower_bound = kwargs.get('transaction_set_control_number_lower_bound', None) + self.transaction_set_control_number_upper_bound = kwargs.get('transaction_set_control_number_upper_bound', None) + self.rollover_transaction_set_control_number = kwargs.get('rollover_transaction_set_control_number', None) + self.transaction_set_control_number_prefix = kwargs.get('transaction_set_control_number_prefix', None) + self.transaction_set_control_number_suffix = kwargs.get('transaction_set_control_number_suffix', None) + self.overwrite_existing_transaction_set_control_number = kwargs.get('overwrite_existing_transaction_set_control_number', None) + self.group_header_date_format = kwargs.get('group_header_date_format', None) + self.group_header_time_format = kwargs.get('group_header_time_format', None) + self.usage_indicator = kwargs.get('usage_indicator', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings_py3.py new file mode 100644 index 000000000000..8a4bf0b5b7ea --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings_py3.py @@ -0,0 +1,168 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class X12EnvelopeSettings(Model): + """The X12 agreement envelope settings. + + All required parameters must be populated in order to send to Azure. + + :param control_standards_id: Required. The controls standards id. + :type control_standards_id: int + :param use_control_standards_id_as_repetition_character: Required. The + value indicating whether to use control standards id as repetition + character. + :type use_control_standards_id_as_repetition_character: bool + :param sender_application_id: Required. The sender application id. + :type sender_application_id: str + :param receiver_application_id: Required. The receiver application id. + :type receiver_application_id: str + :param control_version_number: Required. The control version number. + :type control_version_number: str + :param interchange_control_number_lower_bound: Required. The interchange + control number lower bound. + :type interchange_control_number_lower_bound: int + :param interchange_control_number_upper_bound: Required. The interchange + control number upper bound. + :type interchange_control_number_upper_bound: int + :param rollover_interchange_control_number: Required. The value indicating + whether to rollover interchange control number. + :type rollover_interchange_control_number: bool + :param enable_default_group_headers: Required. The value indicating + whether to enable default group headers. + :type enable_default_group_headers: bool + :param functional_group_id: The functional group id. + :type functional_group_id: str + :param group_control_number_lower_bound: Required. The group control + number lower bound. + :type group_control_number_lower_bound: int + :param group_control_number_upper_bound: Required. The group control + number upper bound. + :type group_control_number_upper_bound: int + :param rollover_group_control_number: Required. The value indicating + whether to rollover group control number. + :type rollover_group_control_number: bool + :param group_header_agency_code: Required. The group header agency code. + :type group_header_agency_code: str + :param group_header_version: Required. The group header version. + :type group_header_version: str + :param transaction_set_control_number_lower_bound: Required. The + transaction set control number lower bound. + :type transaction_set_control_number_lower_bound: int + :param transaction_set_control_number_upper_bound: Required. The + transaction set control number upper bound. + :type transaction_set_control_number_upper_bound: int + :param rollover_transaction_set_control_number: Required. The value + indicating whether to rollover transaction set control number. + :type rollover_transaction_set_control_number: bool + :param transaction_set_control_number_prefix: The transaction set control + number prefix. + :type transaction_set_control_number_prefix: str + :param transaction_set_control_number_suffix: The transaction set control + number suffix. + :type transaction_set_control_number_suffix: str + :param overwrite_existing_transaction_set_control_number: Required. The + value indicating whether to overwrite existing transaction set control + number. + :type overwrite_existing_transaction_set_control_number: bool + :param group_header_date_format: Required. The group header date format. + Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' + :type group_header_date_format: str or + ~azure.mgmt.logic.models.X12DateFormat + :param group_header_time_format: Required. The group header time format. + Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', + 'HHMMSSd' + :type group_header_time_format: str or + ~azure.mgmt.logic.models.X12TimeFormat + :param usage_indicator: Required. The usage indicator. Possible values + include: 'NotSpecified', 'Test', 'Information', 'Production' + :type usage_indicator: str or ~azure.mgmt.logic.models.UsageIndicator + """ + + _validation = { + 'control_standards_id': {'required': True}, + 'use_control_standards_id_as_repetition_character': {'required': True}, + 'sender_application_id': {'required': True}, + 'receiver_application_id': {'required': True}, + 'control_version_number': {'required': True}, + 'interchange_control_number_lower_bound': {'required': True}, + 'interchange_control_number_upper_bound': {'required': True}, + 'rollover_interchange_control_number': {'required': True}, + 'enable_default_group_headers': {'required': True}, + 'group_control_number_lower_bound': {'required': True}, + 'group_control_number_upper_bound': {'required': True}, + 'rollover_group_control_number': {'required': True}, + 'group_header_agency_code': {'required': True}, + 'group_header_version': {'required': True}, + 'transaction_set_control_number_lower_bound': {'required': True}, + 'transaction_set_control_number_upper_bound': {'required': True}, + 'rollover_transaction_set_control_number': {'required': True}, + 'overwrite_existing_transaction_set_control_number': {'required': True}, + 'group_header_date_format': {'required': True}, + 'group_header_time_format': {'required': True}, + 'usage_indicator': {'required': True}, + } + + _attribute_map = { + 'control_standards_id': {'key': 'controlStandardsId', 'type': 'int'}, + 'use_control_standards_id_as_repetition_character': {'key': 'useControlStandardsIdAsRepetitionCharacter', 'type': 'bool'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, + 'control_version_number': {'key': 'controlVersionNumber', 'type': 'str'}, + 'interchange_control_number_lower_bound': {'key': 'interchangeControlNumberLowerBound', 'type': 'int'}, + 'interchange_control_number_upper_bound': {'key': 'interchangeControlNumberUpperBound', 'type': 'int'}, + 'rollover_interchange_control_number': {'key': 'rolloverInterchangeControlNumber', 'type': 'bool'}, + 'enable_default_group_headers': {'key': 'enableDefaultGroupHeaders', 'type': 'bool'}, + 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, + 'group_control_number_lower_bound': {'key': 'groupControlNumberLowerBound', 'type': 'int'}, + 'group_control_number_upper_bound': {'key': 'groupControlNumberUpperBound', 'type': 'int'}, + 'rollover_group_control_number': {'key': 'rolloverGroupControlNumber', 'type': 'bool'}, + 'group_header_agency_code': {'key': 'groupHeaderAgencyCode', 'type': 'str'}, + 'group_header_version': {'key': 'groupHeaderVersion', 'type': 'str'}, + 'transaction_set_control_number_lower_bound': {'key': 'transactionSetControlNumberLowerBound', 'type': 'int'}, + 'transaction_set_control_number_upper_bound': {'key': 'transactionSetControlNumberUpperBound', 'type': 'int'}, + 'rollover_transaction_set_control_number': {'key': 'rolloverTransactionSetControlNumber', 'type': 'bool'}, + 'transaction_set_control_number_prefix': {'key': 'transactionSetControlNumberPrefix', 'type': 'str'}, + 'transaction_set_control_number_suffix': {'key': 'transactionSetControlNumberSuffix', 'type': 'str'}, + 'overwrite_existing_transaction_set_control_number': {'key': 'overwriteExistingTransactionSetControlNumber', 'type': 'bool'}, + 'group_header_date_format': {'key': 'groupHeaderDateFormat', 'type': 'X12DateFormat'}, + 'group_header_time_format': {'key': 'groupHeaderTimeFormat', 'type': 'X12TimeFormat'}, + 'usage_indicator': {'key': 'usageIndicator', 'type': 'UsageIndicator'}, + } + + def __init__(self, *, control_standards_id: int, use_control_standards_id_as_repetition_character: bool, sender_application_id: str, receiver_application_id: str, control_version_number: str, interchange_control_number_lower_bound: int, interchange_control_number_upper_bound: int, rollover_interchange_control_number: bool, enable_default_group_headers: bool, group_control_number_lower_bound: int, group_control_number_upper_bound: int, rollover_group_control_number: bool, group_header_agency_code: str, group_header_version: str, transaction_set_control_number_lower_bound: int, transaction_set_control_number_upper_bound: int, rollover_transaction_set_control_number: bool, overwrite_existing_transaction_set_control_number: bool, group_header_date_format, group_header_time_format, usage_indicator, functional_group_id: str=None, transaction_set_control_number_prefix: str=None, transaction_set_control_number_suffix: str=None, **kwargs) -> None: + super(X12EnvelopeSettings, self).__init__(**kwargs) + self.control_standards_id = control_standards_id + self.use_control_standards_id_as_repetition_character = use_control_standards_id_as_repetition_character + self.sender_application_id = sender_application_id + self.receiver_application_id = receiver_application_id + self.control_version_number = control_version_number + self.interchange_control_number_lower_bound = interchange_control_number_lower_bound + self.interchange_control_number_upper_bound = interchange_control_number_upper_bound + self.rollover_interchange_control_number = rollover_interchange_control_number + self.enable_default_group_headers = enable_default_group_headers + self.functional_group_id = functional_group_id + self.group_control_number_lower_bound = group_control_number_lower_bound + self.group_control_number_upper_bound = group_control_number_upper_bound + self.rollover_group_control_number = rollover_group_control_number + self.group_header_agency_code = group_header_agency_code + self.group_header_version = group_header_version + self.transaction_set_control_number_lower_bound = transaction_set_control_number_lower_bound + self.transaction_set_control_number_upper_bound = transaction_set_control_number_upper_bound + self.rollover_transaction_set_control_number = rollover_transaction_set_control_number + self.transaction_set_control_number_prefix = transaction_set_control_number_prefix + self.transaction_set_control_number_suffix = transaction_set_control_number_suffix + self.overwrite_existing_transaction_set_control_number = overwrite_existing_transaction_set_control_number + self.group_header_date_format = group_header_date_format + self.group_header_time_format = group_header_time_format + self.usage_indicator = usage_indicator diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings.py old mode 100755 new mode 100644 index 8eed3e84f592..ef590fc24825 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings.py @@ -15,25 +15,26 @@ class X12FramingSettings(Model): """The X12 agreement framing settings. - :param data_element_separator: The data element separator. + All required parameters must be populated in order to send to Azure. + + :param data_element_separator: Required. The data element separator. :type data_element_separator: int - :param component_separator: The component separator. + :param component_separator: Required. The component separator. :type component_separator: int - :param replace_separators_in_payload: The value indicating whether to - replace separators in payload. + :param replace_separators_in_payload: Required. The value indicating + whether to replace separators in payload. :type replace_separators_in_payload: bool - :param replace_character: The replacement character. + :param replace_character: Required. The replacement character. :type replace_character: int - :param segment_terminator: The segment terminator. + :param segment_terminator: Required. The segment terminator. :type segment_terminator: int - :param character_set: The X12 character set. Possible values include: - 'NotSpecified', 'Basic', 'Extended', 'UTF8' - :type character_set: str or :class:`X12CharacterSet - ` - :param segment_terminator_suffix: The segment terminator suffix. Possible - values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - :type segment_terminator_suffix: str or :class:`SegmentTerminatorSuffix - ` + :param character_set: Required. The X12 character set. Possible values + include: 'NotSpecified', 'Basic', 'Extended', 'UTF8' + :type character_set: str or ~azure.mgmt.logic.models.X12CharacterSet + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix """ _validation = { @@ -56,11 +57,12 @@ class X12FramingSettings(Model): 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, } - def __init__(self, data_element_separator, component_separator, replace_separators_in_payload, replace_character, segment_terminator, character_set, segment_terminator_suffix): - self.data_element_separator = data_element_separator - self.component_separator = component_separator - self.replace_separators_in_payload = replace_separators_in_payload - self.replace_character = replace_character - self.segment_terminator = segment_terminator - self.character_set = character_set - self.segment_terminator_suffix = segment_terminator_suffix + def __init__(self, **kwargs): + super(X12FramingSettings, self).__init__(**kwargs) + self.data_element_separator = kwargs.get('data_element_separator', None) + self.component_separator = kwargs.get('component_separator', None) + self.replace_separators_in_payload = kwargs.get('replace_separators_in_payload', None) + self.replace_character = kwargs.get('replace_character', None) + self.segment_terminator = kwargs.get('segment_terminator', None) + self.character_set = kwargs.get('character_set', None) + self.segment_terminator_suffix = kwargs.get('segment_terminator_suffix', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings_py3.py new file mode 100644 index 000000000000..9696f6411129 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings_py3.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class X12FramingSettings(Model): + """The X12 agreement framing settings. + + All required parameters must be populated in order to send to Azure. + + :param data_element_separator: Required. The data element separator. + :type data_element_separator: int + :param component_separator: Required. The component separator. + :type component_separator: int + :param replace_separators_in_payload: Required. The value indicating + whether to replace separators in payload. + :type replace_separators_in_payload: bool + :param replace_character: Required. The replacement character. + :type replace_character: int + :param segment_terminator: Required. The segment terminator. + :type segment_terminator: int + :param character_set: Required. The X12 character set. Possible values + include: 'NotSpecified', 'Basic', 'Extended', 'UTF8' + :type character_set: str or ~azure.mgmt.logic.models.X12CharacterSet + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + """ + + _validation = { + 'data_element_separator': {'required': True}, + 'component_separator': {'required': True}, + 'replace_separators_in_payload': {'required': True}, + 'replace_character': {'required': True}, + 'segment_terminator': {'required': True}, + 'character_set': {'required': True}, + 'segment_terminator_suffix': {'required': True}, + } + + _attribute_map = { + 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, + 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, + 'replace_separators_in_payload': {'key': 'replaceSeparatorsInPayload', 'type': 'bool'}, + 'replace_character': {'key': 'replaceCharacter', 'type': 'int'}, + 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, + 'character_set': {'key': 'characterSet', 'type': 'X12CharacterSet'}, + 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, + } + + def __init__(self, *, data_element_separator: int, component_separator: int, replace_separators_in_payload: bool, replace_character: int, segment_terminator: int, character_set, segment_terminator_suffix, **kwargs) -> None: + super(X12FramingSettings, self).__init__(**kwargs) + self.data_element_separator = data_element_separator + self.component_separator = component_separator + self.replace_separators_in_payload = replace_separators_in_payload + self.replace_character = replace_character + self.segment_terminator = segment_terminator + self.character_set = character_set + self.segment_terminator_suffix = segment_terminator_suffix diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter.py old mode 100755 new mode 100644 index c94f3ae195fd..a560cb141ce8 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter.py @@ -15,10 +15,12 @@ class X12MessageFilter(Model): """The X12 message filter for odata query. - :param message_filter_type: The message filter type. Possible values - include: 'NotSpecified', 'Include', 'Exclude' - :type message_filter_type: str or :class:`MessageFilterType - ` + All required parameters must be populated in order to send to Azure. + + :param message_filter_type: Required. The message filter type. Possible + values include: 'NotSpecified', 'Include', 'Exclude' + :type message_filter_type: str or + ~azure.mgmt.logic.models.MessageFilterType """ _validation = { @@ -29,5 +31,6 @@ class X12MessageFilter(Model): 'message_filter_type': {'key': 'messageFilterType', 'type': 'MessageFilterType'}, } - def __init__(self, message_filter_type): - self.message_filter_type = message_filter_type + def __init__(self, **kwargs): + super(X12MessageFilter, self).__init__(**kwargs) + self.message_filter_type = kwargs.get('message_filter_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter_py3.py new file mode 100644 index 000000000000..beb332725f2d --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class X12MessageFilter(Model): + """The X12 message filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param message_filter_type: Required. The message filter type. Possible + values include: 'NotSpecified', 'Include', 'Exclude' + :type message_filter_type: str or + ~azure.mgmt.logic.models.MessageFilterType + """ + + _validation = { + 'message_filter_type': {'required': True}, + } + + _attribute_map = { + 'message_filter_type': {'key': 'messageFilterType', 'type': 'MessageFilterType'}, + } + + def __init__(self, *, message_filter_type, **kwargs) -> None: + super(X12MessageFilter, self).__init__(**kwargs) + self.message_filter_type = message_filter_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier.py old mode 100755 new mode 100644 index 6ba040afb41a..97cd0c89c7c3 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier.py @@ -15,7 +15,9 @@ class X12MessageIdentifier(Model): """The X12 message identifier. - :param message_id: The message id. + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. :type message_id: str """ @@ -27,5 +29,6 @@ class X12MessageIdentifier(Model): 'message_id': {'key': 'messageId', 'type': 'str'}, } - def __init__(self, message_id): - self.message_id = message_id + def __init__(self, **kwargs): + super(X12MessageIdentifier, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier_py3.py new file mode 100644 index 000000000000..1d7fcee46c94 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class X12MessageIdentifier(Model): + """The X12 message identifier. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. + :type message_id: str + """ + + _validation = { + 'message_id': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + } + + def __init__(self, *, message_id: str, **kwargs) -> None: + super(X12MessageIdentifier, self).__init__(**kwargs) + self.message_id = message_id diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement.py old mode 100755 new mode 100644 index ebe2e28c269c..7d5038dceef5 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement.py @@ -13,17 +13,18 @@ class X12OneWayAgreement(Model): - """The X12 oneway agreement. - - :param sender_business_identity: The sender business identity - :type sender_business_identity: :class:`BusinessIdentity - ` - :param receiver_business_identity: The receiver business identity - :type receiver_business_identity: :class:`BusinessIdentity - ` - :param protocol_settings: The X12 protocol settings. - :type protocol_settings: :class:`X12ProtocolSettings - ` + """The X12 one-way agreement. + + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The X12 protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.X12ProtocolSettings """ _validation = { @@ -38,7 +39,8 @@ class X12OneWayAgreement(Model): 'protocol_settings': {'key': 'protocolSettings', 'type': 'X12ProtocolSettings'}, } - def __init__(self, sender_business_identity, receiver_business_identity, protocol_settings): - self.sender_business_identity = sender_business_identity - self.receiver_business_identity = receiver_business_identity - self.protocol_settings = protocol_settings + def __init__(self, **kwargs): + super(X12OneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = kwargs.get('sender_business_identity', None) + self.receiver_business_identity = kwargs.get('receiver_business_identity', None) + self.protocol_settings = kwargs.get('protocol_settings', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement_py3.py new file mode 100644 index 000000000000..3caddb04ea2c --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class X12OneWayAgreement(Model): + """The X12 one-way agreement. + + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The X12 protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.X12ProtocolSettings + """ + + _validation = { + 'sender_business_identity': {'required': True}, + 'receiver_business_identity': {'required': True}, + 'protocol_settings': {'required': True}, + } + + _attribute_map = { + 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, + 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, + 'protocol_settings': {'key': 'protocolSettings', 'type': 'X12ProtocolSettings'}, + } + + def __init__(self, *, sender_business_identity, receiver_business_identity, protocol_settings, **kwargs) -> None: + super(X12OneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = sender_business_identity + self.receiver_business_identity = receiver_business_identity + self.protocol_settings = protocol_settings diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings.py old mode 100755 new mode 100644 index 1b6d3253cd18..cf116affd990 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings.py @@ -15,23 +15,25 @@ class X12ProcessingSettings(Model): """The X12 processing settings. - :param mask_security_info: The value indicating whether to mask security - information. + All required parameters must be populated in order to send to Azure. + + :param mask_security_info: Required. The value indicating whether to mask + security information. :type mask_security_info: bool - :param convert_implied_decimal: The value indicating whether to convert - numerical type to implied decimal. + :param convert_implied_decimal: Required. The value indicating whether to + convert numerical type to implied decimal. :type convert_implied_decimal: bool - :param preserve_interchange: The value indicating whether to preserve - interchange. + :param preserve_interchange: Required. The value indicating whether to + preserve interchange. :type preserve_interchange: bool - :param suspend_interchange_on_error: The value indicating whether to - suspend interchange on error. + :param suspend_interchange_on_error: Required. The value indicating + whether to suspend interchange on error. :type suspend_interchange_on_error: bool - :param create_empty_xml_tags_for_trailing_separators: The value indicating - whether to create empty xml tags for trailing separators. + :param create_empty_xml_tags_for_trailing_separators: Required. The value + indicating whether to create empty xml tags for trailing separators. :type create_empty_xml_tags_for_trailing_separators: bool - :param use_dot_as_decimal_separator: The value indicating whether to use - dot as decimal separator. + :param use_dot_as_decimal_separator: Required. The value indicating + whether to use dot as decimal separator. :type use_dot_as_decimal_separator: bool """ @@ -53,10 +55,11 @@ class X12ProcessingSettings(Model): 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, } - def __init__(self, mask_security_info, convert_implied_decimal, preserve_interchange, suspend_interchange_on_error, create_empty_xml_tags_for_trailing_separators, use_dot_as_decimal_separator): - self.mask_security_info = mask_security_info - self.convert_implied_decimal = convert_implied_decimal - self.preserve_interchange = preserve_interchange - self.suspend_interchange_on_error = suspend_interchange_on_error - self.create_empty_xml_tags_for_trailing_separators = create_empty_xml_tags_for_trailing_separators - self.use_dot_as_decimal_separator = use_dot_as_decimal_separator + def __init__(self, **kwargs): + super(X12ProcessingSettings, self).__init__(**kwargs) + self.mask_security_info = kwargs.get('mask_security_info', None) + self.convert_implied_decimal = kwargs.get('convert_implied_decimal', None) + self.preserve_interchange = kwargs.get('preserve_interchange', None) + self.suspend_interchange_on_error = kwargs.get('suspend_interchange_on_error', None) + self.create_empty_xml_tags_for_trailing_separators = kwargs.get('create_empty_xml_tags_for_trailing_separators', None) + self.use_dot_as_decimal_separator = kwargs.get('use_dot_as_decimal_separator', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings_py3.py new file mode 100644 index 000000000000..915cf16ee01c --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class X12ProcessingSettings(Model): + """The X12 processing settings. + + All required parameters must be populated in order to send to Azure. + + :param mask_security_info: Required. The value indicating whether to mask + security information. + :type mask_security_info: bool + :param convert_implied_decimal: Required. The value indicating whether to + convert numerical type to implied decimal. + :type convert_implied_decimal: bool + :param preserve_interchange: Required. The value indicating whether to + preserve interchange. + :type preserve_interchange: bool + :param suspend_interchange_on_error: Required. The value indicating + whether to suspend interchange on error. + :type suspend_interchange_on_error: bool + :param create_empty_xml_tags_for_trailing_separators: Required. The value + indicating whether to create empty xml tags for trailing separators. + :type create_empty_xml_tags_for_trailing_separators: bool + :param use_dot_as_decimal_separator: Required. The value indicating + whether to use dot as decimal separator. + :type use_dot_as_decimal_separator: bool + """ + + _validation = { + 'mask_security_info': {'required': True}, + 'convert_implied_decimal': {'required': True}, + 'preserve_interchange': {'required': True}, + 'suspend_interchange_on_error': {'required': True}, + 'create_empty_xml_tags_for_trailing_separators': {'required': True}, + 'use_dot_as_decimal_separator': {'required': True}, + } + + _attribute_map = { + 'mask_security_info': {'key': 'maskSecurityInfo', 'type': 'bool'}, + 'convert_implied_decimal': {'key': 'convertImpliedDecimal', 'type': 'bool'}, + 'preserve_interchange': {'key': 'preserveInterchange', 'type': 'bool'}, + 'suspend_interchange_on_error': {'key': 'suspendInterchangeOnError', 'type': 'bool'}, + 'create_empty_xml_tags_for_trailing_separators': {'key': 'createEmptyXmlTagsForTrailingSeparators', 'type': 'bool'}, + 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, + } + + def __init__(self, *, mask_security_info: bool, convert_implied_decimal: bool, preserve_interchange: bool, suspend_interchange_on_error: bool, create_empty_xml_tags_for_trailing_separators: bool, use_dot_as_decimal_separator: bool, **kwargs) -> None: + super(X12ProcessingSettings, self).__init__(**kwargs) + self.mask_security_info = mask_security_info + self.convert_implied_decimal = convert_implied_decimal + self.preserve_interchange = preserve_interchange + self.suspend_interchange_on_error = suspend_interchange_on_error + self.create_empty_xml_tags_for_trailing_separators = create_empty_xml_tags_for_trailing_separators + self.use_dot_as_decimal_separator = use_dot_as_decimal_separator diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings.py old mode 100755 new mode 100644 index 3e316cee0a5a..ab1d7ac4d471 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings.py @@ -15,42 +15,38 @@ class X12ProtocolSettings(Model): """The X12 agreement protocol settings. - :param validation_settings: The X12 validation settings. - :type validation_settings: :class:`X12ValidationSettings - ` - :param framing_settings: The X12 framing settings. - :type framing_settings: :class:`X12FramingSettings - ` - :param envelope_settings: The X12 envelope settings. - :type envelope_settings: :class:`X12EnvelopeSettings - ` - :param acknowledgement_settings: The X12 acknowledgment settings. - :type acknowledgement_settings: :class:`X12AcknowledgementSettings - ` - :param message_filter: The X12 message filter. - :type message_filter: :class:`X12MessageFilter - ` - :param security_settings: The X12 security settings. - :type security_settings: :class:`X12SecuritySettings - ` - :param processing_settings: The X12 processing settings. - :type processing_settings: :class:`X12ProcessingSettings - ` + All required parameters must be populated in order to send to Azure. + + :param validation_settings: Required. The X12 validation settings. + :type validation_settings: ~azure.mgmt.logic.models.X12ValidationSettings + :param framing_settings: Required. The X12 framing settings. + :type framing_settings: ~azure.mgmt.logic.models.X12FramingSettings + :param envelope_settings: Required. The X12 envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.X12EnvelopeSettings + :param acknowledgement_settings: Required. The X12 acknowledgment + settings. + :type acknowledgement_settings: + ~azure.mgmt.logic.models.X12AcknowledgementSettings + :param message_filter: Required. The X12 message filter. + :type message_filter: ~azure.mgmt.logic.models.X12MessageFilter + :param security_settings: Required. The X12 security settings. + :type security_settings: ~azure.mgmt.logic.models.X12SecuritySettings + :param processing_settings: Required. The X12 processing settings. + :type processing_settings: ~azure.mgmt.logic.models.X12ProcessingSettings :param envelope_overrides: The X12 envelope override settings. - :type envelope_overrides: list of :class:`X12EnvelopeOverride - ` + :type envelope_overrides: + list[~azure.mgmt.logic.models.X12EnvelopeOverride] :param validation_overrides: The X12 validation override settings. - :type validation_overrides: list of :class:`X12ValidationOverride - ` + :type validation_overrides: + list[~azure.mgmt.logic.models.X12ValidationOverride] :param message_filter_list: The X12 message filter list. - :type message_filter_list: list of :class:`X12MessageIdentifier - ` - :param schema_references: The X12 schema references. - :type schema_references: list of :class:`X12SchemaReference - ` + :type message_filter_list: + list[~azure.mgmt.logic.models.X12MessageIdentifier] + :param schema_references: Required. The X12 schema references. + :type schema_references: list[~azure.mgmt.logic.models.X12SchemaReference] :param x12_delimiter_overrides: The X12 delimiter override settings. - :type x12_delimiter_overrides: list of :class:`X12DelimiterOverrides - ` + :type x12_delimiter_overrides: + list[~azure.mgmt.logic.models.X12DelimiterOverrides] """ _validation = { @@ -79,16 +75,17 @@ class X12ProtocolSettings(Model): 'x12_delimiter_overrides': {'key': 'x12DelimiterOverrides', 'type': '[X12DelimiterOverrides]'}, } - def __init__(self, validation_settings, framing_settings, envelope_settings, acknowledgement_settings, message_filter, security_settings, processing_settings, schema_references, envelope_overrides=None, validation_overrides=None, message_filter_list=None, x12_delimiter_overrides=None): - self.validation_settings = validation_settings - self.framing_settings = framing_settings - self.envelope_settings = envelope_settings - self.acknowledgement_settings = acknowledgement_settings - self.message_filter = message_filter - self.security_settings = security_settings - self.processing_settings = processing_settings - self.envelope_overrides = envelope_overrides - self.validation_overrides = validation_overrides - self.message_filter_list = message_filter_list - self.schema_references = schema_references - self.x12_delimiter_overrides = x12_delimiter_overrides + def __init__(self, **kwargs): + super(X12ProtocolSettings, self).__init__(**kwargs) + self.validation_settings = kwargs.get('validation_settings', None) + self.framing_settings = kwargs.get('framing_settings', None) + self.envelope_settings = kwargs.get('envelope_settings', None) + self.acknowledgement_settings = kwargs.get('acknowledgement_settings', None) + self.message_filter = kwargs.get('message_filter', None) + self.security_settings = kwargs.get('security_settings', None) + self.processing_settings = kwargs.get('processing_settings', None) + self.envelope_overrides = kwargs.get('envelope_overrides', None) + self.validation_overrides = kwargs.get('validation_overrides', None) + self.message_filter_list = kwargs.get('message_filter_list', None) + self.schema_references = kwargs.get('schema_references', None) + self.x12_delimiter_overrides = kwargs.get('x12_delimiter_overrides', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings_py3.py new file mode 100644 index 000000000000..3f328db1133e --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings_py3.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class X12ProtocolSettings(Model): + """The X12 agreement protocol settings. + + All required parameters must be populated in order to send to Azure. + + :param validation_settings: Required. The X12 validation settings. + :type validation_settings: ~azure.mgmt.logic.models.X12ValidationSettings + :param framing_settings: Required. The X12 framing settings. + :type framing_settings: ~azure.mgmt.logic.models.X12FramingSettings + :param envelope_settings: Required. The X12 envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.X12EnvelopeSettings + :param acknowledgement_settings: Required. The X12 acknowledgment + settings. + :type acknowledgement_settings: + ~azure.mgmt.logic.models.X12AcknowledgementSettings + :param message_filter: Required. The X12 message filter. + :type message_filter: ~azure.mgmt.logic.models.X12MessageFilter + :param security_settings: Required. The X12 security settings. + :type security_settings: ~azure.mgmt.logic.models.X12SecuritySettings + :param processing_settings: Required. The X12 processing settings. + :type processing_settings: ~azure.mgmt.logic.models.X12ProcessingSettings + :param envelope_overrides: The X12 envelope override settings. + :type envelope_overrides: + list[~azure.mgmt.logic.models.X12EnvelopeOverride] + :param validation_overrides: The X12 validation override settings. + :type validation_overrides: + list[~azure.mgmt.logic.models.X12ValidationOverride] + :param message_filter_list: The X12 message filter list. + :type message_filter_list: + list[~azure.mgmt.logic.models.X12MessageIdentifier] + :param schema_references: Required. The X12 schema references. + :type schema_references: list[~azure.mgmt.logic.models.X12SchemaReference] + :param x12_delimiter_overrides: The X12 delimiter override settings. + :type x12_delimiter_overrides: + list[~azure.mgmt.logic.models.X12DelimiterOverrides] + """ + + _validation = { + 'validation_settings': {'required': True}, + 'framing_settings': {'required': True}, + 'envelope_settings': {'required': True}, + 'acknowledgement_settings': {'required': True}, + 'message_filter': {'required': True}, + 'security_settings': {'required': True}, + 'processing_settings': {'required': True}, + 'schema_references': {'required': True}, + } + + _attribute_map = { + 'validation_settings': {'key': 'validationSettings', 'type': 'X12ValidationSettings'}, + 'framing_settings': {'key': 'framingSettings', 'type': 'X12FramingSettings'}, + 'envelope_settings': {'key': 'envelopeSettings', 'type': 'X12EnvelopeSettings'}, + 'acknowledgement_settings': {'key': 'acknowledgementSettings', 'type': 'X12AcknowledgementSettings'}, + 'message_filter': {'key': 'messageFilter', 'type': 'X12MessageFilter'}, + 'security_settings': {'key': 'securitySettings', 'type': 'X12SecuritySettings'}, + 'processing_settings': {'key': 'processingSettings', 'type': 'X12ProcessingSettings'}, + 'envelope_overrides': {'key': 'envelopeOverrides', 'type': '[X12EnvelopeOverride]'}, + 'validation_overrides': {'key': 'validationOverrides', 'type': '[X12ValidationOverride]'}, + 'message_filter_list': {'key': 'messageFilterList', 'type': '[X12MessageIdentifier]'}, + 'schema_references': {'key': 'schemaReferences', 'type': '[X12SchemaReference]'}, + 'x12_delimiter_overrides': {'key': 'x12DelimiterOverrides', 'type': '[X12DelimiterOverrides]'}, + } + + def __init__(self, *, validation_settings, framing_settings, envelope_settings, acknowledgement_settings, message_filter, security_settings, processing_settings, schema_references, envelope_overrides=None, validation_overrides=None, message_filter_list=None, x12_delimiter_overrides=None, **kwargs) -> None: + super(X12ProtocolSettings, self).__init__(**kwargs) + self.validation_settings = validation_settings + self.framing_settings = framing_settings + self.envelope_settings = envelope_settings + self.acknowledgement_settings = acknowledgement_settings + self.message_filter = message_filter + self.security_settings = security_settings + self.processing_settings = processing_settings + self.envelope_overrides = envelope_overrides + self.validation_overrides = validation_overrides + self.message_filter_list = message_filter_list + self.schema_references = schema_references + self.x12_delimiter_overrides = x12_delimiter_overrides diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference.py old mode 100755 new mode 100644 index 37bad10d9dc5..dc8519933d95 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference.py @@ -15,13 +15,15 @@ class X12SchemaReference(Model): """The X12 schema reference. - :param message_id: The message id. + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. :type message_id: str :param sender_application_id: The sender application id. :type sender_application_id: str - :param schema_version: The schema version. + :param schema_version: Required. The schema version. :type schema_version: str - :param schema_name: The schema name. + :param schema_name: Required. The schema name. :type schema_name: str """ @@ -38,8 +40,9 @@ class X12SchemaReference(Model): 'schema_name': {'key': 'schemaName', 'type': 'str'}, } - def __init__(self, message_id, schema_version, schema_name, sender_application_id=None): - self.message_id = message_id - self.sender_application_id = sender_application_id - self.schema_version = schema_version - self.schema_name = schema_name + def __init__(self, **kwargs): + super(X12SchemaReference, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.sender_application_id = kwargs.get('sender_application_id', None) + self.schema_version = kwargs.get('schema_version', None) + self.schema_name = kwargs.get('schema_name', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference_py3.py new file mode 100644 index 000000000000..e57f4d8806d4 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class X12SchemaReference(Model): + """The X12 schema reference. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. + :type message_id: str + :param sender_application_id: The sender application id. + :type sender_application_id: str + :param schema_version: Required. The schema version. + :type schema_version: str + :param schema_name: Required. The schema name. + :type schema_name: str + """ + + _validation = { + 'message_id': {'required': True}, + 'schema_version': {'required': True}, + 'schema_name': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'schema_version': {'key': 'schemaVersion', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + } + + def __init__(self, *, message_id: str, schema_version: str, schema_name: str, sender_application_id: str=None, **kwargs) -> None: + super(X12SchemaReference, self).__init__(**kwargs) + self.message_id = message_id + self.sender_application_id = sender_application_id + self.schema_version = schema_version + self.schema_name = schema_name diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings.py old mode 100755 new mode 100644 index 09e61426ca83..96f57189b72e --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings.py @@ -15,11 +15,13 @@ class X12SecuritySettings(Model): """The X12 agreement security settings. - :param authorization_qualifier: The authorization qualifier. + All required parameters must be populated in order to send to Azure. + + :param authorization_qualifier: Required. The authorization qualifier. :type authorization_qualifier: str :param authorization_value: The authorization value. :type authorization_value: str - :param security_qualifier: The security qualifier. + :param security_qualifier: Required. The security qualifier. :type security_qualifier: str :param password_value: The password value. :type password_value: str @@ -37,8 +39,9 @@ class X12SecuritySettings(Model): 'password_value': {'key': 'passwordValue', 'type': 'str'}, } - def __init__(self, authorization_qualifier, security_qualifier, authorization_value=None, password_value=None): - self.authorization_qualifier = authorization_qualifier - self.authorization_value = authorization_value - self.security_qualifier = security_qualifier - self.password_value = password_value + def __init__(self, **kwargs): + super(X12SecuritySettings, self).__init__(**kwargs) + self.authorization_qualifier = kwargs.get('authorization_qualifier', None) + self.authorization_value = kwargs.get('authorization_value', None) + self.security_qualifier = kwargs.get('security_qualifier', None) + self.password_value = kwargs.get('password_value', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings_py3.py new file mode 100644 index 000000000000..fd3591dffd2a --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class X12SecuritySettings(Model): + """The X12 agreement security settings. + + All required parameters must be populated in order to send to Azure. + + :param authorization_qualifier: Required. The authorization qualifier. + :type authorization_qualifier: str + :param authorization_value: The authorization value. + :type authorization_value: str + :param security_qualifier: Required. The security qualifier. + :type security_qualifier: str + :param password_value: The password value. + :type password_value: str + """ + + _validation = { + 'authorization_qualifier': {'required': True}, + 'security_qualifier': {'required': True}, + } + + _attribute_map = { + 'authorization_qualifier': {'key': 'authorizationQualifier', 'type': 'str'}, + 'authorization_value': {'key': 'authorizationValue', 'type': 'str'}, + 'security_qualifier': {'key': 'securityQualifier', 'type': 'str'}, + 'password_value': {'key': 'passwordValue', 'type': 'str'}, + } + + def __init__(self, *, authorization_qualifier: str, security_qualifier: str, authorization_value: str=None, password_value: str=None, **kwargs) -> None: + super(X12SecuritySettings, self).__init__(**kwargs) + self.authorization_qualifier = authorization_qualifier + self.authorization_value = authorization_value + self.security_qualifier = security_qualifier + self.password_value = password_value diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override.py old mode 100755 new mode 100644 index 322ad7353ecd..1b5e384734ca --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override.py @@ -15,28 +15,31 @@ class X12ValidationOverride(Model): """The X12 validation override settings. - :param message_id: The message id on which the validation settings has to - be applied. + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which the validation + settings has to be applied. :type message_id: str - :param validate_edi_types: The value indicating whether to validate EDI - types. + :param validate_edi_types: Required. The value indicating whether to + validate EDI types. :type validate_edi_types: bool - :param validate_xsd_types: The value indicating whether to validate XSD - types. + :param validate_xsd_types: Required. The value indicating whether to + validate XSD types. :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: The value indicating - whether to allow leading and trailing spaces and zeroes. + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param validate_character_set: The value indicating whether to validate - character Set. + :param validate_character_set: Required. The value indicating whether to + validate character Set. :type validate_character_set: bool - :param trim_leading_and_trailing_spaces_and_zeroes: The value indicating - whether to trim leading and trailing spaces and zeroes. + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: The trailing separator policy. Possible - values include: 'NotSpecified', 'NotAllowed', 'Optional', 'Mandatory' - :type trailing_separator_policy: str or :class:`TrailingSeparatorPolicy - ` + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy """ _validation = { @@ -59,11 +62,12 @@ class X12ValidationOverride(Model): 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'TrailingSeparatorPolicy'}, } - def __init__(self, message_id, validate_edi_types, validate_xsd_types, allow_leading_and_trailing_spaces_and_zeroes, validate_character_set, trim_leading_and_trailing_spaces_and_zeroes, trailing_separator_policy): - self.message_id = message_id - self.validate_edi_types = validate_edi_types - self.validate_xsd_types = validate_xsd_types - self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes - self.validate_character_set = validate_character_set - self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes - self.trailing_separator_policy = trailing_separator_policy + def __init__(self, **kwargs): + super(X12ValidationOverride, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.validate_edi_types = kwargs.get('validate_edi_types', None) + self.validate_xsd_types = kwargs.get('validate_xsd_types', None) + self.allow_leading_and_trailing_spaces_and_zeroes = kwargs.get('allow_leading_and_trailing_spaces_and_zeroes', None) + self.validate_character_set = kwargs.get('validate_character_set', None) + self.trim_leading_and_trailing_spaces_and_zeroes = kwargs.get('trim_leading_and_trailing_spaces_and_zeroes', None) + self.trailing_separator_policy = kwargs.get('trailing_separator_policy', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override_py3.py new file mode 100644 index 000000000000..9f80ba560202 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override_py3.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class X12ValidationOverride(Model): + """The X12 validation override settings. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which the validation + settings has to be applied. + :type message_id: str + :param validate_edi_types: Required. The value indicating whether to + validate EDI types. + :type validate_edi_types: bool + :param validate_xsd_types: Required. The value indicating whether to + validate XSD types. + :type validate_xsd_types: bool + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. + :type allow_leading_and_trailing_spaces_and_zeroes: bool + :param validate_character_set: Required. The value indicating whether to + validate character Set. + :type validate_character_set: bool + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. + :type trim_leading_and_trailing_spaces_and_zeroes: bool + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + """ + + _validation = { + 'message_id': {'required': True}, + 'validate_edi_types': {'required': True}, + 'validate_xsd_types': {'required': True}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'validate_character_set': {'required': True}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trailing_separator_policy': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'validate_edi_types': {'key': 'validateEdiTypes', 'type': 'bool'}, + 'validate_xsd_types': {'key': 'validateXsdTypes', 'type': 'bool'}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'TrailingSeparatorPolicy'}, + } + + def __init__(self, *, message_id: str, validate_edi_types: bool, validate_xsd_types: bool, allow_leading_and_trailing_spaces_and_zeroes: bool, validate_character_set: bool, trim_leading_and_trailing_spaces_and_zeroes: bool, trailing_separator_policy, **kwargs) -> None: + super(X12ValidationOverride, self).__init__(**kwargs) + self.message_id = message_id + self.validate_edi_types = validate_edi_types + self.validate_xsd_types = validate_xsd_types + self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes + self.validate_character_set = validate_character_set + self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes + self.trailing_separator_policy = trailing_separator_policy diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings.py old mode 100755 new mode 100644 index 670aa9f2efab..107e1849a2c5 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings.py @@ -15,37 +15,40 @@ class X12ValidationSettings(Model): """The X12 agreement validation settings. - :param validate_character_set: The value indicating whether to validate - character set in the message. + All required parameters must be populated in order to send to Azure. + + :param validate_character_set: Required. The value indicating whether to + validate character set in the message. :type validate_character_set: bool - :param check_duplicate_interchange_control_number: The value indicating - whether to check for duplicate interchange control number. + :param check_duplicate_interchange_control_number: Required. The value + indicating whether to check for duplicate interchange control number. :type check_duplicate_interchange_control_number: bool - :param interchange_control_number_validity_days: The validity period of - interchange control number. + :param interchange_control_number_validity_days: Required. The validity + period of interchange control number. :type interchange_control_number_validity_days: int - :param check_duplicate_group_control_number: The value indicating whether - to check for duplicate group control number. + :param check_duplicate_group_control_number: Required. The value + indicating whether to check for duplicate group control number. :type check_duplicate_group_control_number: bool - :param check_duplicate_transaction_set_control_number: The value + :param check_duplicate_transaction_set_control_number: Required. The value indicating whether to check for duplicate transaction set control number. :type check_duplicate_transaction_set_control_number: bool - :param validate_edi_types: The value indicating whether to Whether to - validate EDI types. + :param validate_edi_types: Required. The value indicating whether to + Whether to validate EDI types. :type validate_edi_types: bool - :param validate_xsd_types: The value indicating whether to Whether to - validate XSD types. + :param validate_xsd_types: Required. The value indicating whether to + Whether to validate XSD types. :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: The value indicating - whether to allow leading and trailing spaces and zeroes. + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trim_leading_and_trailing_spaces_and_zeroes: The value indicating - whether to trim leading and trailing spaces and zeroes. + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: The trailing separator policy. Possible - values include: 'NotSpecified', 'NotAllowed', 'Optional', 'Mandatory' - :type trailing_separator_policy: str or :class:`TrailingSeparatorPolicy - ` + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy """ _validation = { @@ -74,14 +77,15 @@ class X12ValidationSettings(Model): 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'TrailingSeparatorPolicy'}, } - def __init__(self, validate_character_set, check_duplicate_interchange_control_number, interchange_control_number_validity_days, check_duplicate_group_control_number, check_duplicate_transaction_set_control_number, validate_edi_types, validate_xsd_types, allow_leading_and_trailing_spaces_and_zeroes, trim_leading_and_trailing_spaces_and_zeroes, trailing_separator_policy): - self.validate_character_set = validate_character_set - self.check_duplicate_interchange_control_number = check_duplicate_interchange_control_number - self.interchange_control_number_validity_days = interchange_control_number_validity_days - self.check_duplicate_group_control_number = check_duplicate_group_control_number - self.check_duplicate_transaction_set_control_number = check_duplicate_transaction_set_control_number - self.validate_edi_types = validate_edi_types - self.validate_xsd_types = validate_xsd_types - self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes - self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes - self.trailing_separator_policy = trailing_separator_policy + def __init__(self, **kwargs): + super(X12ValidationSettings, self).__init__(**kwargs) + self.validate_character_set = kwargs.get('validate_character_set', None) + self.check_duplicate_interchange_control_number = kwargs.get('check_duplicate_interchange_control_number', None) + self.interchange_control_number_validity_days = kwargs.get('interchange_control_number_validity_days', None) + self.check_duplicate_group_control_number = kwargs.get('check_duplicate_group_control_number', None) + self.check_duplicate_transaction_set_control_number = kwargs.get('check_duplicate_transaction_set_control_number', None) + self.validate_edi_types = kwargs.get('validate_edi_types', None) + self.validate_xsd_types = kwargs.get('validate_xsd_types', None) + self.allow_leading_and_trailing_spaces_and_zeroes = kwargs.get('allow_leading_and_trailing_spaces_and_zeroes', None) + self.trim_leading_and_trailing_spaces_and_zeroes = kwargs.get('trim_leading_and_trailing_spaces_and_zeroes', None) + self.trailing_separator_policy = kwargs.get('trailing_separator_policy', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings_py3.py new file mode 100644 index 000000000000..3873b10dfce9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings_py3.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class X12ValidationSettings(Model): + """The X12 agreement validation settings. + + All required parameters must be populated in order to send to Azure. + + :param validate_character_set: Required. The value indicating whether to + validate character set in the message. + :type validate_character_set: bool + :param check_duplicate_interchange_control_number: Required. The value + indicating whether to check for duplicate interchange control number. + :type check_duplicate_interchange_control_number: bool + :param interchange_control_number_validity_days: Required. The validity + period of interchange control number. + :type interchange_control_number_validity_days: int + :param check_duplicate_group_control_number: Required. The value + indicating whether to check for duplicate group control number. + :type check_duplicate_group_control_number: bool + :param check_duplicate_transaction_set_control_number: Required. The value + indicating whether to check for duplicate transaction set control number. + :type check_duplicate_transaction_set_control_number: bool + :param validate_edi_types: Required. The value indicating whether to + Whether to validate EDI types. + :type validate_edi_types: bool + :param validate_xsd_types: Required. The value indicating whether to + Whether to validate XSD types. + :type validate_xsd_types: bool + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. + :type allow_leading_and_trailing_spaces_and_zeroes: bool + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. + :type trim_leading_and_trailing_spaces_and_zeroes: bool + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + """ + + _validation = { + 'validate_character_set': {'required': True}, + 'check_duplicate_interchange_control_number': {'required': True}, + 'interchange_control_number_validity_days': {'required': True}, + 'check_duplicate_group_control_number': {'required': True}, + 'check_duplicate_transaction_set_control_number': {'required': True}, + 'validate_edi_types': {'required': True}, + 'validate_xsd_types': {'required': True}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trailing_separator_policy': {'required': True}, + } + + _attribute_map = { + 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, + 'check_duplicate_interchange_control_number': {'key': 'checkDuplicateInterchangeControlNumber', 'type': 'bool'}, + 'interchange_control_number_validity_days': {'key': 'interchangeControlNumberValidityDays', 'type': 'int'}, + 'check_duplicate_group_control_number': {'key': 'checkDuplicateGroupControlNumber', 'type': 'bool'}, + 'check_duplicate_transaction_set_control_number': {'key': 'checkDuplicateTransactionSetControlNumber', 'type': 'bool'}, + 'validate_edi_types': {'key': 'validateEdiTypes', 'type': 'bool'}, + 'validate_xsd_types': {'key': 'validateXsdTypes', 'type': 'bool'}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'TrailingSeparatorPolicy'}, + } + + def __init__(self, *, validate_character_set: bool, check_duplicate_interchange_control_number: bool, interchange_control_number_validity_days: int, check_duplicate_group_control_number: bool, check_duplicate_transaction_set_control_number: bool, validate_edi_types: bool, validate_xsd_types: bool, allow_leading_and_trailing_spaces_and_zeroes: bool, trim_leading_and_trailing_spaces_and_zeroes: bool, trailing_separator_policy, **kwargs) -> None: + super(X12ValidationSettings, self).__init__(**kwargs) + self.validate_character_set = validate_character_set + self.check_duplicate_interchange_control_number = check_duplicate_interchange_control_number + self.interchange_control_number_validity_days = interchange_control_number_validity_days + self.check_duplicate_group_control_number = check_duplicate_group_control_number + self.check_duplicate_transaction_set_control_number = check_duplicate_transaction_set_control_number + self.validate_edi_types = validate_edi_types + self.validate_xsd_types = validate_xsd_types + self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes + self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes + self.trailing_separator_policy = trailing_separator_policy diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/__init__.py b/azure-mgmt-logic/azure/mgmt/logic/operations/__init__.py old mode 100755 new mode 100644 index d554e3620607..b2facd3995b3 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/__init__.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/__init__.py @@ -15,7 +15,12 @@ from .workflow_trigger_histories_operations import WorkflowTriggerHistoriesOperations from .workflow_runs_operations import WorkflowRunsOperations from .workflow_run_actions_operations import WorkflowRunActionsOperations +from .workflow_run_action_repetitions_operations import WorkflowRunActionRepetitionsOperations +from .workflow_run_action_scoped_repetitions_operations import WorkflowRunActionScopedRepetitionsOperations +from .workflow_run_operations import WorkflowRunOperations from .integration_accounts_operations import IntegrationAccountsOperations +from .integration_account_assemblies_operations import IntegrationAccountAssembliesOperations +from .integration_account_batch_configurations_operations import IntegrationAccountBatchConfigurationsOperations from .schemas_operations import SchemasOperations from .maps_operations import MapsOperations from .partners_operations import PartnersOperations @@ -30,7 +35,12 @@ 'WorkflowTriggerHistoriesOperations', 'WorkflowRunsOperations', 'WorkflowRunActionsOperations', + 'WorkflowRunActionRepetitionsOperations', + 'WorkflowRunActionScopedRepetitionsOperations', + 'WorkflowRunOperations', 'IntegrationAccountsOperations', + 'IntegrationAccountAssembliesOperations', + 'IntegrationAccountBatchConfigurationsOperations', 'SchemasOperations', 'MapsOperations', 'PartnersOperations', diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/agreements_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/agreements_operations.py old mode 100755 new mode 100644 index 57f34d27e366..865610bc4e8b --- a/azure-mgmt-logic/azure/mgmt/logic/operations/agreements_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/agreements_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class AgreementsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,15 +54,16 @@ def list_by_integration_accounts( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountAgreementPaged - ` + :return: An iterator like instance of IntegrationAccountAgreement + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountAgreementPaged[~azure.mgmt.logic.models.IntegrationAccountAgreement] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements' + url = self.list_by_integration_accounts.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +96,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,6 +114,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_integration_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements'} def get( self, resource_group_name, integration_account_name, agreement_name, custom_headers=None, raw=False, **operation_config): @@ -127,14 +131,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountAgreement - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountAgreement or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountAgreement or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -159,7 +162,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -176,6 +179,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} def create_or_update( self, resource_group_name, integration_account_name, agreement_name, agreement, custom_headers=None, raw=False, **operation_config): @@ -188,21 +192,19 @@ def create_or_update( :param agreement_name: The integration account agreement name. :type agreement_name: str :param agreement: The integration account agreement. - :type agreement: :class:`IntegrationAccountAgreement - ` + :type agreement: ~azure.mgmt.logic.models.IntegrationAccountAgreement :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountAgreement - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountAgreement or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountAgreement or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -231,7 +233,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -250,6 +252,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} def delete( self, resource_group_name, integration_account_name, agreement_name, custom_headers=None, raw=False, **operation_config): @@ -266,13 +269,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -297,7 +299,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -307,3 +309,80 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} + + def list_content_callback_url( + self, resource_group_name, integration_account_name, agreement_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param agreement_name: The integration account agreement name. + :type agreement_name: str + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + list_content_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + + # Construct URL + url = self.list_content_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'agreementName': self._serialize.url("agreement_name", agreement_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(list_content_callback_url1, 'GetCallbackUrlParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/certificates_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/certificates_operations.py old mode 100755 new mode 100644 index af9925bef912..615cbe579cec --- a/azure-mgmt-logic/azure/mgmt/logic/operations/certificates_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/certificates_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class CertificatesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,15 +52,16 @@ def list_by_integration_accounts( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountCertificatePaged - ` + :return: An iterator like instance of IntegrationAccountCertificate + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountCertificatePaged[~azure.mgmt.logic.models.IntegrationAccountCertificate] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates' + url = self.list_by_integration_accounts.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -89,7 +92,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -107,6 +110,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_integration_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates'} def get( self, resource_group_name, integration_account_name, certificate_name, custom_headers=None, raw=False, **operation_config): @@ -123,14 +127,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountCertificate - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountCertificate or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountCertificate or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -155,7 +159,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -172,6 +176,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} def create_or_update( self, resource_group_name, integration_account_name, certificate_name, certificate, custom_headers=None, raw=False, **operation_config): @@ -184,21 +189,21 @@ def create_or_update( :param certificate_name: The integration account certificate name. :type certificate_name: str :param certificate: The integration account certificate. - :type certificate: :class:`IntegrationAccountCertificate - ` + :type certificate: + ~azure.mgmt.logic.models.IntegrationAccountCertificate :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountCertificate - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountCertificate or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountCertificate or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -227,7 +232,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -246,6 +251,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} def delete( self, resource_group_name, integration_account_name, certificate_name, custom_headers=None, raw=False, **operation_config): @@ -262,13 +268,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -293,7 +298,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -303,3 +308,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_assemblies_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_assemblies_operations.py new file mode 100644 index 000000000000..ebfb06ee9381 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_assemblies_operations.py @@ -0,0 +1,369 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IntegrationAccountAssembliesOperations(object): + """IntegrationAccountAssembliesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2016-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-06-01" + + self.config = config + + def list( + self, resource_group_name, integration_account_name, custom_headers=None, raw=False, **operation_config): + """List the assemblies for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AssemblyDefinition + :rtype: + ~azure.mgmt.logic.models.AssemblyDefinitionPaged[~azure.mgmt.logic.models.AssemblyDefinition] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.AssemblyDefinitionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AssemblyDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies'} + + def get( + self, resource_group_name, integration_account_name, assembly_artifact_name, custom_headers=None, raw=False, **operation_config): + """Get an assembly for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AssemblyDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.AssemblyDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AssemblyDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} + + def create_or_update( + self, resource_group_name, integration_account_name, assembly_artifact_name, assembly_artifact, custom_headers=None, raw=False, **operation_config): + """Create or update an assembly for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_name: str + :param assembly_artifact: The assembly artifact. + :type assembly_artifact: ~azure.mgmt.logic.models.AssemblyDefinition + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AssemblyDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.AssemblyDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(assembly_artifact, 'AssemblyDefinition') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AssemblyDefinition', response) + if response.status_code == 201: + deserialized = self._deserialize('AssemblyDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} + + def delete( + self, resource_group_name, integration_account_name, assembly_artifact_name, custom_headers=None, raw=False, **operation_config): + """Delete an assembly for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} + + def list_content_callback_url( + self, resource_group_name, integration_account_name, assembly_artifact_name, custom_headers=None, raw=False, **operation_config): + """Get the content callback url for an integration account assembly. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_content_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_batch_configurations_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_batch_configurations_operations.py new file mode 100644 index 000000000000..297b62c6bf2b --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_batch_configurations_operations.py @@ -0,0 +1,304 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IntegrationAccountBatchConfigurationsOperations(object): + """IntegrationAccountBatchConfigurationsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2016-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-06-01" + + self.config = config + + def list( + self, resource_group_name, integration_account_name, custom_headers=None, raw=False, **operation_config): + """List the batch configurations for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BatchConfiguration + :rtype: + ~azure.mgmt.logic.models.BatchConfigurationPaged[~azure.mgmt.logic.models.BatchConfiguration] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.BatchConfigurationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.BatchConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations'} + + def get( + self, resource_group_name, integration_account_name, batch_configuration_name, custom_headers=None, raw=False, **operation_config): + """Get a batch configuration for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param batch_configuration_name: The batch configuration name. + :type batch_configuration_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BatchConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.BatchConfiguration or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BatchConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} + + def create_or_update( + self, resource_group_name, integration_account_name, batch_configuration_name, batch_configuration, custom_headers=None, raw=False, **operation_config): + """Create or update a batch configuration for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param batch_configuration_name: The batch configuration name. + :type batch_configuration_name: str + :param batch_configuration: The batch configuration. + :type batch_configuration: ~azure.mgmt.logic.models.BatchConfiguration + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BatchConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.BatchConfiguration or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(batch_configuration, 'BatchConfiguration') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BatchConfiguration', response) + if response.status_code == 201: + deserialized = self._deserialize('BatchConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} + + def delete( + self, resource_group_name, integration_account_name, batch_configuration_name, custom_headers=None, raw=False, **operation_config): + """Delete a batch configuration for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param batch_configuration_name: The batch configuration name. + :type batch_configuration_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/integration_accounts_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/integration_accounts_operations.py old mode 100755 new mode 100644 index 54463bdb92b9..692acc1e3dd6 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/integration_accounts_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/integration_accounts_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class IntegrationAccountsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -46,15 +48,16 @@ def list_by_subscription( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountPaged - ` + :return: An iterator like instance of IntegrationAccount + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountPaged[~azure.mgmt.logic.models.IntegrationAccount] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts' + url = self.list_by_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -83,7 +86,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -101,6 +104,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts'} def list_by_resource_group( self, resource_group_name, top=None, custom_headers=None, raw=False, **operation_config): @@ -115,15 +119,16 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountPaged - ` + :return: An iterator like instance of IntegrationAccount + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountPaged[~azure.mgmt.logic.models.IntegrationAccount] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -153,7 +158,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -171,6 +176,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts'} def get( self, resource_group_name, integration_account_name, custom_headers=None, raw=False, **operation_config): @@ -185,14 +191,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccount or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -216,7 +221,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -233,6 +238,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} def create_or_update( self, resource_group_name, integration_account_name, integration_account, custom_headers=None, raw=False, **operation_config): @@ -243,21 +249,19 @@ def create_or_update( :param integration_account_name: The integration account name. :type integration_account_name: str :param integration_account: The integration account. - :type integration_account: :class:`IntegrationAccount - ` + :type integration_account: ~azure.mgmt.logic.models.IntegrationAccount :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccount or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -285,7 +289,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -304,6 +308,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} def update( self, resource_group_name, integration_account_name, integration_account, custom_headers=None, raw=False, **operation_config): @@ -314,21 +319,19 @@ def update( :param integration_account_name: The integration account name. :type integration_account_name: str :param integration_account: The integration account. - :type integration_account: :class:`IntegrationAccount - ` + :type integration_account: ~azure.mgmt.logic.models.IntegrationAccount :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccount or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -356,7 +359,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -373,6 +376,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} def delete( self, resource_group_name, integration_account_name, custom_headers=None, raw=False, **operation_config): @@ -387,13 +391,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -417,7 +420,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -427,6 +430,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} def get_callback_url( self, resource_group_name, integration_account_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): @@ -440,22 +444,21 @@ def get_callback_url( :type not_after: datetime :param key_type: The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or :class:`KeyType - ` + :type key_type: str or ~azure.mgmt.logic.models.KeyType :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`CallbackUrl ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: CallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.CallbackUrl or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl' + url = self.get_callback_url.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -483,7 +486,7 @@ def get_callback_url( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -500,3 +503,216 @@ def get_callback_url( return client_raw_response return deserialized + get_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl'} + + def list_key_vault_keys( + self, resource_group_name, integration_account_name, key_vault, skip_token=None, custom_headers=None, raw=False, **operation_config): + """Gets the integration account's Key Vault keys. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param key_vault: The key vault reference. + :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference + :param skip_token: The skip token. + :type skip_token: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of KeyVaultKey + :rtype: + ~azure.mgmt.logic.models.KeyVaultKeyPaged[~azure.mgmt.logic.models.KeyVaultKey] + :raises: :class:`CloudError` + """ + list_key_vault_keys1 = models.ListKeyVaultKeysDefinition(key_vault=key_vault, skip_token=skip_token) + + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_key_vault_keys.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(list_key_vault_keys1, 'ListKeyVaultKeysDefinition') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.KeyVaultKeyPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.KeyVaultKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_key_vault_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys'} + + def log_tracking_events( + self, resource_group_name, integration_account_name, log_tracking_events, custom_headers=None, raw=False, **operation_config): + """Logs the integration account's tracking events. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param log_tracking_events: The callback URL parameters. + :type log_tracking_events: + ~azure.mgmt.logic.models.TrackingEventsDefinition + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.log_tracking_events.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(log_tracking_events, 'TrackingEventsDefinition') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + log_tracking_events.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents'} + + def regenerate_access_key( + self, resource_group_name, integration_account_name, key_type=None, custom_headers=None, raw=False, **operation_config): + """Regenerates the integration account access key. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + regenerate_access_key1 = models.RegenerateActionParameter(key_type=key_type) + + # Construct URL + url = self.regenerate_access_key.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(regenerate_access_key1, 'RegenerateActionParameter') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/maps_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/maps_operations.py old mode 100755 new mode 100644 index ef7e28bf303e..555e97bdf0e9 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/maps_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/maps_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class MapsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,15 +54,16 @@ def list_by_integration_accounts( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountMapPaged - ` + :return: An iterator like instance of IntegrationAccountMap + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountMapPaged[~azure.mgmt.logic.models.IntegrationAccountMap] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps' + url = self.list_by_integration_accounts.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +96,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,6 +114,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_integration_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps'} def get( self, resource_group_name, integration_account_name, map_name, custom_headers=None, raw=False, **operation_config): @@ -127,14 +131,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountMap - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountMap or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountMap or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -159,7 +162,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -176,6 +179,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} def create_or_update( self, resource_group_name, integration_account_name, map_name, map, custom_headers=None, raw=False, **operation_config): @@ -188,21 +192,19 @@ def create_or_update( :param map_name: The integration account map name. :type map_name: str :param map: The integration account map. - :type map: :class:`IntegrationAccountMap - ` + :type map: ~azure.mgmt.logic.models.IntegrationAccountMap :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountMap - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountMap or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountMap or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -231,7 +233,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -250,6 +252,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} def delete( self, resource_group_name, integration_account_name, map_name, custom_headers=None, raw=False, **operation_config): @@ -266,13 +269,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -297,7 +299,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -307,3 +309,80 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} + + def list_content_callback_url( + self, resource_group_name, integration_account_name, map_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param map_name: The integration account map name. + :type map_name: str + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + list_content_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + + # Construct URL + url = self.list_content_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'mapName': self._serialize.url("map_name", map_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(list_content_callback_url1, 'GetCallbackUrlParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/partners_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/partners_operations.py old mode 100755 new mode 100644 index 506ae85389b8..4000d7a2cd2e --- a/azure-mgmt-logic/azure/mgmt/logic/operations/partners_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/partners_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class PartnersOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,15 +54,16 @@ def list_by_integration_accounts( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountPartnerPaged - ` + :return: An iterator like instance of IntegrationAccountPartner + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountPartnerPaged[~azure.mgmt.logic.models.IntegrationAccountPartner] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners' + url = self.list_by_integration_accounts.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +96,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,6 +114,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_integration_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners'} def get( self, resource_group_name, integration_account_name, partner_name, custom_headers=None, raw=False, **operation_config): @@ -127,14 +131,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountPartner - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountPartner or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountPartner or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -159,7 +162,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -176,6 +179,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} def create_or_update( self, resource_group_name, integration_account_name, partner_name, partner, custom_headers=None, raw=False, **operation_config): @@ -188,21 +192,19 @@ def create_or_update( :param partner_name: The integration account partner name. :type partner_name: str :param partner: The integration account partner. - :type partner: :class:`IntegrationAccountPartner - ` + :type partner: ~azure.mgmt.logic.models.IntegrationAccountPartner :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountPartner - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountPartner or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountPartner or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -231,7 +233,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -250,6 +252,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} def delete( self, resource_group_name, integration_account_name, partner_name, custom_headers=None, raw=False, **operation_config): @@ -266,13 +269,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -297,7 +299,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -307,3 +309,80 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} + + def list_content_callback_url( + self, resource_group_name, integration_account_name, partner_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param partner_name: The integration account partner name. + :type partner_name: str + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + list_content_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + + # Construct URL + url = self.list_content_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'partnerName': self._serialize.url("partner_name", partner_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(list_content_callback_url1, 'GetCallbackUrlParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/schemas_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/schemas_operations.py old mode 100755 new mode 100644 index 4cdf009ea660..49970966db56 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/schemas_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/schemas_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class SchemasOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,15 +54,16 @@ def list_by_integration_accounts( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountSchemaPaged - ` + :return: An iterator like instance of IntegrationAccountSchema + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountSchemaPaged[~azure.mgmt.logic.models.IntegrationAccountSchema] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas' + url = self.list_by_integration_accounts.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +96,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,6 +114,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_integration_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas'} def get( self, resource_group_name, integration_account_name, schema_name, custom_headers=None, raw=False, **operation_config): @@ -127,14 +131,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountSchema - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountSchema or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSchema or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -159,7 +162,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -176,6 +179,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} def create_or_update( self, resource_group_name, integration_account_name, schema_name, schema, custom_headers=None, raw=False, **operation_config): @@ -188,21 +192,19 @@ def create_or_update( :param schema_name: The integration account schema name. :type schema_name: str :param schema: The integration account schema. - :type schema: :class:`IntegrationAccountSchema - ` + :type schema: ~azure.mgmt.logic.models.IntegrationAccountSchema :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountSchema - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountSchema or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSchema or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -231,7 +233,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -250,6 +252,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} def delete( self, resource_group_name, integration_account_name, schema_name, custom_headers=None, raw=False, **operation_config): @@ -266,13 +269,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -297,7 +299,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -307,3 +309,80 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} + + def list_content_callback_url( + self, resource_group_name, integration_account_name, schema_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param schema_name: The integration account schema name. + :type schema_name: str + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + list_content_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + + # Construct URL + url = self.list_content_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(list_content_callback_url1, 'GetCallbackUrlParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/sessions_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/sessions_operations.py old mode 100755 new mode 100644 index 832beec92a25..dce104362e52 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/sessions_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/sessions_operations.py @@ -9,8 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.pipeline import ClientRawResponse import uuid +from msrest.pipeline import ClientRawResponse from .. import models @@ -21,10 +21,12 @@ class SessionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,8 +53,9 @@ def list_by_integration_accounts( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountSessionPaged - ` + :return: An iterator like instance of IntegrationAccountSession + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountSessionPaged[~azure.mgmt.logic.models.IntegrationAccountSession] :raises: :class:`ErrorResponseException` """ @@ -60,7 +63,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions' + url = self.list_by_integration_accounts.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +96,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -109,6 +112,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_integration_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions'} def get( self, resource_group_name, integration_account_name, session_name, custom_headers=None, raw=False, **operation_config): @@ -125,15 +129,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountSession - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountSession or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSession or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -158,7 +161,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -173,6 +176,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} def create_or_update( self, resource_group_name, integration_account_name, session_name, session, custom_headers=None, raw=False, **operation_config): @@ -185,22 +189,20 @@ def create_or_update( :param session_name: The integration account session name. :type session_name: str :param session: The integration account session. - :type session: :class:`IntegrationAccountSession - ` + :type session: ~azure.mgmt.logic.models.IntegrationAccountSession :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountSession - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountSession or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSession or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -229,7 +231,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ErrorResponseException(self._deserialize, response) @@ -246,6 +248,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} def delete( self, resource_group_name, integration_account_name, session_name, custom_headers=None, raw=False, **operation_config): @@ -262,14 +265,13 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -294,7 +296,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.ErrorResponseException(self._deserialize, response) @@ -302,3 +304,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_repetitions_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_repetitions_operations.py new file mode 100644 index 000000000000..8124908c44ab --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_repetitions_operations.py @@ -0,0 +1,268 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkflowRunActionRepetitionsOperations(object): + """WorkflowRunActionRepetitionsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2016-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-06-01" + + self.config = config + + def list( + self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): + """Get all of a workflow run action repetitions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + WorkflowRunActionRepetitionDefinition + :rtype: + ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinitionPaged[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.WorkflowRunActionRepetitionDefinitionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.WorkflowRunActionRepetitionDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions'} + + def get( + self, resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers=None, raw=False, **operation_config): + """Get a workflow run action repetition. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowRunActionRepetitionDefinition or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}'} + + def list_expression_traces( + self, resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers=None, raw=False, **operation_config): + """Lists a workflow run expression trace. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ExpressionRoot + :rtype: + ~azure.mgmt.logic.models.ExpressionRootPaged[~azure.mgmt.logic.models.ExpressionRoot] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_expression_traces.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ExpressionRootPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ExpressionRootPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_expression_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/backup_vault_configs_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_scoped_repetitions_operations.py similarity index 59% rename from azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/backup_vault_configs_operations.py rename to azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_scoped_repetitions_operations.py index cd5ff1134f3a..9c48bbd0fc19 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/backup_vault_configs_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_scoped_repetitions_operations.py @@ -16,54 +16,59 @@ from .. import models -class BackupVaultConfigsOperations(object): - """BackupVaultConfigsOperations operations. +class WorkflowRunActionScopedRepetitionsOperations(object): + """WorkflowRunActionScopedRepetitionsOperations operations. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-12-01". + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-12-01" + self.api_version = "2016-06-01" self.config = config - def get( - self, resource_group_name, vault_name, custom_headers=None, raw=False, **operation_config): - """Fetches vault config. + def list( + self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): + """List the workflow run action scoped repetitions. - :param resource_group_name: The name of the resource group where the - recovery services vault is present. + :param resource_group_name: The resource group name. :type resource_group_name: str - :param vault_name: The name of the recovery services vault. - :type vault_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`BackupVaultConfig - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`BackupVaultConfig - ` or - :class:`ClientRawResponse` + :return: WorkflowRunActionRepetitionDefinitionCollection or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinitionCollection + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vaultName': self._serialize.url("vault_name", vault_name, 'str') + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -83,7 +88,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -93,46 +98,49 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupVaultConfig', response) + deserialized = self._deserialize('WorkflowRunActionRepetitionDefinitionCollection', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions'} - def update( - self, resource_group_name, vault_name, backup_vault_config, custom_headers=None, raw=False, **operation_config): - """Updates vault config model type. + def get( + self, resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers=None, raw=False, **operation_config): + """Get a workflow run action scoped repetition. - :param resource_group_name: The name of the resource group where the - recovery services vault is present. + :param resource_group_name: The resource group name. :type resource_group_name: str - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param backup_vault_config: Backup vault config. - :type backup_vault_config: :class:`BackupVaultConfig - ` + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`BackupVaultConfig - ` or - :class:`ClientRawResponse` if + :return: WorkflowRunActionRepetitionDefinition or ClientRawResponse if raw=true - :rtype: :class:`BackupVaultConfig - ` or - :class:`ClientRawResponse` + :rtype: ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vaultName': self._serialize.url("vault_name", vault_name, 'str') + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -150,13 +158,9 @@ def update( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - # Construct body - body_content = self._serialize.body(backup_vault_config, 'BackupVaultConfig') - # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -166,10 +170,11 @@ def update( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupVaultConfig', response) + deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_actions_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_actions_operations.py old mode 100755 new mode 100644 index 3e0c5dcc6bc4..12b74f6eb764 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_actions_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_actions_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class WorkflowRunActionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -54,15 +56,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowRunActionPaged - ` + :return: An iterator like instance of WorkflowRunAction + :rtype: + ~azure.mgmt.logic.models.WorkflowRunActionPaged[~azure.mgmt.logic.models.WorkflowRunAction] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -96,7 +99,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -114,6 +117,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions'} def get( self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): @@ -132,14 +136,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowRunAction - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkflowRunAction or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowRunAction or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -165,7 +168,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -182,3 +185,81 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}'} + + def list_expression_traces( + self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): + """Lists a workflow run expression trace. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ExpressionRoot + :rtype: + ~azure.mgmt.logic.models.ExpressionRootPaged[~azure.mgmt.logic.models.ExpressionRoot] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_expression_traces.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ExpressionRootPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ExpressionRootPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_expression_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_operations.py new file mode 100644 index 000000000000..a034b81249e9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_operations.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkflowRunOperations(object): + """WorkflowRunOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2016-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-06-01" + + self.config = config + + def get( + self, resource_group_name, workflow_name, run_name, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets an operation for a run. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param operation_id: The workflow operation id. + :type operation_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowRun or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowRun or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkflowRun', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_runs_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_runs_operations.py old mode 100755 new mode 100644 index cdb0aabcb275..4e2a94efb342 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_runs_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_runs_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class WorkflowRunsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,15 +54,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowRunPaged - ` + :return: An iterator like instance of WorkflowRun + :rtype: + ~azure.mgmt.logic.models.WorkflowRunPaged[~azure.mgmt.logic.models.WorkflowRun] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +96,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,6 +114,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs'} def get( self, resource_group_name, workflow_name, run_name, custom_headers=None, raw=False, **operation_config): @@ -127,13 +131,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowRun ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkflowRun or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowRun or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -158,7 +162,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -175,6 +179,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}'} def cancel( self, resource_group_name, workflow_name, run_name, custom_headers=None, raw=False, **operation_config): @@ -191,13 +196,12 @@ def cancel( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel' + url = self.cancel.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -222,7 +226,7 @@ def cancel( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -232,3 +236,4 @@ def cancel( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_trigger_histories_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_trigger_histories_operations.py old mode 100755 new mode 100644 index 9cf1e02d4293..2a4d74d93221 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_trigger_histories_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_trigger_histories_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class WorkflowTriggerHistoriesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -54,15 +56,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowTriggerHistoryPaged - ` + :return: An iterator like instance of WorkflowTriggerHistory + :rtype: + ~azure.mgmt.logic.models.WorkflowTriggerHistoryPaged[~azure.mgmt.logic.models.WorkflowTriggerHistory] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -96,7 +99,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -114,6 +117,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories'} def get( self, resource_group_name, workflow_name, trigger_name, history_name, custom_headers=None, raw=False, **operation_config): @@ -133,14 +137,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowTriggerHistory - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkflowTriggerHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerHistory or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -166,7 +169,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -183,6 +186,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}'} def resubmit( self, resource_group_name, workflow_name, trigger_name, history_name, custom_headers=None, raw=False, **operation_config): @@ -202,13 +206,12 @@ def resubmit( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit' + url = self.resubmit.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -234,7 +237,7 @@ def resubmit( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -244,3 +247,4 @@ def resubmit( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + resubmit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_triggers_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_triggers_operations.py old mode 100755 new mode 100644 index 23209acd7b49..7d84a2859d11 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_triggers_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_triggers_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class WorkflowTriggersOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,15 +54,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowTriggerPaged - ` + :return: An iterator like instance of WorkflowTrigger + :rtype: + ~azure.mgmt.logic.models.WorkflowTriggerPaged[~azure.mgmt.logic.models.WorkflowTrigger] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +96,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,6 +114,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/'} def get( self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): @@ -127,14 +131,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowTrigger - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkflowTrigger or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTrigger or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -159,7 +162,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -176,6 +179,64 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}'} + + def reset( + self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): + """Resets a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reset.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset'} def run( self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): @@ -192,14 +253,13 @@ def run( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: object - :rtype: :class:`ClientRawResponse` - if raw=true + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run' + url = self.run.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -224,7 +284,7 @@ def run( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code < 200 or response.status_code >= 300: raise HttpOperationError(self._deserialize, response, 'object') @@ -232,10 +292,141 @@ def run( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run'} + + def get_schema_json( + self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): + """Get the trigger schema as JSON. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JsonSchema or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.JsonSchema or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_schema_json.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JsonSchema', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_schema_json.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json'} + + def set_state( + self, resource_group_name, workflow_name, trigger_name, source, custom_headers=None, raw=False, **operation_config): + """Sets the state of a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param source: + :type source: ~azure.mgmt.logic.models.WorkflowTrigger + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + set_state1 = models.SetTriggerStateActionDefinition(source=source) + + # Construct URL + url = self.set_state.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(set_state1, 'SetTriggerStateActionDefinition') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + set_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState'} def list_callback_url( self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): - """Gets the callback URL for a workflow trigger. + """Get the callback URL for a workflow trigger. :param resource_group_name: The resource group name. :type resource_group_name: str @@ -248,14 +439,13 @@ def list_callback_url( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowTriggerCallbackUrl - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl' + url = self.list_callback_url.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -280,7 +470,7 @@ def list_callback_url( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -297,3 +487,4 @@ def list_callback_url( return client_raw_response return deserialized + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_versions_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_versions_operations.py old mode 100755 new mode 100644 index 55eb113e6084..f6dffba9225b --- a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_versions_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_versions_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class WorkflowVersionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,15 +52,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowVersionPaged - ` + :return: An iterator like instance of WorkflowVersion + :rtype: + ~azure.mgmt.logic.models.WorkflowVersionPaged[~azure.mgmt.logic.models.WorkflowVersion] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -89,7 +92,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -107,6 +110,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions'} def get( self, resource_group_name, workflow_name, version_id, custom_headers=None, raw=False, **operation_config): @@ -123,14 +127,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowVersion - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkflowVersion or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowVersion or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -155,7 +158,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -172,10 +175,11 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}'} def list_callback_url( self, resource_group_name, workflow_name, version_id, trigger_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): - """Lists the callback URL for a trigger of a workflow version. + """Get the callback url for a trigger of a workflow version. :param resource_group_name: The resource group name. :type resource_group_name: str @@ -189,17 +193,15 @@ def list_callback_url( :type not_after: datetime :param key_type: The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or :class:`KeyType - ` + :type key_type: str or ~azure.mgmt.logic.models.KeyType :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowTriggerCallbackUrl - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = None @@ -207,7 +209,7 @@ def list_callback_url( parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl' + url = self.list_callback_url.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -240,7 +242,7 @@ def list_callback_url( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -257,3 +259,4 @@ def list_callback_url( return client_raw_response return deserialized + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflows_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflows_operations.py old mode 100755 new mode 100644 index 2aab563b196e..297d0375d8a8 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/workflows_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflows_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class WorkflowsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -48,14 +50,16 @@ def list_by_subscription( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowPaged ` + :return: An iterator like instance of Workflow + :rtype: + ~azure.mgmt.logic.models.WorkflowPaged[~azure.mgmt.logic.models.Workflow] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows' + url = self.list_by_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -86,7 +90,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -104,6 +108,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows'} def list_by_resource_group( self, resource_group_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): @@ -120,14 +125,16 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowPaged ` + :return: An iterator like instance of Workflow + :rtype: + ~azure.mgmt.logic.models.WorkflowPaged[~azure.mgmt.logic.models.Workflow] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -159,7 +166,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -177,6 +184,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows'} def get( self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): @@ -191,13 +199,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Workflow ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Workflow or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.Workflow or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -221,7 +229,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -238,6 +246,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} def create_or_update( self, resource_group_name, workflow_name, workflow, custom_headers=None, raw=False, **operation_config): @@ -248,19 +257,19 @@ def create_or_update( :param workflow_name: The workflow name. :type workflow_name: str :param workflow: The workflow. - :type workflow: :class:`Workflow ` + :type workflow: ~azure.mgmt.logic.models.Workflow :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Workflow ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Workflow or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.Workflow or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -288,7 +297,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -307,6 +316,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} def update( self, resource_group_name, workflow_name, workflow, custom_headers=None, raw=False, **operation_config): @@ -317,19 +327,19 @@ def update( :param workflow_name: The workflow name. :type workflow_name: str :param workflow: The workflow. - :type workflow: :class:`Workflow ` + :type workflow: ~azure.mgmt.logic.models.Workflow :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Workflow ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Workflow or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.Workflow or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -357,7 +367,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -374,6 +384,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} def delete( self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): @@ -388,13 +399,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -418,7 +428,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -428,6 +438,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} def disable( self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): @@ -442,13 +453,12 @@ def disable( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable' + url = self.disable.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -472,7 +482,7 @@ def disable( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -482,6 +492,7 @@ def disable( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + disable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable'} def enable( self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): @@ -496,13 +507,12 @@ def enable( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable' + url = self.enable.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -526,7 +536,7 @@ def enable( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -536,6 +546,7 @@ def enable( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + enable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable'} def generate_upgraded_definition( self, resource_group_name, workflow_name, target_schema_version=None, custom_headers=None, raw=False, **operation_config): @@ -552,15 +563,14 @@ def generate_upgraded_definition( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: object - :rtype: :class:`ClientRawResponse` - if raw=true + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = models.GenerateUpgradedDefinitionParameters(target_schema_version=target_schema_version) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition' + url = self.generate_upgraded_definition.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -588,7 +598,7 @@ def generate_upgraded_definition( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -605,6 +615,80 @@ def generate_upgraded_definition( return client_raw_response return deserialized + generate_upgraded_definition.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition'} + + def list_callback_url( + self, resource_group_name, workflow_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): + """Get the workflow callback Url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + list_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + + # Construct URL + url = self.list_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(list_callback_url1, 'GetCallbackUrlParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl'} def list_swagger( self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): @@ -619,13 +703,12 @@ def list_swagger( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: object - :rtype: :class:`ClientRawResponse` - if raw=true + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger' + url = self.list_swagger.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -649,7 +732,7 @@ def list_swagger( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -666,6 +749,67 @@ def list_swagger( return client_raw_response return deserialized + list_swagger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger'} + + def move( + self, resource_group_name, workflow_name, move, custom_headers=None, raw=False, **operation_config): + """Moves an existing workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param move: The workflow to move. + :type move: ~azure.mgmt.logic.models.Workflow + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.move.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(move, 'Workflow') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'} def regenerate_access_key( self, resource_group_name, workflow_name, key_type=None, custom_headers=None, raw=False, **operation_config): @@ -677,22 +821,20 @@ def regenerate_access_key( :type workflow_name: str :param key_type: The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or :class:`KeyType - ` + :type key_type: str or ~azure.mgmt.logic.models.KeyType :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ key_type1 = models.RegenerateActionParameter(key_type=key_type) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey' + url = self.regenerate_access_key.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -720,7 +862,67 @@ def regenerate_access_key( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey'} + + def validate_workflow( + self, resource_group_name, workflow_name, validate, custom_headers=None, raw=False, **operation_config): + """Validates the workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param validate: The workflow. + :type validate: ~azure.mgmt.logic.models.Workflow + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.validate_workflow.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(validate, 'Workflow') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -730,6 +932,7 @@ def regenerate_access_key( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + validate_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate'} def validate( self, resource_group_name, location, workflow_name, workflow, custom_headers=None, raw=False, **operation_config): @@ -742,19 +945,18 @@ def validate( :param workflow_name: The workflow name. :type workflow_name: str :param workflow: The workflow definition. - :type workflow: :class:`Workflow ` + :type workflow: ~azure.mgmt.logic.models.Workflow :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate' + url = self.validate.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -783,7 +985,7 @@ def validate( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -793,3 +995,4 @@ def validate( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/version.py b/azure-mgmt-logic/azure/mgmt/logic/version.py old mode 100755 new mode 100644 index be75d8eae586..7f225c6aab41 --- a/azure-mgmt-logic/azure/mgmt/logic/version.py +++ b/azure-mgmt-logic/azure/mgmt/logic/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2.1.0" +VERSION = "3.0.0" diff --git a/azure-mgmt-logic/build.json b/azure-mgmt-logic/build.json deleted file mode 100644 index 583e4cec186d..000000000000 --- a/azure-mgmt-logic/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170417-2300-nightly", - "date": "2017-04-18T20:13:42Z", - "version": "2.1.0" -} \ No newline at end of file diff --git a/azure-mgmt-logic/sdk_packaging.toml b/azure-mgmt-logic/sdk_packaging.toml new file mode 100644 index 000000000000..32ac78a065f1 --- /dev/null +++ b/azure-mgmt-logic/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-logic" +package_pprint_name = "Logic Apps Management" +package_doc_id = "logic-apps" +is_stable = false diff --git a/azure-mgmt-logic/setup.cfg b/azure-mgmt-logic/setup.cfg index 0be29eb3bc63..856f4164982c 100644 --- a/azure-mgmt-logic/setup.cfg +++ b/azure-mgmt-logic/setup.cfg @@ -1,3 +1,3 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-mgmt-nspkg +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/azure-mgmt-logic/setup.py b/azure-mgmt-logic/setup.py index 5ca355093fe4..17ac0d37f0d3 100644 --- a/azure-mgmt-logic/setup.py +++ b/azure-mgmt-logic/setup.py @@ -6,15 +6,25 @@ # license information. #-------------------------------------------------------------------------- -from setuptools import setup +import re +import os.path +from io import open +from setuptools import find_packages, setup try: from azure_bdist_wheel import cmdclass except ImportError: from distutils import log as logger logger.warn("Wheel is not available, disabling bdist_wheel hook") cmdclass = {} -from io import open -import re + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-logic" +PACKAGE_PPRINT_NAME = "Logic Apps Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') # azure v0.x is not compatible with this package # azure v0.x used to have a __version__ attribute (newer versions don't) @@ -32,7 +42,7 @@ pass # Version extraction inspired from 'requests' -with open('azure/mgmt/logic/version.py', 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -45,37 +55,30 @@ history = f.read() setup( - name='azure-mgmt-logic', + name=PACKAGE_NAME, version=version, - description='Microsoft Azure Logic Apps Resource Management Client Library for Python', + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - 'Development Status :: 5 - Production/Stable', + 'Development Status :: 4 - Beta', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=[ - 'azure', - 'azure.mgmt', - 'azure.mgmt.logic', - 'azure.mgmt.logic.models', - 'azure.mgmt.logic.operations', - ], + packages=find_packages(exclude=["tests"]), install_requires=[ - 'azure-common~=1.1.5', - 'msrestazure~=0.4.7', + 'msrestazure>=0.4.27,<2.0.0', + 'azure-common~=1.1', ], cmdclass=cmdclass ) diff --git a/azure-mgmt-machinelearningcompute/HISTORY.rst b/azure-mgmt-machinelearningcompute/HISTORY.rst index bb811dfee337..ad630519af32 100644 --- a/azure-mgmt-machinelearningcompute/HISTORY.rst +++ b/azure-mgmt-machinelearningcompute/HISTORY.rst @@ -3,6 +3,14 @@ Release History =============== +0.4.1 (2018-05-29) +++++++++++++++++++ + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 +- msrestazure dependency version range + 0.4.0 (2018-01-02) ++++++++++++++++++ diff --git a/azure-mgmt-machinelearningcompute/README.rst b/azure-mgmt-machinelearningcompute/README.rst index 9a72f0685aeb..2faf43ef630d 100644 --- a/azure-mgmt-machinelearningcompute/README.rst +++ b/azure-mgmt-machinelearningcompute/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Machine Learning Compute Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `Machine Learning Compute Management -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/version.py b/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/version.py index 85da2c00c1a6..e9983c0d8c01 100644 --- a/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/version.py +++ b/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.4.0" +VERSION = "0.4.1" diff --git a/azure-mgmt-machinelearningcompute/sdk_packaging.toml b/azure-mgmt-machinelearningcompute/sdk_packaging.toml new file mode 100644 index 000000000000..f3ecd257d722 --- /dev/null +++ b/azure-mgmt-machinelearningcompute/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-machinelearningcompute" +package_pprint_name = "Machine Learning Compute Management" +package_doc_id = "machinelearning" +is_stable = false diff --git a/azure-mgmt-machinelearningcompute/setup.py b/azure-mgmt-machinelearningcompute/setup.py index 5c3408f37d23..dd0ec4d9388e 100644 --- a/azure-mgmt-machinelearningcompute/setup.py +++ b/azure-mgmt-machinelearningcompute/setup.py @@ -69,7 +69,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', @@ -78,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-machinelearningcompute/tests/__init__.py b/azure-mgmt-machinelearningcompute/tests/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/azure-mgmt-managementgroups/HISTORY.rst b/azure-mgmt-managementgroups/HISTORY.rst index 8924d5d6c445..9f05fb2833bd 100644 --- a/azure-mgmt-managementgroups/HISTORY.rst +++ b/azure-mgmt-managementgroups/HISTORY.rst @@ -3,7 +3,7 @@ Release History =============== -0.1.0 (1970-01-01) +0.1.0 (2018-05-31) ++++++++++++++++++ * Initial Release diff --git a/azure-mgmt-managementgroups/README.rst b/azure-mgmt-managementgroups/README.rst index f1037e9f39de..972b9e4942b3 100644 --- a/azure-mgmt-managementgroups/README.rst +++ b/azure-mgmt-managementgroups/README.rst @@ -37,7 +37,7 @@ Usage ===== For code examples, see `Management Groups -`__ +`__ on docs.microsoft.com. diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/management_groups_api.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/management_groups_api.py index b69c12875600..46f344c5e711 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/management_groups_api.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/management_groups_api.py @@ -9,13 +9,18 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling +import uuid from .operations.management_groups_operations import ManagementGroupsOperations from .operations.management_group_subscriptions_operations import ManagementGroupSubscriptionsOperations from .operations.operations import Operations +from .operations.entities_operations import EntitiesOperations from . import models @@ -46,10 +51,8 @@ def __init__( self.credentials = credentials -class ManagementGroupsAPI(object): - """The Azure Management Groups API enables consolidation of multiple - subscriptions/resources into an organizational hierarchy and centrally - manage access control, policies, alerting and reporting for those resources. +class ManagementGroupsAPI(SDKClient): + """The Azure Management Groups API enables consolidation of multiple subscriptions/resources into an organizational hierarchy and centrally manage access control, policies, alerting and reporting for those resources. :ivar config: Configuration for client. :vartype config: ManagementGroupsAPIConfiguration @@ -60,6 +63,8 @@ class ManagementGroupsAPI(object): :vartype management_group_subscriptions: azure.mgmt.managementgroups.operations.ManagementGroupSubscriptionsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.managementgroups.operations.Operations + :ivar entities: Entities operations + :vartype entities: azure.mgmt.managementgroups.operations.EntitiesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -71,10 +76,10 @@ def __init__( self, credentials, base_url=None): self.config = ManagementGroupsAPIConfiguration(credentials, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(ManagementGroupsAPI, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2017-11-01-preview' + self.api_version = '2018-03-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -84,3 +89,167 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) + self.entities = EntitiesOperations( + self._client, self.config, self._serialize, self._deserialize) + + def check_name_availability( + self, check_name_availability_request, custom_headers=None, raw=False, **operation_config): + """Checks if the specified management group name is valid and unique. + + :param check_name_availability_request: Management group name + availability check parameters. + :type check_name_availability_request: + ~azure.mgmt.managementgroups.models.CheckNameAvailabilityRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CheckNameAvailabilityResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.managementgroups.models.CheckNameAvailabilityResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.check_name_availability.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(check_name_availability_request, 'CheckNameAvailabilityRequest') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CheckNameAvailabilityResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/providers/Microsoft.Management/checkNameAvailability'} + + def start_tenant_backfill( + self, custom_headers=None, raw=False, **operation_config): + """Starts backfilling subscriptions for the Tenant. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TenantBackfillStatusResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.managementgroups.models.TenantBackfillStatusResult + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.start_tenant_backfill.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('TenantBackfillStatusResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + start_tenant_backfill.metadata = {'url': '/providers/Microsoft.Management/startTenantBackfill'} + + def tenant_backfill_status( + self, custom_headers=None, raw=False, **operation_config): + """Gets tenant backfill status. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TenantBackfillStatusResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.managementgroups.models.TenantBackfillStatusResult + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.tenant_backfill_status.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('TenantBackfillStatusResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + tenant_backfill_status.metadata = {'url': '/providers/Microsoft.Management/tenantBackfillStatus'} diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/__init__.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/__init__.py index 941635d07c58..72c19c0a5a09 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/__init__.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/__init__.py @@ -9,30 +9,85 @@ # regenerated. # -------------------------------------------------------------------------- -from .error_details import ErrorDetails -from .error_response import ErrorResponse, ErrorResponseException -from .operation_display import OperationDisplay -from .operation import Operation -from .management_group_info import ManagementGroupInfo -from .parent_group_info import ParentGroupInfo -from .management_group_details import ManagementGroupDetails -from .management_group_child_info import ManagementGroupChildInfo -from .management_group import ManagementGroup -from .create_management_group_request import CreateManagementGroupRequest +try: + from .error_details_py3 import ErrorDetails + from .error_response_py3 import ErrorResponse, ErrorResponseException + from .operation_display_properties_py3 import OperationDisplayProperties + from .operation_py3 import Operation + from .check_name_availability_result_py3 import CheckNameAvailabilityResult + from .tenant_backfill_status_result_py3 import TenantBackfillStatusResult + from .management_group_info_py3 import ManagementGroupInfo + from .parent_group_info_py3 import ParentGroupInfo + from .management_group_details_py3 import ManagementGroupDetails + from .management_group_child_info_py3 import ManagementGroupChildInfo + from .management_group_py3 import ManagementGroup + from .operation_results_py3 import OperationResults + from .entity_parent_group_info_py3 import EntityParentGroupInfo + from .entity_info_py3 import EntityInfo + from .entity_hierarchy_item_py3 import EntityHierarchyItem + from .patch_management_group_request_py3 import PatchManagementGroupRequest + from .create_parent_group_info_py3 import CreateParentGroupInfo + from .create_management_group_details_py3 import CreateManagementGroupDetails + from .create_management_group_child_info_py3 import CreateManagementGroupChildInfo + from .create_management_group_request_py3 import CreateManagementGroupRequest + from .check_name_availability_request_py3 import CheckNameAvailabilityRequest +except (SyntaxError, ImportError): + from .error_details import ErrorDetails + from .error_response import ErrorResponse, ErrorResponseException + from .operation_display_properties import OperationDisplayProperties + from .operation import Operation + from .check_name_availability_result import CheckNameAvailabilityResult + from .tenant_backfill_status_result import TenantBackfillStatusResult + from .management_group_info import ManagementGroupInfo + from .parent_group_info import ParentGroupInfo + from .management_group_details import ManagementGroupDetails + from .management_group_child_info import ManagementGroupChildInfo + from .management_group import ManagementGroup + from .operation_results import OperationResults + from .entity_parent_group_info import EntityParentGroupInfo + from .entity_info import EntityInfo + from .entity_hierarchy_item import EntityHierarchyItem + from .patch_management_group_request import PatchManagementGroupRequest + from .create_parent_group_info import CreateParentGroupInfo + from .create_management_group_details import CreateManagementGroupDetails + from .create_management_group_child_info import CreateManagementGroupChildInfo + from .create_management_group_request import CreateManagementGroupRequest + from .check_name_availability_request import CheckNameAvailabilityRequest from .management_group_info_paged import ManagementGroupInfoPaged from .operation_paged import OperationPaged +from .entity_info_paged import EntityInfoPaged +from .management_groups_api_enums import ( + Reason, + Status, + Type, +) __all__ = [ 'ErrorDetails', 'ErrorResponse', 'ErrorResponseException', - 'OperationDisplay', + 'OperationDisplayProperties', 'Operation', + 'CheckNameAvailabilityResult', + 'TenantBackfillStatusResult', 'ManagementGroupInfo', 'ParentGroupInfo', 'ManagementGroupDetails', 'ManagementGroupChildInfo', 'ManagementGroup', + 'OperationResults', + 'EntityParentGroupInfo', + 'EntityInfo', + 'EntityHierarchyItem', + 'PatchManagementGroupRequest', + 'CreateParentGroupInfo', + 'CreateManagementGroupDetails', + 'CreateManagementGroupChildInfo', 'CreateManagementGroupRequest', + 'CheckNameAvailabilityRequest', 'ManagementGroupInfoPaged', 'OperationPaged', + 'EntityInfoPaged', + 'Reason', + 'Status', + 'Type', ] diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_request.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_request.py new file mode 100644 index 000000000000..9bc8379bb94f --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_request.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityRequest(Model): + """Management group name availability check parameters. + + :param name: the name to check for availability + :type name: str + :param type: fully qualified resource type which includes provider + namespace. Possible values include: + '/providers/Microsoft.Management/managementGroups' + :type type: str or ~azure.mgmt.managementgroups.models.Type + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'Type'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_request_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_request_py3.py new file mode 100644 index 000000000000..2b020be13871 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_request_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityRequest(Model): + """Management group name availability check parameters. + + :param name: the name to check for availability + :type name: str + :param type: fully qualified resource type which includes provider + namespace. Possible values include: + '/providers/Microsoft.Management/managementGroups' + :type type: str or ~azure.mgmt.managementgroups.models.Type + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'Type'}, + } + + def __init__(self, *, name: str=None, type=None, **kwargs) -> None: + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.type = type diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_result.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_result.py new file mode 100644 index 000000000000..f6cd42f2279e --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_result.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityResult(Model): + """Describes the result of the request to check management group name + availability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: Required. True indicates name is valid and + available. False indicates the name is invalid, unavailable, or both. + :vartype name_available: bool + :ivar reason: Required if nameAvailable == false. Invalid indicates the + name provided does not match the resource provider's naming requirements + (incorrect length, unsupported characters, etc.) AlreadyExists indicates + that the name is already in use and is therefore unavailable. Possible + values include: 'Invalid', 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.managementgroups.models.Reason + :ivar message: Required if nameAvailable == false. Localized. If reason == + invalid, provide the user with the reason why the given name is invalid, + and provide the resource naming requirements so that the user can select a + valid name. If reason == AlreadyExists, explain that is already in use, + and direct them to select a different name. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'Reason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_result_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_result_py3.py new file mode 100644 index 000000000000..94a0cbc8ae0b --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_result_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityResult(Model): + """Describes the result of the request to check management group name + availability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: Required. True indicates name is valid and + available. False indicates the name is invalid, unavailable, or both. + :vartype name_available: bool + :ivar reason: Required if nameAvailable == false. Invalid indicates the + name provided does not match the resource provider's naming requirements + (incorrect length, unsupported characters, etc.) AlreadyExists indicates + that the name is already in use and is therefore unavailable. Possible + values include: 'Invalid', 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.managementgroups.models.Reason + :ivar message: Required if nameAvailable == false. Localized. If reason == + invalid, provide the user with the reason why the given name is invalid, + and provide the resource naming requirements so that the user can select a + valid name. If reason == AlreadyExists, explain that is already in use, + and direct them to select a different name. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'Reason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_child_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_child_info.py new file mode 100644 index 000000000000..05c0e10b664e --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_child_info.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateManagementGroupChildInfo(Model): + """The child information of a management group used during creation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of child resource. The fully qualified resource type + which includes provider namespace (e.g. + /providers/Microsoft.Management/managementGroups). Possible values + include: '/providers/Microsoft.Management/managementGroups', + '/subscriptions' + :vartype type: str or ~azure.mgmt.managementgroups.models.enum + :ivar id: The fully qualified ID for the child resource (management group + or subscription). For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar name: The name of the child entity. + :vartype name: str + :ivar display_name: The friendly name of the child resource. + :vartype display_name: str + :ivar roles: The roles definitions associated with the management group. + :vartype roles: list[str] + :ivar children: The list of children. + :vartype children: + list[~azure.mgmt.managementgroups.models.CreateManagementGroupChildInfo] + """ + + _validation = { + 'type': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'roles': {'readonly': True}, + 'children': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + 'children': {'key': 'children', 'type': '[CreateManagementGroupChildInfo]'}, + } + + def __init__(self, **kwargs): + super(CreateManagementGroupChildInfo, self).__init__(**kwargs) + self.type = None + self.id = None + self.name = None + self.display_name = None + self.roles = None + self.children = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_child_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_child_info_py3.py new file mode 100644 index 000000000000..9a9850a4edf6 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_child_info_py3.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateManagementGroupChildInfo(Model): + """The child information of a management group used during creation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of child resource. The fully qualified resource type + which includes provider namespace (e.g. + /providers/Microsoft.Management/managementGroups). Possible values + include: '/providers/Microsoft.Management/managementGroups', + '/subscriptions' + :vartype type: str or ~azure.mgmt.managementgroups.models.enum + :ivar id: The fully qualified ID for the child resource (management group + or subscription). For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar name: The name of the child entity. + :vartype name: str + :ivar display_name: The friendly name of the child resource. + :vartype display_name: str + :ivar roles: The roles definitions associated with the management group. + :vartype roles: list[str] + :ivar children: The list of children. + :vartype children: + list[~azure.mgmt.managementgroups.models.CreateManagementGroupChildInfo] + """ + + _validation = { + 'type': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'roles': {'readonly': True}, + 'children': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + 'children': {'key': 'children', 'type': '[CreateManagementGroupChildInfo]'}, + } + + def __init__(self, **kwargs) -> None: + super(CreateManagementGroupChildInfo, self).__init__(**kwargs) + self.type = None + self.id = None + self.name = None + self.display_name = None + self.roles = None + self.children = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_details.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_details.py new file mode 100644 index 000000000000..1c35ff148136 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_details.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateManagementGroupDetails(Model): + """The details of a management group used during creation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar version: The version number of the object. + :vartype version: float + :ivar updated_time: The date and time when this object was last updated. + :vartype updated_time: datetime + :ivar updated_by: The identity of the principal or process that updated + the object. + :vartype updated_by: str + :param parent: Parent. + :type parent: ~azure.mgmt.managementgroups.models.CreateParentGroupInfo + """ + + _validation = { + 'version': {'readonly': True}, + 'updated_time': {'readonly': True}, + 'updated_by': {'readonly': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'float'}, + 'updated_time': {'key': 'updatedTime', 'type': 'iso-8601'}, + 'updated_by': {'key': 'updatedBy', 'type': 'str'}, + 'parent': {'key': 'parent', 'type': 'CreateParentGroupInfo'}, + } + + def __init__(self, **kwargs): + super(CreateManagementGroupDetails, self).__init__(**kwargs) + self.version = None + self.updated_time = None + self.updated_by = None + self.parent = kwargs.get('parent', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_details_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_details_py3.py new file mode 100644 index 000000000000..d0b2dab1aacf --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_details_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateManagementGroupDetails(Model): + """The details of a management group used during creation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar version: The version number of the object. + :vartype version: float + :ivar updated_time: The date and time when this object was last updated. + :vartype updated_time: datetime + :ivar updated_by: The identity of the principal or process that updated + the object. + :vartype updated_by: str + :param parent: Parent. + :type parent: ~azure.mgmt.managementgroups.models.CreateParentGroupInfo + """ + + _validation = { + 'version': {'readonly': True}, + 'updated_time': {'readonly': True}, + 'updated_by': {'readonly': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'float'}, + 'updated_time': {'key': 'updatedTime', 'type': 'iso-8601'}, + 'updated_by': {'key': 'updatedBy', 'type': 'str'}, + 'parent': {'key': 'parent', 'type': 'CreateParentGroupInfo'}, + } + + def __init__(self, *, parent=None, **kwargs) -> None: + super(CreateManagementGroupDetails, self).__init__(**kwargs) + self.version = None + self.updated_time = None + self.updated_by = None + self.parent = parent diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request.py index 78ec7516aede..ac64070a79c4 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request.py @@ -15,20 +15,60 @@ class CreateManagementGroupRequest(Model): """Management group creation parameters. - :param display_name: The friendly name of the management group. - :type display_name: str - :param parent_id: (Optional) The fully qualified ID for the parent - management group. For example, + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - :type parent_id: str + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :param name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :type name: str + :ivar tenant_id: The AAD Tenant ID associated with the management group. + For example, 00000000-0000-0000-0000-000000000000 + :vartype tenant_id: str + :param display_name: The friendly name of the management group. If no + value is passed then this field will be set to the groupId. + :type display_name: str + :ivar roles: The roles definitions associated with the management group. + :vartype roles: list[str] + :param details: Details. + :type details: + ~azure.mgmt.managementgroups.models.CreateManagementGroupDetails + :ivar children: The list of children. + :vartype children: + list[~azure.mgmt.managementgroups.models.CreateManagementGroupChildInfo] """ + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'roles': {'readonly': True}, + 'children': {'readonly': True}, + } + _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'parent_id': {'key': 'parentId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'roles': {'key': 'properties.roles', 'type': '[str]'}, + 'details': {'key': 'properties.details', 'type': 'CreateManagementGroupDetails'}, + 'children': {'key': 'properties.children', 'type': '[CreateManagementGroupChildInfo]'}, } - def __init__(self, display_name=None, parent_id=None): - super(CreateManagementGroupRequest, self).__init__() - self.display_name = display_name - self.parent_id = parent_id + def __init__(self, **kwargs): + super(CreateManagementGroupRequest, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = kwargs.get('name', None) + self.tenant_id = None + self.display_name = kwargs.get('display_name', None) + self.roles = None + self.details = kwargs.get('details', None) + self.children = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request_py3.py new file mode 100644 index 000000000000..dfbcaa65a532 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request_py3.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateManagementGroupRequest(Model): + """Management group creation parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :param name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :type name: str + :ivar tenant_id: The AAD Tenant ID associated with the management group. + For example, 00000000-0000-0000-0000-000000000000 + :vartype tenant_id: str + :param display_name: The friendly name of the management group. If no + value is passed then this field will be set to the groupId. + :type display_name: str + :ivar roles: The roles definitions associated with the management group. + :vartype roles: list[str] + :param details: Details. + :type details: + ~azure.mgmt.managementgroups.models.CreateManagementGroupDetails + :ivar children: The list of children. + :vartype children: + list[~azure.mgmt.managementgroups.models.CreateManagementGroupChildInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'roles': {'readonly': True}, + 'children': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'roles': {'key': 'properties.roles', 'type': '[str]'}, + 'details': {'key': 'properties.details', 'type': 'CreateManagementGroupDetails'}, + 'children': {'key': 'properties.children', 'type': '[CreateManagementGroupChildInfo]'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, details=None, **kwargs) -> None: + super(CreateManagementGroupRequest, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = name + self.tenant_id = None + self.display_name = display_name + self.roles = None + self.details = details + self.children = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_parent_group_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_parent_group_info.py new file mode 100644 index 000000000000..34f31e6efcff --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_parent_group_info.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateParentGroupInfo(Model): + """(Optional) The ID of the parent management group used during creation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: The fully qualified ID for the parent management group. For + example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type id: str + :ivar name: The name of the parent management group + :vartype name: str + :ivar display_name: The friendly name of the parent management group. + :vartype display_name: str + """ + + _validation = { + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreateParentGroupInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = None + self.display_name = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_parent_group_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_parent_group_info_py3.py new file mode 100644 index 000000000000..d71815c12e1b --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_parent_group_info_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateParentGroupInfo(Model): + """(Optional) The ID of the parent management group used during creation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: The fully qualified ID for the parent management group. For + example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type id: str + :ivar name: The name of the parent management group + :vartype name: str + :ivar display_name: The friendly name of the parent management group. + :vartype display_name: str + """ + + _validation = { + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(CreateParentGroupInfo, self).__init__(**kwargs) + self.id = id + self.name = None + self.display_name = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_hierarchy_item.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_hierarchy_item.py new file mode 100644 index 000000000000..9ea06db4eecf --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_hierarchy_item.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityHierarchyItem(Model): + """The management group details for the hierarchy view. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param display_name: The friendly name of the management group. + :type display_name: str + :param permissions: Permissions. Possible values include: 'noaccess', + 'view', 'edit', 'delete' + :type permissions: str or ~azure.mgmt.managementgroups.models.enum + :param children: The list of children. + :type children: + list[~azure.mgmt.managementgroups.models.EntityHierarchyItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'permissions': {'key': 'properties.permissions', 'type': 'str'}, + 'children': {'key': 'properties.children', 'type': '[EntityHierarchyItem]'}, + } + + def __init__(self, **kwargs): + super(EntityHierarchyItem, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.display_name = kwargs.get('display_name', None) + self.permissions = kwargs.get('permissions', None) + self.children = kwargs.get('children', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_hierarchy_item_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_hierarchy_item_py3.py new file mode 100644 index 000000000000..a1c51a63ae21 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_hierarchy_item_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityHierarchyItem(Model): + """The management group details for the hierarchy view. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param display_name: The friendly name of the management group. + :type display_name: str + :param permissions: Permissions. Possible values include: 'noaccess', + 'view', 'edit', 'delete' + :type permissions: str or ~azure.mgmt.managementgroups.models.enum + :param children: The list of children. + :type children: + list[~azure.mgmt.managementgroups.models.EntityHierarchyItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'permissions': {'key': 'properties.permissions', 'type': 'str'}, + 'children': {'key': 'properties.children', 'type': '[EntityHierarchyItem]'}, + } + + def __init__(self, *, display_name: str=None, permissions=None, children=None, **kwargs) -> None: + super(EntityHierarchyItem, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.display_name = display_name + self.permissions = permissions + self.children = children diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info.py new file mode 100644 index 000000000000..5444b8975f55 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info.py @@ -0,0 +1,86 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityInfo(Model): + """The entity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the entity. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the entity. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param tenant_id: The AAD Tenant ID associated with the entity. For + example, 00000000-0000-0000-0000-000000000000 + :type tenant_id: str + :param display_name: The friendly name of the management group. + :type display_name: str + :param parent: Parent. + :type parent: ~azure.mgmt.managementgroups.models.EntityParentGroupInfo + :param permissions: Permissions. Possible values include: 'noaccess', + 'view', 'edit', 'delete' + :type permissions: str or ~azure.mgmt.managementgroups.models.enum + :param inherited_permissions: Inherited Permissions. Possible values + include: 'noaccess', 'view', 'edit', 'delete' + :type inherited_permissions: str or + ~azure.mgmt.managementgroups.models.enum + :param number_of_descendants: Number of Descendants. + :type number_of_descendants: int + :param parent_display_name_chain: The parent display name chain from the + root group to the immediate parent + :type parent_display_name_chain: list[str] + :param parent_name_chain: The parent name chain from the root group to the + immediate parent + :type parent_name_chain: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'parent': {'key': 'properties.parent', 'type': 'EntityParentGroupInfo'}, + 'permissions': {'key': 'properties.permissions', 'type': 'str'}, + 'inherited_permissions': {'key': 'properties.inheritedPermissions', 'type': 'str'}, + 'number_of_descendants': {'key': 'properties.numberOfDescendants', 'type': 'int'}, + 'parent_display_name_chain': {'key': 'properties.parentDisplayNameChain', 'type': '[str]'}, + 'parent_name_chain': {'key': 'properties.parentNameChain', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(EntityInfo, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tenant_id = kwargs.get('tenant_id', None) + self.display_name = kwargs.get('display_name', None) + self.parent = kwargs.get('parent', None) + self.permissions = kwargs.get('permissions', None) + self.inherited_permissions = kwargs.get('inherited_permissions', None) + self.number_of_descendants = kwargs.get('number_of_descendants', None) + self.parent_display_name_chain = kwargs.get('parent_display_name_chain', None) + self.parent_name_chain = kwargs.get('parent_name_chain', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_paged.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_paged.py new file mode 100644 index 000000000000..0bcfc102560d --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class EntityInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`EntityInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[EntityInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(EntityInfoPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_py3.py new file mode 100644 index 000000000000..8949d968d284 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_py3.py @@ -0,0 +1,86 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityInfo(Model): + """The entity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the entity. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the entity. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param tenant_id: The AAD Tenant ID associated with the entity. For + example, 00000000-0000-0000-0000-000000000000 + :type tenant_id: str + :param display_name: The friendly name of the management group. + :type display_name: str + :param parent: Parent. + :type parent: ~azure.mgmt.managementgroups.models.EntityParentGroupInfo + :param permissions: Permissions. Possible values include: 'noaccess', + 'view', 'edit', 'delete' + :type permissions: str or ~azure.mgmt.managementgroups.models.enum + :param inherited_permissions: Inherited Permissions. Possible values + include: 'noaccess', 'view', 'edit', 'delete' + :type inherited_permissions: str or + ~azure.mgmt.managementgroups.models.enum + :param number_of_descendants: Number of Descendants. + :type number_of_descendants: int + :param parent_display_name_chain: The parent display name chain from the + root group to the immediate parent + :type parent_display_name_chain: list[str] + :param parent_name_chain: The parent name chain from the root group to the + immediate parent + :type parent_name_chain: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'parent': {'key': 'properties.parent', 'type': 'EntityParentGroupInfo'}, + 'permissions': {'key': 'properties.permissions', 'type': 'str'}, + 'inherited_permissions': {'key': 'properties.inheritedPermissions', 'type': 'str'}, + 'number_of_descendants': {'key': 'properties.numberOfDescendants', 'type': 'int'}, + 'parent_display_name_chain': {'key': 'properties.parentDisplayNameChain', 'type': '[str]'}, + 'parent_name_chain': {'key': 'properties.parentNameChain', 'type': '[str]'}, + } + + def __init__(self, *, tenant_id: str=None, display_name: str=None, parent=None, permissions=None, inherited_permissions=None, number_of_descendants: int=None, parent_display_name_chain=None, parent_name_chain=None, **kwargs) -> None: + super(EntityInfo, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tenant_id = tenant_id + self.display_name = display_name + self.parent = parent + self.permissions = permissions + self.inherited_permissions = inherited_permissions + self.number_of_descendants = number_of_descendants + self.parent_display_name_chain = parent_display_name_chain + self.parent_name_chain = parent_name_chain diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_parent_group_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_parent_group_info.py new file mode 100644 index 000000000000..7e26dca6f12c --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_parent_group_info.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityParentGroupInfo(Model): + """(Optional) The ID of the parent management group. + + :param id: The fully qualified ID for the parent management group. For + example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EntityParentGroupInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_parent_group_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_parent_group_info_py3.py new file mode 100644 index 000000000000..b0275df6a41f --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_parent_group_info_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityParentGroupInfo(Model): + """(Optional) The ID of the parent management group. + + :param id: The fully qualified ID for the parent management group. For + example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(EntityParentGroupInfo, self).__init__(**kwargs) + self.id = id diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details.py index 97dff2a08156..11dab3905b6e 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details.py @@ -19,14 +19,18 @@ class ErrorDetails(Model): :type code: str :param message: A human-readable representation of the error. :type message: str + :param details: A human-readable representation of the error's details. + :type details: str """ _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, } - def __init__(self, code=None, message=None): - super(ErrorDetails, self).__init__() - self.code = code - self.message = message + def __init__(self, **kwargs): + super(ErrorDetails, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details_py3.py new file mode 100644 index 000000000000..e5d31f18a57b --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorDetails(Model): + """The details of the error. + + :param code: One of a server-defined set of error codes. + :type code: str + :param message: A human-readable representation of the error. + :type message: str + :param details: A human-readable representation of the error's details. + :type details: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, details: str=None, **kwargs) -> None: + super(ErrorDetails, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response.py index a0367d3aaa7c..206717b3e423 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response.py @@ -24,9 +24,9 @@ class ErrorResponse(Model): 'error': {'key': 'error', 'type': 'ErrorDetails'}, } - def __init__(self, error=None): - super(ErrorResponse, self).__init__() - self.error = error + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) class ErrorResponseException(HttpOperationError): diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response_py3.py new file mode 100644 index 000000000000..f371695bb4c6 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """The error object. + + :param error: Error. + :type error: ~azure.mgmt.managementgroups.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group.py index 29cfa5bb6b1a..6c77afda9581 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group.py @@ -32,6 +32,8 @@ class ManagementGroup(Model): :type tenant_id: str :param display_name: The friendly name of the management group. :type display_name: str + :param roles: The role definitions associated with the management group. + :type roles: list[str] :param details: Details. :type details: ~azure.mgmt.managementgroups.models.ManagementGroupDetails :param children: The list of children. @@ -51,16 +53,18 @@ class ManagementGroup(Model): 'name': {'key': 'name', 'type': 'str'}, 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'roles': {'key': 'properties.roles', 'type': '[str]'}, 'details': {'key': 'properties.details', 'type': 'ManagementGroupDetails'}, 'children': {'key': 'properties.children', 'type': '[ManagementGroupChildInfo]'}, } - def __init__(self, tenant_id=None, display_name=None, details=None, children=None): - super(ManagementGroup, self).__init__() + def __init__(self, **kwargs): + super(ManagementGroup, self).__init__(**kwargs) self.id = None self.type = None self.name = None - self.tenant_id = tenant_id - self.display_name = display_name - self.details = details - self.children = children + self.tenant_id = kwargs.get('tenant_id', None) + self.display_name = kwargs.get('display_name', None) + self.roles = kwargs.get('roles', None) + self.details = kwargs.get('details', None) + self.children = kwargs.get('children', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info.py index 209af58e80ff..a5f0ca517200 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info.py @@ -15,30 +15,41 @@ class ManagementGroupChildInfo(Model): """The child information of a management group. - :param child_type: The type of child resource. Possible values include: - 'ManagementGroup', 'Subscription' - :type child_type: str or ~azure.mgmt.managementgroups.models.enum - :param child_id: The fully qualified ID for the child resource (management - group or subscription). For example, + :param type: The type of child resource. The fully qualified resource type + which includes provider namespace (e.g. + /providers/Microsoft.Management/managementGroups). Possible values + include: '/providers/Microsoft.Management/managementGroups', + '/subscriptions' + :type type: str or ~azure.mgmt.managementgroups.models.enum + :param id: The fully qualified ID for the child resource (management group + or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - :type child_id: str + :type id: str + :param name: The name of the child entity. + :type name: str :param display_name: The friendly name of the child resource. :type display_name: str + :param roles: The roles definitions associated with the management group. + :type roles: list[str] :param children: The list of children. :type children: list[~azure.mgmt.managementgroups.models.ManagementGroupChildInfo] """ _attribute_map = { - 'child_type': {'key': 'childType', 'type': 'str'}, - 'child_id': {'key': 'childId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, 'children': {'key': 'children', 'type': '[ManagementGroupChildInfo]'}, } - def __init__(self, child_type=None, child_id=None, display_name=None, children=None): - super(ManagementGroupChildInfo, self).__init__() - self.child_type = child_type - self.child_id = child_id - self.display_name = display_name - self.children = children + def __init__(self, **kwargs): + super(ManagementGroupChildInfo, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.roles = kwargs.get('roles', None) + self.children = kwargs.get('children', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info_py3.py new file mode 100644 index 000000000000..fd0917339900 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementGroupChildInfo(Model): + """The child information of a management group. + + :param type: The type of child resource. The fully qualified resource type + which includes provider namespace (e.g. + /providers/Microsoft.Management/managementGroups). Possible values + include: '/providers/Microsoft.Management/managementGroups', + '/subscriptions' + :type type: str or ~azure.mgmt.managementgroups.models.enum + :param id: The fully qualified ID for the child resource (management group + or subscription). For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type id: str + :param name: The name of the child entity. + :type name: str + :param display_name: The friendly name of the child resource. + :type display_name: str + :param roles: The roles definitions associated with the management group. + :type roles: list[str] + :param children: The list of children. + :type children: + list[~azure.mgmt.managementgroups.models.ManagementGroupChildInfo] + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + 'children': {'key': 'children', 'type': '[ManagementGroupChildInfo]'}, + } + + def __init__(self, *, type=None, id: str=None, name: str=None, display_name: str=None, roles=None, children=None, **kwargs) -> None: + super(ManagementGroupChildInfo, self).__init__(**kwargs) + self.type = type + self.id = id + self.name = name + self.display_name = display_name + self.roles = roles + self.children = children diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details.py index 7618834b6a08..499faa92f9c7 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details.py @@ -33,9 +33,9 @@ class ManagementGroupDetails(Model): 'parent': {'key': 'parent', 'type': 'ParentGroupInfo'}, } - def __init__(self, version=None, updated_time=None, updated_by=None, parent=None): - super(ManagementGroupDetails, self).__init__() - self.version = version - self.updated_time = updated_time - self.updated_by = updated_by - self.parent = parent + def __init__(self, **kwargs): + super(ManagementGroupDetails, self).__init__(**kwargs) + self.version = kwargs.get('version', None) + self.updated_time = kwargs.get('updated_time', None) + self.updated_by = kwargs.get('updated_by', None) + self.parent = kwargs.get('parent', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details_py3.py new file mode 100644 index 000000000000..1d47be815022 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementGroupDetails(Model): + """The details of a management group. + + :param version: The version number of the object. + :type version: float + :param updated_time: The date and time when this object was last updated. + :type updated_time: datetime + :param updated_by: The identity of the principal or process that updated + the object. + :type updated_by: str + :param parent: Parent. + :type parent: ~azure.mgmt.managementgroups.models.ParentGroupInfo + """ + + _attribute_map = { + 'version': {'key': 'version', 'type': 'float'}, + 'updated_time': {'key': 'updatedTime', 'type': 'iso-8601'}, + 'updated_by': {'key': 'updatedBy', 'type': 'str'}, + 'parent': {'key': 'parent', 'type': 'ParentGroupInfo'}, + } + + def __init__(self, *, version: float=None, updated_time=None, updated_by: str=None, parent=None, **kwargs) -> None: + super(ManagementGroupDetails, self).__init__(**kwargs) + self.version = version + self.updated_time = updated_time + self.updated_by = updated_by + self.parent = parent diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info.py index 27f1b74f2293..7e016651bf34 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info.py @@ -48,10 +48,10 @@ class ManagementGroupInfo(Model): 'display_name': {'key': 'properties.displayName', 'type': 'str'}, } - def __init__(self, tenant_id=None, display_name=None): - super(ManagementGroupInfo, self).__init__() + def __init__(self, **kwargs): + super(ManagementGroupInfo, self).__init__(**kwargs) self.id = None self.type = None self.name = None - self.tenant_id = tenant_id - self.display_name = display_name + self.tenant_id = kwargs.get('tenant_id', None) + self.display_name = kwargs.get('display_name', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info_py3.py new file mode 100644 index 000000000000..b9d250177747 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementGroupInfo(Model): + """The management group resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param tenant_id: The AAD Tenant ID associated with the management group. + For example, 00000000-0000-0000-0000-000000000000 + :type tenant_id: str + :param display_name: The friendly name of the management group. + :type display_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, display_name: str=None, **kwargs) -> None: + super(ManagementGroupInfo, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tenant_id = tenant_id + self.display_name = display_name diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_py3.py new file mode 100644 index 000000000000..21f12f9bc209 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementGroup(Model): + """The management group details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param tenant_id: The AAD Tenant ID associated with the management group. + For example, 00000000-0000-0000-0000-000000000000 + :type tenant_id: str + :param display_name: The friendly name of the management group. + :type display_name: str + :param roles: The role definitions associated with the management group. + :type roles: list[str] + :param details: Details. + :type details: ~azure.mgmt.managementgroups.models.ManagementGroupDetails + :param children: The list of children. + :type children: + list[~azure.mgmt.managementgroups.models.ManagementGroupChildInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'roles': {'key': 'properties.roles', 'type': '[str]'}, + 'details': {'key': 'properties.details', 'type': 'ManagementGroupDetails'}, + 'children': {'key': 'properties.children', 'type': '[ManagementGroupChildInfo]'}, + } + + def __init__(self, *, tenant_id: str=None, display_name: str=None, roles=None, details=None, children=None, **kwargs) -> None: + super(ManagementGroup, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tenant_id = tenant_id + self.display_name = display_name + self.roles = roles + self.details = details + self.children = children diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_groups_api_enums.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_groups_api_enums.py new file mode 100644 index 000000000000..3fa750f98cf8 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_groups_api_enums.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class Reason(str, Enum): + + invalid = "Invalid" + already_exists = "AlreadyExists" + + +class Status(str, Enum): + + not_started = "NotStarted" + not_started_but_groups_exist = "NotStartedButGroupsExist" + started = "Started" + failed = "Failed" + cancelled = "Cancelled" + completed = "Completed" + + +class Type(str, Enum): + + providers_microsoft_managementmanagement_groups = "/providers/Microsoft.Management/managementGroups" diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation.py index 832260c9ce06..3114ff739ced 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation.py @@ -20,8 +20,9 @@ class Operation(Model): :ivar name: Operation name: {provider}/{resource}/{operation}. :vartype name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.managementgroups.models.OperationDisplay + :param display: Display. + :type display: + ~azure.mgmt.managementgroups.models.OperationDisplayProperties """ _validation = { @@ -30,10 +31,10 @@ class Operation(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'display': {'key': 'display', 'type': 'OperationDisplayProperties'}, } - def __init__(self, display=None): - super(Operation, self).__init__() + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) self.name = None - self.display = display + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display_properties.py similarity index 91% rename from azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display.py rename to azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display_properties.py index 1c60d0d60eb9..cd3859eddd07 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display_properties.py @@ -12,7 +12,7 @@ from msrest.serialization import Model -class OperationDisplay(Model): +class OperationDisplayProperties(Model): """The object that represents the operation. Variables are only populated by the server, and will be ignored when @@ -42,8 +42,8 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self): - super(OperationDisplay, self).__init__() + def __init__(self, **kwargs): + super(OperationDisplayProperties, self).__init__(**kwargs) self.provider = None self.resource = None self.operation = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display_properties_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display_properties_py3.py new file mode 100644 index 000000000000..9e10f38005c8 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display_properties_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplayProperties(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The name of the provider. + :vartype provider: str + :ivar resource: The resource on which the operation is performed. + :vartype resource: str + :ivar operation: The operation that can be performed. + :vartype operation: str + :ivar description: Operation description. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplayProperties, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_py3.py new file mode 100644 index 000000000000..af5129cb8f7c --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Operation supported by the Microsoft.Management resource provider. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :param display: Display. + :type display: + ~azure.mgmt.managementgroups.models.OperationDisplayProperties + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplayProperties'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_results.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_results.py new file mode 100644 index 000000000000..e4503472bdaa --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_results.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationResults(Model): + """The results of an asynchronous operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param provisioning_state: Provisioning State. Possible values include: + 'Updating' + :type provisioning_state: str or ~azure.mgmt.managementgroups.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationResults, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.provisioning_state = kwargs.get('provisioning_state', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_results_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_results_py3.py new file mode 100644 index 000000000000..04308fb22f02 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_results_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationResults(Model): + """The results of an asynchronous operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param provisioning_state: Provisioning State. Possible values include: + 'Updating' + :type provisioning_state: str or ~azure.mgmt.managementgroups.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, provisioning_state=None, **kwargs) -> None: + super(OperationResults, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.provisioning_state = provisioning_state diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info.py index fb4b8942975b..4f6672a63570 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info.py @@ -15,20 +15,24 @@ class ParentGroupInfo(Model): """(Optional) The ID of the parent management group. - :param parent_id: The fully qualified ID for the parent management group. - For example, + :param id: The fully qualified ID for the parent management group. For + example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - :type parent_id: str + :type id: str + :param name: The name of the parent management group + :type name: str :param display_name: The friendly name of the parent management group. :type display_name: str """ _attribute_map = { - 'parent_id': {'key': 'parentId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, } - def __init__(self, parent_id=None, display_name=None): - super(ParentGroupInfo, self).__init__() - self.parent_id = parent_id - self.display_name = display_name + def __init__(self, **kwargs): + super(ParentGroupInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info_py3.py new file mode 100644 index 000000000000..16ed06de5838 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ParentGroupInfo(Model): + """(Optional) The ID of the parent management group. + + :param id: The fully qualified ID for the parent management group. For + example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type id: str + :param name: The name of the parent management group + :type name: str + :param display_name: The friendly name of the parent management group. + :type display_name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, display_name: str=None, **kwargs) -> None: + super(ParentGroupInfo, self).__init__(**kwargs) + self.id = id + self.name = name + self.display_name = display_name diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/patch_management_group_request.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/patch_management_group_request.py new file mode 100644 index 000000000000..a48de68753cd --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/patch_management_group_request.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatchManagementGroupRequest(Model): + """Management group patch parameters. + + :param display_name: The friendly name of the management group. + :type display_name: str + :param parent_id: (Optional) The fully qualified ID for the parent + management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type parent_id: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'parent_id': {'key': 'parentId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PatchManagementGroupRequest, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.parent_id = kwargs.get('parent_id', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/patch_management_group_request_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/patch_management_group_request_py3.py new file mode 100644 index 000000000000..5a5b4cc26d76 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/patch_management_group_request_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatchManagementGroupRequest(Model): + """Management group patch parameters. + + :param display_name: The friendly name of the management group. + :type display_name: str + :param parent_id: (Optional) The fully qualified ID for the parent + management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type parent_id: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'parent_id': {'key': 'parentId', 'type': 'str'}, + } + + def __init__(self, *, display_name: str=None, parent_id: str=None, **kwargs) -> None: + super(PatchManagementGroupRequest, self).__init__(**kwargs) + self.display_name = display_name + self.parent_id = parent_id diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/tenant_backfill_status_result.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/tenant_backfill_status_result.py new file mode 100644 index 000000000000..e13bbd7119dc --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/tenant_backfill_status_result.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TenantBackfillStatusResult(Model): + """The tenant backfill status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tenant_id: The AAD Tenant ID associated with the management group. + For example, 00000000-0000-0000-0000-000000000000 + :vartype tenant_id: str + :ivar status: The status of the Tenant Backfill. Possible values include: + 'NotStarted', 'NotStartedButGroupsExist', 'Started', 'Failed', + 'Cancelled', 'Completed' + :vartype status: str or ~azure.mgmt.managementgroups.models.Status + """ + + _validation = { + 'tenant_id': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'Status'}, + } + + def __init__(self, **kwargs): + super(TenantBackfillStatusResult, self).__init__(**kwargs) + self.tenant_id = None + self.status = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/tenant_backfill_status_result_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/tenant_backfill_status_result_py3.py new file mode 100644 index 000000000000..61dddcc78e84 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/tenant_backfill_status_result_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TenantBackfillStatusResult(Model): + """The tenant backfill status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tenant_id: The AAD Tenant ID associated with the management group. + For example, 00000000-0000-0000-0000-000000000000 + :vartype tenant_id: str + :ivar status: The status of the Tenant Backfill. Possible values include: + 'NotStarted', 'NotStartedButGroupsExist', 'Started', 'Failed', + 'Cancelled', 'Completed' + :vartype status: str or ~azure.mgmt.managementgroups.models.Status + """ + + _validation = { + 'tenant_id': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'Status'}, + } + + def __init__(self, **kwargs) -> None: + super(TenantBackfillStatusResult, self).__init__(**kwargs) + self.tenant_id = None + self.status = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/__init__.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/__init__.py index f2f0ee70fdd6..3baf43e0f0a7 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/__init__.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/__init__.py @@ -12,9 +12,11 @@ from .management_groups_operations import ManagementGroupsOperations from .management_group_subscriptions_operations import ManagementGroupSubscriptionsOperations from .operations import Operations +from .entities_operations import EntitiesOperations __all__ = [ 'ManagementGroupsOperations', 'ManagementGroupSubscriptionsOperations', 'Operations', + 'EntitiesOperations', ] diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/entities_operations.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/entities_operations.py new file mode 100644 index 000000000000..2b2f7fb8ebd6 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/entities_operations.py @@ -0,0 +1,165 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class EntitiesOperations(object): + """EntitiesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-01-01-preview. Constant value: "2018-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-03-01-preview" + + self.config = config + + def list( + self, skiptoken=None, skip=None, top=None, select=None, search=None, filter=None, view=None, group_name=None, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): + """List all entities (Management Groups, Subscriptions, etc.) for the + authenticated user. + + :param skiptoken: Page continuation token 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 + token parameter that specifies a starting point to use for subsequent + calls. + :type skiptoken: str + :param skip: Number of entities to skip over when retrieving results. + Passing this in will override $skipToken. + :type skip: int + :param top: Number of elements to return when retrieving results. + Passing this in will override $skipToken. + :type top: int + :param select: This parameter specifies the fields to include in the + response. Can include any combination of + Name,DisplayName,Type,ParentDisplayNameChain,ParentChain, e.g. + '$select=Name,DisplayName,Type,ParentDisplayNameChain,ParentNameChain'. + When specified the $select parameter can override select in + $skipToken. + :type select: str + :param search: The $search parameter is used in conjunction with the + $filter parameter to return three different outputs depending on the + parameter passed in. With $search=AllowedParents the API will return + the entity info of all groups that the requested entity will be able + to reparent to as determined by the user's permissions. With + $search=AllowedChildren the API will return the entity info of all + entities that can be added as children of the requested entity. With + $search=ParentAndFirstLevelChildren the API will return the parent and + first level of children that the user has either direct access to or + indirect access via one of their descendants. Possible values include: + 'AllowedParents', 'AllowedChildren', 'ParentAndFirstLevelChildren' + :type search: str + :param filter: The filter parameter allows you to filter on the the + name or display name fields. You can check for equality on the name + field (e.g. name eq '{entityName}') and you can check for substrings + on either the name or display name fields(e.g. contains(name, + '{substringToSearch}'), contains(displayName, '{substringToSearch')). + Note that the '{entityName}' and '{substringToSearch}' fields are + checked case insensitively. + :type filter: str + :param view: The view parameter allows clients to filter the type of + data that is returned by the getEntities call. Possible values + include: 'FullHierarchy', 'GroupsOnly', 'SubscriptionsOnly', 'Audit' + :type view: str + :param group_name: A filter which allows the get entities call to + focus on a particular group (i.e. "$filter=name eq 'groupName'") + :type group_name: str + :param cache_control: Indicates that the request shouldn't utilize any + caches. + :type cache_control: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of EntityInfo + :rtype: + ~azure.mgmt.managementgroups.models.EntityInfoPaged[~azure.mgmt.managementgroups.models.EntityInfo] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skiptoken is not None: + query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if search is not None: + query_parameters['$search'] = self._serialize.query("search", search, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if view is not None: + query_parameters['$view'] = self._serialize.query("view", view, 'str') + if group_name is not None: + query_parameters['groupName'] = self._serialize.query("group_name", group_name, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if cache_control is not None: + header_parameters['Cache-Control'] = self._serialize.header("cache_control", cache_control, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.EntityInfoPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.EntityInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Management/getEntities'} diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_group_subscriptions_operations.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_group_subscriptions_operations.py index 0f196aefeb6d..1e78f9d5157f 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_group_subscriptions_operations.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_group_subscriptions_operations.py @@ -21,8 +21,8 @@ class ManagementGroupSubscriptionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2017-11-01-preview. Constant value: "2017-11-01-preview". + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-01-01-preview. Constant value: "2018-03-01-preview". """ models = models @@ -32,14 +32,13 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-11-01-preview" + self.api_version = "2018-03-01-preview" self.config = config def create( self, group_id, subscription_id, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): """Associates existing subscription with the management group. - . :param group_id: Management Group ID. :type group_id: str @@ -59,7 +58,7 @@ def create( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}' + url = self.create.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str'), 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str') @@ -92,11 +91,11 @@ def create( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + create.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}'} def delete( self, group_id, subscription_id, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): """De-associates subscription from the management group. - . :param group_id: Management Group ID. :type group_id: str @@ -116,7 +115,7 @@ def delete( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}' + url = self.delete.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str'), 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str') @@ -149,3 +148,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}'} diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_groups_operations.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_groups_operations.py index 85636fbb5010..e9e08d746243 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_groups_operations.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_groups_operations.py @@ -11,6 +11,8 @@ import uuid from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -21,8 +23,8 @@ class ManagementGroupsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2017-11-01-preview. Constant value: "2017-11-01-preview". + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-01-01-preview. Constant value: "2018-03-01-preview". """ models = models @@ -32,23 +34,22 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-11-01-preview" + self.api_version = "2018-03-01-preview" self.config = config def list( self, cache_control="no-cache", skiptoken=None, custom_headers=None, raw=False, **operation_config): """List management groups for the authenticated user. - . :param cache_control: Indicates that the request shouldn't utilize any caches. :type cache_control: str :param skiptoken: Page continuation token 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 token parameter that specifies a - starting point to use for subsequent calls. + operation returned a partial result. If a previous response contains a + nextLink element, the value of the nextLink element will include a + token parameter that specifies a starting point to use for subsequent + calls. :type skiptoken: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -65,7 +66,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.Management/managementGroups' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -108,11 +109,11 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.Management/managementGroups'} def get( - self, group_id, expand=None, recurse=None, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): + self, group_id, expand=None, recurse=None, filter=None, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): """Get the details of the management group. - . :param group_id: Management Group ID. :type group_id: str @@ -122,8 +123,12 @@ def get( :type expand: str :param recurse: The $recurse=true query string parameter allows clients to request inclusion of entire hierarchy in the response - payload. + payload. Note that $expand=children must be passed up if $recurse is + set to true. :type recurse: bool + :param filter: A filter which allows the exclusion of subscriptions + from results (i.e. '$filter=children.childType ne Subscription') + :type filter: str :param cache_control: Indicates that the request shouldn't utilize any caches. :type cache_control: str @@ -139,7 +144,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}' + url = self.get.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str') } @@ -152,6 +157,8 @@ def get( query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') if recurse is not None: query_parameters['$recurse'] = self._serialize.query("recurse", recurse, 'bool') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') # Construct headers header_parameters = {} @@ -182,37 +189,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}'} - def create_or_update( - self, group_id, create_management_group_request, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): - """Create or update a management group. - If a management group is already created and a subsequent create - request is issued with different properties, the management group - properties will be updated. - . - :param group_id: Management Group ID. - :type group_id: str - :param create_management_group_request: Management group creation - parameters. - :type create_management_group_request: - ~azure.mgmt.managementgroups.models.CreateManagementGroupRequest - :param cache_control: Indicates that the request shouldn't utilize any - caches. - :type cache_control: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagementGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.managementgroups.models.ManagementGroup or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ + def _create_or_update_initial( + self, group_id, create_management_group_request, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str') } @@ -242,13 +225,15 @@ def create_or_update( response = self._client.send( request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize('ManagementGroup', response) + if response.status_code == 202: + deserialized = self._deserialize('OperationResults', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -256,10 +241,11 @@ def create_or_update( return deserialized - def update( - self, group_id, create_management_group_request, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): - """Update a management group. - . + def create_or_update( + self, group_id, create_management_group_request, cache_control="no-cache", custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a management group. If a management group is already + created and a subsequent create request is issued with different + properties, the management group properties will be updated. :param group_id: Management Group ID. :type group_id: str @@ -271,6 +257,57 @@ def update( caches. :type cache_control: str :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns object or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_or_update_initial( + group_id=group_id, + create_management_group_request=create_management_group_request, + cache_control=cache_control, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}'} + + def update( + self, group_id, patch_group_request, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): + """Update a management group. + + :param group_id: Management Group ID. + :type group_id: str + :param patch_group_request: Management group patch parameters. + :type patch_group_request: + ~azure.mgmt.managementgroups.models.PatchManagementGroupRequest + :param cache_control: Indicates that the request shouldn't utilize any + caches. + :type cache_control: str + :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration @@ -282,7 +319,7 @@ def update( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}' + url = self.update.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str') } @@ -305,7 +342,7 @@ def update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(create_management_group_request, 'CreateManagementGroupRequest') + body_content = self._serialize.body(patch_group_request, 'PatchManagementGroupRequest') # Construct and send request request = self._client.patch(url, query_parameters) @@ -325,30 +362,13 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}'} - def delete( - self, group_id, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): - """Delete management group. - If a management group contains child resources, the request will fail. - . - :param group_id: Management Group ID. - :type group_id: str - :param cache_control: Indicates that the request shouldn't utilize any - caches. - :type cache_control: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ + def _delete_initial( + self, group_id, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}' + url = self.delete.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str') } @@ -374,9 +394,66 @@ def delete( request = self._client.delete(url, query_parameters) response = self._client.send(request, header_parameters, stream=False, **operation_config) - if response.status_code not in [200, 204]: + if response.status_code not in [202, 204]: raise models.ErrorResponseException(self._deserialize, response) + deserialized = None + + if response.status_code == 202: + deserialized = self._deserialize('OperationResults', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + + return deserialized + + def delete( + self, group_id, cache_control="no-cache", custom_headers=None, raw=False, polling=True, **operation_config): + """Delete management group. If a management group contains child + resources, the request will fail. + + :param group_id: Management Group ID. + :type group_id: str + :param cache_control: Indicates that the request shouldn't utilize any + caches. + :type cache_control: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.managementgroups.models.OperationResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.managementgroups.models.OperationResults]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._delete_initial( + group_id=group_id, + cache_control=cache_control, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}'} diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py index 184c6c83b1b1..ac619d5b0b6b 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py @@ -21,8 +21,8 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2017-11-01-preview. Constant value: "2017-11-01-preview". + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-01-01-preview. Constant value: "2018-03-01-preview". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-11-01-preview" + self.api_version = "2018-03-01-preview" self.config = config @@ -55,7 +55,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.Management/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -94,3 +94,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.Management/operations'} diff --git a/azure-mgmt-managementgroups/sdk_packaging.toml b/azure-mgmt-managementgroups/sdk_packaging.toml new file mode 100644 index 000000000000..9f7667e15cdd --- /dev/null +++ b/azure-mgmt-managementgroups/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-managementgroups" +package_pprint_name = "Management Groups" +package_doc_id = "" +is_stable = false diff --git a/azure-mgmt-managementgroups/setup.py b/azure-mgmt-managementgroups/setup.py index 37df7d143eb5..0149e4864dfa 100644 --- a/azure-mgmt-managementgroups/setup.py +++ b/azure-mgmt-managementgroups/setup.py @@ -77,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure>=0.4.20,<2.0.0', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-managementpartner/tests/__init__.py b/azure-mgmt-managementpartner/tests/__init__.py deleted file mode 100644 index 8b137891791f..000000000000 --- a/azure-mgmt-managementpartner/tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/azure-mgmt-media/tests/__init__.py b/azure-mgmt-media/tests/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/azure-mgmt-monitor/HISTORY.rst b/azure-mgmt-monitor/HISTORY.rst index f471d270d100..79c5e35afe6d 100644 --- a/azure-mgmt-monitor/HISTORY.rst +++ b/azure-mgmt-monitor/HISTORY.rst @@ -3,6 +3,18 @@ Release History =============== +0.5.2 (2018-06-06) +++++++++++++++++++ + +**Features** + +- Model ActionGroupResource has a new parameter voice_receivers +- Model ActionGroupResource has a new parameter azure_function_receivers +- Model ActionGroupResource has a new parameter logic_app_receivers +- Added operation group MetricAlertsOperations +- Added operation group ScheduledQueryRulesOperations +- Added operation group MetricAlertsStatusOperations + 0.5.1 (2018-04-16) ++++++++++++++++++ diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py index f0a59de93e28..1f76267967cf 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py @@ -59,6 +59,9 @@ from .itsm_receiver_py3 import ItsmReceiver from .azure_app_push_receiver_py3 import AzureAppPushReceiver from .automation_runbook_receiver_py3 import AutomationRunbookReceiver + from .voice_receiver_py3 import VoiceReceiver + from .logic_app_receiver_py3 import LogicAppReceiver + from .azure_function_receiver_py3 import AzureFunctionReceiver from .action_group_resource_py3 import ActionGroupResource from .enable_request_py3 import EnableRequest from .action_group_patch_body_py3 import ActionGroupPatchBody @@ -84,6 +87,25 @@ from .baseline_response_py3 import BaselineResponse from .time_series_information_py3 import TimeSeriesInformation from .calculate_baseline_response_py3 import CalculateBaselineResponse + from .metric_alert_action_py3 import MetricAlertAction + from .metric_alert_criteria_py3 import MetricAlertCriteria + from .metric_alert_resource_py3 import MetricAlertResource + from .metric_alert_resource_patch_py3 import MetricAlertResourcePatch + from .metric_alert_status_properties_py3 import MetricAlertStatusProperties + from .metric_alert_status_py3 import MetricAlertStatus + from .metric_alert_status_collection_py3 import MetricAlertStatusCollection + from .metric_dimension_py3 import MetricDimension + from .metric_criteria_py3 import MetricCriteria + from .metric_alert_single_resource_multiple_metric_criteria_py3 import MetricAlertSingleResourceMultipleMetricCriteria + from .source_py3 import Source + from .schedule_py3 import Schedule + from .action_py3 import Action + from .log_search_rule_resource_py3 import LogSearchRuleResource + from .log_search_rule_resource_patch_py3 import LogSearchRuleResourcePatch + from .log_metric_trigger_py3 import LogMetricTrigger + from .trigger_condition_py3 import TriggerCondition + from .az_ns_action_group_py3 import AzNsActionGroup + from .alerting_action_py3 import AlertingAction except (SyntaxError, ImportError): from .resource import Resource from .scale_capacity import ScaleCapacity @@ -134,6 +156,9 @@ from .itsm_receiver import ItsmReceiver from .azure_app_push_receiver import AzureAppPushReceiver from .automation_runbook_receiver import AutomationRunbookReceiver + from .voice_receiver import VoiceReceiver + from .logic_app_receiver import LogicAppReceiver + from .azure_function_receiver import AzureFunctionReceiver from .action_group_resource import ActionGroupResource from .enable_request import EnableRequest from .action_group_patch_body import ActionGroupPatchBody @@ -159,6 +184,25 @@ from .baseline_response import BaselineResponse from .time_series_information import TimeSeriesInformation from .calculate_baseline_response import CalculateBaselineResponse + from .metric_alert_action import MetricAlertAction + from .metric_alert_criteria import MetricAlertCriteria + from .metric_alert_resource import MetricAlertResource + from .metric_alert_resource_patch import MetricAlertResourcePatch + from .metric_alert_status_properties import MetricAlertStatusProperties + from .metric_alert_status import MetricAlertStatus + from .metric_alert_status_collection import MetricAlertStatusCollection + from .metric_dimension import MetricDimension + from .metric_criteria import MetricCriteria + from .metric_alert_single_resource_multiple_metric_criteria import MetricAlertSingleResourceMultipleMetricCriteria + from .source import Source + from .schedule import Schedule + from .action import Action + from .log_search_rule_resource import LogSearchRuleResource + from .log_search_rule_resource_patch import LogSearchRuleResourcePatch + from .log_metric_trigger import LogMetricTrigger + from .trigger_condition import TriggerCondition + from .az_ns_action_group import AzNsActionGroup + from .alerting_action import AlertingAction from .autoscale_setting_resource_paged import AutoscaleSettingResourcePaged from .incident_paged import IncidentPaged from .alert_rule_resource_paged import AlertRuleResourcePaged @@ -168,6 +212,8 @@ from .event_data_paged import EventDataPaged from .localizable_string_paged import LocalizableStringPaged from .metric_definition_paged import MetricDefinitionPaged +from .metric_alert_resource_paged import MetricAlertResourcePaged +from .log_search_rule_resource_paged import LogSearchRuleResourcePaged from .monitor_management_client_enums import ( MetricStatisticType, TimeAggregationType, @@ -183,6 +229,12 @@ Unit, AggregationType, Sensitivity, + Enabled, + ProvisioningState, + QueryType, + ConditionalOperator, + MetricTriggerType, + AlertSeverity, ResultType, ) @@ -236,6 +288,9 @@ 'ItsmReceiver', 'AzureAppPushReceiver', 'AutomationRunbookReceiver', + 'VoiceReceiver', + 'LogicAppReceiver', + 'AzureFunctionReceiver', 'ActionGroupResource', 'EnableRequest', 'ActionGroupPatchBody', @@ -261,6 +316,25 @@ 'BaselineResponse', 'TimeSeriesInformation', 'CalculateBaselineResponse', + 'MetricAlertAction', + 'MetricAlertCriteria', + 'MetricAlertResource', + 'MetricAlertResourcePatch', + 'MetricAlertStatusProperties', + 'MetricAlertStatus', + 'MetricAlertStatusCollection', + 'MetricDimension', + 'MetricCriteria', + 'MetricAlertSingleResourceMultipleMetricCriteria', + 'Source', + 'Schedule', + 'Action', + 'LogSearchRuleResource', + 'LogSearchRuleResourcePatch', + 'LogMetricTrigger', + 'TriggerCondition', + 'AzNsActionGroup', + 'AlertingAction', 'AutoscaleSettingResourcePaged', 'IncidentPaged', 'AlertRuleResourcePaged', @@ -270,6 +344,8 @@ 'EventDataPaged', 'LocalizableStringPaged', 'MetricDefinitionPaged', + 'MetricAlertResourcePaged', + 'LogSearchRuleResourcePaged', 'MetricStatisticType', 'TimeAggregationType', 'ComparisonOperationType', @@ -284,5 +360,11 @@ 'Unit', 'AggregationType', 'Sensitivity', + 'Enabled', + 'ProvisioningState', + 'QueryType', + 'ConditionalOperator', + 'MetricTriggerType', + 'AlertSeverity', 'ResultType', ] diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/action.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/action.py new file mode 100644 index 000000000000..97c98e4fc86c --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/action.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Action(Model): + """Action. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AlertingAction + + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. + :type odatatype: str + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odatatype': {'Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction': 'AlertingAction'} + } + + def __init__(self, **kwargs): + super(Action, self).__init__(**kwargs) + self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py index 4cdf16d25a2d..0ccca8947395 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py @@ -57,6 +57,17 @@ class ActionGroupResource(Resource): receivers that are part of this action group. :type automation_runbook_receivers: list[~azure.mgmt.monitor.models.AutomationRunbookReceiver] + :param voice_receivers: The list of voice receivers that are part of this + action group. + :type voice_receivers: list[~azure.mgmt.monitor.models.VoiceReceiver] + :param logic_app_receivers: The list of logic app receivers that are part + of this action group. + :type logic_app_receivers: + list[~azure.mgmt.monitor.models.LogicAppReceiver] + :param azure_function_receivers: The list of azure function receivers that + are part of this action group. + :type azure_function_receivers: + list[~azure.mgmt.monitor.models.AzureFunctionReceiver] """ _validation = { @@ -64,7 +75,7 @@ class ActionGroupResource(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, - 'group_short_name': {'required': True, 'max_length': 15}, + 'group_short_name': {'required': True, 'max_length': 12}, 'enabled': {'required': True}, } @@ -82,6 +93,9 @@ class ActionGroupResource(Resource): 'itsm_receivers': {'key': 'properties.itsmReceivers', 'type': '[ItsmReceiver]'}, 'azure_app_push_receivers': {'key': 'properties.azureAppPushReceivers', 'type': '[AzureAppPushReceiver]'}, 'automation_runbook_receivers': {'key': 'properties.automationRunbookReceivers', 'type': '[AutomationRunbookReceiver]'}, + 'voice_receivers': {'key': 'properties.voiceReceivers', 'type': '[VoiceReceiver]'}, + 'logic_app_receivers': {'key': 'properties.logicAppReceivers', 'type': '[LogicAppReceiver]'}, + 'azure_function_receivers': {'key': 'properties.azureFunctionReceivers', 'type': '[AzureFunctionReceiver]'}, } def __init__(self, **kwargs): @@ -94,3 +108,6 @@ def __init__(self, **kwargs): self.itsm_receivers = kwargs.get('itsm_receivers', None) self.azure_app_push_receivers = kwargs.get('azure_app_push_receivers', None) self.automation_runbook_receivers = kwargs.get('automation_runbook_receivers', None) + self.voice_receivers = kwargs.get('voice_receivers', None) + self.logic_app_receivers = kwargs.get('logic_app_receivers', None) + self.azure_function_receivers = kwargs.get('azure_function_receivers', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource_py3.py index fdd6a95d4f1a..81edb6f53b0f 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class ActionGroupResource(Resource): @@ -57,6 +57,17 @@ class ActionGroupResource(Resource): receivers that are part of this action group. :type automation_runbook_receivers: list[~azure.mgmt.monitor.models.AutomationRunbookReceiver] + :param voice_receivers: The list of voice receivers that are part of this + action group. + :type voice_receivers: list[~azure.mgmt.monitor.models.VoiceReceiver] + :param logic_app_receivers: The list of logic app receivers that are part + of this action group. + :type logic_app_receivers: + list[~azure.mgmt.monitor.models.LogicAppReceiver] + :param azure_function_receivers: The list of azure function receivers that + are part of this action group. + :type azure_function_receivers: + list[~azure.mgmt.monitor.models.AzureFunctionReceiver] """ _validation = { @@ -64,7 +75,7 @@ class ActionGroupResource(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, - 'group_short_name': {'required': True, 'max_length': 15}, + 'group_short_name': {'required': True, 'max_length': 12}, 'enabled': {'required': True}, } @@ -82,9 +93,12 @@ class ActionGroupResource(Resource): 'itsm_receivers': {'key': 'properties.itsmReceivers', 'type': '[ItsmReceiver]'}, 'azure_app_push_receivers': {'key': 'properties.azureAppPushReceivers', 'type': '[AzureAppPushReceiver]'}, 'automation_runbook_receivers': {'key': 'properties.automationRunbookReceivers', 'type': '[AutomationRunbookReceiver]'}, + 'voice_receivers': {'key': 'properties.voiceReceivers', 'type': '[VoiceReceiver]'}, + 'logic_app_receivers': {'key': 'properties.logicAppReceivers', 'type': '[LogicAppReceiver]'}, + 'azure_function_receivers': {'key': 'properties.azureFunctionReceivers', 'type': '[AzureFunctionReceiver]'}, } - def __init__(self, *, location: str, group_short_name: str, tags=None, enabled: bool=True, email_receivers=None, sms_receivers=None, webhook_receivers=None, itsm_receivers=None, azure_app_push_receivers=None, automation_runbook_receivers=None, **kwargs) -> None: + def __init__(self, *, location: str, group_short_name: str, tags=None, enabled: bool=True, email_receivers=None, sms_receivers=None, webhook_receivers=None, itsm_receivers=None, azure_app_push_receivers=None, automation_runbook_receivers=None, voice_receivers=None, logic_app_receivers=None, azure_function_receivers=None, **kwargs) -> None: super(ActionGroupResource, self).__init__(location=location, tags=tags, **kwargs) self.group_short_name = group_short_name self.enabled = enabled @@ -94,3 +108,6 @@ def __init__(self, *, location: str, group_short_name: str, tags=None, enabled: self.itsm_receivers = itsm_receivers self.azure_app_push_receivers = azure_app_push_receivers self.automation_runbook_receivers = automation_runbook_receivers + self.voice_receivers = voice_receivers + self.logic_app_receivers = logic_app_receivers + self.azure_function_receivers = azure_function_receivers diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_py3.py new file mode 100644 index 000000000000..c8217283cc29 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Action(Model): + """Action. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AlertingAction + + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. + :type odatatype: str + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odatatype': {'Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction': 'AlertingAction'} + } + + def __init__(self, **kwargs) -> None: + super(Action, self).__init__(**kwargs) + self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource_py3.py index bc03347d612d..1d44d057e560 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class ActivityLogAlertResource(Resource): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_py3.py index 83f226b1201d..c5d83396e2ab 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class AlertRuleResource(Resource): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/alerting_action.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/alerting_action.py new file mode 100644 index 000000000000..6df6d93edc5a --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/alerting_action.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .action import Action + + +class AlertingAction(Action): + """Specifiy action need to be taken when rule type is Alert. + + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param severity: Required. Severity of the alert. Possible values include: + '0', '1', '2', '3', '4' + :type severity: str or ~azure.mgmt.monitor.models.AlertSeverity + :param azns_action: Required. Azure action group reference. + :type azns_action: ~azure.mgmt.monitor.models.AzNsActionGroup + :param throttling_in_min: time (in minutes) for which Alerts should be + throttled or suppressed. + :type throttling_in_min: int + :param trigger: Required. The trigger condition that results in the alert + rule being. + :type trigger: ~azure.mgmt.monitor.models.TriggerCondition + """ + + _validation = { + 'odatatype': {'required': True}, + 'severity': {'required': True}, + 'azns_action': {'required': True}, + 'trigger': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'azns_action': {'key': 'aznsAction', 'type': 'AzNsActionGroup'}, + 'throttling_in_min': {'key': 'throttlingInMin', 'type': 'int'}, + 'trigger': {'key': 'trigger', 'type': 'TriggerCondition'}, + } + + def __init__(self, **kwargs): + super(AlertingAction, self).__init__(**kwargs) + self.severity = kwargs.get('severity', None) + self.azns_action = kwargs.get('azns_action', None) + self.throttling_in_min = kwargs.get('throttling_in_min', None) + self.trigger = kwargs.get('trigger', None) + self.odatatype = 'Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/alerting_action_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/alerting_action_py3.py new file mode 100644 index 000000000000..558088fa5315 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/alerting_action_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .action_py3 import Action + + +class AlertingAction(Action): + """Specifiy action need to be taken when rule type is Alert. + + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param severity: Required. Severity of the alert. Possible values include: + '0', '1', '2', '3', '4' + :type severity: str or ~azure.mgmt.monitor.models.AlertSeverity + :param azns_action: Required. Azure action group reference. + :type azns_action: ~azure.mgmt.monitor.models.AzNsActionGroup + :param throttling_in_min: time (in minutes) for which Alerts should be + throttled or suppressed. + :type throttling_in_min: int + :param trigger: Required. The trigger condition that results in the alert + rule being. + :type trigger: ~azure.mgmt.monitor.models.TriggerCondition + """ + + _validation = { + 'odatatype': {'required': True}, + 'severity': {'required': True}, + 'azns_action': {'required': True}, + 'trigger': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'azns_action': {'key': 'aznsAction', 'type': 'AzNsActionGroup'}, + 'throttling_in_min': {'key': 'throttlingInMin', 'type': 'int'}, + 'trigger': {'key': 'trigger', 'type': 'TriggerCondition'}, + } + + def __init__(self, *, severity, azns_action, trigger, throttling_in_min: int=None, **kwargs) -> None: + super(AlertingAction, self).__init__(**kwargs) + self.severity = severity + self.azns_action = azns_action + self.throttling_in_min = throttling_in_min + self.trigger = trigger + self.odatatype = 'Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_py3.py index b09a23c57c85..23eb4643a585 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class AutoscaleSettingResource(Resource): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/az_ns_action_group.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/az_ns_action_group.py new file mode 100644 index 000000000000..d98d5546826e --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/az_ns_action_group.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzNsActionGroup(Model): + """Azure action group. + + :param action_group: Azure Action Group reference. + :type action_group: list[str] + :param email_subject: Custom subject override for all email ids in Azure + action group + :type email_subject: str + :param custom_webhook_payload: Custom payload to be sent for all webook + URI in Azure action group + :type custom_webhook_payload: str + """ + + _attribute_map = { + 'action_group': {'key': 'actionGroup', 'type': '[str]'}, + 'email_subject': {'key': 'emailSubject', 'type': 'str'}, + 'custom_webhook_payload': {'key': 'customWebhookPayload', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzNsActionGroup, self).__init__(**kwargs) + self.action_group = kwargs.get('action_group', None) + self.email_subject = kwargs.get('email_subject', None) + self.custom_webhook_payload = kwargs.get('custom_webhook_payload', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/az_ns_action_group_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/az_ns_action_group_py3.py new file mode 100644 index 000000000000..72bc693ab43d --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/az_ns_action_group_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzNsActionGroup(Model): + """Azure action group. + + :param action_group: Azure Action Group reference. + :type action_group: list[str] + :param email_subject: Custom subject override for all email ids in Azure + action group + :type email_subject: str + :param custom_webhook_payload: Custom payload to be sent for all webook + URI in Azure action group + :type custom_webhook_payload: str + """ + + _attribute_map = { + 'action_group': {'key': 'actionGroup', 'type': '[str]'}, + 'email_subject': {'key': 'emailSubject', 'type': 'str'}, + 'custom_webhook_payload': {'key': 'customWebhookPayload', 'type': 'str'}, + } + + def __init__(self, *, action_group=None, email_subject: str=None, custom_webhook_payload: str=None, **kwargs) -> None: + super(AzNsActionGroup, self).__init__(**kwargs) + self.action_group = action_group + self.email_subject = email_subject + self.custom_webhook_payload = custom_webhook_payload diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_function_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_function_receiver.py new file mode 100644 index 000000000000..131ce64379ef --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_function_receiver.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureFunctionReceiver(Model): + """An azure function receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the azure function receiver. Names must + be unique across all receivers within an action group. + :type name: str + :param function_app_resource_id: Required. The azure resource id of the + function app. + :type function_app_resource_id: str + :param function_name: Required. The function name in the function app. + :type function_name: str + :param http_trigger_url: Required. The http trigger url where http request + sent to. + :type http_trigger_url: str + """ + + _validation = { + 'name': {'required': True}, + 'function_app_resource_id': {'required': True}, + 'function_name': {'required': True}, + 'http_trigger_url': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'function_app_resource_id': {'key': 'functionAppResourceId', 'type': 'str'}, + 'function_name': {'key': 'functionName', 'type': 'str'}, + 'http_trigger_url': {'key': 'httpTriggerUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureFunctionReceiver, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.function_app_resource_id = kwargs.get('function_app_resource_id', None) + self.function_name = kwargs.get('function_name', None) + self.http_trigger_url = kwargs.get('http_trigger_url', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_function_receiver_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_function_receiver_py3.py new file mode 100644 index 000000000000..cc8d10fa6fe2 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_function_receiver_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureFunctionReceiver(Model): + """An azure function receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the azure function receiver. Names must + be unique across all receivers within an action group. + :type name: str + :param function_app_resource_id: Required. The azure resource id of the + function app. + :type function_app_resource_id: str + :param function_name: Required. The function name in the function app. + :type function_name: str + :param http_trigger_url: Required. The http trigger url where http request + sent to. + :type http_trigger_url: str + """ + + _validation = { + 'name': {'required': True}, + 'function_app_resource_id': {'required': True}, + 'function_name': {'required': True}, + 'http_trigger_url': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'function_app_resource_id': {'key': 'functionAppResourceId', 'type': 'str'}, + 'function_name': {'key': 'functionName', 'type': 'str'}, + 'http_trigger_url': {'key': 'httpTriggerUrl', 'type': 'str'}, + } + + def __init__(self, *, name: str, function_app_resource_id: str, function_name: str, http_trigger_url: str, **kwargs) -> None: + super(AzureFunctionReceiver, self).__init__(**kwargs) + self.name = name + self.function_app_resource_id = function_app_resource_id + self.function_name = function_name + self.http_trigger_url = http_trigger_url diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_py3.py index 3c98429cbc1c..f97b609a6e0a 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_only_resource import ProxyOnlyResource +from .proxy_only_resource_py3 import ProxyOnlyResource class DiagnosticSettingsCategoryResource(ProxyOnlyResource): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_py3.py index df04a6892561..8d02b9e280ca 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_only_resource import ProxyOnlyResource +from .proxy_only_resource_py3 import ProxyOnlyResource class DiagnosticSettingsResource(ProxyOnlyResource): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition_py3.py index 1d4157b8cdd1..e0d0eff9a386 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .rule_condition import RuleCondition +from .rule_condition_py3 import RuleCondition class LocationThresholdRuleCondition(RuleCondition): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_metric_trigger.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_metric_trigger.py new file mode 100644 index 000000000000..754ab30066fc --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_metric_trigger.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LogMetricTrigger(Model): + """LogMetricTrigger. + + :param threshold_operator: Evaluation operation for Metric -'GreaterThan' + or 'LessThan' or 'Equal'. Possible values include: 'GreaterThan', + 'LessThan', 'Equal' + :type threshold_operator: str or + ~azure.mgmt.monitor.models.ConditionalOperator + :param threshold: + :type threshold: float + :param metric_trigger_type: Metric Trigger Type - 'Consecutive' or + 'Total'. Possible values include: 'Consecutive', 'Total' + :type metric_trigger_type: str or + ~azure.mgmt.monitor.models.MetricTriggerType + :param metric_column: Evaluation of metric on a particular column + :type metric_column: str + """ + + _attribute_map = { + 'threshold_operator': {'key': 'thresholdOperator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'metric_trigger_type': {'key': 'metricTriggerType', 'type': 'str'}, + 'metric_column': {'key': 'metricColumn', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogMetricTrigger, self).__init__(**kwargs) + self.threshold_operator = kwargs.get('threshold_operator', None) + self.threshold = kwargs.get('threshold', None) + self.metric_trigger_type = kwargs.get('metric_trigger_type', None) + self.metric_column = kwargs.get('metric_column', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_metric_trigger_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_metric_trigger_py3.py new file mode 100644 index 000000000000..bcf1cfa94dc5 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_metric_trigger_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LogMetricTrigger(Model): + """LogMetricTrigger. + + :param threshold_operator: Evaluation operation for Metric -'GreaterThan' + or 'LessThan' or 'Equal'. Possible values include: 'GreaterThan', + 'LessThan', 'Equal' + :type threshold_operator: str or + ~azure.mgmt.monitor.models.ConditionalOperator + :param threshold: + :type threshold: float + :param metric_trigger_type: Metric Trigger Type - 'Consecutive' or + 'Total'. Possible values include: 'Consecutive', 'Total' + :type metric_trigger_type: str or + ~azure.mgmt.monitor.models.MetricTriggerType + :param metric_column: Evaluation of metric on a particular column + :type metric_column: str + """ + + _attribute_map = { + 'threshold_operator': {'key': 'thresholdOperator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'metric_trigger_type': {'key': 'metricTriggerType', 'type': 'str'}, + 'metric_column': {'key': 'metricColumn', 'type': 'str'}, + } + + def __init__(self, *, threshold_operator=None, threshold: float=None, metric_trigger_type=None, metric_column: str=None, **kwargs) -> None: + super(LogMetricTrigger, self).__init__(**kwargs) + self.threshold_operator = threshold_operator + self.threshold = threshold + self.metric_trigger_type = metric_trigger_type + self.metric_column = metric_column diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_py3.py index ec376218e6c2..28d3892f442d 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class LogProfileResource(Resource): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_search_rule_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_search_rule_resource.py new file mode 100644 index 000000000000..fc531623e212 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_search_rule_resource.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class LogSearchRuleResource(Resource): + """The Log Search Rule 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 id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param description: The description of the Log Search rule. + :type description: str + :param enabled: The flag which indicates whether the Log Search rule is + enabled. Value should be true or false. Possible values include: 'true', + 'false' + :type enabled: str or ~azure.mgmt.monitor.models.Enabled + :ivar last_updated_time: Last time the rule was updated in IS08601 format. + :vartype last_updated_time: datetime + :ivar provisioning_state: Provisioning state of the scheduledquery rule. + Possible values include: 'Succeeded', 'Deploying', 'Canceled', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.monitor.models.ProvisioningState + :param source: Required. Data Source against which rule will Query Data + :type source: ~azure.mgmt.monitor.models.Source + :param schedule: Required. Schedule (Frequnecy, Time Window) for rule. + :type schedule: ~azure.mgmt.monitor.models.Schedule + :param action: Required. Action needs to be taken on rule execution. + :type action: ~azure.mgmt.monitor.models.Action + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'last_updated_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'source': {'required': True}, + 'schedule': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'str'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'source': {'key': 'properties.source', 'type': 'Source'}, + 'schedule': {'key': 'properties.schedule', 'type': 'Schedule'}, + 'action': {'key': 'properties.action', 'type': 'Action'}, + } + + def __init__(self, **kwargs): + super(LogSearchRuleResource, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.enabled = kwargs.get('enabled', None) + self.last_updated_time = None + self.provisioning_state = None + self.source = kwargs.get('source', None) + self.schedule = kwargs.get('schedule', None) + self.action = kwargs.get('action', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_search_rule_resource_paged.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_search_rule_resource_paged.py new file mode 100644 index 000000000000..fbec51381f06 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_search_rule_resource_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class LogSearchRuleResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`LogSearchRuleResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LogSearchRuleResource]'} + } + + def __init__(self, *args, **kwargs): + + super(LogSearchRuleResourcePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_search_rule_resource_patch.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_search_rule_resource_patch.py new file mode 100644 index 000000000000..350f17ce36ac --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_search_rule_resource_patch.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LogSearchRuleResourcePatch(Model): + """The log search rule resource for patch operations. + + :param tags: Resource tags + :type tags: dict[str, str] + :param enabled: The flag which indicates whether the Log Search rule is + enabled. Value should be true or false. Possible values include: 'true', + 'false' + :type enabled: str or ~azure.mgmt.monitor.models.Enabled + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'enabled': {'key': 'properties.enabled', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogSearchRuleResourcePatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.enabled = kwargs.get('enabled', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_search_rule_resource_patch_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_search_rule_resource_patch_py3.py new file mode 100644 index 000000000000..010407469673 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_search_rule_resource_patch_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LogSearchRuleResourcePatch(Model): + """The log search rule resource for patch operations. + + :param tags: Resource tags + :type tags: dict[str, str] + :param enabled: The flag which indicates whether the Log Search rule is + enabled. Value should be true or false. Possible values include: 'true', + 'false' + :type enabled: str or ~azure.mgmt.monitor.models.Enabled + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'enabled': {'key': 'properties.enabled', 'type': 'str'}, + } + + def __init__(self, *, tags=None, enabled=None, **kwargs) -> None: + super(LogSearchRuleResourcePatch, self).__init__(**kwargs) + self.tags = tags + self.enabled = enabled diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_search_rule_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_search_rule_resource_py3.py new file mode 100644 index 000000000000..5cee5f349023 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_search_rule_resource_py3.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class LogSearchRuleResource(Resource): + """The Log Search Rule 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 id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param description: The description of the Log Search rule. + :type description: str + :param enabled: The flag which indicates whether the Log Search rule is + enabled. Value should be true or false. Possible values include: 'true', + 'false' + :type enabled: str or ~azure.mgmt.monitor.models.Enabled + :ivar last_updated_time: Last time the rule was updated in IS08601 format. + :vartype last_updated_time: datetime + :ivar provisioning_state: Provisioning state of the scheduledquery rule. + Possible values include: 'Succeeded', 'Deploying', 'Canceled', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.monitor.models.ProvisioningState + :param source: Required. Data Source against which rule will Query Data + :type source: ~azure.mgmt.monitor.models.Source + :param schedule: Required. Schedule (Frequnecy, Time Window) for rule. + :type schedule: ~azure.mgmt.monitor.models.Schedule + :param action: Required. Action needs to be taken on rule execution. + :type action: ~azure.mgmt.monitor.models.Action + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'last_updated_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'source': {'required': True}, + 'schedule': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'str'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'source': {'key': 'properties.source', 'type': 'Source'}, + 'schedule': {'key': 'properties.schedule', 'type': 'Schedule'}, + 'action': {'key': 'properties.action', 'type': 'Action'}, + } + + def __init__(self, *, location: str, source, schedule, action, tags=None, description: str=None, enabled=None, **kwargs) -> None: + super(LogSearchRuleResource, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.enabled = enabled + self.last_updated_time = None + self.provisioning_state = None + self.source = source + self.schedule = schedule + self.action = action diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/logic_app_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/logic_app_receiver.py new file mode 100644 index 000000000000..a2072831f0de --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/logic_app_receiver.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LogicAppReceiver(Model): + """A logic app receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the logic app receiver. Names must be + unique across all receivers within an action group. + :type name: str + :param resource_id: Required. The azure resource id of the logic app + receiver. + :type resource_id: str + :param callback_url: Required. The callback url where http request sent + to. + :type callback_url: str + """ + + _validation = { + 'name': {'required': True}, + 'resource_id': {'required': True}, + 'callback_url': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'callback_url': {'key': 'callbackUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogicAppReceiver, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.resource_id = kwargs.get('resource_id', None) + self.callback_url = kwargs.get('callback_url', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/logic_app_receiver_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/logic_app_receiver_py3.py new file mode 100644 index 000000000000..cc0e13916d23 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/logic_app_receiver_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LogicAppReceiver(Model): + """A logic app receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the logic app receiver. Names must be + unique across all receivers within an action group. + :type name: str + :param resource_id: Required. The azure resource id of the logic app + receiver. + :type resource_id: str + :param callback_url: Required. The callback url where http request sent + to. + :type callback_url: str + """ + + _validation = { + 'name': {'required': True}, + 'resource_id': {'required': True}, + 'callback_url': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'callback_url': {'key': 'callbackUrl', 'type': 'str'}, + } + + def __init__(self, *, name: str, resource_id: str, callback_url: str, **kwargs) -> None: + super(LogicAppReceiver, self).__init__(**kwargs) + self.name = name + self.resource_id = resource_id + self.callback_url = callback_url diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition_py3.py index 6de67497fbcd..6fb5cdb009f7 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .rule_condition import RuleCondition +from .rule_condition_py3 import RuleCondition class ManagementEventRuleCondition(RuleCondition): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_action.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_action.py new file mode 100644 index 000000000000..426d3cef5664 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_action.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricAlertAction(Model): + """An alert action. + + :param action_group_id: the id of the action group to use. + :type action_group_id: str + :param webhook_properties: + :type webhook_properties: dict[str, str] + """ + + _attribute_map = { + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + 'webhook_properties': {'key': 'webhookProperties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(MetricAlertAction, self).__init__(**kwargs) + self.action_group_id = kwargs.get('action_group_id', None) + self.webhook_properties = kwargs.get('webhook_properties', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_action_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_action_py3.py new file mode 100644 index 000000000000..da06ee03df07 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_action_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricAlertAction(Model): + """An alert action. + + :param action_group_id: the id of the action group to use. + :type action_group_id: str + :param webhook_properties: + :type webhook_properties: dict[str, str] + """ + + _attribute_map = { + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + 'webhook_properties': {'key': 'webhookProperties', 'type': '{str}'}, + } + + def __init__(self, *, action_group_id: str=None, webhook_properties=None, **kwargs) -> None: + super(MetricAlertAction, self).__init__(**kwargs) + self.action_group_id = action_group_id + self.webhook_properties = webhook_properties diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_criteria.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_criteria.py new file mode 100644 index 000000000000..e09cd7cbd52a --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_criteria.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricAlertCriteria(Model): + """The rule criteria that defines the conditions of the alert rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MetricAlertSingleResourceMultipleMetricCriteria + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param odatatype: Required. Constant filled by server. + :type odatatype: str + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odatatype': {'Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria': 'MetricAlertSingleResourceMultipleMetricCriteria'} + } + + def __init__(self, **kwargs): + super(MetricAlertCriteria, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_criteria_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_criteria_py3.py new file mode 100644 index 000000000000..c7efb60b1ddc --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_criteria_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricAlertCriteria(Model): + """The rule criteria that defines the conditions of the alert rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MetricAlertSingleResourceMultipleMetricCriteria + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param odatatype: Required. Constant filled by server. + :type odatatype: str + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odatatype': {'Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria': 'MetricAlertSingleResourceMultipleMetricCriteria'} + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(MetricAlertCriteria, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_resource.py new file mode 100644 index 000000000000..98ac70d43bb1 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_resource.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class MetricAlertResource(Resource): + """The metric alert 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 id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param description: Required. the description of the metric alert that + will be included in the alert email. + :type description: str + :param severity: Required. Alert severity {0, 1, 2, 3, 4} + :type severity: int + :param enabled: Required. the flag that indicates whether the metric alert + is enabled. + :type enabled: bool + :param scopes: the list of resource id's that this metric alert is scoped + to. + :type scopes: list[str] + :param evaluation_frequency: Required. how often the metric alert is + evaluated represented in ISO 8601 duration format. + :type evaluation_frequency: timedelta + :param window_size: Required. the period of time (in ISO 8601 duration + format) that is used to monitor alert activity based on the threshold. + :type window_size: timedelta + :param criteria: Required. defines the specific alert criteria + information. + :type criteria: ~azure.mgmt.monitor.models.MetricAlertCriteria + :param auto_mitigate: the flag that indicates whether the alert should be + auto resolved or not. + :type auto_mitigate: bool + :param actions: the array of actions that are performed when the alert + rule becomes active, and when an alert condition is resolved. + :type actions: list[~azure.mgmt.monitor.models.MetricAlertAction] + :ivar last_updated_time: Last time the rule was updated in ISO8601 format. + :vartype last_updated_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'description': {'required': True}, + 'severity': {'required': True}, + 'enabled': {'required': True}, + 'evaluation_frequency': {'required': True}, + 'window_size': {'required': True}, + 'criteria': {'required': True}, + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'int'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, + 'evaluation_frequency': {'key': 'properties.evaluationFrequency', 'type': 'duration'}, + 'window_size': {'key': 'properties.windowSize', 'type': 'duration'}, + 'criteria': {'key': 'properties.criteria', 'type': 'MetricAlertCriteria'}, + 'auto_mitigate': {'key': 'properties.autoMitigate', 'type': 'bool'}, + 'actions': {'key': 'properties.actions', 'type': '[MetricAlertAction]'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(MetricAlertResource, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.severity = kwargs.get('severity', None) + self.enabled = kwargs.get('enabled', None) + self.scopes = kwargs.get('scopes', None) + self.evaluation_frequency = kwargs.get('evaluation_frequency', None) + self.window_size = kwargs.get('window_size', None) + self.criteria = kwargs.get('criteria', None) + self.auto_mitigate = kwargs.get('auto_mitigate', None) + self.actions = kwargs.get('actions', None) + self.last_updated_time = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_resource_paged.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_resource_paged.py new file mode 100644 index 000000000000..8ad3fb071965 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_resource_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class MetricAlertResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`MetricAlertResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MetricAlertResource]'} + } + + def __init__(self, *args, **kwargs): + + super(MetricAlertResourcePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_resource_patch.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_resource_patch.py new file mode 100644 index 000000000000..72bca9080e59 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_resource_patch.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricAlertResourcePatch(Model): + """The metric alert resource for patch operations. + + 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: Resource tags + :type tags: dict[str, str] + :param description: Required. the description of the metric alert that + will be included in the alert email. + :type description: str + :param severity: Required. Alert severity {0, 1, 2, 3, 4} + :type severity: int + :param enabled: Required. the flag that indicates whether the metric alert + is enabled. + :type enabled: bool + :param scopes: the list of resource id's that this metric alert is scoped + to. + :type scopes: list[str] + :param evaluation_frequency: Required. how often the metric alert is + evaluated represented in ISO 8601 duration format. + :type evaluation_frequency: timedelta + :param window_size: Required. the period of time (in ISO 8601 duration + format) that is used to monitor alert activity based on the threshold. + :type window_size: timedelta + :param criteria: Required. defines the specific alert criteria + information. + :type criteria: ~azure.mgmt.monitor.models.MetricAlertCriteria + :param auto_mitigate: the flag that indicates whether the alert should be + auto resolved or not. + :type auto_mitigate: bool + :param actions: the array of actions that are performed when the alert + rule becomes active, and when an alert condition is resolved. + :type actions: list[~azure.mgmt.monitor.models.MetricAlertAction] + :ivar last_updated_time: Last time the rule was updated in ISO8601 format. + :vartype last_updated_time: datetime + """ + + _validation = { + 'description': {'required': True}, + 'severity': {'required': True}, + 'enabled': {'required': True}, + 'evaluation_frequency': {'required': True}, + 'window_size': {'required': True}, + 'criteria': {'required': True}, + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'int'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, + 'evaluation_frequency': {'key': 'properties.evaluationFrequency', 'type': 'duration'}, + 'window_size': {'key': 'properties.windowSize', 'type': 'duration'}, + 'criteria': {'key': 'properties.criteria', 'type': 'MetricAlertCriteria'}, + 'auto_mitigate': {'key': 'properties.autoMitigate', 'type': 'bool'}, + 'actions': {'key': 'properties.actions', 'type': '[MetricAlertAction]'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(MetricAlertResourcePatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.description = kwargs.get('description', None) + self.severity = kwargs.get('severity', None) + self.enabled = kwargs.get('enabled', None) + self.scopes = kwargs.get('scopes', None) + self.evaluation_frequency = kwargs.get('evaluation_frequency', None) + self.window_size = kwargs.get('window_size', None) + self.criteria = kwargs.get('criteria', None) + self.auto_mitigate = kwargs.get('auto_mitigate', None) + self.actions = kwargs.get('actions', None) + self.last_updated_time = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_resource_patch_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_resource_patch_py3.py new file mode 100644 index 000000000000..c415f69e489b --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_resource_patch_py3.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricAlertResourcePatch(Model): + """The metric alert resource for patch operations. + + 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: Resource tags + :type tags: dict[str, str] + :param description: Required. the description of the metric alert that + will be included in the alert email. + :type description: str + :param severity: Required. Alert severity {0, 1, 2, 3, 4} + :type severity: int + :param enabled: Required. the flag that indicates whether the metric alert + is enabled. + :type enabled: bool + :param scopes: the list of resource id's that this metric alert is scoped + to. + :type scopes: list[str] + :param evaluation_frequency: Required. how often the metric alert is + evaluated represented in ISO 8601 duration format. + :type evaluation_frequency: timedelta + :param window_size: Required. the period of time (in ISO 8601 duration + format) that is used to monitor alert activity based on the threshold. + :type window_size: timedelta + :param criteria: Required. defines the specific alert criteria + information. + :type criteria: ~azure.mgmt.monitor.models.MetricAlertCriteria + :param auto_mitigate: the flag that indicates whether the alert should be + auto resolved or not. + :type auto_mitigate: bool + :param actions: the array of actions that are performed when the alert + rule becomes active, and when an alert condition is resolved. + :type actions: list[~azure.mgmt.monitor.models.MetricAlertAction] + :ivar last_updated_time: Last time the rule was updated in ISO8601 format. + :vartype last_updated_time: datetime + """ + + _validation = { + 'description': {'required': True}, + 'severity': {'required': True}, + 'enabled': {'required': True}, + 'evaluation_frequency': {'required': True}, + 'window_size': {'required': True}, + 'criteria': {'required': True}, + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'int'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, + 'evaluation_frequency': {'key': 'properties.evaluationFrequency', 'type': 'duration'}, + 'window_size': {'key': 'properties.windowSize', 'type': 'duration'}, + 'criteria': {'key': 'properties.criteria', 'type': 'MetricAlertCriteria'}, + 'auto_mitigate': {'key': 'properties.autoMitigate', 'type': 'bool'}, + 'actions': {'key': 'properties.actions', 'type': '[MetricAlertAction]'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, description: str, severity: int, enabled: bool, evaluation_frequency, window_size, criteria, tags=None, scopes=None, auto_mitigate: bool=None, actions=None, **kwargs) -> None: + super(MetricAlertResourcePatch, self).__init__(**kwargs) + self.tags = tags + self.description = description + self.severity = severity + self.enabled = enabled + self.scopes = scopes + self.evaluation_frequency = evaluation_frequency + self.window_size = window_size + self.criteria = criteria + self.auto_mitigate = auto_mitigate + self.actions = actions + self.last_updated_time = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_resource_py3.py new file mode 100644 index 000000000000..a116607117c6 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_resource_py3.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class MetricAlertResource(Resource): + """The metric alert 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 id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param description: Required. the description of the metric alert that + will be included in the alert email. + :type description: str + :param severity: Required. Alert severity {0, 1, 2, 3, 4} + :type severity: int + :param enabled: Required. the flag that indicates whether the metric alert + is enabled. + :type enabled: bool + :param scopes: the list of resource id's that this metric alert is scoped + to. + :type scopes: list[str] + :param evaluation_frequency: Required. how often the metric alert is + evaluated represented in ISO 8601 duration format. + :type evaluation_frequency: timedelta + :param window_size: Required. the period of time (in ISO 8601 duration + format) that is used to monitor alert activity based on the threshold. + :type window_size: timedelta + :param criteria: Required. defines the specific alert criteria + information. + :type criteria: ~azure.mgmt.monitor.models.MetricAlertCriteria + :param auto_mitigate: the flag that indicates whether the alert should be + auto resolved or not. + :type auto_mitigate: bool + :param actions: the array of actions that are performed when the alert + rule becomes active, and when an alert condition is resolved. + :type actions: list[~azure.mgmt.monitor.models.MetricAlertAction] + :ivar last_updated_time: Last time the rule was updated in ISO8601 format. + :vartype last_updated_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'description': {'required': True}, + 'severity': {'required': True}, + 'enabled': {'required': True}, + 'evaluation_frequency': {'required': True}, + 'window_size': {'required': True}, + 'criteria': {'required': True}, + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'int'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, + 'evaluation_frequency': {'key': 'properties.evaluationFrequency', 'type': 'duration'}, + 'window_size': {'key': 'properties.windowSize', 'type': 'duration'}, + 'criteria': {'key': 'properties.criteria', 'type': 'MetricAlertCriteria'}, + 'auto_mitigate': {'key': 'properties.autoMitigate', 'type': 'bool'}, + 'actions': {'key': 'properties.actions', 'type': '[MetricAlertAction]'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, location: str, description: str, severity: int, enabled: bool, evaluation_frequency, window_size, criteria, tags=None, scopes=None, auto_mitigate: bool=None, actions=None, **kwargs) -> None: + super(MetricAlertResource, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.severity = severity + self.enabled = enabled + self.scopes = scopes + self.evaluation_frequency = evaluation_frequency + self.window_size = window_size + self.criteria = criteria + self.auto_mitigate = auto_mitigate + self.actions = actions + self.last_updated_time = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria.py new file mode 100644 index 000000000000..ccc84e1991ca --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .metric_alert_criteria import MetricAlertCriteria + + +class MetricAlertSingleResourceMultipleMetricCriteria(MetricAlertCriteria): + """Specifies the metric alert criteria for a single resource that has multiple + metric criteria. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param all_of: The list of metric criteria for this 'all of' operation. + :type all_of: list[~azure.mgmt.monitor.models.MetricCriteria] + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'all_of': {'key': 'allOf', 'type': '[MetricCriteria]'}, + } + + def __init__(self, **kwargs): + super(MetricAlertSingleResourceMultipleMetricCriteria, self).__init__(**kwargs) + self.all_of = kwargs.get('all_of', None) + self.odatatype = 'Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria_py3.py new file mode 100644 index 000000000000..7e74e7a90272 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .metric_alert_criteria_py3 import MetricAlertCriteria + + +class MetricAlertSingleResourceMultipleMetricCriteria(MetricAlertCriteria): + """Specifies the metric alert criteria for a single resource that has multiple + metric criteria. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param all_of: The list of metric criteria for this 'all of' operation. + :type all_of: list[~azure.mgmt.monitor.models.MetricCriteria] + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'all_of': {'key': 'allOf', 'type': '[MetricCriteria]'}, + } + + def __init__(self, *, additional_properties=None, all_of=None, **kwargs) -> None: + super(MetricAlertSingleResourceMultipleMetricCriteria, self).__init__(additional_properties=additional_properties, **kwargs) + self.all_of = all_of + self.odatatype = 'Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status.py new file mode 100644 index 000000000000..89a6928343f2 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricAlertStatus(Model): + """An alert status. + + :param name: The status name. + :type name: str + :param id: The alert rule arm id. + :type id: str + :param type: The extended resource type name. + :type type: str + :param properties: The alert status properties of the metric alert status. + :type properties: ~azure.mgmt.monitor.models.MetricAlertStatusProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'MetricAlertStatusProperties'}, + } + + def __init__(self, **kwargs): + super(MetricAlertStatus, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.id = kwargs.get('id', None) + self.type = kwargs.get('type', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status_collection.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status_collection.py new file mode 100644 index 000000000000..f893590e2015 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status_collection.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricAlertStatusCollection(Model): + """Represents a collection of alert rule resources. + + :param value: the values for the alert rule resources. + :type value: list[~azure.mgmt.monitor.models.MetricAlertStatus] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MetricAlertStatus]'}, + } + + def __init__(self, **kwargs): + super(MetricAlertStatusCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status_collection_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status_collection_py3.py new file mode 100644 index 000000000000..06c21ce2b3cc --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status_collection_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricAlertStatusCollection(Model): + """Represents a collection of alert rule resources. + + :param value: the values for the alert rule resources. + :type value: list[~azure.mgmt.monitor.models.MetricAlertStatus] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MetricAlertStatus]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(MetricAlertStatusCollection, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status_properties.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status_properties.py new file mode 100644 index 000000000000..dbb20a8f55e4 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status_properties.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricAlertStatusProperties(Model): + """An alert status properties. + + :param dimensions: + :type dimensions: dict[str, str] + :param status: status value + :type status: str + :param timestamp: UTC time when the status was checked. + :type timestamp: datetime + """ + + _attribute_map = { + 'dimensions': {'key': 'dimensions', 'type': '{str}'}, + 'status': {'key': 'status', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(MetricAlertStatusProperties, self).__init__(**kwargs) + self.dimensions = kwargs.get('dimensions', None) + self.status = kwargs.get('status', None) + self.timestamp = kwargs.get('timestamp', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status_properties_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status_properties_py3.py new file mode 100644 index 000000000000..5990828126e4 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status_properties_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricAlertStatusProperties(Model): + """An alert status properties. + + :param dimensions: + :type dimensions: dict[str, str] + :param status: status value + :type status: str + :param timestamp: UTC time when the status was checked. + :type timestamp: datetime + """ + + _attribute_map = { + 'dimensions': {'key': 'dimensions', 'type': '{str}'}, + 'status': {'key': 'status', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, dimensions=None, status: str=None, timestamp=None, **kwargs) -> None: + super(MetricAlertStatusProperties, self).__init__(**kwargs) + self.dimensions = dimensions + self.status = status + self.timestamp = timestamp diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status_py3.py new file mode 100644 index 000000000000..e6b7f3062534 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_status_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricAlertStatus(Model): + """An alert status. + + :param name: The status name. + :type name: str + :param id: The alert rule arm id. + :type id: str + :param type: The extended resource type name. + :type type: str + :param properties: The alert status properties of the metric alert status. + :type properties: ~azure.mgmt.monitor.models.MetricAlertStatusProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'MetricAlertStatusProperties'}, + } + + def __init__(self, *, name: str=None, id: str=None, type: str=None, properties=None, **kwargs) -> None: + super(MetricAlertStatus, self).__init__(**kwargs) + self.name = name + self.id = id + self.type = type + self.properties = properties diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria.py new file mode 100644 index 000000000000..b9c0298fe117 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricCriteria(Model): + """MetricCriteria. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the criteria. + :type name: str + :param metric_name: Required. Name of the metric. + :type metric_name: str + :param metric_namespace: Namespace of the metric. + :type metric_namespace: str + :param operator: Required. the criteria operator. + :type operator: object + :param time_aggregation: Required. the criteria time aggregation types. + :type time_aggregation: object + :param threshold: Required. the criteria threshold value that activates + the alert. + :type threshold: float + :param dimensions: List of dimension conditions. + :type dimensions: list[~azure.mgmt.monitor.models.MetricDimension] + """ + + _validation = { + 'name': {'required': True}, + 'metric_name': {'required': True}, + 'operator': {'required': True}, + 'time_aggregation': {'required': True}, + 'threshold': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'metric_name': {'key': 'metricName', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'object'}, + 'time_aggregation': {'key': 'timeAggregation', 'type': 'object'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + } + + def __init__(self, **kwargs): + super(MetricCriteria, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.metric_name = kwargs.get('metric_name', None) + self.metric_namespace = kwargs.get('metric_namespace', None) + self.operator = kwargs.get('operator', None) + self.time_aggregation = kwargs.get('time_aggregation', None) + self.threshold = kwargs.get('threshold', None) + self.dimensions = kwargs.get('dimensions', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria_py3.py new file mode 100644 index 000000000000..65c32e4e0f08 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricCriteria(Model): + """MetricCriteria. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the criteria. + :type name: str + :param metric_name: Required. Name of the metric. + :type metric_name: str + :param metric_namespace: Namespace of the metric. + :type metric_namespace: str + :param operator: Required. the criteria operator. + :type operator: object + :param time_aggregation: Required. the criteria time aggregation types. + :type time_aggregation: object + :param threshold: Required. the criteria threshold value that activates + the alert. + :type threshold: float + :param dimensions: List of dimension conditions. + :type dimensions: list[~azure.mgmt.monitor.models.MetricDimension] + """ + + _validation = { + 'name': {'required': True}, + 'metric_name': {'required': True}, + 'operator': {'required': True}, + 'time_aggregation': {'required': True}, + 'threshold': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'metric_name': {'key': 'metricName', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'object'}, + 'time_aggregation': {'key': 'timeAggregation', 'type': 'object'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + } + + def __init__(self, *, name: str, metric_name: str, operator, time_aggregation, threshold: float, metric_namespace: str=None, dimensions=None, **kwargs) -> None: + super(MetricCriteria, self).__init__(**kwargs) + self.name = name + self.metric_name = metric_name + self.metric_namespace = metric_namespace + self.operator = operator + self.time_aggregation = time_aggregation + self.threshold = threshold + self.dimensions = dimensions diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_dimension.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_dimension.py new file mode 100644 index 000000000000..a2c5882d0892 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_dimension.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricDimension(Model): + """MetricDimension. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the dimension. + :type name: str + :param operator: Required. the dimension operator. + :type operator: str + :param values: Required. list of dimension values. + :type values: list[str] + """ + + _validation = { + 'name': {'required': True}, + 'operator': {'required': True}, + 'values': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(MetricDimension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.operator = kwargs.get('operator', None) + self.values = kwargs.get('values', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_dimension_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_dimension_py3.py new file mode 100644 index 000000000000..3bad2ed539b3 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_dimension_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricDimension(Model): + """MetricDimension. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the dimension. + :type name: str + :param operator: Required. the dimension operator. + :type operator: str + :param values: Required. list of dimension values. + :type values: list[str] + """ + + _validation = { + 'name': {'required': True}, + 'operator': {'required': True}, + 'values': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, name: str, operator: str, values, **kwargs) -> None: + super(MetricDimension, self).__init__(**kwargs) + self.name = name + self.operator = operator + self.values = values diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/monitor_management_client_enums.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/monitor_management_client_enums.py index 0f3e04d11484..d2bda057fbd3 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/monitor_management_client_enums.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/monitor_management_client_enums.py @@ -134,6 +134,47 @@ class Sensitivity(str, Enum): high = "High" +class Enabled(str, Enum): + + true = "true" + false = "false" + + +class ProvisioningState(str, Enum): + + succeeded = "Succeeded" + deploying = "Deploying" + canceled = "Canceled" + failed = "Failed" + + +class QueryType(str, Enum): + + result_count = "ResultCount" + + +class ConditionalOperator(str, Enum): + + greater_than = "GreaterThan" + less_than = "LessThan" + equal = "Equal" + + +class MetricTriggerType(str, Enum): + + consecutive = "Consecutive" + total = "Total" + + +class AlertSeverity(str, Enum): + + zero = "0" + one = "1" + two = "2" + three = "3" + four = "4" + + class ResultType(str, Enum): data = "Data" diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action_py3.py index ebc3c723dacf..4c871a13da37 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .rule_action import RuleAction +from .rule_action_py3 import RuleAction class RuleEmailAction(RuleAction): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source_py3.py index 5bf22d45150d..83398e8909b4 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .rule_data_source import RuleDataSource +from .rule_data_source_py3 import RuleDataSource class RuleManagementEventDataSource(RuleDataSource): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source_py3.py index d29e9ecf9fd1..ad28d6387bb5 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .rule_data_source import RuleDataSource +from .rule_data_source_py3 import RuleDataSource class RuleMetricDataSource(RuleDataSource): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action_py3.py index 20ac0fd328e0..4f0803555d93 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .rule_action import RuleAction +from .rule_action_py3 import RuleAction class RuleWebhookAction(RuleAction): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/schedule.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/schedule.py new file mode 100644 index 000000000000..1ddff6b7910d --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/schedule.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Schedule(Model): + """Defines how often to run the search and the time interval. + + All required parameters must be populated in order to send to Azure. + + :param frequency_in_minutes: Required. frequency (in minutes) at which + rule condition should be evaluated. + :type frequency_in_minutes: int + :param time_window_in_minutes: Required. Time window for which data needs + to be fetched for query (should be greater than or equal to + frequencyInMinutes). + :type time_window_in_minutes: int + """ + + _validation = { + 'frequency_in_minutes': {'required': True}, + 'time_window_in_minutes': {'required': True}, + } + + _attribute_map = { + 'frequency_in_minutes': {'key': 'frequencyInMinutes', 'type': 'int'}, + 'time_window_in_minutes': {'key': 'timeWindowInMinutes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Schedule, self).__init__(**kwargs) + self.frequency_in_minutes = kwargs.get('frequency_in_minutes', None) + self.time_window_in_minutes = kwargs.get('time_window_in_minutes', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/schedule_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/schedule_py3.py new file mode 100644 index 000000000000..a1f87d04605a --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/schedule_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Schedule(Model): + """Defines how often to run the search and the time interval. + + All required parameters must be populated in order to send to Azure. + + :param frequency_in_minutes: Required. frequency (in minutes) at which + rule condition should be evaluated. + :type frequency_in_minutes: int + :param time_window_in_minutes: Required. Time window for which data needs + to be fetched for query (should be greater than or equal to + frequencyInMinutes). + :type time_window_in_minutes: int + """ + + _validation = { + 'frequency_in_minutes': {'required': True}, + 'time_window_in_minutes': {'required': True}, + } + + _attribute_map = { + 'frequency_in_minutes': {'key': 'frequencyInMinutes', 'type': 'int'}, + 'time_window_in_minutes': {'key': 'timeWindowInMinutes', 'type': 'int'}, + } + + def __init__(self, *, frequency_in_minutes: int, time_window_in_minutes: int, **kwargs) -> None: + super(Schedule, self).__init__(**kwargs) + self.frequency_in_minutes = frequency_in_minutes + self.time_window_in_minutes = time_window_in_minutes diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/source.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/source.py new file mode 100644 index 000000000000..4c305b2d49ba --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/source.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Source(Model): + """Specifies the log search query. + + All required parameters must be populated in order to send to Azure. + + :param query: Required. Log search query. + :type query: str + :param authorized_resources: List of Resource referred into query + :type authorized_resources: list[str] + :param data_source_id: Required. The resource uri over which log search + query is to be run. + :type data_source_id: str + :param query_type: Set value to 'ResultCount'. Possible values include: + 'ResultCount' + :type query_type: str or ~azure.mgmt.monitor.models.QueryType + """ + + _validation = { + 'query': {'required': True}, + 'data_source_id': {'required': True}, + } + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'authorized_resources': {'key': 'authorizedResources', 'type': '[str]'}, + 'data_source_id': {'key': 'dataSourceId', 'type': 'str'}, + 'query_type': {'key': 'queryType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Source, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.authorized_resources = kwargs.get('authorized_resources', None) + self.data_source_id = kwargs.get('data_source_id', None) + self.query_type = kwargs.get('query_type', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/source_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/source_py3.py new file mode 100644 index 000000000000..77655c4b55b5 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/source_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Source(Model): + """Specifies the log search query. + + All required parameters must be populated in order to send to Azure. + + :param query: Required. Log search query. + :type query: str + :param authorized_resources: List of Resource referred into query + :type authorized_resources: list[str] + :param data_source_id: Required. The resource uri over which log search + query is to be run. + :type data_source_id: str + :param query_type: Set value to 'ResultCount'. Possible values include: + 'ResultCount' + :type query_type: str or ~azure.mgmt.monitor.models.QueryType + """ + + _validation = { + 'query': {'required': True}, + 'data_source_id': {'required': True}, + } + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'authorized_resources': {'key': 'authorizedResources', 'type': '[str]'}, + 'data_source_id': {'key': 'dataSourceId', 'type': 'str'}, + 'query_type': {'key': 'queryType', 'type': 'str'}, + } + + def __init__(self, *, query: str, data_source_id: str, authorized_resources=None, query_type=None, **kwargs) -> None: + super(Source, self).__init__(**kwargs) + self.query = query + self.authorized_resources = authorized_resources + self.data_source_id = data_source_id + self.query_type = query_type diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition_py3.py index e2f2340c02b0..8fbff1f8930e 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .rule_condition import RuleCondition +from .rule_condition_py3 import RuleCondition class ThresholdRuleCondition(RuleCondition): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/trigger_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/trigger_condition.py new file mode 100644 index 000000000000..e89fdc8c18f1 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/trigger_condition.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TriggerCondition(Model): + """The condition that results in the Log Search rule. + + All required parameters must be populated in order to send to Azure. + + :param threshold_operator: Required. Evaluation operation for rule - + 'GreaterThan' or 'LessThan. Possible values include: 'GreaterThan', + 'LessThan', 'Equal' + :type threshold_operator: str or + ~azure.mgmt.monitor.models.ConditionalOperator + :param threshold: Required. Result or count threshold based on which rule + should be triggered. + :type threshold: float + :param metric_trigger: Trigger condition for metric query rule + :type metric_trigger: ~azure.mgmt.monitor.models.LogMetricTrigger + """ + + _validation = { + 'threshold_operator': {'required': True}, + 'threshold': {'required': True}, + } + + _attribute_map = { + 'threshold_operator': {'key': 'thresholdOperator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'metric_trigger': {'key': 'metricTrigger', 'type': 'LogMetricTrigger'}, + } + + def __init__(self, **kwargs): + super(TriggerCondition, self).__init__(**kwargs) + self.threshold_operator = kwargs.get('threshold_operator', None) + self.threshold = kwargs.get('threshold', None) + self.metric_trigger = kwargs.get('metric_trigger', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/trigger_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/trigger_condition_py3.py new file mode 100644 index 000000000000..b21e39d9a53e --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/trigger_condition_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TriggerCondition(Model): + """The condition that results in the Log Search rule. + + All required parameters must be populated in order to send to Azure. + + :param threshold_operator: Required. Evaluation operation for rule - + 'GreaterThan' or 'LessThan. Possible values include: 'GreaterThan', + 'LessThan', 'Equal' + :type threshold_operator: str or + ~azure.mgmt.monitor.models.ConditionalOperator + :param threshold: Required. Result or count threshold based on which rule + should be triggered. + :type threshold: float + :param metric_trigger: Trigger condition for metric query rule + :type metric_trigger: ~azure.mgmt.monitor.models.LogMetricTrigger + """ + + _validation = { + 'threshold_operator': {'required': True}, + 'threshold': {'required': True}, + } + + _attribute_map = { + 'threshold_operator': {'key': 'thresholdOperator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'metric_trigger': {'key': 'metricTrigger', 'type': 'LogMetricTrigger'}, + } + + def __init__(self, *, threshold_operator, threshold: float, metric_trigger=None, **kwargs) -> None: + super(TriggerCondition, self).__init__(**kwargs) + self.threshold_operator = threshold_operator + self.threshold = threshold + self.metric_trigger = metric_trigger diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/voice_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/voice_receiver.py new file mode 100644 index 000000000000..0cecd17337d7 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/voice_receiver.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VoiceReceiver(Model): + """A voice receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the voice receiver. Names must be + unique across all receivers within an action group. + :type name: str + :param country_code: Required. The country code of the voice receiver. + :type country_code: str + :param phone_number: Required. The phone number of the voice receiver. + :type phone_number: str + """ + + _validation = { + 'name': {'required': True}, + 'country_code': {'required': True}, + 'phone_number': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, + 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VoiceReceiver, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.country_code = kwargs.get('country_code', None) + self.phone_number = kwargs.get('phone_number', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/voice_receiver_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/voice_receiver_py3.py new file mode 100644 index 000000000000..02334b76c479 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/voice_receiver_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VoiceReceiver(Model): + """A voice receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the voice receiver. Names must be + unique across all receivers within an action group. + :type name: str + :param country_code: Required. The country code of the voice receiver. + :type country_code: str + :param phone_number: Required. The phone number of the voice receiver. + :type phone_number: str + """ + + _validation = { + 'name': {'required': True}, + 'country_code': {'required': True}, + 'phone_number': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, + 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, + } + + def __init__(self, *, name: str, country_code: str, phone_number: str, **kwargs) -> None: + super(VoiceReceiver, self).__init__(**kwargs) + self.name = name + self.country_code = country_code + self.phone_number = phone_number diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/monitor_management_client.py b/azure-mgmt-monitor/azure/mgmt/monitor/monitor_management_client.py index 8ba664998175..f27f5bbcbefa 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/monitor_management_client.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/monitor_management_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -28,6 +28,9 @@ from .operations.metric_definitions_operations import MetricDefinitionsOperations from .operations.metrics_operations import MetricsOperations from .operations.metric_baseline_operations import MetricBaselineOperations +from .operations.metric_alerts_operations import MetricAlertsOperations +from .operations.metric_alerts_status_operations import MetricAlertsStatusOperations +from .operations.scheduled_query_rules_operations import ScheduledQueryRulesOperations from . import models @@ -63,7 +66,7 @@ def __init__( self.subscription_id = subscription_id -class MonitorManagementClient(object): +class MonitorManagementClient(SDKClient): """Monitor Management Client :ivar config: Configuration for client. @@ -99,6 +102,12 @@ class MonitorManagementClient(object): :vartype metrics: azure.mgmt.monitor.operations.MetricsOperations :ivar metric_baseline: MetricBaseline operations :vartype metric_baseline: azure.mgmt.monitor.operations.MetricBaselineOperations + :ivar metric_alerts: MetricAlerts operations + :vartype metric_alerts: azure.mgmt.monitor.operations.MetricAlertsOperations + :ivar metric_alerts_status: MetricAlertsStatus operations + :vartype metric_alerts_status: azure.mgmt.monitor.operations.MetricAlertsStatusOperations + :ivar scheduled_query_rules: ScheduledQueryRules operations + :vartype scheduled_query_rules: azure.mgmt.monitor.operations.ScheduledQueryRulesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -112,7 +121,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = MonitorManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(MonitorManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) @@ -148,3 +157,9 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.metric_baseline = MetricBaselineOperations( self._client, self.config, self._serialize, self._deserialize) + self.metric_alerts = MetricAlertsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.metric_alerts_status = MetricAlertsStatusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.scheduled_query_rules = ScheduledQueryRulesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/__init__.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/__init__.py index 071c73c9668e..17a5cbbab15e 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/__init__.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/__init__.py @@ -24,6 +24,9 @@ from .metric_definitions_operations import MetricDefinitionsOperations from .metrics_operations import MetricsOperations from .metric_baseline_operations import MetricBaselineOperations +from .metric_alerts_operations import MetricAlertsOperations +from .metric_alerts_status_operations import MetricAlertsStatusOperations +from .scheduled_query_rules_operations import ScheduledQueryRulesOperations __all__ = [ 'AutoscaleSettingsOperations', @@ -41,4 +44,7 @@ 'MetricDefinitionsOperations', 'MetricsOperations', 'MetricBaselineOperations', + 'MetricAlertsOperations', + 'MetricAlertsStatusOperations', + 'ScheduledQueryRulesOperations', ] diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py index 88fd6c92ff0f..763b3361a9f0 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py @@ -22,7 +22,7 @@ class ActionGroupsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-04-01". + :ivar api_version: Client Api Version. Constant value: "2018-03-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-01" + self.api_version = "2018-03-01" self.config = config @@ -427,7 +427,8 @@ def internal_paging(next_link=None, raw=False): def enable_receiver( self, resource_group_name, action_group_name, receiver_name, custom_headers=None, raw=False, **operation_config): """Enable a receiver in an action group. This changes the receiver's - status from Disabled to Enabled. + status from Disabled to Enabled. This operation is only supported for + Email or SMS receivers. :param resource_group_name: The name of the resource group. :type resource_group_name: str diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_alerts_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_alerts_operations.py new file mode 100644 index 000000000000..0f42e68bb6c3 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_alerts_operations.py @@ -0,0 +1,418 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class MetricAlertsOperations(object): + """MetricAlertsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-03-01" + + self.config = config + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Retrieve alert rule definitions in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of MetricAlertResource + :rtype: + ~azure.mgmt.monitor.models.MetricAlertResourcePaged[~azure.mgmt.monitor.models.MetricAlertResource] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.MetricAlertResourcePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.MetricAlertResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/metricAlerts'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Retrieve alert rule defintions in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of MetricAlertResource + :rtype: + ~azure.mgmt.monitor.models.MetricAlertResourcePaged[~azure.mgmt.monitor.models.MetricAlertResource] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.MetricAlertResourcePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.MetricAlertResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts'} + + def get( + self, resource_group_name, rule_name, custom_headers=None, raw=False, **operation_config): + """Retrieve an alert rule definiton. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MetricAlertResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.monitor.models.MetricAlertResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('MetricAlertResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}'} + + def create_or_update( + self, resource_group_name, rule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update an metric alert definition. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param parameters: The parameters of the rule to create or update. + :type parameters: ~azure.mgmt.monitor.models.MetricAlertResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MetricAlertResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.monitor.models.MetricAlertResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'MetricAlertResource') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('MetricAlertResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}'} + + def update( + self, resource_group_name, rule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update an metric alert definition. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param parameters: The parameters of the rule to update. + :type parameters: ~azure.mgmt.monitor.models.MetricAlertResourcePatch + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MetricAlertResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.monitor.models.MetricAlertResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'MetricAlertResourcePatch') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('MetricAlertResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}'} + + def delete( + self, resource_group_name, rule_name, custom_headers=None, raw=False, **operation_config): + """Delete an alert rule defitiniton. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/backup_storage_configs_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_alerts_status_operations.py similarity index 57% rename from azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/backup_storage_configs_operations.py rename to azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_alerts_status_operations.py index c7a05b95b3cc..a30a72eed057 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/backup_storage_configs_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_alerts_status_operations.py @@ -11,59 +11,56 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models -class BackupStorageConfigsOperations(object): - """BackupStorageConfigsOperations operations. +class MetricAlertsStatusOperations(object): + """MetricAlertsStatusOperations operations. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-12-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-12-01" + self.api_version = "2018-03-01" self.config = config - def get( - self, resource_group_name, vault_name, custom_headers=None, raw=False, **operation_config): - """Fetches resource storage config. + def list( + self, resource_group_name, rule_name, custom_headers=None, raw=False, **operation_config): + """Retrieve an alert rule status. - :param resource_group_name: The name of the resource group where the - recovery services vault is present. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param vault_name: The name of the recovery services vault. - :type vault_name: str + :param rule_name: The name of the rule. + :type rule_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`BackupStorageConfig - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`BackupStorageConfig - ` or - :class:`ClientRawResponse` - :raises: :class:`CloudError` + :return: MetricAlertStatusCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.monitor.models.MetricAlertStatusCollection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vaultName': self._serialize.url("vault_name", vault_name, 'str') + 'ruleName': self._serialize.url("rule_name", rule_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -83,54 +80,51 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupStorageConfig', response) + deserialized = self._deserialize('MetricAlertStatusCollection', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status'} - def update( - self, resource_group_name, vault_name, backup_storage_config, custom_headers=None, raw=False, **operation_config): - """Updates vault storage model type. + def list_by_name( + self, resource_group_name, rule_name, status_name, custom_headers=None, raw=False, **operation_config): + """Retrieve an alert rule status. - :param resource_group_name: The name of the resource group where the - recovery services vault is present. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param backup_storage_config: Backup storage config. - :type backup_storage_config: :class:`BackupStorageConfig - ` + :param rule_name: The name of the rule. + :type rule_name: str + :param status_name: The name of the status. + :type status_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` - :raises: :class:`CloudError` + :return: MetricAlertStatusCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.monitor.models.MetricAlertStatusCollection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig' + url = self.list_by_name.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vaultName': self._serialize.url("vault_name", vault_name, 'str') + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + 'statusName': self._serialize.url("status_name", status_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -148,19 +142,21 @@ def update( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - # Construct body - body_content = self._serialize.body(backup_storage_config, 'BackupStorageConfig') - # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('MetricAlertStatusCollection', response) if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + + return deserialized + list_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status/{statusName}'} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/scheduled_query_rules_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/scheduled_query_rules_operations.py new file mode 100644 index 000000000000..16230f44386c --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/scheduled_query_rules_operations.py @@ -0,0 +1,436 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ScheduledQueryRulesOperations(object): + """ScheduledQueryRulesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-16". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-16" + + self.config = config + + def create_or_update( + self, resource_group_name, rule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an log search rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param parameters: The parameters of the rule to create or update. + :type parameters: ~azure.mgmt.monitor.models.LogSearchRuleResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LogSearchRuleResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.monitor.models.LogSearchRuleResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'LogSearchRuleResource') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LogSearchRuleResource', response) + if response.status_code == 201: + deserialized = self._deserialize('LogSearchRuleResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}'} + + def get( + self, resource_group_name, rule_name, custom_headers=None, raw=False, **operation_config): + """Gets an Log Search rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LogSearchRuleResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.monitor.models.LogSearchRuleResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LogSearchRuleResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}'} + + def update( + self, resource_group_name, rule_name, tags=None, enabled=None, custom_headers=None, raw=False, **operation_config): + """Update log search Rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param tags: Resource tags + :type tags: dict[str, str] + :param enabled: The flag which indicates whether the Log Search rule + is enabled. Value should be true or false. Possible values include: + 'true', 'false' + :type enabled: str or ~azure.mgmt.monitor.models.Enabled + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LogSearchRuleResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.monitor.models.LogSearchRuleResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.LogSearchRuleResourcePatch(tags=tags, enabled=enabled) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'LogSearchRuleResourcePatch') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LogSearchRuleResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}'} + + def delete( + self, resource_group_name, rule_name, custom_headers=None, raw=False, **operation_config): + """Deletes a Log Search rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}'} + + def list_by_subscription( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """List the Log Search rules within a subscription group. + + :param filter: The filter to apply on the operation. For more + information please see + https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of LogSearchRuleResource + :rtype: + ~azure.mgmt.monitor.models.LogSearchRuleResourcePaged[~azure.mgmt.monitor.models.LogSearchRuleResource] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.LogSearchRuleResourcePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.LogSearchRuleResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/scheduledQueryRules'} + + def list_by_resource_group( + self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): + """List the Log Search rules within a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param filter: The filter to apply on the operation. For more + information please see + https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of LogSearchRuleResource + :rtype: + ~azure.mgmt.monitor.models.LogSearchRuleResourcePaged[~azure.mgmt.monitor.models.LogSearchRuleResource] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.LogSearchRuleResourcePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.LogSearchRuleResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules'} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/version.py b/azure-mgmt-monitor/azure/mgmt/monitor/version.py index c9fea7678df4..3c93989b8fef 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/version.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.5.1" +VERSION = "0.5.2" diff --git a/azure-mgmt-monitor/sdk_packaging.toml b/azure-mgmt-monitor/sdk_packaging.toml new file mode 100644 index 000000000000..bdaf36684e1e --- /dev/null +++ b/azure-mgmt-monitor/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-monitor" +package_pprint_name = "Monitor" +package_doc_id = "monitoring" +is_stable = false diff --git a/azure-mgmt-monitor/setup.py b/azure-mgmt-monitor/setup.py index e0c133de0bf6..6c95e69612cd 100644 --- a/azure-mgmt-monitor/setup.py +++ b/azure-mgmt-monitor/setup.py @@ -77,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure>=0.4.20,<2.0.0', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-msi/HISTORY.rst b/azure-mgmt-msi/HISTORY.rst index eb40145d0723..a07bf95f2f42 100644 --- a/azure-mgmt-msi/HISTORY.rst +++ b/azure-mgmt-msi/HISTORY.rst @@ -3,6 +3,42 @@ Release History =============== +0.2.0 (2018-05-25) +++++++++++++++++++ + +**Features** + +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + 0.1.0 (2017-12-13) ++++++++++++++++++ diff --git a/azure-mgmt-msi/README.rst b/azure-mgmt-msi/README.rst index 977379507943..6d2ecf1dd4b2 100644 --- a/azure-mgmt-msi/README.rst +++ b/azure-mgmt-msi/README.rst @@ -37,8 +37,8 @@ Usage ===== For code examples, see `MSI Management -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-msi/azure/mgmt/msi/managed_service_identity_client.py b/azure-mgmt-msi/azure/mgmt/msi/managed_service_identity_client.py index dc077f97118a..f1804dfe67e9 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/managed_service_identity_client.py +++ b/azure-mgmt-msi/azure/mgmt/msi/managed_service_identity_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -51,7 +51,7 @@ def __init__( self.subscription_id = subscription_id -class ManagedServiceIdentityClient(object): +class ManagedServiceIdentityClient(SDKClient): """The Managed Service Identity Client. :ivar config: Configuration for client. @@ -75,7 +75,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = ManagedServiceIdentityClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(ManagedServiceIdentityClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '2015-08-31-preview' diff --git a/azure-mgmt-msi/azure/mgmt/msi/models/__init__.py b/azure-mgmt-msi/azure/mgmt/msi/models/__init__.py index ce703380e057..1bf860b5697d 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/models/__init__.py +++ b/azure-mgmt-msi/azure/mgmt/msi/models/__init__.py @@ -9,9 +9,14 @@ # regenerated. # -------------------------------------------------------------------------- -from .identity import Identity -from .operation_display import OperationDisplay -from .operation import Operation +try: + from .identity_py3 import Identity + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation +except (SyntaxError, ImportError): + from .identity import Identity + from .operation_display import OperationDisplay + from .operation import Operation from .operation_paged import OperationPaged from .identity_paged import IdentityPaged from .managed_service_identity_client_enums import ( diff --git a/azure-mgmt-msi/azure/mgmt/msi/models/identity.py b/azure-mgmt-msi/azure/mgmt/msi/models/identity.py index 27effe81cc32..ab8be27563c5 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/models/identity.py +++ b/azure-mgmt-msi/azure/mgmt/msi/models/identity.py @@ -65,11 +65,12 @@ class Identity(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, location=None, tags=None): + def __init__(self, **kwargs): + super(Identity, self).__init__(**kwargs) self.id = None self.name = None - self.location = location - self.tags = tags + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) self.tenant_id = None self.principal_id = None self.client_id = None diff --git a/azure-mgmt-msi/azure/mgmt/msi/models/identity_py3.py b/azure-mgmt-msi/azure/mgmt/msi/models/identity_py3.py new file mode 100644 index 000000000000..9bdc6aeac153 --- /dev/null +++ b/azure-mgmt-msi/azure/mgmt/msi/models/identity_py3.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Identity(Model): + """Describes an identity resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The id of the created identity. + :vartype id: str + :ivar name: The name of the created identity. + :vartype name: str + :param location: The Azure region where the identity lives. + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar tenant_id: The id of the tenant which the identity belongs to. + :vartype tenant_id: str + :ivar principal_id: The id of the service principal object associated with + the created identity. + :vartype principal_id: str + :ivar client_id: The id of the app associated with the identity. This is a + random generated UUID by MSI. + :vartype client_id: str + :ivar client_secret_url: The ManagedServiceIdentity DataPlane URL that + can be queried to obtain the identity credentials. + :vartype client_secret_url: str + :ivar type: The type of resource i.e. + Microsoft.ManagedIdentity/userAssignedIdentities. Possible values include: + 'Microsoft.ManagedIdentity/userAssignedIdentities' + :vartype type: str or ~azure.mgmt.msi.models.UserAssignedIdentities + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + 'client_secret_url': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret_url': {'key': 'properties.clientSecretUrl', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Identity, self).__init__(**kwargs) + self.id = None + self.name = None + self.location = location + self.tags = tags + self.tenant_id = None + self.principal_id = None + self.client_id = None + self.client_secret_url = None + self.type = None diff --git a/azure-mgmt-msi/azure/mgmt/msi/models/managed_service_identity_client_enums.py b/azure-mgmt-msi/azure/mgmt/msi/models/managed_service_identity_client_enums.py index a22c288f08c5..1be9ca0449b3 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/models/managed_service_identity_client_enums.py +++ b/azure-mgmt-msi/azure/mgmt/msi/models/managed_service_identity_client_enums.py @@ -12,6 +12,6 @@ from enum import Enum -class UserAssignedIdentities(Enum): +class UserAssignedIdentities(str, Enum): microsoft_managed_identityuser_assigned_identities = "Microsoft.ManagedIdentity/userAssignedIdentities" diff --git a/azure-mgmt-msi/azure/mgmt/msi/models/operation.py b/azure-mgmt-msi/azure/mgmt/msi/models/operation.py index 9d7b328d4ca5..3123b2729c32 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/models/operation.py +++ b/azure-mgmt-msi/azure/mgmt/msi/models/operation.py @@ -30,6 +30,7 @@ class Operation(Model): 'display': {'key': 'display', 'type': 'OperationDisplay'}, } - def __init__(self, name=None, display=None): - self.name = name - self.display = display + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-msi/azure/mgmt/msi/models/operation_display.py b/azure-mgmt-msi/azure/mgmt/msi/models/operation_display.py index 5a6f7abbe6f9..9129b1f8145d 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/models/operation_display.py +++ b/azure-mgmt-msi/azure/mgmt/msi/models/operation_display.py @@ -37,8 +37,9 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, operation=None, resource=None, description=None): - self.provider = provider - self.operation = operation - self.resource = resource - self.description = description + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.operation = kwargs.get('operation', None) + self.resource = kwargs.get('resource', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-msi/azure/mgmt/msi/models/operation_display_py3.py b/azure-mgmt-msi/azure/mgmt/msi/models/operation_display_py3.py new file mode 100644 index 000000000000..c0ce73c19513 --- /dev/null +++ b/azure-mgmt-msi/azure/mgmt/msi/models/operation_display_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """Operation Display. + + The object that describes the operation. + + :param provider: Resource Provider Name. Friendly name of the resource + provider. + :type provider: str + :param operation: Operation Type. The type of operation. For example: + read, write, delete. + :type operation: str + :param resource: Resource Type. The resource type on which the operation + is performed. + :type resource: str + :param description: Operation description. A description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, operation: str=None, resource: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.operation = operation + self.resource = resource + self.description = description diff --git a/azure-mgmt-msi/azure/mgmt/msi/models/operation_py3.py b/azure-mgmt-msi/azure/mgmt/msi/models/operation_py3.py new file mode 100644 index 000000000000..f4aff37fc086 --- /dev/null +++ b/azure-mgmt-msi/azure/mgmt/msi/models/operation_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Microsoft.ManagedIdentity Operation. + + Operation supported by the Microsoft.ManagedIdentity REST API. + + :param name: Operation Name. The name of the REST Operation. This is of + the format {provider}/{resource}/{operation}. + :type name: str + :param display: Operation Display. The object that describes the + operation. + :type display: ~azure.mgmt.msi.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display diff --git a/azure-mgmt-msi/azure/mgmt/msi/operations/operations.py b/azure-mgmt-msi/azure/mgmt/msi/operations/operations.py index 8b6bc1a05c26..11e7cf98f86a 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/operations/operations.py +++ b/azure-mgmt-msi/azure/mgmt/msi/operations/operations.py @@ -22,7 +22,7 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Version of API to invoke. Constant value: "2015-08-31-preview". """ @@ -55,7 +55,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.ManagedIdentity/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -78,7 +78,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -96,3 +96,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.ManagedIdentity/operations'} diff --git a/azure-mgmt-msi/azure/mgmt/msi/operations/user_assigned_identities_operations.py b/azure-mgmt-msi/azure/mgmt/msi/operations/user_assigned_identities_operations.py index eeb135c746a4..e01790fc5582 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/operations/user_assigned_identities_operations.py +++ b/azure-mgmt-msi/azure/mgmt/msi/operations/user_assigned_identities_operations.py @@ -22,7 +22,7 @@ class UserAssignedIdentitiesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Version of API to invoke. Constant value: "2015-08-31-preview". """ @@ -56,7 +56,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.ManagedIdentity/userAssignedIdentities' + url = self.list_by_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -83,7 +83,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -101,6 +101,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ManagedIdentity/userAssignedIdentities'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -124,7 +125,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -152,7 +153,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -170,6 +171,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities'} def create_or_update( self, resource_group_name, resource_name, location=None, tags=None, custom_headers=None, raw=False, **operation_config): @@ -198,7 +200,7 @@ def create_or_update( parameters = models.Identity(location=location, tags=tags) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -226,7 +228,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -245,6 +247,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'} def update( self, resource_group_name, resource_name, location=None, tags=None, custom_headers=None, raw=False, **operation_config): @@ -272,7 +275,7 @@ def update( parameters = models.Identity(location=location, tags=tags) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -300,7 +303,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -317,6 +320,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'} def get( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): @@ -338,7 +342,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -362,7 +366,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -379,6 +383,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'} def delete( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): @@ -399,7 +404,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -423,7 +428,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -433,3 +438,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'} diff --git a/azure-mgmt-msi/azure/mgmt/msi/version.py b/azure-mgmt-msi/azure/mgmt/msi/version.py index e0ec669828cb..9bd1dfac7ecb 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/version.py +++ b/azure-mgmt-msi/azure/mgmt/msi/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "0.2.0" diff --git a/azure-mgmt-msi/sdk_packaging.toml b/azure-mgmt-msi/sdk_packaging.toml new file mode 100644 index 000000000000..e10e556882e3 --- /dev/null +++ b/azure-mgmt-msi/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-msi" +package_pprint_name = "MSI Management" +package_doc_id = "activedirectory" +is_stable = false diff --git a/azure-mgmt-msi/setup.py b/azure-mgmt-msi/setup.py index 068d98844699..54211cbc9f6b 100644 --- a/azure-mgmt-msi/setup.py +++ b/azure-mgmt-msi/setup.py @@ -77,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-notificationhubs/HISTORY.rst b/azure-mgmt-notificationhubs/HISTORY.rst index 0fc9a54a4469..cd91317f4237 100644 --- a/azure-mgmt-notificationhubs/HISTORY.rst +++ b/azure-mgmt-notificationhubs/HISTORY.rst @@ -3,6 +3,62 @@ Release History =============== +2.0.0 (2018-05-25) +++++++++++++++++++ + +**Features** + +- Model NamespaceResource has a new parameter updated_at +- Model NamespaceResource has a new parameter metric_id +- Model NamespaceResource has a new parameter data_center +- Model NamespaceCreateOrUpdateParameters has a new parameter updated_at +- Model NamespaceCreateOrUpdateParameters has a new parameter metric_id +- Model NamespaceCreateOrUpdateParameters has a new parameter data_center +- Added operation NotificationHubsOperations.check_notification_hub_availability +- Added operation group Operations +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**Breaking changes** + +- Operation NotificationHubsOperations.create_or_update_authorization_rule has a new signature +- Operation NamespacesOperations.create_or_update_authorization_rule has a new signature +- Removed operation NotificationHubsOperations.check_availability (replaced by NotificationHubsOperations.check_notification_hub_availability) +- Model SharedAccessAuthorizationRuleResource has a new signature +- Model SharedAccessAuthorizationRuleProperties has a new signature +- Model SharedAccessAuthorizationRuleCreateOrUpdateParameters has a new signature +- Removed operation group NameOperations (replaced by NotificationHubsOperations.check_notification_hub_availability) +- Removed operation group HubsOperations (merged in NotificationHubsOperations) + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + + 1.0.0 (2017-06-27) ++++++++++++++++++ diff --git a/azure-mgmt-notificationhubs/README.rst b/azure-mgmt-notificationhubs/README.rst index e1e3d6b71d1b..c2993d6f867c 100644 --- a/azure-mgmt-notificationhubs/README.rst +++ b/azure-mgmt-notificationhubs/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Notification Hubs Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `Notification Hubs Management -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/__init__.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/__init__.py index e131516f02d1..fa659d0d218c 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/__init__.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/__init__.py @@ -9,30 +9,61 @@ # regenerated. # -------------------------------------------------------------------------- -from .check_name_availability_request_parameters import CheckNameAvailabilityRequestParameters -from .check_name_availability_response import CheckNameAvailabilityResponse -from .sku import Sku -from .check_availability_parameters import CheckAvailabilityParameters -from .check_availability_result import CheckAvailabilityResult -from .namespace_create_or_update_parameters import NamespaceCreateOrUpdateParameters -from .namespace_patch_parameters import NamespacePatchParameters -from .namespace_resource import NamespaceResource -from .shared_access_authorization_rule_properties import SharedAccessAuthorizationRuleProperties -from .shared_access_authorization_rule_create_or_update_parameters import SharedAccessAuthorizationRuleCreateOrUpdateParameters -from .shared_access_authorization_rule_resource import SharedAccessAuthorizationRuleResource -from .resource_list_keys import ResourceListKeys -from .policykey_resource import PolicykeyResource -from .apns_credential import ApnsCredential -from .wns_credential import WnsCredential -from .gcm_credential import GcmCredential -from .mpns_credential import MpnsCredential -from .adm_credential import AdmCredential -from .baidu_credential import BaiduCredential -from .notification_hub_create_or_update_parameters import NotificationHubCreateOrUpdateParameters -from .notification_hub_resource import NotificationHubResource -from .pns_credentials_resource import PnsCredentialsResource -from .resource import Resource -from .sub_resource import SubResource +try: + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .error_response_py3 import ErrorResponse, ErrorResponseException + from .sku_py3 import Sku + from .check_availability_parameters_py3 import CheckAvailabilityParameters + from .check_availability_result_py3 import CheckAvailabilityResult + from .namespace_create_or_update_parameters_py3 import NamespaceCreateOrUpdateParameters + from .namespace_patch_parameters_py3 import NamespacePatchParameters + from .namespace_resource_py3 import NamespaceResource + from .shared_access_authorization_rule_properties_py3 import SharedAccessAuthorizationRuleProperties + from .shared_access_authorization_rule_create_or_update_parameters_py3 import SharedAccessAuthorizationRuleCreateOrUpdateParameters + from .shared_access_authorization_rule_resource_py3 import SharedAccessAuthorizationRuleResource + from .shared_access_authorization_rule_list_result_py3 import SharedAccessAuthorizationRuleListResult + from .resource_list_keys_py3 import ResourceListKeys + from .policykey_resource_py3 import PolicykeyResource + from .apns_credential_py3 import ApnsCredential + from .wns_credential_py3 import WnsCredential + from .gcm_credential_py3 import GcmCredential + from .mpns_credential_py3 import MpnsCredential + from .adm_credential_py3 import AdmCredential + from .baidu_credential_py3 import BaiduCredential + from .notification_hub_create_or_update_parameters_py3 import NotificationHubCreateOrUpdateParameters + from .notification_hub_resource_py3 import NotificationHubResource + from .pns_credentials_resource_py3 import PnsCredentialsResource + from .resource_py3 import Resource + from .sub_resource_py3 import SubResource +except (SyntaxError, ImportError): + from .operation_display import OperationDisplay + from .operation import Operation + from .error_response import ErrorResponse, ErrorResponseException + from .sku import Sku + from .check_availability_parameters import CheckAvailabilityParameters + from .check_availability_result import CheckAvailabilityResult + from .namespace_create_or_update_parameters import NamespaceCreateOrUpdateParameters + from .namespace_patch_parameters import NamespacePatchParameters + from .namespace_resource import NamespaceResource + from .shared_access_authorization_rule_properties import SharedAccessAuthorizationRuleProperties + from .shared_access_authorization_rule_create_or_update_parameters import SharedAccessAuthorizationRuleCreateOrUpdateParameters + from .shared_access_authorization_rule_resource import SharedAccessAuthorizationRuleResource + from .shared_access_authorization_rule_list_result import SharedAccessAuthorizationRuleListResult + from .resource_list_keys import ResourceListKeys + from .policykey_resource import PolicykeyResource + from .apns_credential import ApnsCredential + from .wns_credential import WnsCredential + from .gcm_credential import GcmCredential + from .mpns_credential import MpnsCredential + from .adm_credential import AdmCredential + from .baidu_credential import BaiduCredential + from .notification_hub_create_or_update_parameters import NotificationHubCreateOrUpdateParameters + from .notification_hub_resource import NotificationHubResource + from .pns_credentials_resource import PnsCredentialsResource + from .resource import Resource + from .sub_resource import SubResource +from .operation_paged import OperationPaged from .namespace_resource_paged import NamespaceResourcePaged from .shared_access_authorization_rule_resource_paged import SharedAccessAuthorizationRuleResourcePaged from .notification_hub_resource_paged import NotificationHubResourcePaged @@ -43,8 +74,9 @@ ) __all__ = [ - 'CheckNameAvailabilityRequestParameters', - 'CheckNameAvailabilityResponse', + 'OperationDisplay', + 'Operation', + 'ErrorResponse', 'ErrorResponseException', 'Sku', 'CheckAvailabilityParameters', 'CheckAvailabilityResult', @@ -54,6 +86,7 @@ 'SharedAccessAuthorizationRuleProperties', 'SharedAccessAuthorizationRuleCreateOrUpdateParameters', 'SharedAccessAuthorizationRuleResource', + 'SharedAccessAuthorizationRuleListResult', 'ResourceListKeys', 'PolicykeyResource', 'ApnsCredential', @@ -67,6 +100,7 @@ 'PnsCredentialsResource', 'Resource', 'SubResource', + 'OperationPaged', 'NamespaceResourcePaged', 'SharedAccessAuthorizationRuleResourcePaged', 'NotificationHubResourcePaged', diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential.py index 3d06c0e26e9e..de14a2dff39b 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential.py @@ -29,7 +29,8 @@ class AdmCredential(Model): 'auth_token_url': {'key': 'properties.authTokenUrl', 'type': 'str'}, } - def __init__(self, client_id=None, client_secret=None, auth_token_url=None): - self.client_id = client_id - self.client_secret = client_secret - self.auth_token_url = auth_token_url + def __init__(self, **kwargs): + super(AdmCredential, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + self.auth_token_url = kwargs.get('auth_token_url', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential_py3.py new file mode 100644 index 000000000000..eccb8b0f07ca --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AdmCredential(Model): + """Description of a NotificationHub AdmCredential. + + :param client_id: The client identifier. + :type client_id: str + :param client_secret: The credential secret access key. + :type client_secret: str + :param auth_token_url: The URL of the authorization token. + :type auth_token_url: str + """ + + _attribute_map = { + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + 'auth_token_url': {'key': 'properties.authTokenUrl', 'type': 'str'}, + } + + def __init__(self, *, client_id: str=None, client_secret: str=None, auth_token_url: str=None, **kwargs) -> None: + super(AdmCredential, self).__init__(**kwargs) + self.client_id = client_id + self.client_secret = client_secret + self.auth_token_url = auth_token_url diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential.py index 2832b2385635..823a6dd3ec2d 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential.py @@ -47,12 +47,13 @@ class ApnsCredential(Model): 'token': {'key': 'properties.token', 'type': 'str'}, } - def __init__(self, apns_certificate=None, certificate_key=None, endpoint=None, thumbprint=None, key_id=None, app_name=None, app_id=None, token=None): - self.apns_certificate = apns_certificate - self.certificate_key = certificate_key - self.endpoint = endpoint - self.thumbprint = thumbprint - self.key_id = key_id - self.app_name = app_name - self.app_id = app_id - self.token = token + def __init__(self, **kwargs): + super(ApnsCredential, self).__init__(**kwargs) + self.apns_certificate = kwargs.get('apns_certificate', None) + self.certificate_key = kwargs.get('certificate_key', None) + self.endpoint = kwargs.get('endpoint', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.key_id = kwargs.get('key_id', None) + self.app_name = kwargs.get('app_name', None) + self.app_id = kwargs.get('app_id', None) + self.token = kwargs.get('token', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential_py3.py new file mode 100644 index 000000000000..295a024f5eb2 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApnsCredential(Model): + """Description of a NotificationHub ApnsCredential. + + :param apns_certificate: The APNS certificate. + :type apns_certificate: str + :param certificate_key: The certificate key. + :type certificate_key: str + :param endpoint: The endpoint of this credential. + :type endpoint: str + :param thumbprint: The Apns certificate Thumbprint + :type thumbprint: str + :param key_id: A 10-character key identifier (kid) key, obtained from your + developer account + :type key_id: str + :param app_name: The name of the application + :type app_name: str + :param app_id: The issuer (iss) registered claim key, whose value is your + 10-character Team ID, obtained from your developer account + :type app_id: str + :param token: Provider Authentication Token, obtained through your + developer account + :type token: str + """ + + _attribute_map = { + 'apns_certificate': {'key': 'properties.apnsCertificate', 'type': 'str'}, + 'certificate_key': {'key': 'properties.certificateKey', 'type': 'str'}, + 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'key_id': {'key': 'properties.keyId', 'type': 'str'}, + 'app_name': {'key': 'properties.appName', 'type': 'str'}, + 'app_id': {'key': 'properties.appId', 'type': 'str'}, + 'token': {'key': 'properties.token', 'type': 'str'}, + } + + def __init__(self, *, apns_certificate: str=None, certificate_key: str=None, endpoint: str=None, thumbprint: str=None, key_id: str=None, app_name: str=None, app_id: str=None, token: str=None, **kwargs) -> None: + super(ApnsCredential, self).__init__(**kwargs) + self.apns_certificate = apns_certificate + self.certificate_key = certificate_key + self.endpoint = endpoint + self.thumbprint = thumbprint + self.key_id = key_id + self.app_name = app_name + self.app_id = app_id + self.token = token diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential.py index 668631f8d4f2..e43621a5307b 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential.py @@ -29,7 +29,8 @@ class BaiduCredential(Model): 'baidu_secret_key': {'key': 'properties.baiduSecretKey', 'type': 'str'}, } - def __init__(self, baidu_api_key=None, baidu_end_point=None, baidu_secret_key=None): - self.baidu_api_key = baidu_api_key - self.baidu_end_point = baidu_end_point - self.baidu_secret_key = baidu_secret_key + def __init__(self, **kwargs): + super(BaiduCredential, self).__init__(**kwargs) + self.baidu_api_key = kwargs.get('baidu_api_key', None) + self.baidu_end_point = kwargs.get('baidu_end_point', None) + self.baidu_secret_key = kwargs.get('baidu_secret_key', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential_py3.py new file mode 100644 index 000000000000..97d634443cbb --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BaiduCredential(Model): + """Description of a NotificationHub BaiduCredential. + + :param baidu_api_key: Baidu Api Key. + :type baidu_api_key: str + :param baidu_end_point: Baidu Endpoint. + :type baidu_end_point: str + :param baidu_secret_key: Baidu Secret Key + :type baidu_secret_key: str + """ + + _attribute_map = { + 'baidu_api_key': {'key': 'properties.baiduApiKey', 'type': 'str'}, + 'baidu_end_point': {'key': 'properties.baiduEndPoint', 'type': 'str'}, + 'baidu_secret_key': {'key': 'properties.baiduSecretKey', 'type': 'str'}, + } + + def __init__(self, *, baidu_api_key: str=None, baidu_end_point: str=None, baidu_secret_key: str=None, **kwargs) -> None: + super(BaiduCredential, self).__init__(**kwargs) + self.baidu_api_key = baidu_api_key + self.baidu_end_point = baidu_end_point + self.baidu_secret_key = baidu_secret_key diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters.py index 2e1604aafba2..3ed36a8e0bf3 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters.py @@ -19,18 +19,20 @@ class CheckAvailabilityParameters(Model): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Resource Id :vartype id: str - :param name: Resource name + :param name: Required. Resource name :type name: str :ivar type: Resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :param is_availiable: True if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false. :type is_availiable: bool @@ -53,11 +55,12 @@ class CheckAvailabilityParameters(Model): 'is_availiable': {'key': 'isAvailiable', 'type': 'bool'}, } - def __init__(self, name, location, tags=None, sku=None, is_availiable=None): + def __init__(self, **kwargs): + super(CheckAvailabilityParameters, self).__init__(**kwargs) self.id = None - self.name = name + self.name = kwargs.get('name', None) self.type = None - self.location = location - self.tags = tags - self.sku = sku - self.is_availiable = is_availiable + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.is_availiable = kwargs.get('is_availiable', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters_py3.py new file mode 100644 index 000000000000..9913fc3c1b0b --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckAvailabilityParameters(Model): + """Parameters supplied to the Check Name Availability for Namespace and + NotificationHubs. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :param name: Required. Resource name + :type name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param is_availiable: True if the name is available and can be used to + create new Namespace/NotificationHub. Otherwise false. + :type is_availiable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'required': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'is_availiable': {'key': 'isAvailiable', 'type': 'bool'}, + } + + def __init__(self, *, name: str, location: str, tags=None, sku=None, is_availiable: bool=None, **kwargs) -> None: + super(CheckAvailabilityParameters, self).__init__(**kwargs) + self.id = None + self.name = name + self.type = None + self.location = location + self.tags = tags + self.sku = sku + self.is_availiable = is_availiable diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result.py index a759ce71f7bd..8ad9a11c440b 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result.py @@ -27,9 +27,9 @@ class CheckAvailabilityResult(Resource): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :param is_availiable: True if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false. :type is_availiable: bool @@ -39,7 +39,6 @@ class CheckAvailabilityResult(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, } _attribute_map = { @@ -52,6 +51,6 @@ class CheckAvailabilityResult(Resource): 'is_availiable': {'key': 'isAvailiable', 'type': 'bool'}, } - def __init__(self, location, tags=None, sku=None, is_availiable=None): - super(CheckAvailabilityResult, self).__init__(location=location, tags=tags, sku=sku) - self.is_availiable = is_availiable + def __init__(self, **kwargs): + super(CheckAvailabilityResult, self).__init__(**kwargs) + self.is_availiable = kwargs.get('is_availiable', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result_py3.py new file mode 100644 index 000000000000..64e1ab2ad7de --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class CheckAvailabilityResult(Resource): + """Description of a CheckAvailibility resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param is_availiable: True if the name is available and can be used to + create new Namespace/NotificationHub. Otherwise false. + :type is_availiable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'is_availiable': {'key': 'isAvailiable', 'type': 'bool'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, is_availiable: bool=None, **kwargs) -> None: + super(CheckAvailabilityResult, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.is_availiable = is_availiable diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_name_availability_response.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_name_availability_response.py deleted file mode 100644 index 40cf42202048..000000000000 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_name_availability_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityResponse(Model): - """CheckNameAvailabilityResponse. - - :param name_available: Checks if the namespace name is available - :type name_available: bool - :param reason: States the reason due to which the namespace name is not - available - :type reason: str - :param message: The messsage returned when checking for namespace name - availability - :type message: str - """ - - _attribute_map = { - 'name_available': {'key': 'NameAvailable', 'type': 'bool'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - 'message': {'key': 'Message', 'type': 'str'}, - } - - def __init__(self, name_available=None, reason=None, message=None): - self.name_available = name_available - self.reason = reason - self.message = message diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response.py new file mode 100644 index 000000000000..6d7907d66fd4 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error reponse indicates NotificationHubs service is not able to process the + incoming request. The reason is provided in the error message. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response_py3.py new file mode 100644 index 000000000000..22530f8dc898 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error reponse indicates NotificationHubs service is not able to process the + incoming request. The reason is provided in the error message. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential.py index 83df4fe01316..e7567286c25d 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential.py @@ -26,6 +26,7 @@ class GcmCredential(Model): 'google_api_key': {'key': 'properties.googleApiKey', 'type': 'str'}, } - def __init__(self, gcm_endpoint=None, google_api_key=None): - self.gcm_endpoint = gcm_endpoint - self.google_api_key = google_api_key + def __init__(self, **kwargs): + super(GcmCredential, self).__init__(**kwargs) + self.gcm_endpoint = kwargs.get('gcm_endpoint', None) + self.google_api_key = kwargs.get('google_api_key', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential_py3.py new file mode 100644 index 000000000000..a9f09bfd7a58 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GcmCredential(Model): + """Description of a NotificationHub GcmCredential. + + :param gcm_endpoint: The GCM endpoint. + :type gcm_endpoint: str + :param google_api_key: The Google API key. + :type google_api_key: str + """ + + _attribute_map = { + 'gcm_endpoint': {'key': 'properties.gcmEndpoint', 'type': 'str'}, + 'google_api_key': {'key': 'properties.googleApiKey', 'type': 'str'}, + } + + def __init__(self, *, gcm_endpoint: str=None, google_api_key: str=None, **kwargs) -> None: + super(GcmCredential, self).__init__(**kwargs) + self.gcm_endpoint = gcm_endpoint + self.google_api_key = google_api_key diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential.py index 133ac5287a5c..95ff2e76a3f5 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential.py @@ -29,7 +29,8 @@ class MpnsCredential(Model): 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, } - def __init__(self, mpns_certificate=None, certificate_key=None, thumbprint=None): - self.mpns_certificate = mpns_certificate - self.certificate_key = certificate_key - self.thumbprint = thumbprint + def __init__(self, **kwargs): + super(MpnsCredential, self).__init__(**kwargs) + self.mpns_certificate = kwargs.get('mpns_certificate', None) + self.certificate_key = kwargs.get('certificate_key', None) + self.thumbprint = kwargs.get('thumbprint', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential_py3.py new file mode 100644 index 000000000000..a1d2da085167 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MpnsCredential(Model): + """Description of a NotificationHub MpnsCredential. + + :param mpns_certificate: The MPNS certificate. + :type mpns_certificate: str + :param certificate_key: The certificate key for this credential. + :type certificate_key: str + :param thumbprint: The Mpns certificate Thumbprint + :type thumbprint: str + """ + + _attribute_map = { + 'mpns_certificate': {'key': 'properties.mpnsCertificate', 'type': 'str'}, + 'certificate_key': {'key': 'properties.certificateKey', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, mpns_certificate: str=None, certificate_key: str=None, thumbprint: str=None, **kwargs) -> None: + super(MpnsCredential, self).__init__(**kwargs) + self.mpns_certificate = mpns_certificate + self.certificate_key = certificate_key + self.thumbprint = thumbprint diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters.py index cbc9efd9298b..4e7ebeb7beb4 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters.py @@ -27,9 +27,9 @@ class NamespaceCreateOrUpdateParameters(Resource): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :param namespace_create_or_update_parameters_name: The name of the namespace. :type namespace_create_or_update_parameters_name: str @@ -41,11 +41,15 @@ class NamespaceCreateOrUpdateParameters(Resource): USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth EuropeWest Europe :type region: str + :ivar metric_id: Identifier for Azure Insights metrics + :vartype metric_id: str :param status: Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting :type status: str :param created_at: The time the namespace was created. :type created_at: datetime + :param updated_at: The time the namespace was updated. + :type updated_at: datetime :param service_bus_endpoint: Endpoint you can use to perform NotificationHub operations. :type service_bus_endpoint: str @@ -58,17 +62,19 @@ class NamespaceCreateOrUpdateParameters(Resource): :type enabled: bool :param critical: Whether or not the namespace is set as Critical. :type critical: bool + :param data_center: Data center for the namespace + :type data_center: str :param namespace_type: The namespace type. Possible values include: 'Messaging', 'NotificationHub' - :type namespace_type: str or :class:`NamespaceType - ` + :type namespace_type: str or + ~azure.mgmt.notificationhubs.models.NamespaceType """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, + 'metric_id': {'readonly': True}, } _attribute_map = { @@ -81,26 +87,32 @@ class NamespaceCreateOrUpdateParameters(Resource): 'namespace_create_or_update_parameters_name': {'key': 'properties.name', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'region': {'key': 'properties.region', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, 'scale_unit': {'key': 'properties.scaleUnit', 'type': 'str'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'critical': {'key': 'properties.critical', 'type': 'bool'}, + 'data_center': {'key': 'properties.dataCenter', 'type': 'str'}, 'namespace_type': {'key': 'properties.namespaceType', 'type': 'NamespaceType'}, } - def __init__(self, location, tags=None, sku=None, namespace_create_or_update_parameters_name=None, provisioning_state=None, region=None, status=None, created_at=None, service_bus_endpoint=None, subscription_id=None, scale_unit=None, enabled=None, critical=None, namespace_type=None): - super(NamespaceCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku) - self.namespace_create_or_update_parameters_name = namespace_create_or_update_parameters_name - self.provisioning_state = provisioning_state - self.region = region - self.status = status - self.created_at = created_at - self.service_bus_endpoint = service_bus_endpoint - self.subscription_id = subscription_id - self.scale_unit = scale_unit - self.enabled = enabled - self.critical = critical - self.namespace_type = namespace_type + def __init__(self, **kwargs): + super(NamespaceCreateOrUpdateParameters, self).__init__(**kwargs) + self.namespace_create_or_update_parameters_name = kwargs.get('namespace_create_or_update_parameters_name', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.region = kwargs.get('region', None) + self.metric_id = None + self.status = kwargs.get('status', None) + self.created_at = kwargs.get('created_at', None) + self.updated_at = kwargs.get('updated_at', None) + self.service_bus_endpoint = kwargs.get('service_bus_endpoint', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.scale_unit = kwargs.get('scale_unit', None) + self.enabled = kwargs.get('enabled', None) + self.critical = kwargs.get('critical', None) + self.data_center = kwargs.get('data_center', None) + self.namespace_type = kwargs.get('namespace_type', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..f851a4d3507d --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters_py3.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class NamespaceCreateOrUpdateParameters(Resource): + """Parameters supplied to the CreateOrUpdate Namespace operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param namespace_create_or_update_parameters_name: The name of the + namespace. + :type namespace_create_or_update_parameters_name: str + :param provisioning_state: Provisioning state of the Namespace. + :type provisioning_state: str + :param region: Specifies the targeted region in which the namespace should + be created. It can be any of the following values: Australia EastAustralia + SoutheastCentral USEast USEast US 2West USNorth Central USSouth Central + USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth EuropeWest + Europe + :type region: str + :ivar metric_id: Identifier for Azure Insights metrics + :vartype metric_id: str + :param status: Status of the namespace. It can be any of these values:1 = + Created/Active2 = Creating3 = Suspended4 = Deleting + :type status: str + :param created_at: The time the namespace was created. + :type created_at: datetime + :param updated_at: The time the namespace was updated. + :type updated_at: datetime + :param service_bus_endpoint: Endpoint you can use to perform + NotificationHub operations. + :type service_bus_endpoint: str + :param subscription_id: The Id of the Azure subscription associated with + the namespace. + :type subscription_id: str + :param scale_unit: ScaleUnit where the namespace gets created + :type scale_unit: str + :param enabled: Whether or not the namespace is currently enabled. + :type enabled: bool + :param critical: Whether or not the namespace is set as Critical. + :type critical: bool + :param data_center: Data center for the namespace + :type data_center: str + :param namespace_type: The namespace type. Possible values include: + 'Messaging', 'NotificationHub' + :type namespace_type: str or + ~azure.mgmt.notificationhubs.models.NamespaceType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metric_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'namespace_create_or_update_parameters_name': {'key': 'properties.name', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'region': {'key': 'properties.region', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'scale_unit': {'key': 'properties.scaleUnit', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'critical': {'key': 'properties.critical', 'type': 'bool'}, + 'data_center': {'key': 'properties.dataCenter', 'type': 'str'}, + 'namespace_type': {'key': 'properties.namespaceType', 'type': 'NamespaceType'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, namespace_create_or_update_parameters_name: str=None, provisioning_state: str=None, region: str=None, status: str=None, created_at=None, updated_at=None, service_bus_endpoint: str=None, subscription_id: str=None, scale_unit: str=None, enabled: bool=None, critical: bool=None, data_center: str=None, namespace_type=None, **kwargs) -> None: + super(NamespaceCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.namespace_create_or_update_parameters_name = namespace_create_or_update_parameters_name + self.provisioning_state = provisioning_state + self.region = region + self.metric_id = None + self.status = status + self.created_at = created_at + self.updated_at = updated_at + self.service_bus_endpoint = service_bus_endpoint + self.subscription_id = subscription_id + self.scale_unit = scale_unit + self.enabled = enabled + self.critical = critical + self.data_center = data_center + self.namespace_type = namespace_type diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters.py index 9a523c84ceed..f75f66bd3b55 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters.py @@ -16,9 +16,9 @@ class NamespacePatchParameters(Model): """Parameters supplied to the Patch Namespace operation. :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku """ _attribute_map = { @@ -26,6 +26,7 @@ class NamespacePatchParameters(Model): 'sku': {'key': 'sku', 'type': 'Sku'}, } - def __init__(self, tags=None, sku=None): - self.tags = tags - self.sku = sku + def __init__(self, **kwargs): + super(NamespacePatchParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters_py3.py new file mode 100644 index 000000000000..d7b1b8473e75 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NamespacePatchParameters(Model): + """Parameters supplied to the Patch Namespace operation. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, tags=None, sku=None, **kwargs) -> None: + super(NamespacePatchParameters, self).__init__(**kwargs) + self.tags = tags + self.sku = sku diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource.py index 93eb3b0ee4e8..0014bd7600ec 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource.py @@ -27,9 +27,9 @@ class NamespaceResource(Resource): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :param namespace_resource_name: The name of the namespace. :type namespace_resource_name: str :param provisioning_state: Provisioning state of the Namespace. @@ -40,11 +40,15 @@ class NamespaceResource(Resource): USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth EuropeWest Europe :type region: str + :ivar metric_id: Identifier for Azure Insights metrics + :vartype metric_id: str :param status: Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting :type status: str :param created_at: The time the namespace was created. :type created_at: datetime + :param updated_at: The time the namespace was updated. + :type updated_at: datetime :param service_bus_endpoint: Endpoint you can use to perform NotificationHub operations. :type service_bus_endpoint: str @@ -57,17 +61,19 @@ class NamespaceResource(Resource): :type enabled: bool :param critical: Whether or not the namespace is set as Critical. :type critical: bool + :param data_center: Data center for the namespace + :type data_center: str :param namespace_type: The namespace type. Possible values include: 'Messaging', 'NotificationHub' - :type namespace_type: str or :class:`NamespaceType - ` + :type namespace_type: str or + ~azure.mgmt.notificationhubs.models.NamespaceType """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, + 'metric_id': {'readonly': True}, } _attribute_map = { @@ -80,26 +86,32 @@ class NamespaceResource(Resource): 'namespace_resource_name': {'key': 'properties.name', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'region': {'key': 'properties.region', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, 'scale_unit': {'key': 'properties.scaleUnit', 'type': 'str'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'critical': {'key': 'properties.critical', 'type': 'bool'}, + 'data_center': {'key': 'properties.dataCenter', 'type': 'str'}, 'namespace_type': {'key': 'properties.namespaceType', 'type': 'NamespaceType'}, } - def __init__(self, location, tags=None, sku=None, namespace_resource_name=None, provisioning_state=None, region=None, status=None, created_at=None, service_bus_endpoint=None, subscription_id=None, scale_unit=None, enabled=None, critical=None, namespace_type=None): - super(NamespaceResource, self).__init__(location=location, tags=tags, sku=sku) - self.namespace_resource_name = namespace_resource_name - self.provisioning_state = provisioning_state - self.region = region - self.status = status - self.created_at = created_at - self.service_bus_endpoint = service_bus_endpoint - self.subscription_id = subscription_id - self.scale_unit = scale_unit - self.enabled = enabled - self.critical = critical - self.namespace_type = namespace_type + def __init__(self, **kwargs): + super(NamespaceResource, self).__init__(**kwargs) + self.namespace_resource_name = kwargs.get('namespace_resource_name', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.region = kwargs.get('region', None) + self.metric_id = None + self.status = kwargs.get('status', None) + self.created_at = kwargs.get('created_at', None) + self.updated_at = kwargs.get('updated_at', None) + self.service_bus_endpoint = kwargs.get('service_bus_endpoint', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.scale_unit = kwargs.get('scale_unit', None) + self.enabled = kwargs.get('enabled', None) + self.critical = kwargs.get('critical', None) + self.data_center = kwargs.get('data_center', None) + self.namespace_type = kwargs.get('namespace_type', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_paged.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_paged.py index 0ded738bc09c..3cab77ffaf99 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_paged.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_paged.py @@ -14,7 +14,7 @@ class NamespaceResourcePaged(Paged): """ - A paging container for iterating over a list of NamespaceResource object + A paging container for iterating over a list of :class:`NamespaceResource ` object """ _attribute_map = { diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_py3.py new file mode 100644 index 000000000000..bbd58e897f9e --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_py3.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class NamespaceResource(Resource): + """Description of a Namespace resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param namespace_resource_name: The name of the namespace. + :type namespace_resource_name: str + :param provisioning_state: Provisioning state of the Namespace. + :type provisioning_state: str + :param region: Specifies the targeted region in which the namespace should + be created. It can be any of the following values: Australia EastAustralia + SoutheastCentral USEast USEast US 2West USNorth Central USSouth Central + USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth EuropeWest + Europe + :type region: str + :ivar metric_id: Identifier for Azure Insights metrics + :vartype metric_id: str + :param status: Status of the namespace. It can be any of these values:1 = + Created/Active2 = Creating3 = Suspended4 = Deleting + :type status: str + :param created_at: The time the namespace was created. + :type created_at: datetime + :param updated_at: The time the namespace was updated. + :type updated_at: datetime + :param service_bus_endpoint: Endpoint you can use to perform + NotificationHub operations. + :type service_bus_endpoint: str + :param subscription_id: The Id of the Azure subscription associated with + the namespace. + :type subscription_id: str + :param scale_unit: ScaleUnit where the namespace gets created + :type scale_unit: str + :param enabled: Whether or not the namespace is currently enabled. + :type enabled: bool + :param critical: Whether or not the namespace is set as Critical. + :type critical: bool + :param data_center: Data center for the namespace + :type data_center: str + :param namespace_type: The namespace type. Possible values include: + 'Messaging', 'NotificationHub' + :type namespace_type: str or + ~azure.mgmt.notificationhubs.models.NamespaceType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metric_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'namespace_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'region': {'key': 'properties.region', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'scale_unit': {'key': 'properties.scaleUnit', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'critical': {'key': 'properties.critical', 'type': 'bool'}, + 'data_center': {'key': 'properties.dataCenter', 'type': 'str'}, + 'namespace_type': {'key': 'properties.namespaceType', 'type': 'NamespaceType'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, namespace_resource_name: str=None, provisioning_state: str=None, region: str=None, status: str=None, created_at=None, updated_at=None, service_bus_endpoint: str=None, subscription_id: str=None, scale_unit: str=None, enabled: bool=None, critical: bool=None, data_center: str=None, namespace_type=None, **kwargs) -> None: + super(NamespaceResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.namespace_resource_name = namespace_resource_name + self.provisioning_state = provisioning_state + self.region = region + self.metric_id = None + self.status = status + self.created_at = created_at + self.updated_at = updated_at + self.service_bus_endpoint = service_bus_endpoint + self.subscription_id = subscription_id + self.scale_unit = scale_unit + self.enabled = enabled + self.critical = critical + self.data_center = data_center + self.namespace_type = namespace_type diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters.py index 306984aa11b4..e82f1174d70a 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters.py @@ -27,9 +27,9 @@ class NotificationHubCreateOrUpdateParameters(Resource): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :param notification_hub_create_or_update_parameters_name: The NotificationHub name. :type notification_hub_create_or_update_parameters_name: str @@ -38,35 +38,28 @@ class NotificationHubCreateOrUpdateParameters(Resource): :type registration_ttl: str :param authorization_rules: The AuthorizationRules of the created NotificationHub - :type authorization_rules: list of - :class:`SharedAccessAuthorizationRuleProperties - ` + :type authorization_rules: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] :param apns_credential: The ApnsCredential of the created NotificationHub - :type apns_credential: :class:`ApnsCredential - ` + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential :param wns_credential: The WnsCredential of the created NotificationHub - :type wns_credential: :class:`WnsCredential - ` + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential :param gcm_credential: The GcmCredential of the created NotificationHub - :type gcm_credential: :class:`GcmCredential - ` + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential :param mpns_credential: The MpnsCredential of the created NotificationHub - :type mpns_credential: :class:`MpnsCredential - ` + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential :param adm_credential: The AdmCredential of the created NotificationHub - :type adm_credential: :class:`AdmCredential - ` + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential :param baidu_credential: The BaiduCredential of the created NotificationHub - :type baidu_credential: :class:`BaiduCredential - ` + :type baidu_credential: + ~azure.mgmt.notificationhubs.models.BaiduCredential """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, } _attribute_map = { @@ -87,14 +80,14 @@ class NotificationHubCreateOrUpdateParameters(Resource): 'baidu_credential': {'key': 'properties.baiduCredential', 'type': 'BaiduCredential'}, } - def __init__(self, location, tags=None, sku=None, notification_hub_create_or_update_parameters_name=None, registration_ttl=None, authorization_rules=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None): - super(NotificationHubCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku) - self.notification_hub_create_or_update_parameters_name = notification_hub_create_or_update_parameters_name - self.registration_ttl = registration_ttl - self.authorization_rules = authorization_rules - self.apns_credential = apns_credential - self.wns_credential = wns_credential - self.gcm_credential = gcm_credential - self.mpns_credential = mpns_credential - self.adm_credential = adm_credential - self.baidu_credential = baidu_credential + def __init__(self, **kwargs): + super(NotificationHubCreateOrUpdateParameters, self).__init__(**kwargs) + self.notification_hub_create_or_update_parameters_name = kwargs.get('notification_hub_create_or_update_parameters_name', None) + self.registration_ttl = kwargs.get('registration_ttl', None) + self.authorization_rules = kwargs.get('authorization_rules', None) + self.apns_credential = kwargs.get('apns_credential', None) + self.wns_credential = kwargs.get('wns_credential', None) + self.gcm_credential = kwargs.get('gcm_credential', None) + self.mpns_credential = kwargs.get('mpns_credential', None) + self.adm_credential = kwargs.get('adm_credential', None) + self.baidu_credential = kwargs.get('baidu_credential', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..7b97c00d588f --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters_py3.py @@ -0,0 +1,93 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class NotificationHubCreateOrUpdateParameters(Resource): + """Parameters supplied to the CreateOrUpdate NotificationHub operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param notification_hub_create_or_update_parameters_name: The + NotificationHub name. + :type notification_hub_create_or_update_parameters_name: str + :param registration_ttl: The RegistrationTtl of the created + NotificationHub + :type registration_ttl: str + :param authorization_rules: The AuthorizationRules of the created + NotificationHub + :type authorization_rules: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] + :param apns_credential: The ApnsCredential of the created NotificationHub + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential + :param wns_credential: The WnsCredential of the created NotificationHub + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential + :param gcm_credential: The GcmCredential of the created NotificationHub + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential + :param mpns_credential: The MpnsCredential of the created NotificationHub + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential + :param adm_credential: The AdmCredential of the created NotificationHub + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential + :param baidu_credential: The BaiduCredential of the created + NotificationHub + :type baidu_credential: + ~azure.mgmt.notificationhubs.models.BaiduCredential + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'notification_hub_create_or_update_parameters_name': {'key': 'properties.name', 'type': 'str'}, + 'registration_ttl': {'key': 'properties.registrationTtl', 'type': 'str'}, + 'authorization_rules': {'key': 'properties.authorizationRules', 'type': '[SharedAccessAuthorizationRuleProperties]'}, + 'apns_credential': {'key': 'properties.apnsCredential', 'type': 'ApnsCredential'}, + 'wns_credential': {'key': 'properties.wnsCredential', 'type': 'WnsCredential'}, + 'gcm_credential': {'key': 'properties.gcmCredential', 'type': 'GcmCredential'}, + 'mpns_credential': {'key': 'properties.mpnsCredential', 'type': 'MpnsCredential'}, + 'adm_credential': {'key': 'properties.admCredential', 'type': 'AdmCredential'}, + 'baidu_credential': {'key': 'properties.baiduCredential', 'type': 'BaiduCredential'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, notification_hub_create_or_update_parameters_name: str=None, registration_ttl: str=None, authorization_rules=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None, **kwargs) -> None: + super(NotificationHubCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.notification_hub_create_or_update_parameters_name = notification_hub_create_or_update_parameters_name + self.registration_ttl = registration_ttl + self.authorization_rules = authorization_rules + self.apns_credential = apns_credential + self.wns_credential = wns_credential + self.gcm_credential = gcm_credential + self.mpns_credential = mpns_credential + self.adm_credential = adm_credential + self.baidu_credential = baidu_credential diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource.py index 233af3f8bce2..388cf54b763a 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource.py @@ -27,9 +27,9 @@ class NotificationHubResource(Resource): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :param notification_hub_resource_name: The NotificationHub name. :type notification_hub_resource_name: str :param registration_ttl: The RegistrationTtl of the created @@ -37,35 +37,28 @@ class NotificationHubResource(Resource): :type registration_ttl: str :param authorization_rules: The AuthorizationRules of the created NotificationHub - :type authorization_rules: list of - :class:`SharedAccessAuthorizationRuleProperties - ` + :type authorization_rules: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] :param apns_credential: The ApnsCredential of the created NotificationHub - :type apns_credential: :class:`ApnsCredential - ` + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential :param wns_credential: The WnsCredential of the created NotificationHub - :type wns_credential: :class:`WnsCredential - ` + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential :param gcm_credential: The GcmCredential of the created NotificationHub - :type gcm_credential: :class:`GcmCredential - ` + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential :param mpns_credential: The MpnsCredential of the created NotificationHub - :type mpns_credential: :class:`MpnsCredential - ` + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential :param adm_credential: The AdmCredential of the created NotificationHub - :type adm_credential: :class:`AdmCredential - ` + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential :param baidu_credential: The BaiduCredential of the created NotificationHub - :type baidu_credential: :class:`BaiduCredential - ` + :type baidu_credential: + ~azure.mgmt.notificationhubs.models.BaiduCredential """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, } _attribute_map = { @@ -86,14 +79,14 @@ class NotificationHubResource(Resource): 'baidu_credential': {'key': 'properties.baiduCredential', 'type': 'BaiduCredential'}, } - def __init__(self, location, tags=None, sku=None, notification_hub_resource_name=None, registration_ttl=None, authorization_rules=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None): - super(NotificationHubResource, self).__init__(location=location, tags=tags, sku=sku) - self.notification_hub_resource_name = notification_hub_resource_name - self.registration_ttl = registration_ttl - self.authorization_rules = authorization_rules - self.apns_credential = apns_credential - self.wns_credential = wns_credential - self.gcm_credential = gcm_credential - self.mpns_credential = mpns_credential - self.adm_credential = adm_credential - self.baidu_credential = baidu_credential + def __init__(self, **kwargs): + super(NotificationHubResource, self).__init__(**kwargs) + self.notification_hub_resource_name = kwargs.get('notification_hub_resource_name', None) + self.registration_ttl = kwargs.get('registration_ttl', None) + self.authorization_rules = kwargs.get('authorization_rules', None) + self.apns_credential = kwargs.get('apns_credential', None) + self.wns_credential = kwargs.get('wns_credential', None) + self.gcm_credential = kwargs.get('gcm_credential', None) + self.mpns_credential = kwargs.get('mpns_credential', None) + self.adm_credential = kwargs.get('adm_credential', None) + self.baidu_credential = kwargs.get('baidu_credential', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_paged.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_paged.py index 819adbfbd274..8ed446880895 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_paged.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_paged.py @@ -14,7 +14,7 @@ class NotificationHubResourcePaged(Paged): """ - A paging container for iterating over a list of NotificationHubResource object + A paging container for iterating over a list of :class:`NotificationHubResource ` object """ _attribute_map = { diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_py3.py new file mode 100644 index 000000000000..d59ebe406ca3 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_py3.py @@ -0,0 +1,92 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class NotificationHubResource(Resource): + """Description of a NotificationHub Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param notification_hub_resource_name: The NotificationHub name. + :type notification_hub_resource_name: str + :param registration_ttl: The RegistrationTtl of the created + NotificationHub + :type registration_ttl: str + :param authorization_rules: The AuthorizationRules of the created + NotificationHub + :type authorization_rules: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] + :param apns_credential: The ApnsCredential of the created NotificationHub + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential + :param wns_credential: The WnsCredential of the created NotificationHub + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential + :param gcm_credential: The GcmCredential of the created NotificationHub + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential + :param mpns_credential: The MpnsCredential of the created NotificationHub + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential + :param adm_credential: The AdmCredential of the created NotificationHub + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential + :param baidu_credential: The BaiduCredential of the created + NotificationHub + :type baidu_credential: + ~azure.mgmt.notificationhubs.models.BaiduCredential + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'notification_hub_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'registration_ttl': {'key': 'properties.registrationTtl', 'type': 'str'}, + 'authorization_rules': {'key': 'properties.authorizationRules', 'type': '[SharedAccessAuthorizationRuleProperties]'}, + 'apns_credential': {'key': 'properties.apnsCredential', 'type': 'ApnsCredential'}, + 'wns_credential': {'key': 'properties.wnsCredential', 'type': 'WnsCredential'}, + 'gcm_credential': {'key': 'properties.gcmCredential', 'type': 'GcmCredential'}, + 'mpns_credential': {'key': 'properties.mpnsCredential', 'type': 'MpnsCredential'}, + 'adm_credential': {'key': 'properties.admCredential', 'type': 'AdmCredential'}, + 'baidu_credential': {'key': 'properties.baiduCredential', 'type': 'BaiduCredential'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, notification_hub_resource_name: str=None, registration_ttl: str=None, authorization_rules=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None, **kwargs) -> None: + super(NotificationHubResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.notification_hub_resource_name = notification_hub_resource_name + self.registration_ttl = registration_ttl + self.authorization_rules = authorization_rules + self.apns_credential = apns_credential + self.wns_credential = wns_credential + self.gcm_credential = gcm_credential + self.mpns_credential = mpns_credential + self.adm_credential = adm_credential + self.baidu_credential = baidu_credential diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hubs_management_client_enums.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hubs_management_client_enums.py index 22f7e592f2a4..f97b28ab81f5 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hubs_management_client_enums.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hubs_management_client_enums.py @@ -12,20 +12,20 @@ from enum import Enum -class SkuName(Enum): +class SkuName(str, Enum): free = "Free" basic = "Basic" standard = "Standard" -class NamespaceType(Enum): +class NamespaceType(str, Enum): messaging = "Messaging" notification_hub = "NotificationHub" -class AccessRights(Enum): +class AccessRights(str, Enum): manage = "Manage" send = "Send" diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation.py new file mode 100644 index 000000000000..56c433b420ba --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """A NotificationHubs REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation} + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.notificationhubs.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display.py new file mode 100644 index 000000000000..1a0166fb286b --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.NotificationHubs + :vartype provider: str + :ivar resource: Resource on which the operation is performed: Invoice, + etc. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display_py3.py new file mode 100644 index 000000000000..cd9b2cf5306c --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.NotificationHubs + :vartype provider: str + :ivar resource: Resource on which the operation is performed: Invoice, + etc. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_paged.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_paged.py new file mode 100644 index 000000000000..3a2eba438979 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_py3.py new file mode 100644 index 000000000000..be95b7117c54 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """A NotificationHubs REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation} + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.notificationhubs.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource.py index 0e369f63ab8f..9e4a6a1ec3ec 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource.py @@ -27,35 +27,29 @@ class PnsCredentialsResource(Resource): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :param apns_credential: The ApnsCredential of the created NotificationHub - :type apns_credential: :class:`ApnsCredential - ` + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential :param wns_credential: The WnsCredential of the created NotificationHub - :type wns_credential: :class:`WnsCredential - ` + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential :param gcm_credential: The GcmCredential of the created NotificationHub - :type gcm_credential: :class:`GcmCredential - ` + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential :param mpns_credential: The MpnsCredential of the created NotificationHub - :type mpns_credential: :class:`MpnsCredential - ` + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential :param adm_credential: The AdmCredential of the created NotificationHub - :type adm_credential: :class:`AdmCredential - ` + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential :param baidu_credential: The BaiduCredential of the created NotificationHub - :type baidu_credential: :class:`BaiduCredential - ` + :type baidu_credential: + ~azure.mgmt.notificationhubs.models.BaiduCredential """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, } _attribute_map = { @@ -73,11 +67,11 @@ class PnsCredentialsResource(Resource): 'baidu_credential': {'key': 'properties.baiduCredential', 'type': 'BaiduCredential'}, } - def __init__(self, location, tags=None, sku=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None): - super(PnsCredentialsResource, self).__init__(location=location, tags=tags, sku=sku) - self.apns_credential = apns_credential - self.wns_credential = wns_credential - self.gcm_credential = gcm_credential - self.mpns_credential = mpns_credential - self.adm_credential = adm_credential - self.baidu_credential = baidu_credential + def __init__(self, **kwargs): + super(PnsCredentialsResource, self).__init__(**kwargs) + self.apns_credential = kwargs.get('apns_credential', None) + self.wns_credential = kwargs.get('wns_credential', None) + self.gcm_credential = kwargs.get('gcm_credential', None) + self.mpns_credential = kwargs.get('mpns_credential', None) + self.adm_credential = kwargs.get('adm_credential', None) + self.baidu_credential = kwargs.get('baidu_credential', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource_py3.py new file mode 100644 index 000000000000..b15189f06d4a --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource_py3.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class PnsCredentialsResource(Resource): + """Description of a NotificationHub PNS Credentials. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param apns_credential: The ApnsCredential of the created NotificationHub + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential + :param wns_credential: The WnsCredential of the created NotificationHub + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential + :param gcm_credential: The GcmCredential of the created NotificationHub + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential + :param mpns_credential: The MpnsCredential of the created NotificationHub + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential + :param adm_credential: The AdmCredential of the created NotificationHub + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential + :param baidu_credential: The BaiduCredential of the created + NotificationHub + :type baidu_credential: + ~azure.mgmt.notificationhubs.models.BaiduCredential + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'apns_credential': {'key': 'properties.apnsCredential', 'type': 'ApnsCredential'}, + 'wns_credential': {'key': 'properties.wnsCredential', 'type': 'WnsCredential'}, + 'gcm_credential': {'key': 'properties.gcmCredential', 'type': 'GcmCredential'}, + 'mpns_credential': {'key': 'properties.mpnsCredential', 'type': 'MpnsCredential'}, + 'adm_credential': {'key': 'properties.admCredential', 'type': 'AdmCredential'}, + 'baidu_credential': {'key': 'properties.baiduCredential', 'type': 'BaiduCredential'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None, **kwargs) -> None: + super(PnsCredentialsResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.apns_credential = apns_credential + self.wns_credential = wns_credential + self.gcm_credential = gcm_credential + self.mpns_credential = mpns_credential + self.adm_credential = adm_credential + self.baidu_credential = baidu_credential diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource.py index d9b962aa9ecd..af72abe54bd8 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource.py @@ -25,5 +25,6 @@ class PolicykeyResource(Model): 'policy_key': {'key': 'policyKey', 'type': 'str'}, } - def __init__(self, policy_key=None): - self.policy_key = policy_key + def __init__(self, **kwargs): + super(PolicykeyResource, self).__init__(**kwargs) + self.policy_key = kwargs.get('policy_key', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource_py3.py new file mode 100644 index 000000000000..e9c003053af0 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PolicykeyResource(Model): + """Namespace/NotificationHub Regenerate Keys. + + :param policy_key: Name of the key that has to be regenerated for the + Namespace/Notification Hub Authorization Rule. The value can be Primary + Key/Secondary Key. + :type policy_key: str + """ + + _attribute_map = { + 'policy_key': {'key': 'policyKey', 'type': 'str'}, + } + + def __init__(self, *, policy_key: str=None, **kwargs) -> None: + super(PolicykeyResource, self).__init__(**kwargs) + self.policy_key = policy_key diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource.py index 3bdc4969b50b..45dfdd515b7c 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource.py @@ -27,16 +27,15 @@ class Resource(Model): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, } _attribute_map = { @@ -48,10 +47,11 @@ class Resource(Model): 'sku': {'key': 'sku', 'type': 'Sku'}, } - def __init__(self, location, tags=None, sku=None): + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = location - self.tags = tags - self.sku = sku + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys.py index 88e8c44886f9..9ef2a841ab02 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys.py @@ -37,9 +37,10 @@ class ResourceListKeys(Model): 'key_name': {'key': 'keyName', 'type': 'str'}, } - def __init__(self, primary_connection_string=None, secondary_connection_string=None, primary_key=None, secondary_key=None, key_name=None): - self.primary_connection_string = primary_connection_string - self.secondary_connection_string = secondary_connection_string - self.primary_key = primary_key - self.secondary_key = secondary_key - self.key_name = key_name + def __init__(self, **kwargs): + super(ResourceListKeys, self).__init__(**kwargs) + self.primary_connection_string = kwargs.get('primary_connection_string', None) + self.secondary_connection_string = kwargs.get('secondary_connection_string', None) + self.primary_key = kwargs.get('primary_key', None) + self.secondary_key = kwargs.get('secondary_key', None) + self.key_name = kwargs.get('key_name', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys_py3.py new file mode 100644 index 000000000000..dbdace0ac567 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceListKeys(Model): + """Namespace/NotificationHub Connection String. + + :param primary_connection_string: PrimaryConnectionString of the + AuthorizationRule. + :type primary_connection_string: str + :param secondary_connection_string: SecondaryConnectionString of the + created AuthorizationRule + :type secondary_connection_string: str + :param primary_key: PrimaryKey of the created AuthorizationRule. + :type primary_key: str + :param secondary_key: SecondaryKey of the created AuthorizationRule + :type secondary_key: str + :param key_name: KeyName of the created AuthorizationRule + :type key_name: str + """ + + _attribute_map = { + 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, + 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, *, primary_connection_string: str=None, secondary_connection_string: str=None, primary_key: str=None, secondary_key: str=None, key_name: str=None, **kwargs) -> None: + super(ResourceListKeys, self).__init__(**kwargs) + self.primary_connection_string = primary_connection_string + self.secondary_connection_string = secondary_connection_string + self.primary_key = primary_key + self.secondary_key = secondary_key + self.key_name = key_name diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_py3.py new file mode 100644 index 000000000000..7d5987763ec1 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + self.sku = sku diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters.py index e78d2d18e760..8c3afbcb2483 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters.py @@ -9,50 +9,28 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from msrest.serialization import Model -class SharedAccessAuthorizationRuleCreateOrUpdateParameters(Resource): +class SharedAccessAuthorizationRuleCreateOrUpdateParameters(Model): """Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict - :param sku: The sku of the created namespace - :type sku: :class:`Sku ` - :param properties: Properties of the Namespace AuthorizationRules. - :type properties: :class:`SharedAccessAuthorizationRuleProperties - ` + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Properties of the Namespace + AuthorizationRules. + :type properties: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, 'properties': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, 'properties': {'key': 'properties', 'type': 'SharedAccessAuthorizationRuleProperties'}, } - def __init__(self, location, properties, tags=None, sku=None): - super(SharedAccessAuthorizationRuleCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku) - self.properties = properties + def __init__(self, **kwargs): + super(SharedAccessAuthorizationRuleCreateOrUpdateParameters, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..0d11ff3e2506 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SharedAccessAuthorizationRuleCreateOrUpdateParameters(Model): + """Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules. + + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Properties of the Namespace + AuthorizationRules. + :type properties: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties + """ + + _validation = { + 'properties': {'required': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'SharedAccessAuthorizationRuleProperties'}, + } + + def __init__(self, *, properties, **kwargs) -> None: + super(SharedAccessAuthorizationRuleCreateOrUpdateParameters, self).__init__(**kwargs) + self.properties = properties diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result.py new file mode 100644 index 000000000000..ccefda05d86a --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SharedAccessAuthorizationRuleListResult(Model): + """The response of the List Namespace operation. + + :param value: Result of the List AuthorizationRules operation. + :type value: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] + :param next_link: Link to the next set of results. Not empty if Value + contains incomplete list of AuthorizationRules + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SharedAccessAuthorizationRuleResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SharedAccessAuthorizationRuleListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result_py3.py new file mode 100644 index 000000000000..986431f0b8c1 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SharedAccessAuthorizationRuleListResult(Model): + """The response of the List Namespace operation. + + :param value: Result of the List AuthorizationRules operation. + :type value: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] + :param next_link: Link to the next set of results. Not empty if Value + contains incomplete list of AuthorizationRules + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SharedAccessAuthorizationRuleResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(SharedAccessAuthorizationRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties.py index bdde83a7c416..336a9b615e2e 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties.py @@ -15,14 +15,63 @@ class SharedAccessAuthorizationRuleProperties(Model): """SharedAccessAuthorizationRule properties. + Variables are only populated by the server, and will be ignored when + sending a request. + :param rights: The rights associated with the rule. - :type rights: list of str or :class:`AccessRights - ` + :type rights: list[str or + ~azure.mgmt.notificationhubs.models.AccessRights] + :ivar primary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype primary_key: str + :ivar secondary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype secondary_key: str + :ivar key_name: A string that describes the authorization rule. + :vartype key_name: str + :ivar claim_type: A string that describes the claim type + :vartype claim_type: str + :ivar claim_value: A string that describes the claim value + :vartype claim_value: str + :ivar modified_time: The last modified time for this rule + :vartype modified_time: str + :ivar created_time: The created time for this rule + :vartype created_time: str + :ivar revision: The revision number for the rule + :vartype revision: int """ + _validation = { + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + 'key_name': {'readonly': True}, + 'claim_type': {'readonly': True}, + 'claim_value': {'readonly': True}, + 'modified_time': {'readonly': True}, + 'created_time': {'readonly': True}, + 'revision': {'readonly': True}, + } + _attribute_map = { 'rights': {'key': 'rights', 'type': '[AccessRights]'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'claim_type': {'key': 'claimType', 'type': 'str'}, + 'claim_value': {'key': 'claimValue', 'type': 'str'}, + 'modified_time': {'key': 'modifiedTime', 'type': 'str'}, + 'created_time': {'key': 'createdTime', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'}, } - def __init__(self, rights=None): - self.rights = rights + def __init__(self, **kwargs): + super(SharedAccessAuthorizationRuleProperties, self).__init__(**kwargs) + self.rights = kwargs.get('rights', None) + self.primary_key = None + self.secondary_key = None + self.key_name = None + self.claim_type = None + self.claim_value = None + self.modified_time = None + self.created_time = None + self.revision = None diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties_py3.py new file mode 100644 index 000000000000..9b220d462436 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties_py3.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SharedAccessAuthorizationRuleProperties(Model): + """SharedAccessAuthorizationRule properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param rights: The rights associated with the rule. + :type rights: list[str or + ~azure.mgmt.notificationhubs.models.AccessRights] + :ivar primary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype primary_key: str + :ivar secondary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype secondary_key: str + :ivar key_name: A string that describes the authorization rule. + :vartype key_name: str + :ivar claim_type: A string that describes the claim type + :vartype claim_type: str + :ivar claim_value: A string that describes the claim value + :vartype claim_value: str + :ivar modified_time: The last modified time for this rule + :vartype modified_time: str + :ivar created_time: The created time for this rule + :vartype created_time: str + :ivar revision: The revision number for the rule + :vartype revision: int + """ + + _validation = { + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + 'key_name': {'readonly': True}, + 'claim_type': {'readonly': True}, + 'claim_value': {'readonly': True}, + 'modified_time': {'readonly': True}, + 'created_time': {'readonly': True}, + 'revision': {'readonly': True}, + } + + _attribute_map = { + 'rights': {'key': 'rights', 'type': '[AccessRights]'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'claim_type': {'key': 'claimType', 'type': 'str'}, + 'claim_value': {'key': 'claimValue', 'type': 'str'}, + 'modified_time': {'key': 'modifiedTime', 'type': 'str'}, + 'created_time': {'key': 'createdTime', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'}, + } + + def __init__(self, *, rights=None, **kwargs) -> None: + super(SharedAccessAuthorizationRuleProperties, self).__init__(**kwargs) + self.rights = rights + self.primary_key = None + self.secondary_key = None + self.key_name = None + self.claim_type = None + self.claim_value = None + self.modified_time = None + self.created_time = None + self.revision = None diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource.py index ae02f11ffdd7..b7dbba779637 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource.py @@ -27,19 +27,44 @@ class SharedAccessAuthorizationRuleResource(Resource): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :param rights: The rights associated with the rule. - :type rights: list of str or :class:`AccessRights - ` + :type rights: list[str or + ~azure.mgmt.notificationhubs.models.AccessRights] + :ivar primary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype primary_key: str + :ivar secondary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype secondary_key: str + :ivar key_name: A string that describes the authorization rule. + :vartype key_name: str + :ivar claim_type: A string that describes the claim type + :vartype claim_type: str + :ivar claim_value: A string that describes the claim value + :vartype claim_value: str + :ivar modified_time: The last modified time for this rule + :vartype modified_time: str + :ivar created_time: The created time for this rule + :vartype created_time: str + :ivar revision: The revision number for the rule + :vartype revision: int """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + 'key_name': {'readonly': True}, + 'claim_type': {'readonly': True}, + 'claim_value': {'readonly': True}, + 'modified_time': {'readonly': True}, + 'created_time': {'readonly': True}, + 'revision': {'readonly': True}, } _attribute_map = { @@ -50,8 +75,24 @@ class SharedAccessAuthorizationRuleResource(Resource): 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'rights': {'key': 'properties.rights', 'type': '[AccessRights]'}, + 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, + 'key_name': {'key': 'properties.keyName', 'type': 'str'}, + 'claim_type': {'key': 'properties.claimType', 'type': 'str'}, + 'claim_value': {'key': 'properties.claimValue', 'type': 'str'}, + 'modified_time': {'key': 'properties.modifiedTime', 'type': 'str'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'str'}, + 'revision': {'key': 'properties.revision', 'type': 'int'}, } - def __init__(self, location, tags=None, sku=None, rights=None): - super(SharedAccessAuthorizationRuleResource, self).__init__(location=location, tags=tags, sku=sku) - self.rights = rights + def __init__(self, **kwargs): + super(SharedAccessAuthorizationRuleResource, self).__init__(**kwargs) + self.rights = kwargs.get('rights', None) + self.primary_key = None + self.secondary_key = None + self.key_name = None + self.claim_type = None + self.claim_value = None + self.modified_time = None + self.created_time = None + self.revision = None diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_paged.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_paged.py index fe48ca7f9450..76ef1c177995 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_paged.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_paged.py @@ -14,7 +14,7 @@ class SharedAccessAuthorizationRuleResourcePaged(Paged): """ - A paging container for iterating over a list of SharedAccessAuthorizationRuleResource object + A paging container for iterating over a list of :class:`SharedAccessAuthorizationRuleResource ` object """ _attribute_map = { diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_py3.py new file mode 100644 index 000000000000..13fd38bed3f6 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_py3.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class SharedAccessAuthorizationRuleResource(Resource): + """Description of a Namespace AuthorizationRules. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param rights: The rights associated with the rule. + :type rights: list[str or + ~azure.mgmt.notificationhubs.models.AccessRights] + :ivar primary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype primary_key: str + :ivar secondary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype secondary_key: str + :ivar key_name: A string that describes the authorization rule. + :vartype key_name: str + :ivar claim_type: A string that describes the claim type + :vartype claim_type: str + :ivar claim_value: A string that describes the claim value + :vartype claim_value: str + :ivar modified_time: The last modified time for this rule + :vartype modified_time: str + :ivar created_time: The created time for this rule + :vartype created_time: str + :ivar revision: The revision number for the rule + :vartype revision: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + 'key_name': {'readonly': True}, + 'claim_type': {'readonly': True}, + 'claim_value': {'readonly': True}, + 'modified_time': {'readonly': True}, + 'created_time': {'readonly': True}, + 'revision': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'rights': {'key': 'properties.rights', 'type': '[AccessRights]'}, + 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, + 'key_name': {'key': 'properties.keyName', 'type': 'str'}, + 'claim_type': {'key': 'properties.claimType', 'type': 'str'}, + 'claim_value': {'key': 'properties.claimValue', 'type': 'str'}, + 'modified_time': {'key': 'properties.modifiedTime', 'type': 'str'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'str'}, + 'revision': {'key': 'properties.revision', 'type': 'int'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, rights=None, **kwargs) -> None: + super(SharedAccessAuthorizationRuleResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.rights = rights + self.primary_key = None + self.secondary_key = None + self.key_name = None + self.claim_type = None + self.claim_value = None + self.modified_time = None + self.created_time = None + self.revision = None diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku.py index d3bb894af55f..028ddb22359b 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku.py @@ -15,10 +15,11 @@ class Sku(Model): """The Sku description for a namespace. - :param name: Name of the notification hub sku. Possible values include: - 'Free', 'Basic', 'Standard' - :type name: str or :class:`SkuName - ` + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the notification hub sku. Possible values + include: 'Free', 'Basic', 'Standard' + :type name: str or ~azure.mgmt.notificationhubs.models.SkuName :param tier: The tier of particular sku :type tier: str :param size: The Sku size @@ -41,9 +42,10 @@ class Sku(Model): 'capacity': {'key': 'capacity', 'type': 'int'}, } - def __init__(self, name, tier=None, size=None, family=None, capacity=None): - self.name = name - self.tier = tier - self.size = size - self.family = family - self.capacity = capacity + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.size = kwargs.get('size', None) + self.family = kwargs.get('family', None) + self.capacity = kwargs.get('capacity', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku_py3.py new file mode 100644 index 000000000000..39a4d9f98808 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """The Sku description for a namespace. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the notification hub sku. Possible values + include: 'Free', 'Basic', 'Standard' + :type name: str or ~azure.mgmt.notificationhubs.models.SkuName + :param tier: The tier of particular sku + :type tier: str + :param size: The Sku size + :type size: str + :param family: The Sku Family + :type family: str + :param capacity: The capacity of the resource + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, *, name, tier: str=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.size = size + self.family = family + self.capacity = capacity diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource.py index e77acb8015b2..11e092cc6ff5 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource.py @@ -23,5 +23,6 @@ class SubResource(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, id=None): - self.id = id + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource_py3.py new file mode 100644 index 000000000000..29e5afee38f9 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = id diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential.py index c1efcc25b81d..4dc2f88e62f9 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential.py @@ -29,7 +29,8 @@ class WnsCredential(Model): 'windows_live_endpoint': {'key': 'properties.windowsLiveEndpoint', 'type': 'str'}, } - def __init__(self, package_sid=None, secret_key=None, windows_live_endpoint=None): - self.package_sid = package_sid - self.secret_key = secret_key - self.windows_live_endpoint = windows_live_endpoint + def __init__(self, **kwargs): + super(WnsCredential, self).__init__(**kwargs) + self.package_sid = kwargs.get('package_sid', None) + self.secret_key = kwargs.get('secret_key', None) + self.windows_live_endpoint = kwargs.get('windows_live_endpoint', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential_py3.py new file mode 100644 index 000000000000..104b788a1f68 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WnsCredential(Model): + """Description of a NotificationHub WnsCredential. + + :param package_sid: The package ID for this credential. + :type package_sid: str + :param secret_key: The secret key. + :type secret_key: str + :param windows_live_endpoint: The Windows Live endpoint. + :type windows_live_endpoint: str + """ + + _attribute_map = { + 'package_sid': {'key': 'properties.packageSid', 'type': 'str'}, + 'secret_key': {'key': 'properties.secretKey', 'type': 'str'}, + 'windows_live_endpoint': {'key': 'properties.windowsLiveEndpoint', 'type': 'str'}, + } + + def __init__(self, *, package_sid: str=None, secret_key: str=None, windows_live_endpoint: str=None, **kwargs) -> None: + super(WnsCredential, self).__init__(**kwargs) + self.package_sid = package_sid + self.secret_key = secret_key + self.windows_live_endpoint = windows_live_endpoint diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/notification_hubs_management_client.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/notification_hubs_management_client.py index 4b2d63604aa0..8ffd380593cc 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/notification_hubs_management_client.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/notification_hubs_management_client.py @@ -9,14 +9,13 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION +from .operations.operations import Operations from .operations.namespaces_operations import NamespacesOperations -from .operations.name_operations import NameOperations from .operations.notification_hubs_operations import NotificationHubsOperations -from .operations.hubs_operations import HubsOperations from . import models @@ -42,34 +41,30 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(NotificationHubsManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('notificationhubsmanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-notificationhubs/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class NotificationHubsManagementClient(object): +class NotificationHubsManagementClient(SDKClient): """Azure NotificationHub client :ivar config: Configuration for client. :vartype config: NotificationHubsManagementClientConfiguration + :ivar operations: Operations operations + :vartype operations: azure.mgmt.notificationhubs.operations.Operations :ivar namespaces: Namespaces operations :vartype namespaces: azure.mgmt.notificationhubs.operations.NamespacesOperations - :ivar name: Name operations - :vartype name: azure.mgmt.notificationhubs.operations.NameOperations :ivar notification_hubs: NotificationHubs operations :vartype notification_hubs: azure.mgmt.notificationhubs.operations.NotificationHubsOperations - :ivar hubs: Hubs operations - :vartype hubs: azure.mgmt.notificationhubs.operations.HubsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -85,18 +80,16 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = NotificationHubsManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(NotificationHubsManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '2017-04-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.namespaces = NamespacesOperations( + self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) - self.name = NameOperations( + self.namespaces = NamespacesOperations( self._client, self.config, self._serialize, self._deserialize) self.notification_hubs = NotificationHubsOperations( self._client, self.config, self._serialize, self._deserialize) - self.hubs = HubsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/__init__.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/__init__.py index 16ffcc7b2d4a..a81c5ff50e13 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/__init__.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/__init__.py @@ -9,14 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- +from .operations import Operations from .namespaces_operations import NamespacesOperations -from .name_operations import NameOperations from .notification_hubs_operations import NotificationHubsOperations -from .hubs_operations import HubsOperations __all__ = [ + 'Operations', 'NamespacesOperations', - 'NameOperations', 'NotificationHubsOperations', - 'HubsOperations', ] diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/namespaces_operations.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/namespaces_operations.py index 501e5ec14e28..066abe6ebc22 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/namespaces_operations.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/namespaces_operations.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -23,10 +24,12 @@ class NamespacesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2017-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -43,21 +46,20 @@ def check_availability( on the service namespace name. :param parameters: The namespace name. - :type parameters: :class:`CheckAvailabilityParameters - ` + :type parameters: + ~azure.mgmt.notificationhubs.models.CheckAvailabilityParameters :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`CheckAvailabilityResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: CheckAvailabilityResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.CheckAvailabilityResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNamespaceAvailability' + url = self.check_availability.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -83,7 +85,7 @@ def check_availability( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -100,6 +102,7 @@ def check_availability( return client_raw_response return deserialized + check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNamespaceAvailability'} def create_or_update( self, resource_group_name, namespace_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -111,21 +114,20 @@ def create_or_update( :param namespace_name: The namespace name. :type namespace_name: str :param parameters: Parameters supplied to create a Namespace Resource. - :type parameters: :class:`NamespaceCreateOrUpdateParameters - ` + :type parameters: + ~azure.mgmt.notificationhubs.models.NamespaceCreateOrUpdateParameters :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`NamespaceResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: NamespaceResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.NamespaceResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -153,25 +155,26 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [201, 200]: + if response.status_code not in [200, 201]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 201: - deserialized = self._deserialize('NamespaceResource', response) if response.status_code == 200: deserialized = self._deserialize('NamespaceResource', response) + if response.status_code == 201: + deserialized = self._deserialize('NamespaceResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}'} def patch( self, resource_group_name, namespace_name, tags=None, sku=None, custom_headers=None, raw=False, **operation_config): @@ -182,24 +185,23 @@ def patch( :param namespace_name: The namespace name. :type namespace_name: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`NamespaceResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: NamespaceResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.NamespaceResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = models.NamespacePatchParameters(tags=tags, sku=sku) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}' + url = self.patch.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -227,7 +229,7 @@ def patch( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -244,28 +246,13 @@ def patch( return client_raw_response return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}'} - def delete( - self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing namespace. This operation also removes all - associated notificationHubs under the namespace. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param namespace_name: The namespace name. - :type namespace_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ + def _delete_initial( + self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -288,40 +275,59 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - def get_long_running_status(status_link, headers=None): + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - def get_long_running_output(response): + def delete( + self, resource_group_name, namespace_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing namespace. This operation also removes all + associated notificationHubs under the namespace. - if response.status_code not in [204, 200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param namespace_name: The namespace name. + :type namespace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + namespace_name=namespace_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + def get_long_running_output(response): if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}'} def get( self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): @@ -336,14 +342,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`NamespaceResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: NamespaceResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.NamespaceResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -367,7 +372,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -384,9 +389,10 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}'} def create_or_update_authorization_rule( - self, resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, namespace_name, authorization_rule_name, properties, custom_headers=None, raw=False, **operation_config): """Creates an authorization rule for a namespace. :param resource_group_name: The name of the resource group. @@ -395,23 +401,25 @@ def create_or_update_authorization_rule( :type namespace_name: str :param authorization_rule_name: Aauthorization Rule Name. :type authorization_rule_name: str - :param parameters: The shared access authorization rule. - :type parameters: - :class:`SharedAccessAuthorizationRuleCreateOrUpdateParameters - ` + :param properties: Properties of the Namespace AuthorizationRules. + :type properties: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SharedAccessAuthorizationRuleResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: SharedAccessAuthorizationRuleResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + parameters = models.SharedAccessAuthorizationRuleCreateOrUpdateParameters(properties=properties) + # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}' + url = self.create_or_update_authorization_rule.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -440,7 +448,7 @@ def create_or_update_authorization_rule( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -457,6 +465,7 @@ def create_or_update_authorization_rule( return client_raw_response return deserialized + create_or_update_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'} def delete_authorization_rule( self, resource_group_name, namespace_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): @@ -473,13 +482,12 @@ def delete_authorization_rule( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}' + url = self.delete_authorization_rule.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -504,9 +512,9 @@ def delete_authorization_rule( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - if response.status_code not in [204, 200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -514,6 +522,7 @@ def delete_authorization_rule( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'} def get_authorization_rule( self, resource_group_name, namespace_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): @@ -530,14 +539,15 @@ def get_authorization_rule( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SharedAccessAuthorizationRuleResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: SharedAccessAuthorizationRuleResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}' + url = self.get_authorization_rule.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -562,7 +572,7 @@ def get_authorization_rule( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -579,6 +589,7 @@ def get_authorization_rule( return client_raw_response return deserialized + get_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'} def list( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -593,15 +604,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`NamespaceResourcePaged - ` + :return: An iterator like instance of NamespaceResource + :rtype: + ~azure.mgmt.notificationhubs.models.NamespaceResourcePaged[~azure.mgmt.notificationhubs.models.NamespaceResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces' + url = self.list.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -629,7 +641,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -647,6 +659,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces'} def list_all( self, custom_headers=None, raw=False, **operation_config): @@ -658,15 +671,16 @@ def list_all( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`NamespaceResourcePaged - ` + :return: An iterator like instance of NamespaceResource + :rtype: + ~azure.mgmt.notificationhubs.models.NamespaceResourcePaged[~azure.mgmt.notificationhubs.models.NamespaceResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/namespaces' + url = self.list_all.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -693,7 +707,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -711,6 +725,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/namespaces'} def list_authorization_rules( self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): @@ -725,15 +740,17 @@ def list_authorization_rules( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SharedAccessAuthorizationRuleResourcePaged - ` + :return: An iterator like instance of + SharedAccessAuthorizationRuleResource + :rtype: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResourcePaged[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules' + url = self.list_authorization_rules.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -762,7 +779,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -780,6 +797,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules'} def list_keys( self, resource_group_name, namespace_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): @@ -797,14 +815,15 @@ def list_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ResourceListKeys - ` - :rtype: :class:`ClientRawResponse` + :return: SharedAccessAuthorizationRuleListResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleListResult + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys' + url = self.list_keys.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -829,7 +848,7 @@ def list_keys( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -839,13 +858,14 @@ def list_keys( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ResourceListKeys', response) + deserialized = self._deserialize('SharedAccessAuthorizationRuleListResult', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys'} def regenerate_keys( self, resource_group_name, namespace_name, authorization_rule_name, policy_key=None, custom_headers=None, raw=False, **operation_config): @@ -868,16 +888,15 @@ def regenerate_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ResourceListKeys - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: ResourceListKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.ResourceListKeys or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = models.PolicykeyResource(policy_key=policy_key) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys' + url = self.regenerate_keys.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -906,7 +925,7 @@ def regenerate_keys( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -923,3 +942,4 @@ def regenerate_keys( return client_raw_response return deserialized + regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys'} diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/notification_hubs_operations.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/notification_hubs_operations.py index f9a3e086e722..d81cee2faf2e 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/notification_hubs_operations.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/notification_hubs_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class NotificationHubsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2017-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def check_availability( + def check_notification_hub_availability( self, resource_group_name, namespace_name, parameters, custom_headers=None, raw=False, **operation_config): """Checks the availability of the given notificationHub in a namespace. @@ -44,21 +46,20 @@ def check_availability( :param namespace_name: The namespace name. :type namespace_name: str :param parameters: The notificationHub name. - :type parameters: :class:`CheckAvailabilityParameters - ` + :type parameters: + ~azure.mgmt.notificationhubs.models.CheckAvailabilityParameters :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`CheckAvailabilityResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: CheckAvailabilityResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.CheckAvailabilityResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/checkNotificationHubAvailability' + url = self.check_notification_hub_availability.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -86,7 +87,7 @@ def check_availability( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -103,6 +104,7 @@ def check_availability( return client_raw_response return deserialized + check_notification_hub_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/checkNotificationHubAvailability'} def create_or_update( self, resource_group_name, namespace_name, notification_hub_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -116,21 +118,20 @@ def create_or_update( :type notification_hub_name: str :param parameters: Parameters supplied to the create/update a NotificationHub Resource. - :type parameters: :class:`NotificationHubCreateOrUpdateParameters - ` + :type parameters: + ~azure.mgmt.notificationhubs.models.NotificationHubCreateOrUpdateParameters :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`NotificationHubResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: NotificationHubResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.NotificationHubResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -159,7 +160,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -178,6 +179,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}'} def delete( self, resource_group_name, namespace_name, notification_hub_name, custom_headers=None, raw=False, **operation_config): @@ -194,13 +196,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -225,7 +226,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -235,6 +236,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}'} def get( self, resource_group_name, namespace_name, notification_hub_name, custom_headers=None, raw=False, **operation_config): @@ -251,14 +253,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`NotificationHubResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: NotificationHubResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.NotificationHubResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -283,7 +284,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -300,9 +301,10 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}'} def create_or_update_authorization_rule( - self, resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, properties, custom_headers=None, raw=False, **operation_config): """Creates/Updates an authorization rule for a NotificationHub. :param resource_group_name: The name of the resource group. @@ -313,23 +315,25 @@ def create_or_update_authorization_rule( :type notification_hub_name: str :param authorization_rule_name: Authorization Rule Name. :type authorization_rule_name: str - :param parameters: The shared access authorization rule. - :type parameters: - :class:`SharedAccessAuthorizationRuleCreateOrUpdateParameters - ` + :param properties: Properties of the Namespace AuthorizationRules. + :type properties: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SharedAccessAuthorizationRuleResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: SharedAccessAuthorizationRuleResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + parameters = models.SharedAccessAuthorizationRuleCreateOrUpdateParameters(properties=properties) + # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}' + url = self.create_or_update_authorization_rule.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -359,7 +363,7 @@ def create_or_update_authorization_rule( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -376,6 +380,7 @@ def create_or_update_authorization_rule( return client_raw_response return deserialized + create_or_update_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}'} def delete_authorization_rule( self, resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): @@ -394,13 +399,12 @@ def delete_authorization_rule( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}' + url = self.delete_authorization_rule.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -426,9 +430,9 @@ def delete_authorization_rule( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - if response.status_code not in [204, 200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -436,6 +440,7 @@ def delete_authorization_rule( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}'} def get_authorization_rule( self, resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): @@ -454,14 +459,15 @@ def get_authorization_rule( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SharedAccessAuthorizationRuleResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: SharedAccessAuthorizationRuleResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}' + url = self.get_authorization_rule.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -487,7 +493,7 @@ def get_authorization_rule( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -504,6 +510,7 @@ def get_authorization_rule( return client_raw_response return deserialized + get_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}'} def list( self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): @@ -518,15 +525,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`NotificationHubResourcePaged - ` + :return: An iterator like instance of NotificationHubResource + :rtype: + ~azure.mgmt.notificationhubs.models.NotificationHubResourcePaged[~azure.mgmt.notificationhubs.models.NotificationHubResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs' + url = self.list.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -555,7 +563,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -573,6 +581,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs'} def list_authorization_rules( self, resource_group_name, namespace_name, notification_hub_name, custom_headers=None, raw=False, **operation_config): @@ -589,15 +598,17 @@ def list_authorization_rules( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SharedAccessAuthorizationRuleResourcePaged - ` + :return: An iterator like instance of + SharedAccessAuthorizationRuleResource + :rtype: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResourcePaged[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules' + url = self.list_authorization_rules.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -627,7 +638,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -645,6 +656,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules'} def list_keys( self, resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): @@ -665,14 +677,13 @@ def list_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ResourceListKeys - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: ResourceListKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.ResourceListKeys or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}/listKeys' + url = self.list_keys.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -698,7 +709,7 @@ def list_keys( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -715,6 +726,7 @@ def list_keys( return client_raw_response return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}/listKeys'} def regenerate_keys( self, resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, policy_key=None, custom_headers=None, raw=False, **operation_config): @@ -739,16 +751,15 @@ def regenerate_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ResourceListKeys - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: ResourceListKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.ResourceListKeys or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = models.PolicykeyResource(policy_key=policy_key) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys' + url = self.regenerate_keys.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -778,7 +789,7 @@ def regenerate_keys( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -795,6 +806,7 @@ def regenerate_keys( return client_raw_response return deserialized + regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys'} def get_pns_credentials( self, resource_group_name, namespace_name, notification_hub_name, custom_headers=None, raw=False, **operation_config): @@ -811,14 +823,13 @@ def get_pns_credentials( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`PnsCredentialsResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: PnsCredentialsResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.PnsCredentialsResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/pnsCredentials' + url = self.get_pns_credentials.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -843,7 +854,7 @@ def get_pns_credentials( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -860,3 +871,4 @@ def get_pns_credentials( return client_raw_response return deserialized + get_pns_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/pnsCredentials'} diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/operations.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/operations.py new file mode 100644 index 000000000000..4b966f29589b --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/operations.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-04-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available NotificationHubs REST API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.notificationhubs.models.OperationPaged[~azure.mgmt.notificationhubs.models.Operation] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.NotificationHubs/operations'} diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/version.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/version.py index a39916c162ce..53c4c7ea05e8 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/version.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "2.0.0" diff --git a/azure-mgmt-notificationhubs/build.json b/azure-mgmt-notificationhubs/build.json deleted file mode 100644 index aad8296a71d7..000000000000 --- a/azure-mgmt-notificationhubs/build.json +++ /dev/null @@ -1 +0,0 @@ -{"autorest": "1.1.0", "date": "2017-06-27T20:50:59Z", "version": ""} \ No newline at end of file diff --git a/azure-mgmt-notificationhubs/sdk_packaging.toml b/azure-mgmt-notificationhubs/sdk_packaging.toml new file mode 100644 index 000000000000..d950f2463230 --- /dev/null +++ b/azure-mgmt-notificationhubs/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-notificationhubs" +package_pprint_name = "Notification Hubs Management" +package_doc_id = "notification-hubs" +is_stable = true diff --git a/azure-mgmt-notificationhubs/setup.py b/azure-mgmt-notificationhubs/setup.py index 3e687d30fc05..ddd7cd1693b1 100644 --- a/azure-mgmt-notificationhubs/setup.py +++ b/azure-mgmt-notificationhubs/setup.py @@ -61,25 +61,24 @@ long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(), + packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.8', - 'azure-common~=1.1.6', + 'msrestazure>=0.4.27,<2.0.0', + 'azure-common~=1.1', ], cmdclass=cmdclass ) diff --git a/azure-mgmt-powerbiembedded/HISTORY.rst b/azure-mgmt-powerbiembedded/HISTORY.rst index 4d9941a0e602..b4cecd587d02 100644 --- a/azure-mgmt-powerbiembedded/HISTORY.rst +++ b/azure-mgmt-powerbiembedded/HISTORY.rst @@ -3,6 +3,42 @@ Release History =============== +2.0.0 (2018-05-25) +++++++++++++++++++ + +**Features** + +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + 1.0.0 (2017-06-23) ++++++++++++++++++ diff --git a/azure-mgmt-powerbiembedded/README.rst b/azure-mgmt-powerbiembedded/README.rst index 88987f630c1f..f75a904d0183 100644 --- a/azure-mgmt-powerbiembedded/README.rst +++ b/azure-mgmt-powerbiembedded/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Power BI Embedded Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `Power BI Embedded Management -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/__init__.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/__init__.py index abe2fe2f45e1..61403f88b18a 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/__init__.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/__init__.py @@ -9,21 +9,38 @@ # regenerated. # -------------------------------------------------------------------------- -from .error_detail import ErrorDetail -from .error import Error, ErrorException -from .azure_sku import AzureSku -from .workspace_collection import WorkspaceCollection -from .workspace import Workspace -from .display import Display -from .operation import Operation -from .operation_list import OperationList -from .workspace_collection_access_keys import WorkspaceCollectionAccessKeys -from .workspace_collection_access_key import WorkspaceCollectionAccessKey -from .create_workspace_collection_request import CreateWorkspaceCollectionRequest -from .update_workspace_collection_request import UpdateWorkspaceCollectionRequest -from .check_name_request import CheckNameRequest -from .check_name_response import CheckNameResponse -from .migrate_workspace_collection_request import MigrateWorkspaceCollectionRequest +try: + from .error_detail_py3 import ErrorDetail + from .error_py3 import Error, ErrorException + from .azure_sku_py3 import AzureSku + from .workspace_collection_py3 import WorkspaceCollection + from .workspace_py3 import Workspace + from .display_py3 import Display + from .operation_py3 import Operation + from .operation_list_py3 import OperationList + from .workspace_collection_access_keys_py3 import WorkspaceCollectionAccessKeys + from .workspace_collection_access_key_py3 import WorkspaceCollectionAccessKey + from .create_workspace_collection_request_py3 import CreateWorkspaceCollectionRequest + from .update_workspace_collection_request_py3 import UpdateWorkspaceCollectionRequest + from .check_name_request_py3 import CheckNameRequest + from .check_name_response_py3 import CheckNameResponse + from .migrate_workspace_collection_request_py3 import MigrateWorkspaceCollectionRequest +except (SyntaxError, ImportError): + from .error_detail import ErrorDetail + from .error import Error, ErrorException + from .azure_sku import AzureSku + from .workspace_collection import WorkspaceCollection + from .workspace import Workspace + from .display import Display + from .operation import Operation + from .operation_list import OperationList + from .workspace_collection_access_keys import WorkspaceCollectionAccessKeys + from .workspace_collection_access_key import WorkspaceCollectionAccessKey + from .create_workspace_collection_request import CreateWorkspaceCollectionRequest + from .update_workspace_collection_request import UpdateWorkspaceCollectionRequest + from .check_name_request import CheckNameRequest + from .check_name_response import CheckNameResponse + from .migrate_workspace_collection_request import MigrateWorkspaceCollectionRequest from .workspace_collection_paged import WorkspaceCollectionPaged from .workspace_paged import WorkspacePaged from .power_bi_embedded_management_client_enums import ( diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/azure_sku.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/azure_sku.py index 3f9b4a3b9849..e0f5265a33d0 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/azure_sku.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/azure_sku.py @@ -18,9 +18,11 @@ class AzureSku(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: SKU name. Default value: "S1" . + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. SKU name. Default value: "S1" . :vartype name: str - :ivar tier: SKU tier. Default value: "Standard" . + :ivar tier: Required. SKU tier. Default value: "Standard" . :vartype tier: str """ diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/azure_sku_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/azure_sku_py3.py new file mode 100644 index 000000000000..e0f5265a33d0 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/azure_sku_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureSku(Model): + """AzureSku. + + 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 name: Required. SKU name. Default value: "S1" . + :vartype name: str + :ivar tier: Required. SKU tier. Default value: "Standard" . + :vartype tier: str + """ + + _validation = { + 'name': {'required': True, 'constant': True}, + 'tier': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + name = "S1" + + tier = "Standard" diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_request.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_request.py index c88dbb1ff922..8ab54415eaa0 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_request.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_request.py @@ -27,6 +27,7 @@ class CheckNameRequest(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, name=None, type="Microsoft.PowerBI/workspaceCollections"): - self.name = name - self.type = type + def __init__(self, **kwargs): + super(CheckNameRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', "Microsoft.PowerBI/workspaceCollections") diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_request_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_request_py3.py new file mode 100644 index 000000000000..c9548564eef0 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_request_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameRequest(Model): + """CheckNameRequest. + + :param name: Workspace collection name + :type name: str + :param type: Resource type. Default value: + "Microsoft.PowerBI/workspaceCollections" . + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, type: str="Microsoft.PowerBI/workspaceCollections", **kwargs) -> None: + super(CheckNameRequest, self).__init__(**kwargs) + self.name = name + self.type = type diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_response.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_response.py index 9e11f5074f87..b55a632168ec 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_response.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_response.py @@ -20,8 +20,7 @@ class CheckNameResponse(Model): :type name_available: bool :param reason: Reason why the workspace collection name cannot be used. Possible values include: 'Unavailable', 'Invalid' - :type reason: str or :class:`CheckNameReason - ` + :type reason: str or ~azure.mgmt.powerbiembedded.models.CheckNameReason :param message: Message indicating an unavailable name due to a conflict, or a description of the naming rules that are violated. :type message: str @@ -33,7 +32,8 @@ class CheckNameResponse(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, name_available=None, reason=None, message=None): - self.name_available = name_available - self.reason = reason - self.message = message + def __init__(self, **kwargs): + super(CheckNameResponse, self).__init__(**kwargs) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_response_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_response_py3.py new file mode 100644 index 000000000000..2f8f6f305b54 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_response_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameResponse(Model): + """CheckNameResponse. + + :param name_available: Specifies a Boolean value that indicates whether + the specified Power BI Workspace Collection name is available to use. + :type name_available: bool + :param reason: Reason why the workspace collection name cannot be used. + Possible values include: 'Unavailable', 'Invalid' + :type reason: str or ~azure.mgmt.powerbiembedded.models.CheckNameReason + :param message: Message indicating an unavailable name due to a conflict, + or a description of the naming rules that are violated. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, name_available: bool=None, reason=None, message: str=None, **kwargs) -> None: + super(CheckNameResponse, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/create_workspace_collection_request.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/create_workspace_collection_request.py index 8bd3b301d798..b00b51426f78 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/create_workspace_collection_request.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/create_workspace_collection_request.py @@ -22,10 +22,9 @@ class CreateWorkspaceCollectionRequest(Model): :param location: Azure location :type location: str :param tags: - :type tags: dict + :type tags: dict[str, str] :ivar sku: - :vartype sku: :class:`AzureSku - ` + :vartype sku: ~azure.mgmt.powerbiembedded.models.AzureSku """ _validation = { @@ -40,6 +39,7 @@ class CreateWorkspaceCollectionRequest(Model): sku = AzureSku() - def __init__(self, location=None, tags=None): - self.location = location - self.tags = tags + def __init__(self, **kwargs): + super(CreateWorkspaceCollectionRequest, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/create_workspace_collection_request_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/create_workspace_collection_request_py3.py new file mode 100644 index 000000000000..27df1d2da704 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/create_workspace_collection_request_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_sku import AzureSku +from msrest.serialization import Model + + +class CreateWorkspaceCollectionRequest(Model): + """CreateWorkspaceCollectionRequest. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param location: Azure location + :type location: str + :param tags: + :type tags: dict[str, str] + :ivar sku: + :vartype sku: ~azure.mgmt.powerbiembedded.models.AzureSku + """ + + _validation = { + 'sku': {'constant': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'AzureSku'}, + } + + sku = AzureSku() + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(CreateWorkspaceCollectionRequest, self).__init__(**kwargs) + self.location = location + self.tags = tags diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/display.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/display.py index f6e417e0eb35..44a6602c7325 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/display.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/display.py @@ -48,9 +48,10 @@ class Display(Model): 'origin': {'key': 'origin', 'type': 'str'}, } - def __init__(self, provider=None, resource=None, operation=None, description=None, origin=None): - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description - self.origin = origin + def __init__(self, **kwargs): + super(Display, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + self.origin = kwargs.get('origin', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/display_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/display_py3.py new file mode 100644 index 000000000000..092aa1908db2 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/display_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Display(Model): + """Display. + + :param provider: The localized friendly form of the resource provider + name. This form is also expected to include the publisher/company + responsible. Use Title Casing. Begin with “Microsoft” for 1st party + services. + :type provider: str + :param resource: The localized friendly form of the resource type related + to this action/operation. This form should match the public documentation + for the resource provider. Use Title Casing. For examples, refer to the + “name” section. + :type resource: str + :param operation: The localized friendly name for the operation as shown + to the user. This name should be concise (to fit in drop downs), but clear + (self-documenting). Use Title Casing and include the entity/resource to + which it applies. + :type operation: str + :param description: The localized friendly description for the operation + as shown to the user. This description should be thorough, yet concise. It + will be used in tool-tips and detailed views. + :type description: str + :param origin: The intended executor of the operation; governs the display + of the operation in the RBAC UX and the audit logs UX. Default value is + 'user,system' + :type origin: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, origin: str=None, **kwargs) -> None: + super(Display, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + self.origin = origin diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error.py index 3bb88089e9bb..3aa05f8f9f48 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error.py @@ -23,8 +23,7 @@ class Error(Model): :param target: :type target: str :param details: - :type details: list of :class:`ErrorDetail - ` + :type details: list[~azure.mgmt.powerbiembedded.models.ErrorDetail] """ _attribute_map = { @@ -34,11 +33,12 @@ class Error(Model): 'details': {'key': 'details', 'type': '[ErrorDetail]'}, } - def __init__(self, code=None, message=None, target=None, details=None): - self.code = code - self.message = message - self.target = target - self.details = details + def __init__(self, **kwargs): + super(Error, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) class ErrorException(HttpOperationError): diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_detail.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_detail.py index 7f1bf288f1e4..d36c8bd1da8b 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_detail.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_detail.py @@ -29,7 +29,8 @@ class ErrorDetail(Model): 'target': {'key': 'target', 'type': 'str'}, } - def __init__(self, code=None, message=None, target=None): - self.code = code - self.message = message - self.target = target + def __init__(self, **kwargs): + super(ErrorDetail, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_detail_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_detail_py3.py new file mode 100644 index 000000000000..5093fd1b8341 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_detail_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorDetail(Model): + """ErrorDetail. + + :param code: + :type code: str + :param message: + :type message: str + :param target: + :type target: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, **kwargs) -> None: + super(ErrorDetail, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_py3.py new file mode 100644 index 000000000000..553ca60690f7 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Error(Model): + """Error. + + :param code: + :type code: str + :param message: + :type message: str + :param target: + :type target: str + :param details: + :type details: list[~azure.mgmt.powerbiembedded.models.ErrorDetail] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(Error, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ErrorException(HttpOperationError): + """Server responsed with exception of type: 'Error'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorException, self).__init__(deserialize, response, 'Error', *args) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/migrate_workspace_collection_request.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/migrate_workspace_collection_request.py index 1a296b1a2e62..d5fa09ca0c81 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/migrate_workspace_collection_request.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/migrate_workspace_collection_request.py @@ -19,7 +19,7 @@ class MigrateWorkspaceCollectionRequest(Model): workspace collections will be migrated to. :type target_resource_group: str :param resources: - :type resources: list of str + :type resources: list[str] """ _attribute_map = { @@ -27,6 +27,7 @@ class MigrateWorkspaceCollectionRequest(Model): 'resources': {'key': 'resources', 'type': '[str]'}, } - def __init__(self, target_resource_group=None, resources=None): - self.target_resource_group = target_resource_group - self.resources = resources + def __init__(self, **kwargs): + super(MigrateWorkspaceCollectionRequest, self).__init__(**kwargs) + self.target_resource_group = kwargs.get('target_resource_group', None) + self.resources = kwargs.get('resources', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/migrate_workspace_collection_request_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/migrate_workspace_collection_request_py3.py new file mode 100644 index 000000000000..40067c355857 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/migrate_workspace_collection_request_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateWorkspaceCollectionRequest(Model): + """MigrateWorkspaceCollectionRequest. + + :param target_resource_group: Name of the resource group the Power BI + workspace collections will be migrated to. + :type target_resource_group: str + :param resources: + :type resources: list[str] + """ + + _attribute_map = { + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[str]'}, + } + + def __init__(self, *, target_resource_group: str=None, resources=None, **kwargs) -> None: + super(MigrateWorkspaceCollectionRequest, self).__init__(**kwargs) + self.target_resource_group = target_resource_group + self.resources = resources diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation.py index 1d54e2223903..a30f5f7c0822 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation.py @@ -20,8 +20,7 @@ class Operation(Model): event service. :type name: str :param display: - :type display: :class:`Display - ` + :type display: ~azure.mgmt.powerbiembedded.models.Display """ _attribute_map = { @@ -29,6 +28,7 @@ class Operation(Model): 'display': {'key': 'display', 'type': 'Display'}, } - def __init__(self, name=None, display=None): - self.name = name - self.display = display + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_list.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_list.py index ef547c20f74f..0d87571b3285 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_list.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_list.py @@ -16,13 +16,13 @@ class OperationList(Model): """OperationList. :param value: - :type value: list of :class:`Operation - ` + :type value: list[~azure.mgmt.powerbiembedded.models.Operation] """ _attribute_map = { 'value': {'key': 'value', 'type': '[Operation]'}, } - def __init__(self, value=None): - self.value = value + def __init__(self, **kwargs): + super(OperationList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_list_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_list_py3.py new file mode 100644 index 000000000000..489f837b7bb1 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_list_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationList(Model): + """OperationList. + + :param value: + :type value: list[~azure.mgmt.powerbiembedded.models.Operation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(OperationList, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_py3.py new file mode 100644 index 000000000000..530191798420 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Operation. + + :param name: The name of the operation being performed on this particular + object. This name should match the action name that appears in RBAC / the + event service. + :type name: str + :param display: + :type display: ~azure.mgmt.powerbiembedded.models.Display + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'Display'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/power_bi_embedded_management_client_enums.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/power_bi_embedded_management_client_enums.py index c3c3c06f3864..58b7abcc207c 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/power_bi_embedded_management_client_enums.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/power_bi_embedded_management_client_enums.py @@ -12,13 +12,13 @@ from enum import Enum -class AccessKeyName(Enum): +class AccessKeyName(str, Enum): key1 = "key1" key2 = "key2" -class CheckNameReason(Enum): +class CheckNameReason(str, Enum): unavailable = "Unavailable" invalid = "Invalid" diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/update_workspace_collection_request.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/update_workspace_collection_request.py index d740fe74ff07..8c758bcecd24 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/update_workspace_collection_request.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/update_workspace_collection_request.py @@ -20,10 +20,9 @@ class UpdateWorkspaceCollectionRequest(Model): sending a request. :param tags: - :type tags: dict + :type tags: dict[str, str] :ivar sku: - :vartype sku: :class:`AzureSku - ` + :vartype sku: ~azure.mgmt.powerbiembedded.models.AzureSku """ _validation = { @@ -37,5 +36,6 @@ class UpdateWorkspaceCollectionRequest(Model): sku = AzureSku() - def __init__(self, tags=None): - self.tags = tags + def __init__(self, **kwargs): + super(UpdateWorkspaceCollectionRequest, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/update_workspace_collection_request_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/update_workspace_collection_request_py3.py new file mode 100644 index 000000000000..646df196d304 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/update_workspace_collection_request_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_sku import AzureSku +from msrest.serialization import Model + + +class UpdateWorkspaceCollectionRequest(Model): + """UpdateWorkspaceCollectionRequest. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: + :type tags: dict[str, str] + :ivar sku: + :vartype sku: ~azure.mgmt.powerbiembedded.models.AzureSku + """ + + _validation = { + 'sku': {'constant': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'AzureSku'}, + } + + sku = AzureSku() + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateWorkspaceCollectionRequest, self).__init__(**kwargs) + self.tags = tags diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace.py index 05a8974182e3..e4c90b670ac7 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace.py @@ -32,8 +32,9 @@ class Workspace(Model): 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, id=None, name=None, type=None, properties=None): - self.id = id - self.name = name - self.type = type - self.properties = properties + def __init__(self, **kwargs): + super(Workspace, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection.py index b39c66ea29cf..701a1b72f985 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection.py @@ -28,10 +28,9 @@ class WorkspaceCollection(Model): :param location: Azure location :type location: str :param tags: - :type tags: dict + :type tags: dict[str, str] :ivar sku: - :vartype sku: :class:`AzureSku - ` + :vartype sku: ~azure.mgmt.powerbiembedded.models.AzureSku :param properties: Properties :type properties: object """ @@ -52,10 +51,11 @@ class WorkspaceCollection(Model): sku = AzureSku() - def __init__(self, id=None, name=None, type=None, location=None, tags=None, properties=None): - self.id = id - self.name = name - self.type = type - self.location = location - self.tags = tags - self.properties = properties + def __init__(self, **kwargs): + super(WorkspaceCollection, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_key.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_key.py index 36f9ae368fb0..96c3e56c5d92 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_key.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_key.py @@ -16,13 +16,13 @@ class WorkspaceCollectionAccessKey(Model): """WorkspaceCollectionAccessKey. :param key_name: Key name. Possible values include: 'key1', 'key2' - :type key_name: str or :class:`AccessKeyName - ` + :type key_name: str or ~azure.mgmt.powerbiembedded.models.AccessKeyName """ _attribute_map = { 'key_name': {'key': 'keyName', 'type': 'AccessKeyName'}, } - def __init__(self, key_name=None): - self.key_name = key_name + def __init__(self, **kwargs): + super(WorkspaceCollectionAccessKey, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_key_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_key_py3.py new file mode 100644 index 000000000000..a0a43243b2e2 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_key_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkspaceCollectionAccessKey(Model): + """WorkspaceCollectionAccessKey. + + :param key_name: Key name. Possible values include: 'key1', 'key2' + :type key_name: str or ~azure.mgmt.powerbiembedded.models.AccessKeyName + """ + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'AccessKeyName'}, + } + + def __init__(self, *, key_name=None, **kwargs) -> None: + super(WorkspaceCollectionAccessKey, self).__init__(**kwargs) + self.key_name = key_name diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_keys.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_keys.py index 0001dcbe26ad..bfca2c68d6c1 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_keys.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_keys.py @@ -26,6 +26,7 @@ class WorkspaceCollectionAccessKeys(Model): 'key2': {'key': 'key2', 'type': 'str'}, } - def __init__(self, key1=None, key2=None): - self.key1 = key1 - self.key2 = key2 + def __init__(self, **kwargs): + super(WorkspaceCollectionAccessKeys, self).__init__(**kwargs) + self.key1 = kwargs.get('key1', None) + self.key2 = kwargs.get('key2', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_keys_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_keys_py3.py new file mode 100644 index 000000000000..74e13a098b89 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_keys_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkspaceCollectionAccessKeys(Model): + """WorkspaceCollectionAccessKeys. + + :param key1: Access key 1 + :type key1: str + :param key2: Access key 2 + :type key2: str + """ + + _attribute_map = { + 'key1': {'key': 'key1', 'type': 'str'}, + 'key2': {'key': 'key2', 'type': 'str'}, + } + + def __init__(self, *, key1: str=None, key2: str=None, **kwargs) -> None: + super(WorkspaceCollectionAccessKeys, self).__init__(**kwargs) + self.key1 = key1 + self.key2 = key2 diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_paged.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_paged.py index c3086b9892bd..46660de33edf 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_paged.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_paged.py @@ -14,7 +14,7 @@ class WorkspaceCollectionPaged(Paged): """ - A paging container for iterating over a list of WorkspaceCollection object + A paging container for iterating over a list of :class:`WorkspaceCollection ` object """ _attribute_map = { diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_py3.py new file mode 100644 index 000000000000..8310ce99f495 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_sku import AzureSku +from msrest.serialization import Model + + +class WorkspaceCollection(Model): + """WorkspaceCollection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource id + :type id: str + :param name: Workspace collection name + :type name: str + :param type: Resource type + :type type: str + :param location: Azure location + :type location: str + :param tags: + :type tags: dict[str, str] + :ivar sku: + :vartype sku: ~azure.mgmt.powerbiembedded.models.AzureSku + :param properties: Properties + :type properties: object + """ + + _validation = { + 'sku': {'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'AzureSku'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + sku = AzureSku() + + def __init__(self, *, id: str=None, name: str=None, type: str=None, location: str=None, tags=None, properties=None, **kwargs) -> None: + super(WorkspaceCollection, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.location = location + self.tags = tags + self.properties = properties diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_paged.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_paged.py index 67c335af8026..8d630ab6bac7 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_paged.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_paged.py @@ -14,7 +14,7 @@ class WorkspacePaged(Paged): """ - A paging container for iterating over a list of Workspace object + A paging container for iterating over a list of :class:`Workspace ` object """ _attribute_map = { diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_py3.py new file mode 100644 index 000000000000..43b52413c967 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Workspace(Model): + """Workspace. + + :param id: Workspace id + :type id: str + :param name: Workspace name + :type name: str + :param type: Resource type + :type type: str + :param properties: Property bag + :type properties: object + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, properties=None, **kwargs) -> None: + super(Workspace, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.properties = properties diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/workspace_collections_operations.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/workspace_collections_operations.py index 7ff51096e931..94f7399cf90b 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/workspace_collections_operations.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/workspace_collections_operations.py @@ -9,9 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_operation import AzureOperationPoller import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -22,10 +23,12 @@ class WorkspaceCollectionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-01-29". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,15 +52,14 @@ def get_by_name( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkspaceCollection - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkspaceCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.powerbiembedded.models.WorkspaceCollection or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}' + url = self.get_by_name.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -81,7 +83,7 @@ def get_by_name( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -96,6 +98,7 @@ def get_by_name( return client_raw_response return deserialized + get_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}'} def create( self, resource_group_name, workspace_collection_name, location=None, tags=None, custom_headers=None, raw=False, **operation_config): @@ -112,23 +115,22 @@ def create( :param location: Azure location :type location: str :param tags: - :type tags: dict + :type tags: dict[str, str] :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkspaceCollection - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkspaceCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.powerbiembedded.models.WorkspaceCollection or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ body = models.CreateWorkspaceCollectionRequest(location=location, tags=tags) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}' + url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -156,7 +158,7 @@ def create( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -171,6 +173,7 @@ def create( return client_raw_response return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}'} def update( self, resource_group_name, workspace_collection_name, tags=None, custom_headers=None, raw=False, **operation_config): @@ -183,23 +186,22 @@ def update( Collection name :type workspace_collection_name: str :param tags: - :type tags: dict + :type tags: dict[str, str] :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkspaceCollection - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkspaceCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.powerbiembedded.models.WorkspaceCollection or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ body = models.UpdateWorkspaceCollectionRequest(tags=tags) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -227,7 +229,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -242,29 +244,13 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}'} - def delete( - self, resource_group_name, workspace_collection_name, custom_headers=None, raw=False, **operation_config): - """Delete a Power BI Workspace Collection. - :param resource_group_name: Azure resource group - :type resource_group_name: str - :param workspace_collection_name: Power BI Embedded Workspace - Collection name - :type workspace_collection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: - :class:`ErrorException` - """ + def _delete_initial( + self, resource_group_name, workspace_collection_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -287,38 +273,58 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - def get_long_running_status(status_link, headers=None): + if response.status_code not in [202]: + raise models.ErrorException(self._deserialize, response) - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - def get_long_running_output(response): + def delete( + self, resource_group_name, workspace_collection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a Power BI Workspace Collection. - if response.status_code not in [202]: - raise models.ErrorException(self._deserialize, response) + :param resource_group_name: Azure resource group + :type resource_group_name: str + :param workspace_collection_name: Power BI Embedded Workspace + Collection name + :type workspace_collection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_collection_name=workspace_collection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + def get_long_running_output(response): if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}'} def check_name_availability( self, location, name=None, type="Microsoft.PowerBI/workspaceCollections", custom_headers=None, raw=False, **operation_config): @@ -336,17 +342,16 @@ def check_name_availability( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`CheckNameResponse - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: CheckNameResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.powerbiembedded.models.CheckNameResponse or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ body = models.CheckNameRequest(name=name, type=type) # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/locations/{location}/checkNameAvailability' + url = self.check_name_availability.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'location': self._serialize.url("location", location, 'str') @@ -373,7 +378,7 @@ def check_name_availability( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -388,6 +393,7 @@ def check_name_availability( return client_raw_response return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/locations/{location}/checkNameAvailability'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -401,8 +407,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkspaceCollectionPaged - ` + :return: An iterator like instance of WorkspaceCollection + :rtype: + ~azure.mgmt.powerbiembedded.models.WorkspaceCollectionPaged[~azure.mgmt.powerbiembedded.models.WorkspaceCollection] :raises: :class:`ErrorException` """ @@ -410,7 +417,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -438,7 +445,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -454,6 +461,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections'} def list_by_subscription( self, custom_headers=None, raw=False, **operation_config): @@ -465,8 +473,9 @@ def list_by_subscription( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkspaceCollectionPaged - ` + :return: An iterator like instance of WorkspaceCollection + :rtype: + ~azure.mgmt.powerbiembedded.models.WorkspaceCollectionPaged[~azure.mgmt.powerbiembedded.models.WorkspaceCollection] :raises: :class:`ErrorException` """ @@ -474,7 +483,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/workspaceCollections' + url = self.list_by_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -501,7 +510,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -517,6 +526,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/workspaceCollections'} def get_access_keys( self, resource_group_name, workspace_collection_name, custom_headers=None, raw=False, **operation_config): @@ -533,15 +543,16 @@ def get_access_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkspaceCollectionAccessKeys - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkspaceCollectionAccessKeys or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.powerbiembedded.models.WorkspaceCollectionAccessKeys or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/listKeys' + url = self.get_access_keys.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -565,7 +576,7 @@ def get_access_keys( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -580,6 +591,7 @@ def get_access_keys( return client_raw_response return deserialized + get_access_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/listKeys'} def regenerate_key( self, resource_group_name, workspace_collection_name, key_name=None, custom_headers=None, raw=False, **operation_config): @@ -592,24 +604,25 @@ def regenerate_key( Collection name :type workspace_collection_name: str :param key_name: Key name. Possible values include: 'key1', 'key2' - :type key_name: str or :class:`AccessKeyName - ` + :type key_name: str or + ~azure.mgmt.powerbiembedded.models.AccessKeyName :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkspaceCollectionAccessKeys - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkspaceCollectionAccessKeys or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.powerbiembedded.models.WorkspaceCollectionAccessKeys or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ body = models.WorkspaceCollectionAccessKey(key_name=key_name) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/regenerateKey' + url = self.regenerate_key.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -637,7 +650,7 @@ def regenerate_key( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -652,6 +665,7 @@ def regenerate_key( return client_raw_response return deserialized + regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/regenerateKey'} def migrate( self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): @@ -664,22 +678,21 @@ def migrate( workspace collections will be migrated to. :type target_resource_group: str :param resources: - :type resources: list of str + :type resources: list[str] :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ body = models.MigrateWorkspaceCollectionRequest(target_resource_group=target_resource_group, resources=resources) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources' + url = self.migrate.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -706,7 +719,7 @@ def migrate( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -714,3 +727,4 @@ def migrate( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + migrate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/workspaces_operations.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/workspaces_operations.py index 50ef9772113c..cecd26b763fc 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/workspaces_operations.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/workspaces_operations.py @@ -9,8 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.pipeline import ClientRawResponse import uuid +from msrest.pipeline import ClientRawResponse from .. import models @@ -21,10 +21,12 @@ class WorkspacesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-01-29". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,8 +51,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkspacePaged - ` + :return: An iterator like instance of Workspace + :rtype: + ~azure.mgmt.powerbiembedded.models.WorkspacePaged[~azure.mgmt.powerbiembedded.models.Workspace] :raises: :class:`ErrorException` """ @@ -58,7 +61,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/workspaces' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -87,7 +90,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -103,3 +106,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/workspaces'} diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/power_bi_embedded_management_client.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/power_bi_embedded_management_client.py index d1a45c049db9..0b1674ca9a54 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/power_bi_embedded_management_client.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/power_bi_embedded_management_client.py @@ -9,12 +9,13 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from msrest.pipeline import ClientRawResponse -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling import uuid from .operations.workspace_collections_operations import WorkspaceCollectionsOperations from .operations.workspaces_operations import WorkspacesOperations @@ -43,21 +44,19 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(PowerBIEmbeddedManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('powerbiembeddedmanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-powerbiembedded/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class PowerBIEmbeddedManagementClient(object): +class PowerBIEmbeddedManagementClient(SDKClient): """Client to manage your Power BI Embedded workspace collections and retrieve workspaces. :ivar config: Configuration for client. @@ -82,7 +81,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = PowerBIEmbeddedManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(PowerBIEmbeddedManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '2016-01-29' @@ -104,15 +103,14 @@ def get_available_operations( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`OperationList - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: OperationList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.powerbiembedded.models.OperationList or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ # Construct URL - url = '/providers/Microsoft.PowerBI/operations' + url = self.get_available_operations.metadata['url'] # Construct parameters query_parameters = {} @@ -130,7 +128,7 @@ def get_available_operations( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -145,3 +143,4 @@ def get_available_operations( return client_raw_response return deserialized + get_available_operations.metadata = {'url': '/providers/Microsoft.PowerBI/operations'} diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/version.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/version.py index a39916c162ce..53c4c7ea05e8 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/version.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "2.0.0" diff --git a/azure-mgmt-powerbiembedded/build.json b/azure-mgmt-powerbiembedded/build.json deleted file mode 100644 index 204b507d3c37..000000000000 --- a/azure-mgmt-powerbiembedded/build.json +++ /dev/null @@ -1 +0,0 @@ -{"autorest": "1.1.0", "date": "2017-06-23T17:52:38Z", "version": ""} \ No newline at end of file diff --git a/azure-mgmt-powerbiembedded/sdk_packaging.toml b/azure-mgmt-powerbiembedded/sdk_packaging.toml new file mode 100644 index 000000000000..173e964bc7c6 --- /dev/null +++ b/azure-mgmt-powerbiembedded/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-powerbiembedded" +package_pprint_name = "Power BI Embedded Management" +package_doc_id = "power-bi" +is_stable = true diff --git a/azure-mgmt-powerbiembedded/setup.py b/azure-mgmt-powerbiembedded/setup.py index 52631e008464..90d75208fd7e 100644 --- a/azure-mgmt-powerbiembedded/setup.py +++ b/azure-mgmt-powerbiembedded/setup.py @@ -61,25 +61,24 @@ long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(), + packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.8', - 'azure-common~=1.1.6', + 'msrestazure>=0.4.27,<2.0.0', + 'azure-common~=1.1', ], cmdclass=cmdclass ) diff --git a/azure-mgmt-rdbms/HISTORY.rst b/azure-mgmt-rdbms/HISTORY.rst index a02980bd65ec..e19d3057fd2b 100644 --- a/azure-mgmt-rdbms/HISTORY.rst +++ b/azure-mgmt-rdbms/HISTORY.rst @@ -3,6 +3,15 @@ Release History =============== +1.2.0 (2018-05-30) +++++++++++++++++++ + +**Features** + +- Added operation group VirtualNetworkRulesOperations +- Added operation group ServerSecurityAlertPoliciesOperations (PostgreSQL only) +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + 1.1.1 (2018-04-17) ++++++++++++++++++ @@ -39,7 +48,7 @@ This version uses a next-generation code generator that *might* introduce breaki - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. - - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, the response of the initial call will be returned without polling. diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/__init__.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/__init__.py index e630a179e943..cfc92cfd5697 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/__init__.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/__init__.py @@ -22,6 +22,7 @@ from .server_for_create_py3 import ServerForCreate from .server_update_parameters_py3 import ServerUpdateParameters from .firewall_rule_py3 import FirewallRule + from .virtual_network_rule_py3 import VirtualNetworkRule from .database_py3 import Database from .configuration_py3 import Configuration from .operation_display_py3 import OperationDisplay @@ -45,6 +46,7 @@ from .server_for_create import ServerForCreate from .server_update_parameters import ServerUpdateParameters from .firewall_rule import FirewallRule + from .virtual_network_rule import VirtualNetworkRule from .database import Database from .configuration import Configuration from .operation_display import OperationDisplay @@ -57,6 +59,7 @@ from .name_availability import NameAvailability from .server_paged import ServerPaged from .firewall_rule_paged import FirewallRulePaged +from .virtual_network_rule_paged import VirtualNetworkRulePaged from .database_paged import DatabasePaged from .configuration_paged import ConfigurationPaged from .log_file_paged import LogFilePaged @@ -67,6 +70,7 @@ ServerState, GeoRedundantBackup, SkuTier, + VirtualNetworkRuleState, OperationOrigin, ) @@ -83,6 +87,7 @@ 'ServerForCreate', 'ServerUpdateParameters', 'FirewallRule', + 'VirtualNetworkRule', 'Database', 'Configuration', 'OperationDisplay', @@ -95,6 +100,7 @@ 'NameAvailability', 'ServerPaged', 'FirewallRulePaged', + 'VirtualNetworkRulePaged', 'DatabasePaged', 'ConfigurationPaged', 'LogFilePaged', @@ -104,5 +110,6 @@ 'ServerState', 'GeoRedundantBackup', 'SkuTier', + 'VirtualNetworkRuleState', 'OperationOrigin', ] diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/configuration_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/configuration_py3.py index 00d29c7be6dc..59929c953a7e 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/configuration_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/configuration_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class Configuration(ProxyResource): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/database_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/database_py3.py index f5a2bce5f717..af8b0ce61e7c 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/database_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/database_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class Database(ProxyResource): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/firewall_rule_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/firewall_rule_py3.py index c65ec79d8319..f5da7a6331e5 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/firewall_rule_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/firewall_rule_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class FirewallRule(ProxyResource): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/log_file_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/log_file_py3.py index a8dd0f908280..aa8edbe0ca9a 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/log_file_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/log_file_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class LogFile(ProxyResource): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/my_sql_management_client_enums.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/my_sql_management_client_enums.py index ec49c1bde641..89cda990fcd2 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/my_sql_management_client_enums.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/my_sql_management_client_enums.py @@ -44,6 +44,15 @@ class SkuTier(str, Enum): memory_optimized = "MemoryOptimized" +class VirtualNetworkRuleState(str, Enum): + + initializing = "Initializing" + in_progress = "InProgress" + ready = "Ready" + deleting = "Deleting" + unknown = "Unknown" + + class OperationOrigin(str, Enum): not_specified = "NotSpecified" diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_properties_for_default_create_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_properties_for_default_create_py3.py index 96215514555d..68c237b8962e 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_properties_for_default_create_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_properties_for_default_create_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .server_properties_for_create import ServerPropertiesForCreate +from .server_properties_for_create_py3 import ServerPropertiesForCreate class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_properties_for_geo_restore_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_properties_for_geo_restore_py3.py index dd6cfb4d3541..62965b211045 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_properties_for_geo_restore_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_properties_for_geo_restore_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .server_properties_for_create import ServerPropertiesForCreate +from .server_properties_for_create_py3 import ServerPropertiesForCreate class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_properties_for_restore_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_properties_for_restore_py3.py index 2922fd4e075b..eeb71dab3867 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_properties_for_restore_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_properties_for_restore_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .server_properties_for_create import ServerPropertiesForCreate +from .server_properties_for_create_py3 import ServerPropertiesForCreate class ServerPropertiesForRestore(ServerPropertiesForCreate): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_py3.py index c31b74ba0645..74b39f0e3560 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .tracked_resource import TrackedResource +from .tracked_resource_py3 import TrackedResource class Server(TrackedResource): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/tracked_resource_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/tracked_resource_py3.py index 40868a3f44d8..0fbc3cc3edc9 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/tracked_resource_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/tracked_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class TrackedResource(ProxyResource): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/virtual_network_rule.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/virtual_network_rule.py new file mode 100644 index 000000000000..adde320b0085 --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/virtual_network_rule.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param virtual_network_subnet_id: Required. The ARM resource id of the + virtual network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or + ~azure.mgmt.rdbms.mysql.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) + self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) + self.state = None diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/virtual_network_rule_paged.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/virtual_network_rule_paged.py new file mode 100644 index 000000000000..a7eaf18d22bc --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/virtual_network_rule_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class VirtualNetworkRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetworkRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/virtual_network_rule_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/virtual_network_rule_py3.py new file mode 100644 index 000000000000..c0068605e57c --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/virtual_network_rule_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param virtual_network_subnet_id: Required. The ARM resource id of the + virtual network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or + ~azure.mgmt.rdbms.mysql.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = virtual_network_subnet_id + self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint + self.state = None diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/my_sql_management_client.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/my_sql_management_client.py index 789f4fd8984a..4acabe526c05 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/my_sql_management_client.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/my_sql_management_client.py @@ -9,12 +9,13 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from .operations.servers_operations import ServersOperations from .operations.firewall_rules_operations import FirewallRulesOperations +from .operations.virtual_network_rules_operations import VirtualNetworkRulesOperations from .operations.databases_operations import DatabasesOperations from .operations.configurations_operations import ConfigurationsOperations from .operations.log_files_operations import LogFilesOperations @@ -57,8 +58,8 @@ def __init__( self.subscription_id = subscription_id -class MySQLManagementClient(object): - """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, log files and configurations with new business model. +class MySQLManagementClient(SDKClient): + """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. :ivar config: Configuration for client. :vartype config: MySQLManagementClientConfiguration @@ -67,6 +68,8 @@ class MySQLManagementClient(object): :vartype servers: azure.mgmt.rdbms.mysql.operations.ServersOperations :ivar firewall_rules: FirewallRules operations :vartype firewall_rules: azure.mgmt.rdbms.mysql.operations.FirewallRulesOperations + :ivar virtual_network_rules: VirtualNetworkRules operations + :vartype virtual_network_rules: azure.mgmt.rdbms.mysql.operations.VirtualNetworkRulesOperations :ivar databases: Databases operations :vartype databases: azure.mgmt.rdbms.mysql.operations.DatabasesOperations :ivar configurations: Configurations operations @@ -93,7 +96,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = MySQLManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(MySQLManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '2017-12-01' @@ -104,6 +107,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.firewall_rules = FirewallRulesOperations( self._client, self.config, self._serialize, self._deserialize) + self.virtual_network_rules = VirtualNetworkRulesOperations( + self._client, self.config, self._serialize, self._deserialize) self.databases = DatabasesOperations( self._client, self.config, self._serialize, self._deserialize) self.configurations = ConfigurationsOperations( diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/__init__.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/__init__.py index 323618c0dd5f..6020f85ddf6e 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/__init__.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/__init__.py @@ -11,6 +11,7 @@ from .servers_operations import ServersOperations from .firewall_rules_operations import FirewallRulesOperations +from .virtual_network_rules_operations import VirtualNetworkRulesOperations from .databases_operations import DatabasesOperations from .configurations_operations import ConfigurationsOperations from .log_files_operations import LogFilesOperations @@ -21,6 +22,7 @@ __all__ = [ 'ServersOperations', 'FirewallRulesOperations', + 'VirtualNetworkRulesOperations', 'DatabasesOperations', 'ConfigurationsOperations', 'LogFilesOperations', diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/virtual_network_rules_operations.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/virtual_network_rules_operations.py new file mode 100644 index 000000000000..02fc092cc3e9 --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/virtual_network_rules_operations.py @@ -0,0 +1,384 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualNetworkRulesOperations(object): + """VirtualNetworkRulesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def get( + self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): + """Gets a virtual network rule. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param virtual_network_rule_name: The name of the virtual network + rule. + :type virtual_network_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualNetworkRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} + + + def _create_or_update_initial( + self, resource_group_name, server_name, virtual_network_rule_name, virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=None, custom_headers=None, raw=False, **operation_config): + parameters = models.VirtualNetworkRule(virtual_network_subnet_id=virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualNetworkRule') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkRule', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, virtual_network_rule_name, virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates an existing virtual network rule. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param virtual_network_rule_name: The name of the virtual network + rule. + :type virtual_network_rule_name: str + :param virtual_network_subnet_id: The ARM resource id of the virtual + network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule + before the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualNetworkRule or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + virtual_network_rule_name=virtual_network_rule_name, + virtual_network_subnet_id=virtual_network_subnet_id, + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualNetworkRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} + + + def _delete_initial( + self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the virtual network rule with the given name. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param virtual_network_rule_name: The name of the virtual network + rule. + :type virtual_network_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + server_name=server_name, + virtual_network_rule_name=virtual_network_rule_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual network rules in a server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualNetworkRule + :rtype: + ~azure.mgmt.rdbms.mysql.models.VirtualNetworkRulePaged[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/virtualNetworkRules'} diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/__init__.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/__init__.py index 14ff84b0f760..77b55e228bde 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/__init__.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/__init__.py @@ -22,6 +22,7 @@ from .server_for_create_py3 import ServerForCreate from .server_update_parameters_py3 import ServerUpdateParameters from .firewall_rule_py3 import FirewallRule + from .virtual_network_rule_py3 import VirtualNetworkRule from .database_py3 import Database from .configuration_py3 import Configuration from .operation_display_py3 import OperationDisplay @@ -32,6 +33,7 @@ from .performance_tier_properties_py3 import PerformanceTierProperties from .name_availability_request_py3 import NameAvailabilityRequest from .name_availability_py3 import NameAvailability + from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy except (SyntaxError, ImportError): from .proxy_resource import ProxyResource from .tracked_resource import TrackedResource @@ -45,6 +47,7 @@ from .server_for_create import ServerForCreate from .server_update_parameters import ServerUpdateParameters from .firewall_rule import FirewallRule + from .virtual_network_rule import VirtualNetworkRule from .database import Database from .configuration import Configuration from .operation_display import OperationDisplay @@ -55,8 +58,10 @@ from .performance_tier_properties import PerformanceTierProperties from .name_availability_request import NameAvailabilityRequest from .name_availability import NameAvailability + from .server_security_alert_policy import ServerSecurityAlertPolicy from .server_paged import ServerPaged from .firewall_rule_paged import FirewallRulePaged +from .virtual_network_rule_paged import VirtualNetworkRulePaged from .database_paged import DatabasePaged from .configuration_paged import ConfigurationPaged from .log_file_paged import LogFilePaged @@ -67,7 +72,9 @@ ServerState, GeoRedundantBackup, SkuTier, + VirtualNetworkRuleState, OperationOrigin, + ServerSecurityAlertPolicyState, ) __all__ = [ @@ -83,6 +90,7 @@ 'ServerForCreate', 'ServerUpdateParameters', 'FirewallRule', + 'VirtualNetworkRule', 'Database', 'Configuration', 'OperationDisplay', @@ -93,8 +101,10 @@ 'PerformanceTierProperties', 'NameAvailabilityRequest', 'NameAvailability', + 'ServerSecurityAlertPolicy', 'ServerPaged', 'FirewallRulePaged', + 'VirtualNetworkRulePaged', 'DatabasePaged', 'ConfigurationPaged', 'LogFilePaged', @@ -104,5 +114,7 @@ 'ServerState', 'GeoRedundantBackup', 'SkuTier', + 'VirtualNetworkRuleState', 'OperationOrigin', + 'ServerSecurityAlertPolicyState', ] diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/configuration_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/configuration_py3.py index 00d29c7be6dc..59929c953a7e 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/configuration_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/configuration_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class Configuration(ProxyResource): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/database_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/database_py3.py index f5a2bce5f717..af8b0ce61e7c 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/database_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/database_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class Database(ProxyResource): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/firewall_rule_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/firewall_rule_py3.py index c65ec79d8319..f5da7a6331e5 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/firewall_rule_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/firewall_rule_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class FirewallRule(ProxyResource): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/log_file_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/log_file_py3.py index a8dd0f908280..aa8edbe0ca9a 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/log_file_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/log_file_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class LogFile(ProxyResource): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/postgre_sql_management_client_enums.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/postgre_sql_management_client_enums.py index 067e776798b4..113c45c3c003 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/postgre_sql_management_client_enums.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/postgre_sql_management_client_enums.py @@ -44,8 +44,23 @@ class SkuTier(str, Enum): memory_optimized = "MemoryOptimized" +class VirtualNetworkRuleState(str, Enum): + + initializing = "Initializing" + in_progress = "InProgress" + ready = "Ready" + deleting = "Deleting" + unknown = "Unknown" + + class OperationOrigin(str, Enum): not_specified = "NotSpecified" user = "user" system = "system" + + +class ServerSecurityAlertPolicyState(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_default_create_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_default_create_py3.py index 6bb8809b653c..0fb43758d0da 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_default_create_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_default_create_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .server_properties_for_create import ServerPropertiesForCreate +from .server_properties_for_create_py3 import ServerPropertiesForCreate class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_geo_restore_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_geo_restore_py3.py index 2e01f31edeed..91c47cc1418a 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_geo_restore_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_geo_restore_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .server_properties_for_create import ServerPropertiesForCreate +from .server_properties_for_create_py3 import ServerPropertiesForCreate class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_restore_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_restore_py3.py index 61f4aedc4f7c..c6ff05ab6077 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_restore_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_restore_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .server_properties_for_create import ServerPropertiesForCreate +from .server_properties_for_create_py3 import ServerPropertiesForCreate class ServerPropertiesForRestore(ServerPropertiesForCreate): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_py3.py index 2db1674947d2..29cafa54507d 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .tracked_resource import TrackedResource +from .tracked_resource_py3 import TrackedResource class Server(TrackedResource): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_security_alert_policy.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_security_alert_policy.py new file mode 100644 index 000000000000..2e42bd22f18d --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_security_alert_policy.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class ServerSecurityAlertPolicy(ProxyResource): + """A server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled. Possible values include: 'Enabled', 'Disabled' + :type state: str or + ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_security_alert_policy_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_security_alert_policy_py3.py new file mode 100644 index 000000000000..617957804304 --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_security_alert_policy_py3.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class ServerSecurityAlertPolicy(ProxyResource): + """A server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled. Possible values include: 'Enabled', 'Disabled' + :type state: str or + ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/tracked_resource_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/tracked_resource_py3.py index 40868a3f44d8..0fbc3cc3edc9 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/tracked_resource_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/tracked_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class TrackedResource(ProxyResource): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/virtual_network_rule.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/virtual_network_rule.py new file mode 100644 index 000000000000..4b8cc75b3307 --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/virtual_network_rule.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param virtual_network_subnet_id: Required. The ARM resource id of the + virtual network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or + ~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) + self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) + self.state = None diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/virtual_network_rule_paged.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/virtual_network_rule_paged.py new file mode 100644 index 000000000000..df6f247ff1a9 --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/virtual_network_rule_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class VirtualNetworkRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetworkRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/virtual_network_rule_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/virtual_network_rule_py3.py new file mode 100644 index 000000000000..1818cb580bf3 --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/virtual_network_rule_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param virtual_network_subnet_id: Required. The ARM resource id of the + virtual network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or + ~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = virtual_network_subnet_id + self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint + self.state = None diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/__init__.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/__init__.py index 323618c0dd5f..27ac2e7b90d4 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/__init__.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/__init__.py @@ -11,20 +11,24 @@ from .servers_operations import ServersOperations from .firewall_rules_operations import FirewallRulesOperations +from .virtual_network_rules_operations import VirtualNetworkRulesOperations from .databases_operations import DatabasesOperations from .configurations_operations import ConfigurationsOperations from .log_files_operations import LogFilesOperations from .location_based_performance_tier_operations import LocationBasedPerformanceTierOperations from .check_name_availability_operations import CheckNameAvailabilityOperations +from .server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations from .operations import Operations __all__ = [ 'ServersOperations', 'FirewallRulesOperations', + 'VirtualNetworkRulesOperations', 'DatabasesOperations', 'ConfigurationsOperations', 'LogFilesOperations', 'LocationBasedPerformanceTierOperations', 'CheckNameAvailabilityOperations', + 'ServerSecurityAlertPoliciesOperations', 'Operations', ] diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/server_security_alert_policies_operations.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/server_security_alert_policies_operations.py new file mode 100644 index 000000000000..249d0f9b35ea --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/server_security_alert_policies_operations.py @@ -0,0 +1,212 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ServerSecurityAlertPoliciesOperations(object): + """ServerSecurityAlertPoliciesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar security_alert_policy_name: The name of the security alert policy. Constant value: "Default". + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.security_alert_policy_name = "Default" + self.api_version = "2017-12-01" + + self.config = config + + def get( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Get a server's security alert policy. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServerSecurityAlertPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServerSecurityAlertPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}'} + + + def _create_or_update_initial( + self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ServerSecurityAlertPolicy') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServerSecurityAlertPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a threat detection policy. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param parameters: The server security alert policy. + :type parameters: + ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ServerSecurityAlertPolicy or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ServerSecurityAlertPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}'} diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/virtual_network_rules_operations.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/virtual_network_rules_operations.py new file mode 100644 index 000000000000..8a92b6a15a43 --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/virtual_network_rules_operations.py @@ -0,0 +1,384 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualNetworkRulesOperations(object): + """VirtualNetworkRulesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def get( + self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): + """Gets a virtual network rule. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param virtual_network_rule_name: The name of the virtual network + rule. + :type virtual_network_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualNetworkRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} + + + def _create_or_update_initial( + self, resource_group_name, server_name, virtual_network_rule_name, virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=None, custom_headers=None, raw=False, **operation_config): + parameters = models.VirtualNetworkRule(virtual_network_subnet_id=virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualNetworkRule') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkRule', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, virtual_network_rule_name, virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates an existing virtual network rule. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param virtual_network_rule_name: The name of the virtual network + rule. + :type virtual_network_rule_name: str + :param virtual_network_subnet_id: The ARM resource id of the virtual + network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule + before the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualNetworkRule or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + virtual_network_rule_name=virtual_network_rule_name, + virtual_network_subnet_id=virtual_network_subnet_id, + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualNetworkRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} + + + def _delete_initial( + self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the virtual network rule with the given name. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param virtual_network_rule_name: The name of the virtual network + rule. + :type virtual_network_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + server_name=server_name, + virtual_network_rule_name=virtual_network_rule_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual network rules in a server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualNetworkRule + :rtype: + ~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRulePaged[~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules'} diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/postgre_sql_management_client.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/postgre_sql_management_client.py index 205e43afb3b4..a19f2cc96a96 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/postgre_sql_management_client.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/postgre_sql_management_client.py @@ -9,17 +9,19 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from .operations.servers_operations import ServersOperations from .operations.firewall_rules_operations import FirewallRulesOperations +from .operations.virtual_network_rules_operations import VirtualNetworkRulesOperations from .operations.databases_operations import DatabasesOperations from .operations.configurations_operations import ConfigurationsOperations from .operations.log_files_operations import LogFilesOperations from .operations.location_based_performance_tier_operations import LocationBasedPerformanceTierOperations from .operations.check_name_availability_operations import CheckNameAvailabilityOperations +from .operations.server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations from .operations.operations import Operations from . import models @@ -57,8 +59,8 @@ def __init__( self.subscription_id = subscription_id -class PostgreSQLManagementClient(object): - """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, log files and configurations with new business model. +class PostgreSQLManagementClient(SDKClient): + """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. :ivar config: Configuration for client. :vartype config: PostgreSQLManagementClientConfiguration @@ -67,6 +69,8 @@ class PostgreSQLManagementClient(object): :vartype servers: azure.mgmt.rdbms.postgresql.operations.ServersOperations :ivar firewall_rules: FirewallRules operations :vartype firewall_rules: azure.mgmt.rdbms.postgresql.operations.FirewallRulesOperations + :ivar virtual_network_rules: VirtualNetworkRules operations + :vartype virtual_network_rules: azure.mgmt.rdbms.postgresql.operations.VirtualNetworkRulesOperations :ivar databases: Databases operations :vartype databases: azure.mgmt.rdbms.postgresql.operations.DatabasesOperations :ivar configurations: Configurations operations @@ -77,6 +81,8 @@ class PostgreSQLManagementClient(object): :vartype location_based_performance_tier: azure.mgmt.rdbms.postgresql.operations.LocationBasedPerformanceTierOperations :ivar check_name_availability: CheckNameAvailability operations :vartype check_name_availability: azure.mgmt.rdbms.postgresql.operations.CheckNameAvailabilityOperations + :ivar server_security_alert_policies: ServerSecurityAlertPolicies operations + :vartype server_security_alert_policies: azure.mgmt.rdbms.postgresql.operations.ServerSecurityAlertPoliciesOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.rdbms.postgresql.operations.Operations @@ -93,7 +99,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = PostgreSQLManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(PostgreSQLManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '2017-12-01' @@ -104,6 +110,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.firewall_rules = FirewallRulesOperations( self._client, self.config, self._serialize, self._deserialize) + self.virtual_network_rules = VirtualNetworkRulesOperations( + self._client, self.config, self._serialize, self._deserialize) self.databases = DatabasesOperations( self._client, self.config, self._serialize, self._deserialize) self.configurations = ConfigurationsOperations( @@ -114,5 +122,7 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.check_name_availability = CheckNameAvailabilityOperations( self._client, self.config, self._serialize, self._deserialize) + self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( + self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/version.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/version.py index 4e4e705f8106..aa163582f188 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/version.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/version.py @@ -5,5 +5,5 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "1.1.1" +VERSION = "1.2.0" diff --git a/azure-mgmt-rdbms/sdk_packaging.toml b/azure-mgmt-rdbms/sdk_packaging.toml new file mode 100644 index 000000000000..d837234a8122 --- /dev/null +++ b/azure-mgmt-rdbms/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-rdbms" +package_pprint_name = "RDBMS Management" +package_doc_id = "" +is_stable = false diff --git a/azure-mgmt-rdbms/setup.py b/azure-mgmt-rdbms/setup.py index 34fa7582f79c..11cabf50fc31 100644 --- a/azure-mgmt-rdbms/setup.py +++ b/azure-mgmt-rdbms/setup.py @@ -77,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure>=0.4.20,<2.0.0', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-recoveryservices/HISTORY.rst b/azure-mgmt-recoveryservices/HISTORY.rst index d0bf5debb2ca..2ac6e8d96beb 100644 --- a/azure-mgmt-recoveryservices/HISTORY.rst +++ b/azure-mgmt-recoveryservices/HISTORY.rst @@ -3,6 +3,48 @@ Release History =============== +0.3.0 (2018-05-25) +++++++++++++++++++ + +**Breaking Changes** + +- Removed operation group BackupVaultConfigsOperations (moved to azure-mgmt-recoveryservicesbackup) +- Removed operation group BackupStorageConfigsOperations (moved to azure-mgmt-recoveryservicesbackup) + +**Features** + +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + + 0.2.0 (2017-10-16) ++++++++++++++++++ diff --git a/azure-mgmt-recoveryservices/README.rst b/azure-mgmt-recoveryservices/README.rst index d502fe911251..469de038ba8d 100644 --- a/azure-mgmt-recoveryservices/README.rst +++ b/azure-mgmt-recoveryservices/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Recovery Services Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `Recovery Services -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/__init__.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/__init__.py index cc8accc616db..1e5718e6c81b 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/__init__.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/__init__.py @@ -9,57 +9,71 @@ # regenerated. # -------------------------------------------------------------------------- -from .backup_storage_config import BackupStorageConfig -from .backup_vault_config import BackupVaultConfig -from .vault_extended_info_resource import VaultExtendedInfoResource -from .sku import Sku -from .upgrade_details import UpgradeDetails -from .vault_properties import VaultProperties -from .vault import Vault -from .tracked_resource import TrackedResource -from .resource import Resource -from .raw_certificate_data import RawCertificateData -from .certificate_request import CertificateRequest -from .resource_certificate_and_aad_details import ResourceCertificateAndAadDetails -from .resource_certificate_and_acs_details import ResourceCertificateAndAcsDetails -from .resource_certificate_details import ResourceCertificateDetails -from .vault_certificate_response import VaultCertificateResponse -from .jobs_summary import JobsSummary -from .monitoring_summary import MonitoringSummary -from .replication_usage import ReplicationUsage -from .client_discovery_display import ClientDiscoveryDisplay -from .client_discovery_for_log_specification import ClientDiscoveryForLogSpecification -from .client_discovery_for_service_specification import ClientDiscoveryForServiceSpecification -from .client_discovery_for_properties import ClientDiscoveryForProperties -from .client_discovery_value_for_single_api import ClientDiscoveryValueForSingleApi -from .name_info import NameInfo -from .vault_usage import VaultUsage +try: + from .raw_certificate_data_py3 import RawCertificateData + from .certificate_request_py3 import CertificateRequest + from .resource_certificate_and_aad_details_py3 import ResourceCertificateAndAadDetails + from .resource_certificate_and_acs_details_py3 import ResourceCertificateAndAcsDetails + from .resource_certificate_details_py3 import ResourceCertificateDetails + from .vault_certificate_response_py3 import VaultCertificateResponse + from .jobs_summary_py3 import JobsSummary + from .monitoring_summary_py3 import MonitoringSummary + from .replication_usage_py3 import ReplicationUsage + from .client_discovery_display_py3 import ClientDiscoveryDisplay + from .client_discovery_for_log_specification_py3 import ClientDiscoveryForLogSpecification + from .client_discovery_for_service_specification_py3 import ClientDiscoveryForServiceSpecification + from .client_discovery_for_properties_py3 import ClientDiscoveryForProperties + from .client_discovery_value_for_single_api_py3 import ClientDiscoveryValueForSingleApi + from .resource_py3 import Resource + from .sku_py3 import Sku + from .tracked_resource_py3 import TrackedResource + from .patch_tracked_resource_py3 import PatchTrackedResource + from .upgrade_details_py3 import UpgradeDetails + from .vault_properties_py3 import VaultProperties + from .vault_py3 import Vault + from .patch_vault_py3 import PatchVault + from .vault_extended_info_resource_py3 import VaultExtendedInfoResource + from .name_info_py3 import NameInfo + from .vault_usage_py3 import VaultUsage +except (SyntaxError, ImportError): + from .raw_certificate_data import RawCertificateData + from .certificate_request import CertificateRequest + from .resource_certificate_and_aad_details import ResourceCertificateAndAadDetails + from .resource_certificate_and_acs_details import ResourceCertificateAndAcsDetails + from .resource_certificate_details import ResourceCertificateDetails + from .vault_certificate_response import VaultCertificateResponse + from .jobs_summary import JobsSummary + from .monitoring_summary import MonitoringSummary + from .replication_usage import ReplicationUsage + from .client_discovery_display import ClientDiscoveryDisplay + from .client_discovery_for_log_specification import ClientDiscoveryForLogSpecification + from .client_discovery_for_service_specification import ClientDiscoveryForServiceSpecification + from .client_discovery_for_properties import ClientDiscoveryForProperties + from .client_discovery_value_for_single_api import ClientDiscoveryValueForSingleApi + from .resource import Resource + from .sku import Sku + from .tracked_resource import TrackedResource + from .patch_tracked_resource import PatchTrackedResource + from .upgrade_details import UpgradeDetails + from .vault_properties import VaultProperties + from .vault import Vault + from .patch_vault import PatchVault + from .vault_extended_info_resource import VaultExtendedInfoResource + from .name_info import NameInfo + from .vault_usage import VaultUsage from .replication_usage_paged import ReplicationUsagePaged from .vault_paged import VaultPaged from .client_discovery_value_for_single_api_paged import ClientDiscoveryValueForSingleApiPaged from .vault_usage_paged import VaultUsagePaged from .recovery_services_client_enums import ( - StorageModelType, - StorageType, - StorageTypeState, - EnhancedSecurityState, + AuthType, SkuName, VaultUpgradeState, TriggerType, - AuthType, UsagesUnit, ) __all__ = [ - 'BackupStorageConfig', - 'BackupVaultConfig', - 'VaultExtendedInfoResource', - 'Sku', - 'UpgradeDetails', - 'VaultProperties', - 'Vault', - 'TrackedResource', - 'Resource', 'RawCertificateData', 'CertificateRequest', 'ResourceCertificateAndAadDetails', @@ -74,19 +88,24 @@ 'ClientDiscoveryForServiceSpecification', 'ClientDiscoveryForProperties', 'ClientDiscoveryValueForSingleApi', + 'Resource', + 'Sku', + 'TrackedResource', + 'PatchTrackedResource', + 'UpgradeDetails', + 'VaultProperties', + 'Vault', + 'PatchVault', + 'VaultExtendedInfoResource', 'NameInfo', 'VaultUsage', 'ReplicationUsagePaged', 'VaultPaged', 'ClientDiscoveryValueForSingleApiPaged', 'VaultUsagePaged', - 'StorageModelType', - 'StorageType', - 'StorageTypeState', - 'EnhancedSecurityState', + 'AuthType', 'SkuName', 'VaultUpgradeState', 'TriggerType', - 'AuthType', 'UsagesUnit', ] diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/backup_storage_config.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/backup_storage_config.py deleted file mode 100644 index 6441e323c755..000000000000 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/backup_storage_config.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class BackupStorageConfig(Resource): - """The backup storage config. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id represents the complete path to the resource. - :vartype id: str - :ivar name: Resource name associated with the resource. - :vartype name: str - :ivar type: Resource type represents the complete path of the form - Namespace/ResourceType/ResourceType/... - :vartype type: str - :param e_tag: Optional ETag. - :type e_tag: str - :param storage_model_type: Storage model type. Possible values include: - 'Invalid', 'GeoRedundant', 'LocallyRedundant' - :type storage_model_type: str or :class:`StorageModelType - ` - :param storage_type: Storage type. Possible values include: 'Invalid', - 'GeoRedundant', 'LocallyRedundant' - :type storage_type: str or :class:`StorageType - ` - :param storage_type_state: Locked or Unlocked. Once a machine is - registered against a resource, the storageTypeState is always Locked. - Possible values include: 'Invalid', 'Locked', 'Unlocked' - :type storage_type_state: str or :class:`StorageTypeState - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'storage_model_type': {'key': 'properties.storageModelType', 'type': 'str'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'storage_type_state': {'key': 'properties.storageTypeState', 'type': 'str'}, - } - - def __init__(self, e_tag=None, storage_model_type=None, storage_type=None, storage_type_state=None): - super(BackupStorageConfig, self).__init__(e_tag=e_tag) - self.storage_model_type = storage_model_type - self.storage_type = storage_type - self.storage_type_state = storage_type_state diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/backup_vault_config.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/backup_vault_config.py deleted file mode 100644 index 15ec39f617e6..000000000000 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/backup_vault_config.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class BackupVaultConfig(Resource): - """Backup vault config details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id represents the complete path to the resource. - :vartype id: str - :ivar name: Resource name associated with the resource. - :vartype name: str - :ivar type: Resource type represents the complete path of the form - Namespace/ResourceType/ResourceType/... - :vartype type: str - :param e_tag: Optional ETag. - :type e_tag: str - :param storage_type: Storage type. Possible values include: 'Invalid', - 'GeoRedundant', 'LocallyRedundant' - :type storage_type: str or :class:`StorageType - ` - :param storage_type_state: Locked or Unlocked. Once a machine is - registered against a resource, the storageTypeState is always Locked. - Possible values include: 'Invalid', 'Locked', 'Unlocked' - :type storage_type_state: str or :class:`StorageTypeState - ` - :param enhanced_security_state: Enabled or Disabled. Possible values - include: 'Invalid', 'Enabled', 'Disabled' - :type enhanced_security_state: str or :class:`EnhancedSecurityState - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'storage_type_state': {'key': 'properties.storageTypeState', 'type': 'str'}, - 'enhanced_security_state': {'key': 'properties.enhancedSecurityState', 'type': 'str'}, - } - - def __init__(self, e_tag=None, storage_type=None, storage_type_state=None, enhanced_security_state=None): - super(BackupVaultConfig, self).__init__(e_tag=e_tag) - self.storage_type = storage_type - self.storage_type_state = storage_type_state - self.enhanced_security_state = enhanced_security_state diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/certificate_request.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/certificate_request.py index aef4ef2c38ac..ff049a56dd47 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/certificate_request.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/certificate_request.py @@ -16,13 +16,13 @@ class CertificateRequest(Model): """Details of the certificate to be uploaded to the vault. :param properties: - :type properties: :class:`RawCertificateData - ` + :type properties: ~azure.mgmt.recoveryservices.models.RawCertificateData """ _attribute_map = { 'properties': {'key': 'properties', 'type': 'RawCertificateData'}, } - def __init__(self, properties=None): - self.properties = properties + def __init__(self, **kwargs): + super(CertificateRequest, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/certificate_request_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/certificate_request_py3.py new file mode 100644 index 000000000000..0d7d4498e01e --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/certificate_request_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CertificateRequest(Model): + """Details of the certificate to be uploaded to the vault. + + :param properties: + :type properties: ~azure.mgmt.recoveryservices.models.RawCertificateData + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RawCertificateData'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(CertificateRequest, self).__init__(**kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_display.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_display.py index dbc271de1f39..d9557c7b3122 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_display.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_display.py @@ -17,23 +17,25 @@ class ClientDiscoveryDisplay(Model): :param provider: Name of the provider for display purposes :type provider: str - :param resource: Name of the resource type for display purposes + :param resource: ResourceType for which this Operation can be performed. :type resource: str - :param operation: Name of the operation for display purposes + :param operation: Operations Name itself. :type operation: str - :param description: Description of the operation for display purposes + :param description: Description of the operation having details of what + operation is about. :type description: str """ _attribute_map = { - 'provider': {'key': 'Provider', 'type': 'str'}, - 'resource': {'key': 'Resource', 'type': 'str'}, - 'operation': {'key': 'Operation', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, resource=None, operation=None, description=None): - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description + def __init__(self, **kwargs): + super(ClientDiscoveryDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_display_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_display_py3.py new file mode 100644 index 000000000000..61ce520a52bd --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_display_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClientDiscoveryDisplay(Model): + """Localized display information of an operation. + + :param provider: Name of the provider for display purposes + :type provider: str + :param resource: ResourceType for which this Operation can be performed. + :type resource: str + :param operation: Operations Name itself. + :type operation: str + :param description: Description of the operation having details of what + operation is about. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(ClientDiscoveryDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_log_specification.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_log_specification.py index 63275818193c..1bc515721f88 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_log_specification.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_log_specification.py @@ -29,7 +29,8 @@ class ClientDiscoveryForLogSpecification(Model): 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, } - def __init__(self, name=None, display_name=None, blob_duration=None): - self.name = name - self.display_name = display_name - self.blob_duration = blob_duration + def __init__(self, **kwargs): + super(ClientDiscoveryForLogSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.blob_duration = kwargs.get('blob_duration', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_log_specification_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_log_specification_py3.py new file mode 100644 index 000000000000..f1f246c1a207 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_log_specification_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClientDiscoveryForLogSpecification(Model): + """Class to represent shoebox log specification in json client discovery. + + :param name: Name of the log. + :type name: str + :param display_name: Localized display name + :type display_name: str + :param blob_duration: Blobs created in customer storage account per hour + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, blob_duration: str=None, **kwargs) -> None: + super(ClientDiscoveryForLogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_properties.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_properties.py index e692182a882e..cd716c5f3e1f 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_properties.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_properties.py @@ -17,13 +17,13 @@ class ClientDiscoveryForProperties(Model): :param service_specification: Operation properties. :type service_specification: - :class:`ClientDiscoveryForServiceSpecification - ` + ~azure.mgmt.recoveryservices.models.ClientDiscoveryForServiceSpecification """ _attribute_map = { 'service_specification': {'key': 'serviceSpecification', 'type': 'ClientDiscoveryForServiceSpecification'}, } - def __init__(self, service_specification=None): - self.service_specification = service_specification + def __init__(self, **kwargs): + super(ClientDiscoveryForProperties, self).__init__(**kwargs) + self.service_specification = kwargs.get('service_specification', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_properties_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_properties_py3.py new file mode 100644 index 000000000000..e0ba1d3ab791 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_properties_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClientDiscoveryForProperties(Model): + """Class to represent shoebox properties in json client discovery. + + :param service_specification: Operation properties. + :type service_specification: + ~azure.mgmt.recoveryservices.models.ClientDiscoveryForServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ClientDiscoveryForServiceSpecification'}, + } + + def __init__(self, *, service_specification=None, **kwargs) -> None: + super(ClientDiscoveryForProperties, self).__init__(**kwargs) + self.service_specification = service_specification diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_service_specification.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_service_specification.py index 93e71a534bc4..3fc38e4618c8 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_service_specification.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_service_specification.py @@ -16,14 +16,14 @@ class ClientDiscoveryForServiceSpecification(Model): """Class to represent shoebox service specification in json client discovery. :param log_specifications: List of log specifications of this operation. - :type log_specifications: list of - :class:`ClientDiscoveryForLogSpecification - ` + :type log_specifications: + list[~azure.mgmt.recoveryservices.models.ClientDiscoveryForLogSpecification] """ _attribute_map = { 'log_specifications': {'key': 'logSpecifications', 'type': '[ClientDiscoveryForLogSpecification]'}, } - def __init__(self, log_specifications=None): - self.log_specifications = log_specifications + def __init__(self, **kwargs): + super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_service_specification_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_service_specification_py3.py new file mode 100644 index 000000000000..c53d86c7072a --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_service_specification_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClientDiscoveryForServiceSpecification(Model): + """Class to represent shoebox service specification in json client discovery. + + :param log_specifications: List of log specifications of this operation. + :type log_specifications: + list[~azure.mgmt.recoveryservices.models.ClientDiscoveryForLogSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[ClientDiscoveryForLogSpecification]'}, + } + + def __init__(self, *, log_specifications=None, **kwargs) -> None: + super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api.py index 2b5d28a46042..4d751b8e281e 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api.py @@ -15,29 +15,29 @@ class ClientDiscoveryValueForSingleApi(Model): """Available operation details. - :param name: Name of the operation + :param name: Name of the Operation. :type name: str :param display: Contains the localized display information for this particular operation - :type display: :class:`ClientDiscoveryDisplay - ` + :type display: ~azure.mgmt.recoveryservices.models.ClientDiscoveryDisplay :param origin: The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX :type origin: str - :param properties: Properties - :type properties: :class:`ClientDiscoveryForProperties - ` + :param properties: ShoeBox properties for the given operation. + :type properties: + ~azure.mgmt.recoveryservices.models.ClientDiscoveryForProperties """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'display': {'key': 'Display', 'type': 'ClientDiscoveryDisplay'}, - 'origin': {'key': 'Origin', 'type': 'str'}, - 'properties': {'key': 'Properties', 'type': 'ClientDiscoveryForProperties'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ClientDiscoveryDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClientDiscoveryForProperties'}, } - def __init__(self, name=None, display=None, origin=None, properties=None): - self.name = name - self.display = display - self.origin = origin - self.properties = properties + def __init__(self, **kwargs): + super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api_paged.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api_paged.py index a2f16e385d27..e319d306f170 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api_paged.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api_paged.py @@ -18,8 +18,8 @@ class ClientDiscoveryValueForSingleApiPaged(Paged): """ _attribute_map = { - 'next_link': {'key': 'NextLink', 'type': 'str'}, - 'current_page': {'key': 'Value', 'type': '[ClientDiscoveryValueForSingleApi]'} + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ClientDiscoveryValueForSingleApi]'} } def __init__(self, *args, **kwargs): diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api_py3.py new file mode 100644 index 000000000000..6dd23d38991b --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClientDiscoveryValueForSingleApi(Model): + """Available operation details. + + :param name: Name of the Operation. + :type name: str + :param display: Contains the localized display information for this + particular operation + :type display: ~azure.mgmt.recoveryservices.models.ClientDiscoveryDisplay + :param origin: The intended executor of the operation;governs the display + of the operation in the RBAC UX and the audit logs UX + :type origin: str + :param properties: ShoeBox properties for the given operation. + :type properties: + ~azure.mgmt.recoveryservices.models.ClientDiscoveryForProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ClientDiscoveryDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClientDiscoveryForProperties'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/jobs_summary.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/jobs_summary.py index 1da651109dc2..ef94f069fb13 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/jobs_summary.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/jobs_summary.py @@ -29,7 +29,8 @@ class JobsSummary(Model): 'in_progress_jobs': {'key': 'inProgressJobs', 'type': 'int'}, } - def __init__(self, failed_jobs=None, suspended_jobs=None, in_progress_jobs=None): - self.failed_jobs = failed_jobs - self.suspended_jobs = suspended_jobs - self.in_progress_jobs = in_progress_jobs + def __init__(self, **kwargs): + super(JobsSummary, self).__init__(**kwargs) + self.failed_jobs = kwargs.get('failed_jobs', None) + self.suspended_jobs = kwargs.get('suspended_jobs', None) + self.in_progress_jobs = kwargs.get('in_progress_jobs', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/jobs_summary_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/jobs_summary_py3.py new file mode 100644 index 000000000000..cc48f3d12e84 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/jobs_summary_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobsSummary(Model): + """Summary of the replication job data for this vault. + + :param failed_jobs: Count of failed jobs. + :type failed_jobs: int + :param suspended_jobs: Count of suspended jobs. + :type suspended_jobs: int + :param in_progress_jobs: Count of in-progress jobs. + :type in_progress_jobs: int + """ + + _attribute_map = { + 'failed_jobs': {'key': 'failedJobs', 'type': 'int'}, + 'suspended_jobs': {'key': 'suspendedJobs', 'type': 'int'}, + 'in_progress_jobs': {'key': 'inProgressJobs', 'type': 'int'}, + } + + def __init__(self, *, failed_jobs: int=None, suspended_jobs: int=None, in_progress_jobs: int=None, **kwargs) -> None: + super(JobsSummary, self).__init__(**kwargs) + self.failed_jobs = failed_jobs + self.suspended_jobs = suspended_jobs + self.in_progress_jobs = in_progress_jobs diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/monitoring_summary.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/monitoring_summary.py index 11cbe8999979..9e00d698a5d2 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/monitoring_summary.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/monitoring_summary.py @@ -42,10 +42,11 @@ class MonitoringSummary(Model): 'unsupported_provider_count': {'key': 'unsupportedProviderCount', 'type': 'int'}, } - def __init__(self, un_healthy_vm_count=None, un_healthy_provider_count=None, events_count=None, deprecated_provider_count=None, supported_provider_count=None, unsupported_provider_count=None): - self.un_healthy_vm_count = un_healthy_vm_count - self.un_healthy_provider_count = un_healthy_provider_count - self.events_count = events_count - self.deprecated_provider_count = deprecated_provider_count - self.supported_provider_count = supported_provider_count - self.unsupported_provider_count = unsupported_provider_count + def __init__(self, **kwargs): + super(MonitoringSummary, self).__init__(**kwargs) + self.un_healthy_vm_count = kwargs.get('un_healthy_vm_count', None) + self.un_healthy_provider_count = kwargs.get('un_healthy_provider_count', None) + self.events_count = kwargs.get('events_count', None) + self.deprecated_provider_count = kwargs.get('deprecated_provider_count', None) + self.supported_provider_count = kwargs.get('supported_provider_count', None) + self.unsupported_provider_count = kwargs.get('unsupported_provider_count', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/monitoring_summary_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/monitoring_summary_py3.py new file mode 100644 index 000000000000..7b8ae0aacb01 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/monitoring_summary_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MonitoringSummary(Model): + """Summary of the replication monitoring data for this vault. + + :param un_healthy_vm_count: Count of unhealthy VMs. + :type un_healthy_vm_count: int + :param un_healthy_provider_count: Count of unhealthy replication + providers. + :type un_healthy_provider_count: int + :param events_count: Count of all critical warnings. + :type events_count: int + :param deprecated_provider_count: Count of all deprecated recovery service + providers. + :type deprecated_provider_count: int + :param supported_provider_count: Count of all the supported recovery + service providers. + :type supported_provider_count: int + :param unsupported_provider_count: Count of all the unsupported recovery + service providers. + :type unsupported_provider_count: int + """ + + _attribute_map = { + 'un_healthy_vm_count': {'key': 'unHealthyVmCount', 'type': 'int'}, + 'un_healthy_provider_count': {'key': 'unHealthyProviderCount', 'type': 'int'}, + 'events_count': {'key': 'eventsCount', 'type': 'int'}, + 'deprecated_provider_count': {'key': 'deprecatedProviderCount', 'type': 'int'}, + 'supported_provider_count': {'key': 'supportedProviderCount', 'type': 'int'}, + 'unsupported_provider_count': {'key': 'unsupportedProviderCount', 'type': 'int'}, + } + + def __init__(self, *, un_healthy_vm_count: int=None, un_healthy_provider_count: int=None, events_count: int=None, deprecated_provider_count: int=None, supported_provider_count: int=None, unsupported_provider_count: int=None, **kwargs) -> None: + super(MonitoringSummary, self).__init__(**kwargs) + self.un_healthy_vm_count = un_healthy_vm_count + self.un_healthy_provider_count = un_healthy_provider_count + self.events_count = events_count + self.deprecated_provider_count = deprecated_provider_count + self.supported_provider_count = supported_provider_count + self.unsupported_provider_count = unsupported_provider_count diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/name_info.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/name_info.py index 647b137a7f5d..fe124296d77a 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/name_info.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/name_info.py @@ -26,6 +26,7 @@ class NameInfo(Model): 'localized_value': {'key': 'localizedValue', 'type': 'str'}, } - def __init__(self, value=None, localized_value=None): - self.value = value - self.localized_value = localized_value + def __init__(self, **kwargs): + super(NameInfo, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/name_info_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/name_info_py3.py new file mode 100644 index 000000000000..92ebeac4e05f --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/name_info_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NameInfo(Model): + """The name of usage. + + :param value: Value of usage. + :type value: str + :param localized_value: Localized value of usage. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(NameInfo, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_tracked_resource.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_tracked_resource.py new file mode 100644 index 000000000000..889a5e236720 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_tracked_resource.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class PatchTrackedResource(Resource): + """Tracked resource with location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param e_tag: Optional ETag. + :type e_tag: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(PatchTrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_tracked_resource_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_tracked_resource_py3.py new file mode 100644 index 000000000000..f79d055cde3a --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_tracked_resource_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class PatchTrackedResource(Resource): + """Tracked resource with location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param e_tag: Optional ETag. + :type e_tag: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, e_tag: str=None, location: str=None, tags=None, **kwargs) -> None: + super(PatchTrackedResource, self).__init__(e_tag=e_tag, **kwargs) + self.location = location + self.tags = tags diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_vault.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_vault.py new file mode 100644 index 000000000000..be99238e2e7e --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_vault.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .patch_tracked_resource import PatchTrackedResource + + +class PatchVault(PatchTrackedResource): + """Patch Resource information, as returned by the resource provider. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param e_tag: Optional ETag. + :type e_tag: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param properties: + :type properties: ~azure.mgmt.recoveryservices.models.VaultProperties + :param sku: + :type sku: ~azure.mgmt.recoveryservices.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'VaultProperties'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(PatchVault, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_vault_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_vault_py3.py new file mode 100644 index 000000000000..2bb665fed593 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_vault_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .patch_tracked_resource_py3 import PatchTrackedResource + + +class PatchVault(PatchTrackedResource): + """Patch Resource information, as returned by the resource provider. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param e_tag: Optional ETag. + :type e_tag: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param properties: + :type properties: ~azure.mgmt.recoveryservices.models.VaultProperties + :param sku: + :type sku: ~azure.mgmt.recoveryservices.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'VaultProperties'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, e_tag: str=None, location: str=None, tags=None, properties=None, sku=None, **kwargs) -> None: + super(PatchVault, self).__init__(e_tag=e_tag, location=location, tags=tags, **kwargs) + self.properties = properties + self.sku = sku diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/raw_certificate_data.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/raw_certificate_data.py index a6d0d8054836..fa5bd2cf14a6 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/raw_certificate_data.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/raw_certificate_data.py @@ -18,8 +18,7 @@ class RawCertificateData(Model): :param auth_type: Specifies the authentication type. Possible values include: 'Invalid', 'ACS', 'AAD', 'AccessControlService', 'AzureActiveDirectory' - :type auth_type: str or :class:`AuthType - ` + :type auth_type: str or ~azure.mgmt.recoveryservices.models.AuthType :param certificate: The base64 encoded certificate raw data string :type certificate: bytearray """ @@ -29,6 +28,7 @@ class RawCertificateData(Model): 'certificate': {'key': 'certificate', 'type': 'bytearray'}, } - def __init__(self, auth_type=None, certificate=None): - self.auth_type = auth_type - self.certificate = certificate + def __init__(self, **kwargs): + super(RawCertificateData, self).__init__(**kwargs) + self.auth_type = kwargs.get('auth_type', None) + self.certificate = kwargs.get('certificate', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/raw_certificate_data_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/raw_certificate_data_py3.py new file mode 100644 index 000000000000..49f735653918 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/raw_certificate_data_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RawCertificateData(Model): + """Raw certificate data. + + :param auth_type: Specifies the authentication type. Possible values + include: 'Invalid', 'ACS', 'AAD', 'AccessControlService', + 'AzureActiveDirectory' + :type auth_type: str or ~azure.mgmt.recoveryservices.models.AuthType + :param certificate: The base64 encoded certificate raw data string + :type certificate: bytearray + """ + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'certificate': {'key': 'certificate', 'type': 'bytearray'}, + } + + def __init__(self, *, auth_type=None, certificate: bytearray=None, **kwargs) -> None: + super(RawCertificateData, self).__init__(**kwargs) + self.auth_type = auth_type + self.certificate = certificate diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/recovery_services_client_enums.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/recovery_services_client_enums.py index 0c2efdf5aba2..fa46795f2fbd 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/recovery_services_client_enums.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/recovery_services_client_enums.py @@ -12,41 +12,22 @@ from enum import Enum -class StorageModelType(Enum): +class AuthType(str, Enum): invalid = "Invalid" - geo_redundant = "GeoRedundant" - locally_redundant = "LocallyRedundant" - - -class StorageType(Enum): - - invalid = "Invalid" - geo_redundant = "GeoRedundant" - locally_redundant = "LocallyRedundant" - - -class StorageTypeState(Enum): - - invalid = "Invalid" - locked = "Locked" - unlocked = "Unlocked" - - -class EnhancedSecurityState(Enum): - - invalid = "Invalid" - enabled = "Enabled" - disabled = "Disabled" + acs = "ACS" + aad = "AAD" + access_control_service = "AccessControlService" + azure_active_directory = "AzureActiveDirectory" -class SkuName(Enum): +class SkuName(str, Enum): standard = "Standard" rs0 = "RS0" -class VaultUpgradeState(Enum): +class VaultUpgradeState(str, Enum): unknown = "Unknown" in_progress = "InProgress" @@ -54,22 +35,13 @@ class VaultUpgradeState(Enum): failed = "Failed" -class TriggerType(Enum): +class TriggerType(str, Enum): user_triggered = "UserTriggered" forced_upgrade = "ForcedUpgrade" -class AuthType(Enum): - - invalid = "Invalid" - acs = "ACS" - aad = "AAD" - access_control_service = "AccessControlService" - azure_active_directory = "AzureActiveDirectory" - - -class UsagesUnit(Enum): +class UsagesUnit(str, Enum): count = "Count" bytes = "Bytes" diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/replication_usage.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/replication_usage.py index cb2177bfe99c..1bbc9f04e5f3 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/replication_usage.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/replication_usage.py @@ -17,11 +17,10 @@ class ReplicationUsage(Model): :param monitoring_summary: Summary of the replication monitoring data for this vault. - :type monitoring_summary: :class:`MonitoringSummary - ` + :type monitoring_summary: + ~azure.mgmt.recoveryservices.models.MonitoringSummary :param jobs_summary: Summary of the replication jobs data for this vault. - :type jobs_summary: :class:`JobsSummary - ` + :type jobs_summary: ~azure.mgmt.recoveryservices.models.JobsSummary :param protected_item_count: Number of replication protected items for this vault. :type protected_item_count: int @@ -45,10 +44,11 @@ class ReplicationUsage(Model): 'recovery_services_provider_auth_type': {'key': 'recoveryServicesProviderAuthType', 'type': 'int'}, } - def __init__(self, monitoring_summary=None, jobs_summary=None, protected_item_count=None, recovery_plan_count=None, registered_servers_count=None, recovery_services_provider_auth_type=None): - self.monitoring_summary = monitoring_summary - self.jobs_summary = jobs_summary - self.protected_item_count = protected_item_count - self.recovery_plan_count = recovery_plan_count - self.registered_servers_count = registered_servers_count - self.recovery_services_provider_auth_type = recovery_services_provider_auth_type + def __init__(self, **kwargs): + super(ReplicationUsage, self).__init__(**kwargs) + self.monitoring_summary = kwargs.get('monitoring_summary', None) + self.jobs_summary = kwargs.get('jobs_summary', None) + self.protected_item_count = kwargs.get('protected_item_count', None) + self.recovery_plan_count = kwargs.get('recovery_plan_count', None) + self.registered_servers_count = kwargs.get('registered_servers_count', None) + self.recovery_services_provider_auth_type = kwargs.get('recovery_services_provider_auth_type', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/replication_usage_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/replication_usage_py3.py new file mode 100644 index 000000000000..39603411f575 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/replication_usage_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicationUsage(Model): + """Replication usages of a vault. + + :param monitoring_summary: Summary of the replication monitoring data for + this vault. + :type monitoring_summary: + ~azure.mgmt.recoveryservices.models.MonitoringSummary + :param jobs_summary: Summary of the replication jobs data for this vault. + :type jobs_summary: ~azure.mgmt.recoveryservices.models.JobsSummary + :param protected_item_count: Number of replication protected items for + this vault. + :type protected_item_count: int + :param recovery_plan_count: Number of replication recovery plans for this + vault. + :type recovery_plan_count: int + :param registered_servers_count: Number of servers registered to this + vault. + :type registered_servers_count: int + :param recovery_services_provider_auth_type: The authentication type of + recovery service providers in the vault. + :type recovery_services_provider_auth_type: int + """ + + _attribute_map = { + 'monitoring_summary': {'key': 'monitoringSummary', 'type': 'MonitoringSummary'}, + 'jobs_summary': {'key': 'jobsSummary', 'type': 'JobsSummary'}, + 'protected_item_count': {'key': 'protectedItemCount', 'type': 'int'}, + 'recovery_plan_count': {'key': 'recoveryPlanCount', 'type': 'int'}, + 'registered_servers_count': {'key': 'registeredServersCount', 'type': 'int'}, + 'recovery_services_provider_auth_type': {'key': 'recoveryServicesProviderAuthType', 'type': 'int'}, + } + + def __init__(self, *, monitoring_summary=None, jobs_summary=None, protected_item_count: int=None, recovery_plan_count: int=None, registered_servers_count: int=None, recovery_services_provider_auth_type: int=None, **kwargs) -> None: + super(ReplicationUsage, self).__init__(**kwargs) + self.monitoring_summary = monitoring_summary + self.jobs_summary = jobs_summary + self.protected_item_count = protected_item_count + self.recovery_plan_count = recovery_plan_count + self.registered_servers_count = registered_servers_count + self.recovery_services_provider_auth_type = recovery_services_provider_auth_type diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource.py index 37709eedb37f..07459742118d 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource.py @@ -42,8 +42,9 @@ class Resource(Model): 'e_tag': {'key': 'eTag', 'type': 'str'}, } - def __init__(self, e_tag=None): + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.e_tag = e_tag + self.e_tag = kwargs.get('e_tag', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_aad_details.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_aad_details.py index e1abca08bba1..521c0b2ab160 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_aad_details.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_aad_details.py @@ -15,6 +15,8 @@ class ResourceCertificateAndAadDetails(ResourceCertificateDetails): """Certificate details representing the Vault credentials for AAD. + All required parameters must be populated in order to send to Azure. + :param certificate: The base64 encoded certificate raw data string. :type certificate: bytearray :param friendly_name: Certificate friendlyname. @@ -31,18 +33,20 @@ class ResourceCertificateAndAadDetails(ResourceCertificateDetails): :type valid_from: datetime :param valid_to: Certificate Validity End Date time. :type valid_to: datetime - :param auth_type: Polymorphic Discriminator + :param auth_type: Required. Constant filled by server. :type auth_type: str - :param aad_authority: AAD tenant authority. + :param aad_authority: Required. AAD tenant authority. :type aad_authority: str - :param aad_tenant_id: AAD tenant Id. + :param aad_tenant_id: Required. AAD tenant Id. :type aad_tenant_id: str - :param service_principal_client_id: AAD service principal clientId. + :param service_principal_client_id: Required. AAD service principal + clientId. :type service_principal_client_id: str - :param service_principal_object_id: AAD service principal ObjectId. + :param service_principal_object_id: Required. AAD service principal + ObjectId. :type service_principal_object_id: str - :param azure_management_endpoint_audience: Azure Management Endpoint - Audience. + :param azure_management_endpoint_audience: Required. Azure Management + Endpoint Audience. :type azure_management_endpoint_audience: str """ @@ -72,11 +76,11 @@ class ResourceCertificateAndAadDetails(ResourceCertificateDetails): 'azure_management_endpoint_audience': {'key': 'azureManagementEndpointAudience', 'type': 'str'}, } - def __init__(self, aad_authority, aad_tenant_id, service_principal_client_id, service_principal_object_id, azure_management_endpoint_audience, certificate=None, friendly_name=None, issuer=None, resource_id=None, subject=None, thumbprint=None, valid_from=None, valid_to=None): - super(ResourceCertificateAndAadDetails, self).__init__(certificate=certificate, friendly_name=friendly_name, issuer=issuer, resource_id=resource_id, subject=subject, thumbprint=thumbprint, valid_from=valid_from, valid_to=valid_to) - self.aad_authority = aad_authority - self.aad_tenant_id = aad_tenant_id - self.service_principal_client_id = service_principal_client_id - self.service_principal_object_id = service_principal_object_id - self.azure_management_endpoint_audience = azure_management_endpoint_audience + def __init__(self, **kwargs): + super(ResourceCertificateAndAadDetails, self).__init__(**kwargs) + self.aad_authority = kwargs.get('aad_authority', None) + self.aad_tenant_id = kwargs.get('aad_tenant_id', None) + self.service_principal_client_id = kwargs.get('service_principal_client_id', None) + self.service_principal_object_id = kwargs.get('service_principal_object_id', None) + self.azure_management_endpoint_audience = kwargs.get('azure_management_endpoint_audience', None) self.auth_type = 'AzureActiveDirectory' diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_aad_details_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_aad_details_py3.py new file mode 100644 index 000000000000..591a1d0ba44e --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_aad_details_py3.py @@ -0,0 +1,86 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_certificate_details_py3 import ResourceCertificateDetails + + +class ResourceCertificateAndAadDetails(ResourceCertificateDetails): + """Certificate details representing the Vault credentials for AAD. + + All required parameters must be populated in order to send to Azure. + + :param certificate: The base64 encoded certificate raw data string. + :type certificate: bytearray + :param friendly_name: Certificate friendlyname. + :type friendly_name: str + :param issuer: Certificate issuer. + :type issuer: str + :param resource_id: Resource ID of the vault. + :type resource_id: long + :param subject: Certificate Subject Name. + :type subject: str + :param thumbprint: Certificate thumbprint. + :type thumbprint: str + :param valid_from: Certificate Validity start Date time. + :type valid_from: datetime + :param valid_to: Certificate Validity End Date time. + :type valid_to: datetime + :param auth_type: Required. Constant filled by server. + :type auth_type: str + :param aad_authority: Required. AAD tenant authority. + :type aad_authority: str + :param aad_tenant_id: Required. AAD tenant Id. + :type aad_tenant_id: str + :param service_principal_client_id: Required. AAD service principal + clientId. + :type service_principal_client_id: str + :param service_principal_object_id: Required. AAD service principal + ObjectId. + :type service_principal_object_id: str + :param azure_management_endpoint_audience: Required. Azure Management + Endpoint Audience. + :type azure_management_endpoint_audience: str + """ + + _validation = { + 'auth_type': {'required': True}, + 'aad_authority': {'required': True}, + 'aad_tenant_id': {'required': True}, + 'service_principal_client_id': {'required': True}, + 'service_principal_object_id': {'required': True}, + 'azure_management_endpoint_audience': {'required': True}, + } + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'bytearray'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'issuer': {'key': 'issuer', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'long'}, + 'subject': {'key': 'subject', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'valid_from': {'key': 'validFrom', 'type': 'iso-8601'}, + 'valid_to': {'key': 'validTo', 'type': 'iso-8601'}, + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'aad_authority': {'key': 'aadAuthority', 'type': 'str'}, + 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, + 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, + 'service_principal_object_id': {'key': 'servicePrincipalObjectId', 'type': 'str'}, + 'azure_management_endpoint_audience': {'key': 'azureManagementEndpointAudience', 'type': 'str'}, + } + + def __init__(self, *, aad_authority: str, aad_tenant_id: str, service_principal_client_id: str, service_principal_object_id: str, azure_management_endpoint_audience: str, certificate: bytearray=None, friendly_name: str=None, issuer: str=None, resource_id: int=None, subject: str=None, thumbprint: str=None, valid_from=None, valid_to=None, **kwargs) -> None: + super(ResourceCertificateAndAadDetails, self).__init__(certificate=certificate, friendly_name=friendly_name, issuer=issuer, resource_id=resource_id, subject=subject, thumbprint=thumbprint, valid_from=valid_from, valid_to=valid_to, **kwargs) + self.aad_authority = aad_authority + self.aad_tenant_id = aad_tenant_id + self.service_principal_client_id = service_principal_client_id + self.service_principal_object_id = service_principal_object_id + self.azure_management_endpoint_audience = azure_management_endpoint_audience + self.auth_type = 'AzureActiveDirectory' diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_acs_details.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_acs_details.py index c897d20a1920..69f3f03a1c6d 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_acs_details.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_acs_details.py @@ -15,6 +15,8 @@ class ResourceCertificateAndAcsDetails(ResourceCertificateDetails): """Certificate details representing the Vault credentials for ACS. + All required parameters must be populated in order to send to Azure. + :param certificate: The base64 encoded certificate raw data string. :type certificate: bytearray :param friendly_name: Certificate friendlyname. @@ -31,13 +33,14 @@ class ResourceCertificateAndAcsDetails(ResourceCertificateDetails): :type valid_from: datetime :param valid_to: Certificate Validity End Date time. :type valid_to: datetime - :param auth_type: Polymorphic Discriminator + :param auth_type: Required. Constant filled by server. :type auth_type: str - :param global_acs_namespace: ACS namespace name - tenant for our service. + :param global_acs_namespace: Required. ACS namespace name - tenant for our + service. :type global_acs_namespace: str - :param global_acs_host_name: Acs mgmt host name to connect to. + :param global_acs_host_name: Required. Acs mgmt host name to connect to. :type global_acs_host_name: str - :param global_acs_rp_realm: Global ACS namespace RP realm. + :param global_acs_rp_realm: Required. Global ACS namespace RP realm. :type global_acs_rp_realm: str """ @@ -63,9 +66,9 @@ class ResourceCertificateAndAcsDetails(ResourceCertificateDetails): 'global_acs_rp_realm': {'key': 'globalAcsRPRealm', 'type': 'str'}, } - def __init__(self, global_acs_namespace, global_acs_host_name, global_acs_rp_realm, certificate=None, friendly_name=None, issuer=None, resource_id=None, subject=None, thumbprint=None, valid_from=None, valid_to=None): - super(ResourceCertificateAndAcsDetails, self).__init__(certificate=certificate, friendly_name=friendly_name, issuer=issuer, resource_id=resource_id, subject=subject, thumbprint=thumbprint, valid_from=valid_from, valid_to=valid_to) - self.global_acs_namespace = global_acs_namespace - self.global_acs_host_name = global_acs_host_name - self.global_acs_rp_realm = global_acs_rp_realm + def __init__(self, **kwargs): + super(ResourceCertificateAndAcsDetails, self).__init__(**kwargs) + self.global_acs_namespace = kwargs.get('global_acs_namespace', None) + self.global_acs_host_name = kwargs.get('global_acs_host_name', None) + self.global_acs_rp_realm = kwargs.get('global_acs_rp_realm', None) self.auth_type = 'AccessControlService' diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_acs_details_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_acs_details_py3.py new file mode 100644 index 000000000000..d53475e6f844 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_acs_details_py3.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_certificate_details_py3 import ResourceCertificateDetails + + +class ResourceCertificateAndAcsDetails(ResourceCertificateDetails): + """Certificate details representing the Vault credentials for ACS. + + All required parameters must be populated in order to send to Azure. + + :param certificate: The base64 encoded certificate raw data string. + :type certificate: bytearray + :param friendly_name: Certificate friendlyname. + :type friendly_name: str + :param issuer: Certificate issuer. + :type issuer: str + :param resource_id: Resource ID of the vault. + :type resource_id: long + :param subject: Certificate Subject Name. + :type subject: str + :param thumbprint: Certificate thumbprint. + :type thumbprint: str + :param valid_from: Certificate Validity start Date time. + :type valid_from: datetime + :param valid_to: Certificate Validity End Date time. + :type valid_to: datetime + :param auth_type: Required. Constant filled by server. + :type auth_type: str + :param global_acs_namespace: Required. ACS namespace name - tenant for our + service. + :type global_acs_namespace: str + :param global_acs_host_name: Required. Acs mgmt host name to connect to. + :type global_acs_host_name: str + :param global_acs_rp_realm: Required. Global ACS namespace RP realm. + :type global_acs_rp_realm: str + """ + + _validation = { + 'auth_type': {'required': True}, + 'global_acs_namespace': {'required': True}, + 'global_acs_host_name': {'required': True}, + 'global_acs_rp_realm': {'required': True}, + } + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'bytearray'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'issuer': {'key': 'issuer', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'long'}, + 'subject': {'key': 'subject', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'valid_from': {'key': 'validFrom', 'type': 'iso-8601'}, + 'valid_to': {'key': 'validTo', 'type': 'iso-8601'}, + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'global_acs_namespace': {'key': 'globalAcsNamespace', 'type': 'str'}, + 'global_acs_host_name': {'key': 'globalAcsHostName', 'type': 'str'}, + 'global_acs_rp_realm': {'key': 'globalAcsRPRealm', 'type': 'str'}, + } + + def __init__(self, *, global_acs_namespace: str, global_acs_host_name: str, global_acs_rp_realm: str, certificate: bytearray=None, friendly_name: str=None, issuer: str=None, resource_id: int=None, subject: str=None, thumbprint: str=None, valid_from=None, valid_to=None, **kwargs) -> None: + super(ResourceCertificateAndAcsDetails, self).__init__(certificate=certificate, friendly_name=friendly_name, issuer=issuer, resource_id=resource_id, subject=subject, thumbprint=thumbprint, valid_from=valid_from, valid_to=valid_to, **kwargs) + self.global_acs_namespace = global_acs_namespace + self.global_acs_host_name = global_acs_host_name + self.global_acs_rp_realm = global_acs_rp_realm + self.auth_type = 'AccessControlService' diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_details.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_details.py index eabc2caca85d..8beadb8f04df 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_details.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_details.py @@ -15,6 +15,12 @@ class ResourceCertificateDetails(Model): """Certificate details representing the Vault credentials. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ResourceCertificateAndAadDetails, + ResourceCertificateAndAcsDetails + + All required parameters must be populated in order to send to Azure. + :param certificate: The base64 encoded certificate raw data string. :type certificate: bytearray :param friendly_name: Certificate friendlyname. @@ -31,7 +37,7 @@ class ResourceCertificateDetails(Model): :type valid_from: datetime :param valid_to: Certificate Validity End Date time. :type valid_to: datetime - :param auth_type: Polymorphic Discriminator + :param auth_type: Required. Constant filled by server. :type auth_type: str """ @@ -55,13 +61,14 @@ class ResourceCertificateDetails(Model): 'auth_type': {'AzureActiveDirectory': 'ResourceCertificateAndAadDetails', 'AccessControlService': 'ResourceCertificateAndAcsDetails'} } - def __init__(self, certificate=None, friendly_name=None, issuer=None, resource_id=None, subject=None, thumbprint=None, valid_from=None, valid_to=None): - self.certificate = certificate - self.friendly_name = friendly_name - self.issuer = issuer - self.resource_id = resource_id - self.subject = subject - self.thumbprint = thumbprint - self.valid_from = valid_from - self.valid_to = valid_to + def __init__(self, **kwargs): + super(ResourceCertificateDetails, self).__init__(**kwargs) + self.certificate = kwargs.get('certificate', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.issuer = kwargs.get('issuer', None) + self.resource_id = kwargs.get('resource_id', None) + self.subject = kwargs.get('subject', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.valid_from = kwargs.get('valid_from', None) + self.valid_to = kwargs.get('valid_to', None) self.auth_type = None diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_details_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_details_py3.py new file mode 100644 index 000000000000..50799884c1ab --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_details_py3.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceCertificateDetails(Model): + """Certificate details representing the Vault credentials. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ResourceCertificateAndAadDetails, + ResourceCertificateAndAcsDetails + + All required parameters must be populated in order to send to Azure. + + :param certificate: The base64 encoded certificate raw data string. + :type certificate: bytearray + :param friendly_name: Certificate friendlyname. + :type friendly_name: str + :param issuer: Certificate issuer. + :type issuer: str + :param resource_id: Resource ID of the vault. + :type resource_id: long + :param subject: Certificate Subject Name. + :type subject: str + :param thumbprint: Certificate thumbprint. + :type thumbprint: str + :param valid_from: Certificate Validity start Date time. + :type valid_from: datetime + :param valid_to: Certificate Validity End Date time. + :type valid_to: datetime + :param auth_type: Required. Constant filled by server. + :type auth_type: str + """ + + _validation = { + 'auth_type': {'required': True}, + } + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'bytearray'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'issuer': {'key': 'issuer', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'long'}, + 'subject': {'key': 'subject', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'valid_from': {'key': 'validFrom', 'type': 'iso-8601'}, + 'valid_to': {'key': 'validTo', 'type': 'iso-8601'}, + 'auth_type': {'key': 'authType', 'type': 'str'}, + } + + _subtype_map = { + 'auth_type': {'AzureActiveDirectory': 'ResourceCertificateAndAadDetails', 'AccessControlService': 'ResourceCertificateAndAcsDetails'} + } + + def __init__(self, *, certificate: bytearray=None, friendly_name: str=None, issuer: str=None, resource_id: int=None, subject: str=None, thumbprint: str=None, valid_from=None, valid_to=None, **kwargs) -> None: + super(ResourceCertificateDetails, self).__init__(**kwargs) + self.certificate = certificate + self.friendly_name = friendly_name + self.issuer = issuer + self.resource_id = resource_id + self.subject = subject + self.thumbprint = thumbprint + self.valid_from = valid_from + self.valid_to = valid_to + self.auth_type = None diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_py3.py new file mode 100644 index 000000000000..afe3f20f672e --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """ARM Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param e_tag: Optional ETag. + :type e_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, *, e_tag: str=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.e_tag = e_tag diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/sku.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/sku.py index 1993dada8b54..c66c48e9268a 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/sku.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/sku.py @@ -15,9 +15,11 @@ class Sku(Model): """Identifies the unique system identifier for each Azure resource. - :param name: The Sku name. Possible values include: 'Standard', 'RS0' - :type name: str or :class:`SkuName - ` + All required parameters must be populated in order to send to Azure. + + :param name: Required. The Sku name. Possible values include: 'Standard', + 'RS0' + :type name: str or ~azure.mgmt.recoveryservices.models.SkuName """ _validation = { @@ -28,5 +30,6 @@ class Sku(Model): 'name': {'key': 'name', 'type': 'str'}, } - def __init__(self, name): - self.name = name + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/sku_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/sku_py3.py new file mode 100644 index 000000000000..137625e684d8 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/sku_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """Identifies the unique system identifier for each Azure resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The Sku name. Possible values include: 'Standard', + 'RS0' + :type name: str or ~azure.mgmt.recoveryservices.models.SkuName + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/tracked_resource.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/tracked_resource.py index c85442105615..75acf9f90d89 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/tracked_resource.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/tracked_resource.py @@ -18,6 +18,8 @@ class TrackedResource(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 id: Resource Id represents the complete path to the resource. :vartype id: str :ivar name: Resource name associated with the resource. @@ -27,10 +29,10 @@ class TrackedResource(Resource): :vartype type: str :param e_tag: Optional ETag. :type e_tag: str - :param location: Resource location. + :param location: Required. Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] """ _validation = { @@ -49,7 +51,7 @@ class TrackedResource(Resource): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, location, e_tag=None, tags=None): - super(TrackedResource, self).__init__(e_tag=e_tag) - self.location = location - self.tags = tags + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/tracked_resource_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/tracked_resource_py3.py new file mode 100644 index 000000000000..a1abe9f7f846 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/tracked_resource_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class TrackedResource(Resource): + """Tracked resource with location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param e_tag: Optional ETag. + :type e_tag: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, e_tag: str=None, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(e_tag=e_tag, **kwargs) + self.location = location + self.tags = tags diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/upgrade_details.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/upgrade_details.py index c1e585a31222..d1b79809e3e4 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/upgrade_details.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/upgrade_details.py @@ -29,15 +29,15 @@ class UpgradeDetails(Model): :vartype end_time_utc: datetime :ivar status: Status of the vault upgrade operation. Possible values include: 'Unknown', 'InProgress', 'Upgraded', 'Failed' - :vartype status: str or :class:`VaultUpgradeState - ` + :vartype status: str or + ~azure.mgmt.recoveryservices.models.VaultUpgradeState :ivar message: Message to the user containing information about the upgrade operation. :vartype message: str :ivar trigger_type: The way the vault upgradation was triggered. Possible values include: 'UserTriggered', 'ForcedUpgrade' - :vartype trigger_type: str or :class:`TriggerType - ` + :vartype trigger_type: str or + ~azure.mgmt.recoveryservices.models.TriggerType :ivar upgraded_resource_id: Resource ID of the upgraded vault. :vartype upgraded_resource_id: str :ivar previous_resource_id: Resource ID of the vault before the upgrade. @@ -68,7 +68,8 @@ class UpgradeDetails(Model): 'previous_resource_id': {'key': 'previousResourceId', 'type': 'str'}, } - def __init__(self): + def __init__(self, **kwargs): + super(UpgradeDetails, self).__init__(**kwargs) self.operation_id = None self.start_time_utc = None self.last_updated_time_utc = None diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/upgrade_details_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/upgrade_details_py3.py new file mode 100644 index 000000000000..fcfc8f1d6cf9 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/upgrade_details_py3.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpgradeDetails(Model): + """Details for upgrading vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar operation_id: ID of the vault upgrade operation. + :vartype operation_id: str + :ivar start_time_utc: UTC time at which the upgrade operation has started. + :vartype start_time_utc: datetime + :ivar last_updated_time_utc: UTC time at which the upgrade operation + status was last updated. + :vartype last_updated_time_utc: datetime + :ivar end_time_utc: UTC time at which the upgrade operation has ended. + :vartype end_time_utc: datetime + :ivar status: Status of the vault upgrade operation. Possible values + include: 'Unknown', 'InProgress', 'Upgraded', 'Failed' + :vartype status: str or + ~azure.mgmt.recoveryservices.models.VaultUpgradeState + :ivar message: Message to the user containing information about the + upgrade operation. + :vartype message: str + :ivar trigger_type: The way the vault upgradation was triggered. Possible + values include: 'UserTriggered', 'ForcedUpgrade' + :vartype trigger_type: str or + ~azure.mgmt.recoveryservices.models.TriggerType + :ivar upgraded_resource_id: Resource ID of the upgraded vault. + :vartype upgraded_resource_id: str + :ivar previous_resource_id: Resource ID of the vault before the upgrade. + :vartype previous_resource_id: str + """ + + _validation = { + 'operation_id': {'readonly': True}, + 'start_time_utc': {'readonly': True}, + 'last_updated_time_utc': {'readonly': True}, + 'end_time_utc': {'readonly': True}, + 'status': {'readonly': True}, + 'message': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'upgraded_resource_id': {'readonly': True}, + 'previous_resource_id': {'readonly': True}, + } + + _attribute_map = { + 'operation_id': {'key': 'operationId', 'type': 'str'}, + 'start_time_utc': {'key': 'startTimeUtc', 'type': 'iso-8601'}, + 'last_updated_time_utc': {'key': 'lastUpdatedTimeUtc', 'type': 'iso-8601'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'trigger_type': {'key': 'triggerType', 'type': 'str'}, + 'upgraded_resource_id': {'key': 'upgradedResourceId', 'type': 'str'}, + 'previous_resource_id': {'key': 'previousResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeDetails, self).__init__(**kwargs) + self.operation_id = None + self.start_time_utc = None + self.last_updated_time_utc = None + self.end_time_utc = None + self.status = None + self.message = None + self.trigger_type = None + self.upgraded_resource_id = None + self.previous_resource_id = None diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault.py index a4927d87d282..1002b1e31e23 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault.py @@ -18,6 +18,8 @@ class Vault(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Resource Id represents the complete path to the resource. :vartype id: str :ivar name: Resource name associated with the resource. @@ -27,15 +29,14 @@ class Vault(TrackedResource): :vartype type: str :param e_tag: Optional ETag. :type e_tag: str - :param location: Resource location. + :param location: Required. Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param properties: - :type properties: :class:`VaultProperties - ` + :type properties: ~azure.mgmt.recoveryservices.models.VaultProperties :param sku: - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.recoveryservices.models.Sku """ _validation = { @@ -56,7 +57,7 @@ class Vault(TrackedResource): 'sku': {'key': 'sku', 'type': 'Sku'}, } - def __init__(self, location, e_tag=None, tags=None, properties=None, sku=None): - super(Vault, self).__init__(e_tag=e_tag, location=location, tags=tags) - self.properties = properties - self.sku = sku + def __init__(self, **kwargs): + super(Vault, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_certificate_response.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_certificate_response.py index 0713797ad60e..180329c22c63 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_certificate_response.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_certificate_response.py @@ -16,17 +16,27 @@ class VaultCertificateResponse(Model): """Certificate corresponding to a vault that can be used by clients to register themselves with the vault. - :param name: - :type name: str - :param type: - :type type: str - :param id: - :type id: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str :param properties: - :type properties: :class:`ResourceCertificateDetails - ` + :type properties: + ~azure.mgmt.recoveryservices.models.ResourceCertificateDetails """ + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'id': {'readonly': True}, + } + _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, @@ -34,8 +44,9 @@ class VaultCertificateResponse(Model): 'properties': {'key': 'properties', 'type': 'ResourceCertificateDetails'}, } - def __init__(self, name=None, type=None, id=None, properties=None): - self.name = name - self.type = type - self.id = id - self.properties = properties + def __init__(self, **kwargs): + super(VaultCertificateResponse, self).__init__(**kwargs) + self.name = None + self.type = None + self.id = None + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_certificate_response_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_certificate_response_py3.py new file mode 100644 index 000000000000..b4975175043a --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_certificate_response_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VaultCertificateResponse(Model): + """Certificate corresponding to a vault that can be used by clients to + register themselves with the vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :param properties: + :type properties: + ~azure.mgmt.recoveryservices.models.ResourceCertificateDetails + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'id': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ResourceCertificateDetails'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(VaultCertificateResponse, self).__init__(**kwargs) + self.name = None + self.type = None + self.id = None + self.properties = properties diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_extended_info_resource.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_extended_info_resource.py index bbdb1439ff40..b98b55d3b1bf 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_extended_info_resource.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_extended_info_resource.py @@ -33,7 +33,7 @@ class VaultExtendedInfoResource(Resource): :type encryption_key: str :param encryption_key_thumbprint: Encryption key thumbprint. :type encryption_key_thumbprint: str - :param algorithm: Algorithm. + :param algorithm: Algorithm for Vault ExtendedInfo :type algorithm: str """ @@ -54,9 +54,9 @@ class VaultExtendedInfoResource(Resource): 'algorithm': {'key': 'properties.algorithm', 'type': 'str'}, } - def __init__(self, e_tag=None, integrity_key=None, encryption_key=None, encryption_key_thumbprint=None, algorithm=None): - super(VaultExtendedInfoResource, self).__init__(e_tag=e_tag) - self.integrity_key = integrity_key - self.encryption_key = encryption_key - self.encryption_key_thumbprint = encryption_key_thumbprint - self.algorithm = algorithm + def __init__(self, **kwargs): + super(VaultExtendedInfoResource, self).__init__(**kwargs) + self.integrity_key = kwargs.get('integrity_key', None) + self.encryption_key = kwargs.get('encryption_key', None) + self.encryption_key_thumbprint = kwargs.get('encryption_key_thumbprint', None) + self.algorithm = kwargs.get('algorithm', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_extended_info_resource_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_extended_info_resource_py3.py new file mode 100644 index 000000000000..a353d23e4143 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_extended_info_resource_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class VaultExtendedInfoResource(Resource): + """Vault extended information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param e_tag: Optional ETag. + :type e_tag: str + :param integrity_key: Integrity key. + :type integrity_key: str + :param encryption_key: Encryption key. + :type encryption_key: str + :param encryption_key_thumbprint: Encryption key thumbprint. + :type encryption_key_thumbprint: str + :param algorithm: Algorithm for Vault ExtendedInfo + :type algorithm: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'integrity_key': {'key': 'properties.integrityKey', 'type': 'str'}, + 'encryption_key': {'key': 'properties.encryptionKey', 'type': 'str'}, + 'encryption_key_thumbprint': {'key': 'properties.encryptionKeyThumbprint', 'type': 'str'}, + 'algorithm': {'key': 'properties.algorithm', 'type': 'str'}, + } + + def __init__(self, *, e_tag: str=None, integrity_key: str=None, encryption_key: str=None, encryption_key_thumbprint: str=None, algorithm: str=None, **kwargs) -> None: + super(VaultExtendedInfoResource, self).__init__(e_tag=e_tag, **kwargs) + self.integrity_key = integrity_key + self.encryption_key = encryption_key + self.encryption_key_thumbprint = encryption_key_thumbprint + self.algorithm = algorithm diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_properties.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_properties.py index 24b67883e855..34e1c0b96d00 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_properties.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_properties.py @@ -21,8 +21,7 @@ class VaultProperties(Model): :ivar provisioning_state: Provisioning State. :vartype provisioning_state: str :param upgrade_details: - :type upgrade_details: :class:`UpgradeDetails - ` + :type upgrade_details: ~azure.mgmt.recoveryservices.models.UpgradeDetails """ _validation = { @@ -34,6 +33,7 @@ class VaultProperties(Model): 'upgrade_details': {'key': 'upgradeDetails', 'type': 'UpgradeDetails'}, } - def __init__(self, upgrade_details=None): + def __init__(self, **kwargs): + super(VaultProperties, self).__init__(**kwargs) self.provisioning_state = None - self.upgrade_details = upgrade_details + self.upgrade_details = kwargs.get('upgrade_details', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_properties_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_properties_py3.py new file mode 100644 index 000000000000..dceb576548ff --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_properties_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VaultProperties(Model): + """Properties of the vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provisioning_state: Provisioning State. + :vartype provisioning_state: str + :param upgrade_details: + :type upgrade_details: ~azure.mgmt.recoveryservices.models.UpgradeDetails + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'upgrade_details': {'key': 'upgradeDetails', 'type': 'UpgradeDetails'}, + } + + def __init__(self, *, upgrade_details=None, **kwargs) -> None: + super(VaultProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.upgrade_details = upgrade_details diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_py3.py new file mode 100644 index 000000000000..415b9f03f205 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource_py3 import TrackedResource + + +class Vault(TrackedResource): + """Resource information, as returned by the resource provider. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param e_tag: Optional ETag. + :type e_tag: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param properties: + :type properties: ~azure.mgmt.recoveryservices.models.VaultProperties + :param sku: + :type sku: ~azure.mgmt.recoveryservices.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'VaultProperties'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str, e_tag: str=None, tags=None, properties=None, sku=None, **kwargs) -> None: + super(Vault, self).__init__(e_tag=e_tag, location=location, tags=tags, **kwargs) + self.properties = properties + self.sku = sku diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_usage.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_usage.py index 81fe77b5ee08..14d753967ba6 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_usage.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_usage.py @@ -17,8 +17,7 @@ class VaultUsage(Model): :param unit: Unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - :type unit: str or :class:`UsagesUnit - ` + :type unit: str or ~azure.mgmt.recoveryservices.models.UsagesUnit :param quota_period: Quota period of usage. :type quota_period: str :param next_reset_time: Next reset time of usage. @@ -28,8 +27,7 @@ class VaultUsage(Model): :param limit: Limit of usage. :type limit: long :param name: Name of usage. - :type name: :class:`NameInfo - ` + :type name: ~azure.mgmt.recoveryservices.models.NameInfo """ _attribute_map = { @@ -41,10 +39,11 @@ class VaultUsage(Model): 'name': {'key': 'name', 'type': 'NameInfo'}, } - def __init__(self, unit=None, quota_period=None, next_reset_time=None, current_value=None, limit=None, name=None): - self.unit = unit - self.quota_period = quota_period - self.next_reset_time = next_reset_time - self.current_value = current_value - self.limit = limit - self.name = name + def __init__(self, **kwargs): + super(VaultUsage, self).__init__(**kwargs) + self.unit = kwargs.get('unit', None) + self.quota_period = kwargs.get('quota_period', None) + self.next_reset_time = kwargs.get('next_reset_time', None) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_usage_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_usage_py3.py new file mode 100644 index 000000000000..41e3799eb533 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_usage_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VaultUsage(Model): + """Usages of a vault. + + :param unit: Unit of the usage. Possible values include: 'Count', 'Bytes', + 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + :type unit: str or ~azure.mgmt.recoveryservices.models.UsagesUnit + :param quota_period: Quota period of usage. + :type quota_period: str + :param next_reset_time: Next reset time of usage. + :type next_reset_time: datetime + :param current_value: Current value of usage. + :type current_value: long + :param limit: Limit of usage. + :type limit: long + :param name: Name of usage. + :type name: ~azure.mgmt.recoveryservices.models.NameInfo + """ + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'NameInfo'}, + } + + def __init__(self, *, unit=None, quota_period: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: + super(VaultUsage, self).__init__(**kwargs) + self.unit = unit + self.quota_period = quota_period + self.next_reset_time = next_reset_time + self.current_value = current_value + self.limit = limit + self.name = name diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/__init__.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/__init__.py index 0b4746f8b030..fd4496cfacb0 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/__init__.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/__init__.py @@ -9,8 +9,6 @@ # regenerated. # -------------------------------------------------------------------------- -from .backup_vault_configs_operations import BackupVaultConfigsOperations -from .backup_storage_configs_operations import BackupStorageConfigsOperations from .vault_certificates_operations import VaultCertificatesOperations from .registered_identities_operations import RegisteredIdentitiesOperations from .replication_usages_operations import ReplicationUsagesOperations @@ -20,8 +18,6 @@ from .usages_operations import UsagesOperations __all__ = [ - 'BackupVaultConfigsOperations', - 'BackupStorageConfigsOperations', 'VaultCertificatesOperations', 'RegisteredIdentitiesOperations', 'ReplicationUsagesOperations', diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/operations.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/operations.py index 12561d6cac60..45dfbe46af48 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/operations.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/operations.py @@ -22,10 +22,12 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -44,18 +46,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of - :class:`ClientDiscoveryValueForSingleApi - ` - :rtype: :class:`ClientDiscoveryValueForSingleApiPaged - ` + :return: An iterator like instance of ClientDiscoveryValueForSingleApi + :rtype: + ~azure.mgmt.recoveryservices.models.ClientDiscoveryValueForSingleApiPaged[~azure.mgmt.recoveryservices.models.ClientDiscoveryValueForSingleApi] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.RecoveryServices/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -78,7 +78,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -96,3 +96,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.RecoveryServices/operations'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/registered_identities_operations.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/registered_identities_operations.py index f56192f22724..cf9f9829ef5e 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/registered_identities_operations.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/registered_identities_operations.py @@ -22,10 +22,12 @@ class RegisteredIdentitiesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,15 +53,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/registeredIdentities/{identityName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -84,7 +83,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -94,3 +93,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/registeredIdentities/{identityName}'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/replication_usages_operations.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/replication_usages_operations.py index d6280fc5d9b6..fbadd6408dce 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/replication_usages_operations.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/replication_usages_operations.py @@ -22,10 +22,12 @@ class ReplicationUsagesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,17 +51,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ReplicationUsage - ` - :rtype: :class:`ReplicationUsagePaged - ` + :return: An iterator like instance of ReplicationUsage + :rtype: + ~azure.mgmt.recoveryservices.models.ReplicationUsagePaged[~azure.mgmt.recoveryservices.models.ReplicationUsage] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/replicationUsages' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -88,7 +89,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -106,3 +107,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/replicationUsages'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/usages_operations.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/usages_operations.py index cb79b85f1dc6..9ab6c5de79de 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/usages_operations.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/usages_operations.py @@ -22,10 +22,12 @@ class UsagesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,17 +51,16 @@ def list_by_vaults( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`VaultUsage - ` - :rtype: :class:`VaultUsagePaged - ` + :return: An iterator like instance of VaultUsage + :rtype: + ~azure.mgmt.recoveryservices.models.VaultUsagePaged[~azure.mgmt.recoveryservices.models.VaultUsage] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/usages' + url = self.list_by_vaults.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -88,7 +89,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -106,3 +107,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_vaults.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/usages'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vault_certificates_operations.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vault_certificates_operations.py index 5dcf1ee51066..8523ff8ecac2 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vault_certificates_operations.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vault_certificates_operations.py @@ -22,10 +22,12 @@ class VaultCertificatesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -37,7 +39,7 @@ def __init__(self, client, config, serializer, deserializer): def create( self, resource_group_name, vault_name, certificate_name, properties=None, custom_headers=None, raw=False, **operation_config): - """Upload a certificate for a resource. + """Uploads a certificate for a resource. :param resource_group_name: The name of the resource group where the recovery services vault is present. @@ -47,26 +49,22 @@ def create( :param certificate_name: Certificate friendly name. :type certificate_name: str :param properties: - :type properties: :class:`RawCertificateData - ` + :type properties: + ~azure.mgmt.recoveryservices.models.RawCertificateData :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`VaultCertificateResponse - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VaultCertificateResponse - ` or - :class:`ClientRawResponse` + :return: VaultCertificateResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservices.models.VaultCertificateResponse + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ certificate_request = models.CertificateRequest(properties=properties) # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/certificates/{certificateName}' + url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -95,7 +93,7 @@ def create( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -112,3 +110,4 @@ def create( return client_raw_response return deserialized + create.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/certificates/{certificateName}'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vault_extended_info_operations.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vault_extended_info_operations.py index 5eae0c482270..c672aacb65e2 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vault_extended_info_operations.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vault_extended_info_operations.py @@ -22,10 +22,12 @@ class VaultExtendedInfoOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,17 +51,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`VaultExtendedInfoResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VaultExtendedInfoResource - ` or - :class:`ClientRawResponse` + :return: VaultExtendedInfoResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservices.models.VaultExtendedInfoResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -83,7 +81,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -100,6 +98,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo'} def create_or_update( self, resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers=None, raw=False, **operation_config): @@ -110,27 +109,22 @@ def create_or_update( :type resource_group_name: str :param vault_name: The name of the recovery services vault. :type vault_name: str - :param resource_resource_extended_info_details: - resourceResourceExtendedInfoDetails + :param resource_resource_extended_info_details: Details of + ResourceExtendedInfo :type resource_resource_extended_info_details: - :class:`VaultExtendedInfoResource - ` + ~azure.mgmt.recoveryservices.models.VaultExtendedInfoResource :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`VaultExtendedInfoResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VaultExtendedInfoResource - ` or - :class:`ClientRawResponse` + :return: VaultExtendedInfoResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservices.models.VaultExtendedInfoResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -158,7 +152,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -175,6 +169,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo'} def update( self, resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers=None, raw=False, **operation_config): @@ -185,27 +180,22 @@ def update( :type resource_group_name: str :param vault_name: The name of the recovery services vault. :type vault_name: str - :param resource_resource_extended_info_details: - resourceResourceExtendedInfoDetails + :param resource_resource_extended_info_details: Details of + ResourceExtendedInfo :type resource_resource_extended_info_details: - :class:`VaultExtendedInfoResource - ` + ~azure.mgmt.recoveryservices.models.VaultExtendedInfoResource :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`VaultExtendedInfoResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VaultExtendedInfoResource - ` or - :class:`ClientRawResponse` + :return: VaultExtendedInfoResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservices.models.VaultExtendedInfoResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -233,7 +223,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -250,3 +240,4 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vaults_operations.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vaults_operations.py index aadf8bb30d28..b844fa2f8374 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vaults_operations.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vaults_operations.py @@ -22,10 +22,12 @@ class VaultsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -44,17 +46,16 @@ def list_by_subscription_id( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Vault - ` - :rtype: :class:`VaultPaged - ` + :return: An iterator like instance of Vault + :rtype: + ~azure.mgmt.recoveryservices.models.VaultPaged[~azure.mgmt.recoveryservices.models.Vault] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/vaults' + url = self.list_by_subscription_id.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -81,7 +82,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -99,6 +100,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/vaults'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -112,17 +114,16 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Vault - ` - :rtype: :class:`VaultPaged - ` + :return: An iterator like instance of Vault + :rtype: + ~azure.mgmt.recoveryservices.models.VaultPaged[~azure.mgmt.recoveryservices.models.Vault] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -150,7 +151,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -168,6 +169,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults'} def get( self, resource_group_name, vault_name, custom_headers=None, raw=False, **operation_config): @@ -183,15 +185,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Vault ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Vault ` or - :class:`ClientRawResponse` + :return: Vault or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservices.models.Vault or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -215,7 +215,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -232,6 +232,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}'} def create_or_update( self, resource_group_name, vault_name, vault, custom_headers=None, raw=False, **operation_config): @@ -243,21 +244,19 @@ def create_or_update( :param vault_name: The name of the recovery services vault. :type vault_name: str :param vault: Recovery Services Vault to be created. - :type vault: :class:`Vault ` + :type vault: ~azure.mgmt.recoveryservices.models.Vault :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Vault ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Vault ` or - :class:`ClientRawResponse` + :return: Vault or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservices.models.Vault or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -285,7 +284,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -304,6 +303,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}'} def delete( self, resource_group_name, vault_name, custom_headers=None, raw=False, **operation_config): @@ -319,15 +319,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -351,7 +348,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -361,6 +358,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}'} def update( self, resource_group_name, vault_name, vault, custom_headers=None, raw=False, **operation_config): @@ -372,21 +370,19 @@ def update( :param vault_name: The name of the recovery services vault. :type vault_name: str :param vault: Recovery Services Vault to be created. - :type vault: :class:`Vault ` + :type vault: ~azure.mgmt.recoveryservices.models.PatchVault :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Vault ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Vault ` or - :class:`ClientRawResponse` + :return: Vault or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservices.models.Vault or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -409,12 +405,12 @@ def update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(vault, 'Vault') + body_content = self._serialize.body(vault, 'PatchVault') # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -433,3 +429,4 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/recovery_services_client.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/recovery_services_client.py index a86ba67d5fe9..b7119a3cea07 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/recovery_services_client.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/recovery_services_client.py @@ -9,12 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION -from .operations.backup_vault_configs_operations import BackupVaultConfigsOperations -from .operations.backup_storage_configs_operations import BackupStorageConfigsOperations from .operations.vault_certificates_operations import VaultCertificatesOperations from .operations.registered_identities_operations import RegisteredIdentitiesOperations from .operations.replication_usages_operations import ReplicationUsagesOperations @@ -45,30 +43,24 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(RecoveryServicesClientConfiguration, self).__init__(base_url) - self.add_user_agent('recoveryservicesclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-recoveryservices/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class RecoveryServicesClient(object): +class RecoveryServicesClient(SDKClient): """Recovery Services Client :ivar config: Configuration for client. :vartype config: RecoveryServicesClientConfiguration - :ivar backup_vault_configs: BackupVaultConfigs operations - :vartype backup_vault_configs: azure.mgmt.recoveryservices.operations.BackupVaultConfigsOperations - :ivar backup_storage_configs: BackupStorageConfigs operations - :vartype backup_storage_configs: azure.mgmt.recoveryservices.operations.BackupStorageConfigsOperations :ivar vault_certificates: VaultCertificates operations :vartype vault_certificates: azure.mgmt.recoveryservices.operations.VaultCertificatesOperations :ivar registered_identities: RegisteredIdentities operations @@ -96,16 +88,13 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = RecoveryServicesClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(RecoveryServicesClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2016-06-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.backup_vault_configs = BackupVaultConfigsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.backup_storage_configs = BackupStorageConfigsOperations( - self._client, self.config, self._serialize, self._deserialize) self.vault_certificates = VaultCertificatesOperations( self._client, self.config, self._serialize, self._deserialize) self.registered_identities = RegisteredIdentitiesOperations( diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/version.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/version.py index 9bd1dfac7ecb..3e682bbd5fb1 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/version.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.2.0" +VERSION = "0.3.0" diff --git a/azure-mgmt-recoveryservices/sdk_packaging.toml b/azure-mgmt-recoveryservices/sdk_packaging.toml new file mode 100644 index 000000000000..5efb29092888 --- /dev/null +++ b/azure-mgmt-recoveryservices/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-recoveryservices" +package_pprint_name = "Recovery Services" +package_doc_id = "recoveryservices" +is_stable = false diff --git a/azure-mgmt-recoveryservices/setup.py b/azure-mgmt-recoveryservices/setup.py index cff4e02e6235..3b8c97efed35 100644 --- a/azure-mgmt-recoveryservices/setup.py +++ b/azure-mgmt-recoveryservices/setup.py @@ -61,7 +61,7 @@ long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ 'Development Status :: 4 - Beta', @@ -69,16 +69,15 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(), + packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-recoveryservices/tests/__init__.py b/azure-mgmt-recoveryservices/tests/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/azure-mgmt-recoveryservices/tests/test_mgmt_recoveryservices.py b/azure-mgmt-recoveryservices/tests/test_mgmt_recoveryservices.py index ed4566d6b919..abea04ad8500 100644 --- a/azure-mgmt-recoveryservices/tests/test_mgmt_recoveryservices.py +++ b/azure-mgmt-recoveryservices/tests/test_mgmt_recoveryservices.py @@ -10,12 +10,8 @@ import azure.mgmt.recoveryservices import azure.mgmt.resource.resources.models import azure.common.exceptions -from azure.mgmt.recoveryservices.models import (StorageModelType, Vault, Sku, SkuName, VaultProperties, - VaultExtendedInfoResource, VaultUsage, EnhancedSecurityState, - StorageModelType - ) from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer -from .recoveryservices_testcase import MgmtRecoveryServicesTestDefinition, MgmtRecoveryServicesTestHelper +from recoveryservices_testcase import MgmtRecoveryServicesTestDefinition, MgmtRecoveryServicesTestHelper class MgmtRecoveryServicesTests(AzureMgmtTestCase): diff --git a/azure-mgmt-recoveryservicesbackup/HISTORY.rst b/azure-mgmt-recoveryservicesbackup/HISTORY.rst index 9249efb523af..744ae431eef3 100644 --- a/azure-mgmt-recoveryservicesbackup/HISTORY.rst +++ b/azure-mgmt-recoveryservicesbackup/HISTORY.rst @@ -3,6 +3,42 @@ Release History =============== +0.2.0 (2018-05-25) +++++++++++++++++++ + +**Features** + +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + 0.1.1 (2017-08-09) ++++++++++++++++++ diff --git a/azure-mgmt-recoveryservicesbackup/README.rst b/azure-mgmt-recoveryservicesbackup/README.rst index 99b573cc83a7..940d0af77f11 100644 --- a/azure-mgmt-recoveryservicesbackup/README.rst +++ b/azure-mgmt-recoveryservicesbackup/README.rst @@ -1,12 +1,12 @@ Microsoft Azure SDK for Python ============================== -This is the Microsoft Azure Recovery Services Backup Client Library. +This is the Microsoft Azure Recovery Services Backup Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -36,9 +36,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `Recovery Services Backup -`__ -on readthedocs.org. +For code examples, see `Recovery Services Backup Management +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py index 2557e1a753ad..75c1ed3ffccc 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py @@ -9,212 +9,603 @@ # regenerated. # -------------------------------------------------------------------------- -from .azure_iaa_svm_error_info import AzureIaaSVMErrorInfo -from .azure_iaa_svm_job_task_details import AzureIaaSVMJobTaskDetails -from .azure_iaa_svm_job_extended_info import AzureIaaSVMJobExtendedInfo -from .azure_iaa_svm_job import AzureIaaSVMJob -from .dpm_error_info import DpmErrorInfo -from .dpm_job_task_details import DpmJobTaskDetails -from .dpm_job_extended_info import DpmJobExtendedInfo -from .dpm_job import DpmJob -from .job import Job -from .job_query_object import JobQueryObject -from .job_resource import JobResource -from .mab_error_info import MabErrorInfo -from .mab_job_task_details import MabJobTaskDetails -from .mab_job_extended_info import MabJobExtendedInfo -from .mab_job import MabJob -from .resource import Resource -from .resource_list import ResourceList -from .dpm_container_extended_info import DPMContainerExtendedInfo -from .azure_backup_server_container import AzureBackupServerContainer -from .azure_backup_server_engine import AzureBackupServerEngine -from .azure_iaa_sclassic_compute_vm_container import AzureIaaSClassicComputeVMContainer -from .azure_iaa_sclassic_compute_vm_protectable_item import AzureIaaSClassicComputeVMProtectableItem -from .azure_iaa_sclassic_compute_vm_protected_item import AzureIaaSClassicComputeVMProtectedItem -from .azure_iaa_scompute_vm_container import AzureIaaSComputeVMContainer -from .azure_iaa_scompute_vm_protectable_item import AzureIaaSComputeVMProtectableItem -from .azure_iaa_scompute_vm_protected_item import AzureIaaSComputeVMProtectedItem -from .azure_iaa_svm_health_details import AzureIaaSVMHealthDetails -from .azure_iaa_svm_protected_item_extended_info import AzureIaaSVMProtectedItemExtendedInfo -from .azure_iaa_svm_protected_item import AzureIaaSVMProtectedItem -from .schedule_policy import SchedulePolicy -from .retention_policy import RetentionPolicy -from .azure_iaa_svm_protection_policy import AzureIaaSVMProtectionPolicy -from .azure_sql_container import AzureSqlContainer -from .azure_sql_protected_item_extended_info import AzureSqlProtectedItemExtendedInfo -from .azure_sql_protected_item import AzureSqlProtectedItem -from .azure_sql_protection_policy import AzureSqlProtectionPolicy -from .backup_engine_extended_info import BackupEngineExtendedInfo -from .backup_engine_base import BackupEngineBase -from .backup_engine_base_resource import BackupEngineBaseResource -from .name_info import NameInfo -from .backup_management_usage import BackupManagementUsage -from .backup_request import BackupRequest -from .backup_request_resource import BackupRequestResource -from .backup_resource_config import BackupResourceConfig -from .backup_resource_config_resource import BackupResourceConfigResource -from .backup_resource_vault_config import BackupResourceVaultConfig -from .backup_resource_vault_config_resource import BackupResourceVaultConfigResource -from .bek_details import BEKDetails -from .bms_backup_engine_query_object import BMSBackupEngineQueryObject -from .bms_backup_engines_query_object import BMSBackupEnginesQueryObject -from .bms_backup_summaries_query_object import BMSBackupSummariesQueryObject -from .bms_container_query_object import BMSContainerQueryObject -from .bmspo_query_object import BMSPOQueryObject -from .bmsrp_query_object import BMSRPQueryObject -from .client_script_for_connect import ClientScriptForConnect -from .day import Day -from .daily_retention_format import DailyRetentionFormat -from .retention_duration import RetentionDuration -from .daily_retention_schedule import DailyRetentionSchedule -from .dpm_backup_engine import DpmBackupEngine -from .dpm_container import DpmContainer -from .dpm_protected_item_extended_info import DPMProtectedItemExtendedInfo -from .dpm_protected_item import DPMProtectedItem -from .encryption_details import EncryptionDetails -from .export_jobs_operation_result_info import ExportJobsOperationResultInfo -from .generic_recovery_point import GenericRecoveryPoint -from .get_protected_item_query_object import GetProtectedItemQueryObject -from .iaas_vm_backup_request import IaasVMBackupRequest -from .iaa_svm_container import IaaSVMContainer -from .iaas_vmilr_registration_request import IaasVMILRRegistrationRequest -from .iaa_svm_protectable_item import IaaSVMProtectableItem -from .kek_details import KEKDetails -from .key_and_secret_details import KeyAndSecretDetails -from .recovery_point_tier_information import RecoveryPointTierInformation -from .iaas_vm_recovery_point import IaasVMRecoveryPoint -from .iaas_vm_restore_request import IaasVMRestoreRequest -from .ilr_request import ILRRequest -from .ilr_request_resource import ILRRequestResource -from .instant_item_recovery_target import InstantItemRecoveryTarget -from .weekly_retention_schedule import WeeklyRetentionSchedule -from .weekly_retention_format import WeeklyRetentionFormat -from .monthly_retention_schedule import MonthlyRetentionSchedule -from .yearly_retention_schedule import YearlyRetentionSchedule -from .long_term_retention_policy import LongTermRetentionPolicy -from .long_term_schedule_policy import LongTermSchedulePolicy -from .mab_container_extended_info import MabContainerExtendedInfo -from .mab_container import MabContainer -from .mab_file_folder_protected_item_extended_info import MabFileFolderProtectedItemExtendedInfo -from .mab_file_folder_protected_item import MabFileFolderProtectedItem -from .mab_protection_policy import MabProtectionPolicy -from .operation_result_info import OperationResultInfo -from .operation_result_info_base import OperationResultInfoBase -from .operation_result_info_base_resource import OperationResultInfoBaseResource -from .operation_status_error import OperationStatusError -from .operation_status_extended_info import OperationStatusExtendedInfo -from .operation_status import OperationStatus -from .operation_status_job_extended_info import OperationStatusJobExtendedInfo -from .operation_status_jobs_extended_info import OperationStatusJobsExtendedInfo -from .operation_status_provision_ilr_extended_info import OperationStatusProvisionILRExtendedInfo -from .operation_worker_response import OperationWorkerResponse -from .protected_item import ProtectedItem -from .protected_item_query_object import ProtectedItemQueryObject -from .protected_item_resource import ProtectedItemResource -from .protection_container import ProtectionContainer -from .protection_container_resource import ProtectionContainerResource -from .protection_policy import ProtectionPolicy -from .protection_policy_query_object import ProtectionPolicyQueryObject -from .protection_policy_resource import ProtectionPolicyResource -from .recovery_point import RecoveryPoint -from .recovery_point_resource import RecoveryPointResource -from .restore_request import RestoreRequest -from .restore_request_resource import RestoreRequestResource -from .simple_retention_policy import SimpleRetentionPolicy -from .simple_schedule_policy import SimpleSchedulePolicy -from .token_information import TokenInformation -from .workload_protectable_item import WorkloadProtectableItem -from .workload_protectable_item_resource import WorkloadProtectableItemResource -from .client_discovery_display import ClientDiscoveryDisplay -from .client_discovery_for_log_specification import ClientDiscoveryForLogSpecification -from .client_discovery_for_service_specification import ClientDiscoveryForServiceSpecification -from .client_discovery_for_properties import ClientDiscoveryForProperties -from .client_discovery_value_for_single_api import ClientDiscoveryValueForSingleApi +try: + from .azure_fileshare_protected_item_extended_info_py3 import AzureFileshareProtectedItemExtendedInfo + from .azure_fileshare_protected_item_py3 import AzureFileshareProtectedItem + from .schedule_policy_py3 import SchedulePolicy + from .retention_policy_py3 import RetentionPolicy + from .azure_file_share_protection_policy_py3 import AzureFileShareProtectionPolicy + from .azure_iaa_sclassic_compute_vm_protected_item_py3 import AzureIaaSClassicComputeVMProtectedItem + from .azure_iaa_scompute_vm_protected_item_py3 import AzureIaaSComputeVMProtectedItem + from .azure_iaa_svm_error_info_py3 import AzureIaaSVMErrorInfo + from .azure_iaa_svm_health_details_py3 import AzureIaaSVMHealthDetails + from .azure_iaa_svm_job_task_details_py3 import AzureIaaSVMJobTaskDetails + from .azure_iaa_svm_job_extended_info_py3 import AzureIaaSVMJobExtendedInfo + from .azure_iaa_svm_job_py3 import AzureIaaSVMJob + from .azure_iaa_svm_protected_item_extended_info_py3 import AzureIaaSVMProtectedItemExtendedInfo + from .azure_iaa_svm_protected_item_py3 import AzureIaaSVMProtectedItem + from .azure_iaa_svm_protection_policy_py3 import AzureIaaSVMProtectionPolicy + from .azure_resource_protection_intent_py3 import AzureResourceProtectionIntent + from .azure_sql_protected_item_extended_info_py3 import AzureSqlProtectedItemExtendedInfo + from .azure_sql_protected_item_py3 import AzureSqlProtectedItem + from .azure_sql_protection_policy_py3 import AzureSqlProtectionPolicy + from .azure_storage_error_info_py3 import AzureStorageErrorInfo + from .azure_storage_job_task_details_py3 import AzureStorageJobTaskDetails + from .azure_storage_job_extended_info_py3 import AzureStorageJobExtendedInfo + from .azure_storage_job_py3 import AzureStorageJob + from .azure_vm_resource_feature_support_request_py3 import AzureVMResourceFeatureSupportRequest + from .azure_vm_resource_feature_support_response_py3 import AzureVMResourceFeatureSupportResponse + from .azure_vm_workload_protected_item_extended_info_py3 import AzureVmWorkloadProtectedItemExtendedInfo + from .settings_py3 import Settings + from .sub_protection_policy_py3 import SubProtectionPolicy + from .azure_vm_workload_protection_policy_py3 import AzureVmWorkloadProtectionPolicy + from .error_detail_py3 import ErrorDetail + from .azure_vm_workload_sql_database_protected_item_py3 import AzureVmWorkloadSQLDatabaseProtectedItem + from .azure_workload_error_info_py3 import AzureWorkloadErrorInfo + from .azure_workload_job_task_details_py3 import AzureWorkloadJobTaskDetails + from .azure_workload_job_extended_info_py3 import AzureWorkloadJobExtendedInfo + from .azure_workload_job_py3 import AzureWorkloadJob + from .name_info_py3 import NameInfo + from .backup_management_usage_py3 import BackupManagementUsage + from .backup_status_request_py3 import BackupStatusRequest + from .backup_status_response_py3 import BackupStatusResponse + from .bms_backup_summaries_query_object_py3 import BMSBackupSummariesQueryObject + from .day_py3 import Day + from .daily_retention_format_py3 import DailyRetentionFormat + from .retention_duration_py3 import RetentionDuration + from .daily_retention_schedule_py3 import DailyRetentionSchedule + from .dpm_error_info_py3 import DpmErrorInfo + from .dpm_job_task_details_py3 import DpmJobTaskDetails + from .dpm_job_extended_info_py3 import DpmJobExtendedInfo + from .dpm_job_py3 import DpmJob + from .dpm_protected_item_extended_info_py3 import DPMProtectedItemExtendedInfo + from .dpm_protected_item_py3 import DPMProtectedItem + from .export_jobs_operation_result_info_py3 import ExportJobsOperationResultInfo + from .feature_support_request_py3 import FeatureSupportRequest + from .generic_protected_item_py3 import GenericProtectedItem + from .generic_protection_policy_py3 import GenericProtectionPolicy + from .job_py3 import Job + from .job_query_object_py3 import JobQueryObject + from .job_resource_py3 import JobResource + from .log_schedule_policy_py3 import LogSchedulePolicy + from .weekly_retention_schedule_py3 import WeeklyRetentionSchedule + from .weekly_retention_format_py3 import WeeklyRetentionFormat + from .monthly_retention_schedule_py3 import MonthlyRetentionSchedule + from .yearly_retention_schedule_py3 import YearlyRetentionSchedule + from .long_term_retention_policy_py3 import LongTermRetentionPolicy + from .long_term_schedule_policy_py3 import LongTermSchedulePolicy + from .mab_error_info_py3 import MabErrorInfo + from .mab_file_folder_protected_item_extended_info_py3 import MabFileFolderProtectedItemExtendedInfo + from .mab_file_folder_protected_item_py3 import MabFileFolderProtectedItem + from .mab_job_task_details_py3 import MabJobTaskDetails + from .mab_job_extended_info_py3 import MabJobExtendedInfo + from .mab_job_py3 import MabJob + from .mab_protection_policy_py3 import MabProtectionPolicy + from .operation_result_info_py3 import OperationResultInfo + from .operation_result_info_base_py3 import OperationResultInfoBase + from .operation_result_info_base_resource_py3 import OperationResultInfoBaseResource + from .operation_worker_response_py3 import OperationWorkerResponse + from .pre_validate_enable_backup_request_py3 import PreValidateEnableBackupRequest + from .pre_validate_enable_backup_response_py3 import PreValidateEnableBackupResponse + from .protected_item_py3 import ProtectedItem + from .protected_item_query_object_py3 import ProtectedItemQueryObject + from .protected_item_resource_py3 import ProtectedItemResource + from .protection_intent_py3 import ProtectionIntent + from .protection_intent_resource_py3 import ProtectionIntentResource + from .protection_policy_py3 import ProtectionPolicy + from .protection_policy_query_object_py3 import ProtectionPolicyQueryObject + from .protection_policy_resource_py3 import ProtectionPolicyResource + from .resource_py3 import Resource + from .resource_list_py3 import ResourceList + from .simple_retention_policy_py3 import SimpleRetentionPolicy + from .simple_schedule_policy_py3 import SimpleSchedulePolicy + from .dpm_container_extended_info_py3 import DPMContainerExtendedInfo + from .azure_backup_server_container_py3 import AzureBackupServerContainer + from .azure_backup_server_engine_py3 import AzureBackupServerEngine + from .azure_file_share_backup_request_py3 import AzureFileShareBackupRequest + from .azure_file_share_protectable_item_py3 import AzureFileShareProtectableItem + from .azure_file_share_recovery_point_py3 import AzureFileShareRecoveryPoint + from .restore_file_specs_py3 import RestoreFileSpecs + from .target_afs_restore_info_py3 import TargetAFSRestoreInfo + from .azure_file_share_restore_request_py3 import AzureFileShareRestoreRequest + from .azure_iaa_sclassic_compute_vm_container_py3 import AzureIaaSClassicComputeVMContainer + from .azure_iaa_sclassic_compute_vm_protectable_item_py3 import AzureIaaSClassicComputeVMProtectableItem + from .azure_iaa_scompute_vm_container_py3 import AzureIaaSComputeVMContainer + from .azure_iaa_scompute_vm_protectable_item_py3 import AzureIaaSComputeVMProtectableItem + from .azure_sqlag_workload_container_protection_container_py3 import AzureSQLAGWorkloadContainerProtectionContainer + from .azure_sql_container_py3 import AzureSqlContainer + from .azure_storage_container_py3 import AzureStorageContainer + from .azure_storage_protectable_container_py3 import AzureStorageProtectableContainer + from .azure_vm_app_container_protectable_container_py3 import AzureVMAppContainerProtectableContainer + from .azure_vm_app_container_protection_container_py3 import AzureVMAppContainerProtectionContainer + from .azure_vm_workload_item_py3 import AzureVmWorkloadItem + from .pre_backup_validation_py3 import PreBackupValidation + from .azure_vm_workload_protectable_item_py3 import AzureVmWorkloadProtectableItem + from .azure_vm_workload_sql_availability_group_protectable_item_py3 import AzureVmWorkloadSQLAvailabilityGroupProtectableItem + from .azure_vm_workload_sql_database_protectable_item_py3 import AzureVmWorkloadSQLDatabaseProtectableItem + from .azure_vm_workload_sql_database_workload_item_py3 import AzureVmWorkloadSQLDatabaseWorkloadItem + from .azure_vm_workload_sql_instance_protectable_item_py3 import AzureVmWorkloadSQLInstanceProtectableItem + from .sql_data_directory_py3 import SQLDataDirectory + from .azure_vm_workload_sql_instance_workload_item_py3 import AzureVmWorkloadSQLInstanceWorkloadItem + from .azure_workload_backup_request_py3 import AzureWorkloadBackupRequest + from .inquiry_validation_py3 import InquiryValidation + from .workload_inquiry_details_py3 import WorkloadInquiryDetails + from .inquiry_info_py3 import InquiryInfo + from .distributed_nodes_info_py3 import DistributedNodesInfo + from .azure_workload_container_extended_info_py3 import AzureWorkloadContainerExtendedInfo + from .azure_workload_container_py3 import AzureWorkloadContainer + from .azure_workload_recovery_point_py3 import AzureWorkloadRecoveryPoint + from .azure_workload_restore_request_py3 import AzureWorkloadRestoreRequest + from .point_in_time_range_py3 import PointInTimeRange + from .azure_workload_sql_point_in_time_recovery_point_py3 import AzureWorkloadSQLPointInTimeRecoveryPoint + from .azure_workload_sql_point_in_time_restore_request_py3 import AzureWorkloadSQLPointInTimeRestoreRequest + from .azure_workload_sql_recovery_point_extended_info_py3 import AzureWorkloadSQLRecoveryPointExtendedInfo + from .azure_workload_sql_recovery_point_py3 import AzureWorkloadSQLRecoveryPoint + from .target_restore_info_py3 import TargetRestoreInfo + from .sql_data_directory_mapping_py3 import SQLDataDirectoryMapping + from .azure_workload_sql_restore_request_py3 import AzureWorkloadSQLRestoreRequest + from .backup_engine_extended_info_py3 import BackupEngineExtendedInfo + from .backup_engine_base_py3 import BackupEngineBase + from .backup_engine_base_resource_py3 import BackupEngineBaseResource + from .backup_request_py3 import BackupRequest + from .backup_request_resource_py3 import BackupRequestResource + from .backup_resource_config_py3 import BackupResourceConfig + from .backup_resource_config_resource_py3 import BackupResourceConfigResource + from .backup_resource_vault_config_py3 import BackupResourceVaultConfig + from .backup_resource_vault_config_resource_py3 import BackupResourceVaultConfigResource + from .bek_details_py3 import BEKDetails + from .bms_backup_engine_query_object_py3 import BMSBackupEngineQueryObject + from .bms_backup_engines_query_object_py3 import BMSBackupEnginesQueryObject + from .bms_container_query_object_py3 import BMSContainerQueryObject + from .bmspo_query_object_py3 import BMSPOQueryObject + from .bms_refresh_containers_query_object_py3 import BMSRefreshContainersQueryObject + from .bmsrp_query_object_py3 import BMSRPQueryObject + from .bms_workload_item_query_object_py3 import BMSWorkloadItemQueryObject + from .client_script_for_connect_py3 import ClientScriptForConnect + from .container_identity_info_py3 import ContainerIdentityInfo + from .dpm_backup_engine_py3 import DpmBackupEngine + from .dpm_container_py3 import DpmContainer + from .encryption_details_py3 import EncryptionDetails + from .generic_container_extended_info_py3 import GenericContainerExtendedInfo + from .generic_container_py3 import GenericContainer + from .generic_recovery_point_py3 import GenericRecoveryPoint + from .get_protected_item_query_object_py3 import GetProtectedItemQueryObject + from .iaas_vm_backup_request_py3 import IaasVMBackupRequest + from .iaa_svm_container_py3 import IaaSVMContainer + from .iaas_vmilr_registration_request_py3 import IaasVMILRRegistrationRequest + from .iaa_svm_protectable_item_py3 import IaaSVMProtectableItem + from .kek_details_py3 import KEKDetails + from .key_and_secret_details_py3 import KeyAndSecretDetails + from .recovery_point_tier_information_py3 import RecoveryPointTierInformation + from .iaas_vm_recovery_point_py3 import IaasVMRecoveryPoint + from .iaas_vm_restore_request_py3 import IaasVMRestoreRequest + from .ilr_request_py3 import ILRRequest + from .ilr_request_resource_py3 import ILRRequestResource + from .instant_item_recovery_target_py3 import InstantItemRecoveryTarget + from .mab_container_extended_info_py3 import MabContainerExtendedInfo + from .mab_container_health_details_py3 import MABContainerHealthDetails + from .mab_container_py3 import MabContainer + from .operation_status_error_py3 import OperationStatusError + from .operation_status_extended_info_py3 import OperationStatusExtendedInfo + from .operation_status_py3 import OperationStatus + from .operation_status_job_extended_info_py3 import OperationStatusJobExtendedInfo + from .operation_status_jobs_extended_info_py3 import OperationStatusJobsExtendedInfo + from .operation_status_provision_ilr_extended_info_py3 import OperationStatusProvisionILRExtendedInfo + from .protectable_container_py3 import ProtectableContainer + from .protectable_container_resource_py3 import ProtectableContainerResource + from .protection_container_py3 import ProtectionContainer + from .protection_container_resource_py3 import ProtectionContainerResource + from .recovery_point_py3 import RecoveryPoint + from .recovery_point_resource_py3 import RecoveryPointResource + from .restore_request_py3 import RestoreRequest + from .restore_request_resource_py3 import RestoreRequestResource + from .token_information_py3 import TokenInformation + from .workload_item_py3 import WorkloadItem + from .workload_item_resource_py3 import WorkloadItemResource + from .workload_protectable_item_py3 import WorkloadProtectableItem + from .workload_protectable_item_resource_py3 import WorkloadProtectableItemResource + from .client_discovery_display_py3 import ClientDiscoveryDisplay + from .client_discovery_for_log_specification_py3 import ClientDiscoveryForLogSpecification + from .client_discovery_for_service_specification_py3 import ClientDiscoveryForServiceSpecification + from .client_discovery_for_properties_py3 import ClientDiscoveryForProperties + from .client_discovery_value_for_single_api_py3 import ClientDiscoveryValueForSingleApi +except (SyntaxError, ImportError): + from .azure_fileshare_protected_item_extended_info import AzureFileshareProtectedItemExtendedInfo + from .azure_fileshare_protected_item import AzureFileshareProtectedItem + from .schedule_policy import SchedulePolicy + from .retention_policy import RetentionPolicy + from .azure_file_share_protection_policy import AzureFileShareProtectionPolicy + from .azure_iaa_sclassic_compute_vm_protected_item import AzureIaaSClassicComputeVMProtectedItem + from .azure_iaa_scompute_vm_protected_item import AzureIaaSComputeVMProtectedItem + from .azure_iaa_svm_error_info import AzureIaaSVMErrorInfo + from .azure_iaa_svm_health_details import AzureIaaSVMHealthDetails + from .azure_iaa_svm_job_task_details import AzureIaaSVMJobTaskDetails + from .azure_iaa_svm_job_extended_info import AzureIaaSVMJobExtendedInfo + from .azure_iaa_svm_job import AzureIaaSVMJob + from .azure_iaa_svm_protected_item_extended_info import AzureIaaSVMProtectedItemExtendedInfo + from .azure_iaa_svm_protected_item import AzureIaaSVMProtectedItem + from .azure_iaa_svm_protection_policy import AzureIaaSVMProtectionPolicy + from .azure_resource_protection_intent import AzureResourceProtectionIntent + from .azure_sql_protected_item_extended_info import AzureSqlProtectedItemExtendedInfo + from .azure_sql_protected_item import AzureSqlProtectedItem + from .azure_sql_protection_policy import AzureSqlProtectionPolicy + from .azure_storage_error_info import AzureStorageErrorInfo + from .azure_storage_job_task_details import AzureStorageJobTaskDetails + from .azure_storage_job_extended_info import AzureStorageJobExtendedInfo + from .azure_storage_job import AzureStorageJob + from .azure_vm_resource_feature_support_request import AzureVMResourceFeatureSupportRequest + from .azure_vm_resource_feature_support_response import AzureVMResourceFeatureSupportResponse + from .azure_vm_workload_protected_item_extended_info import AzureVmWorkloadProtectedItemExtendedInfo + from .settings import Settings + from .sub_protection_policy import SubProtectionPolicy + from .azure_vm_workload_protection_policy import AzureVmWorkloadProtectionPolicy + from .error_detail import ErrorDetail + from .azure_vm_workload_sql_database_protected_item import AzureVmWorkloadSQLDatabaseProtectedItem + from .azure_workload_error_info import AzureWorkloadErrorInfo + from .azure_workload_job_task_details import AzureWorkloadJobTaskDetails + from .azure_workload_job_extended_info import AzureWorkloadJobExtendedInfo + from .azure_workload_job import AzureWorkloadJob + from .name_info import NameInfo + from .backup_management_usage import BackupManagementUsage + from .backup_status_request import BackupStatusRequest + from .backup_status_response import BackupStatusResponse + from .bms_backup_summaries_query_object import BMSBackupSummariesQueryObject + from .day import Day + from .daily_retention_format import DailyRetentionFormat + from .retention_duration import RetentionDuration + from .daily_retention_schedule import DailyRetentionSchedule + from .dpm_error_info import DpmErrorInfo + from .dpm_job_task_details import DpmJobTaskDetails + from .dpm_job_extended_info import DpmJobExtendedInfo + from .dpm_job import DpmJob + from .dpm_protected_item_extended_info import DPMProtectedItemExtendedInfo + from .dpm_protected_item import DPMProtectedItem + from .export_jobs_operation_result_info import ExportJobsOperationResultInfo + from .feature_support_request import FeatureSupportRequest + from .generic_protected_item import GenericProtectedItem + from .generic_protection_policy import GenericProtectionPolicy + from .job import Job + from .job_query_object import JobQueryObject + from .job_resource import JobResource + from .log_schedule_policy import LogSchedulePolicy + from .weekly_retention_schedule import WeeklyRetentionSchedule + from .weekly_retention_format import WeeklyRetentionFormat + from .monthly_retention_schedule import MonthlyRetentionSchedule + from .yearly_retention_schedule import YearlyRetentionSchedule + from .long_term_retention_policy import LongTermRetentionPolicy + from .long_term_schedule_policy import LongTermSchedulePolicy + from .mab_error_info import MabErrorInfo + from .mab_file_folder_protected_item_extended_info import MabFileFolderProtectedItemExtendedInfo + from .mab_file_folder_protected_item import MabFileFolderProtectedItem + from .mab_job_task_details import MabJobTaskDetails + from .mab_job_extended_info import MabJobExtendedInfo + from .mab_job import MabJob + from .mab_protection_policy import MabProtectionPolicy + from .operation_result_info import OperationResultInfo + from .operation_result_info_base import OperationResultInfoBase + from .operation_result_info_base_resource import OperationResultInfoBaseResource + from .operation_worker_response import OperationWorkerResponse + from .pre_validate_enable_backup_request import PreValidateEnableBackupRequest + from .pre_validate_enable_backup_response import PreValidateEnableBackupResponse + from .protected_item import ProtectedItem + from .protected_item_query_object import ProtectedItemQueryObject + from .protected_item_resource import ProtectedItemResource + from .protection_intent import ProtectionIntent + from .protection_intent_resource import ProtectionIntentResource + from .protection_policy import ProtectionPolicy + from .protection_policy_query_object import ProtectionPolicyQueryObject + from .protection_policy_resource import ProtectionPolicyResource + from .resource import Resource + from .resource_list import ResourceList + from .simple_retention_policy import SimpleRetentionPolicy + from .simple_schedule_policy import SimpleSchedulePolicy + from .dpm_container_extended_info import DPMContainerExtendedInfo + from .azure_backup_server_container import AzureBackupServerContainer + from .azure_backup_server_engine import AzureBackupServerEngine + from .azure_file_share_backup_request import AzureFileShareBackupRequest + from .azure_file_share_protectable_item import AzureFileShareProtectableItem + from .azure_file_share_recovery_point import AzureFileShareRecoveryPoint + from .restore_file_specs import RestoreFileSpecs + from .target_afs_restore_info import TargetAFSRestoreInfo + from .azure_file_share_restore_request import AzureFileShareRestoreRequest + from .azure_iaa_sclassic_compute_vm_container import AzureIaaSClassicComputeVMContainer + from .azure_iaa_sclassic_compute_vm_protectable_item import AzureIaaSClassicComputeVMProtectableItem + from .azure_iaa_scompute_vm_container import AzureIaaSComputeVMContainer + from .azure_iaa_scompute_vm_protectable_item import AzureIaaSComputeVMProtectableItem + from .azure_sqlag_workload_container_protection_container import AzureSQLAGWorkloadContainerProtectionContainer + from .azure_sql_container import AzureSqlContainer + from .azure_storage_container import AzureStorageContainer + from .azure_storage_protectable_container import AzureStorageProtectableContainer + from .azure_vm_app_container_protectable_container import AzureVMAppContainerProtectableContainer + from .azure_vm_app_container_protection_container import AzureVMAppContainerProtectionContainer + from .azure_vm_workload_item import AzureVmWorkloadItem + from .pre_backup_validation import PreBackupValidation + from .azure_vm_workload_protectable_item import AzureVmWorkloadProtectableItem + from .azure_vm_workload_sql_availability_group_protectable_item import AzureVmWorkloadSQLAvailabilityGroupProtectableItem + from .azure_vm_workload_sql_database_protectable_item import AzureVmWorkloadSQLDatabaseProtectableItem + from .azure_vm_workload_sql_database_workload_item import AzureVmWorkloadSQLDatabaseWorkloadItem + from .azure_vm_workload_sql_instance_protectable_item import AzureVmWorkloadSQLInstanceProtectableItem + from .sql_data_directory import SQLDataDirectory + from .azure_vm_workload_sql_instance_workload_item import AzureVmWorkloadSQLInstanceWorkloadItem + from .azure_workload_backup_request import AzureWorkloadBackupRequest + from .inquiry_validation import InquiryValidation + from .workload_inquiry_details import WorkloadInquiryDetails + from .inquiry_info import InquiryInfo + from .distributed_nodes_info import DistributedNodesInfo + from .azure_workload_container_extended_info import AzureWorkloadContainerExtendedInfo + from .azure_workload_container import AzureWorkloadContainer + from .azure_workload_recovery_point import AzureWorkloadRecoveryPoint + from .azure_workload_restore_request import AzureWorkloadRestoreRequest + from .point_in_time_range import PointInTimeRange + from .azure_workload_sql_point_in_time_recovery_point import AzureWorkloadSQLPointInTimeRecoveryPoint + from .azure_workload_sql_point_in_time_restore_request import AzureWorkloadSQLPointInTimeRestoreRequest + from .azure_workload_sql_recovery_point_extended_info import AzureWorkloadSQLRecoveryPointExtendedInfo + from .azure_workload_sql_recovery_point import AzureWorkloadSQLRecoveryPoint + from .target_restore_info import TargetRestoreInfo + from .sql_data_directory_mapping import SQLDataDirectoryMapping + from .azure_workload_sql_restore_request import AzureWorkloadSQLRestoreRequest + from .backup_engine_extended_info import BackupEngineExtendedInfo + from .backup_engine_base import BackupEngineBase + from .backup_engine_base_resource import BackupEngineBaseResource + from .backup_request import BackupRequest + from .backup_request_resource import BackupRequestResource + from .backup_resource_config import BackupResourceConfig + from .backup_resource_config_resource import BackupResourceConfigResource + from .backup_resource_vault_config import BackupResourceVaultConfig + from .backup_resource_vault_config_resource import BackupResourceVaultConfigResource + from .bek_details import BEKDetails + from .bms_backup_engine_query_object import BMSBackupEngineQueryObject + from .bms_backup_engines_query_object import BMSBackupEnginesQueryObject + from .bms_container_query_object import BMSContainerQueryObject + from .bmspo_query_object import BMSPOQueryObject + from .bms_refresh_containers_query_object import BMSRefreshContainersQueryObject + from .bmsrp_query_object import BMSRPQueryObject + from .bms_workload_item_query_object import BMSWorkloadItemQueryObject + from .client_script_for_connect import ClientScriptForConnect + from .container_identity_info import ContainerIdentityInfo + from .dpm_backup_engine import DpmBackupEngine + from .dpm_container import DpmContainer + from .encryption_details import EncryptionDetails + from .generic_container_extended_info import GenericContainerExtendedInfo + from .generic_container import GenericContainer + from .generic_recovery_point import GenericRecoveryPoint + from .get_protected_item_query_object import GetProtectedItemQueryObject + from .iaas_vm_backup_request import IaasVMBackupRequest + from .iaa_svm_container import IaaSVMContainer + from .iaas_vmilr_registration_request import IaasVMILRRegistrationRequest + from .iaa_svm_protectable_item import IaaSVMProtectableItem + from .kek_details import KEKDetails + from .key_and_secret_details import KeyAndSecretDetails + from .recovery_point_tier_information import RecoveryPointTierInformation + from .iaas_vm_recovery_point import IaasVMRecoveryPoint + from .iaas_vm_restore_request import IaasVMRestoreRequest + from .ilr_request import ILRRequest + from .ilr_request_resource import ILRRequestResource + from .instant_item_recovery_target import InstantItemRecoveryTarget + from .mab_container_extended_info import MabContainerExtendedInfo + from .mab_container_health_details import MABContainerHealthDetails + from .mab_container import MabContainer + from .operation_status_error import OperationStatusError + from .operation_status_extended_info import OperationStatusExtendedInfo + from .operation_status import OperationStatus + from .operation_status_job_extended_info import OperationStatusJobExtendedInfo + from .operation_status_jobs_extended_info import OperationStatusJobsExtendedInfo + from .operation_status_provision_ilr_extended_info import OperationStatusProvisionILRExtendedInfo + from .protectable_container import ProtectableContainer + from .protectable_container_resource import ProtectableContainerResource + from .protection_container import ProtectionContainer + from .protection_container_resource import ProtectionContainerResource + from .recovery_point import RecoveryPoint + from .recovery_point_resource import RecoveryPointResource + from .restore_request import RestoreRequest + from .restore_request_resource import RestoreRequestResource + from .token_information import TokenInformation + from .workload_item import WorkloadItem + from .workload_item_resource import WorkloadItemResource + from .workload_protectable_item import WorkloadProtectableItem + from .workload_protectable_item_resource import WorkloadProtectableItemResource + from .client_discovery_display import ClientDiscoveryDisplay + from .client_discovery_for_log_specification import ClientDiscoveryForLogSpecification + from .client_discovery_for_service_specification import ClientDiscoveryForServiceSpecification + from .client_discovery_for_properties import ClientDiscoveryForProperties + from .client_discovery_value_for_single_api import ClientDiscoveryValueForSingleApi from .job_resource_paged import JobResourcePaged +from .protection_policy_resource_paged import ProtectionPolicyResourcePaged +from .protected_item_resource_paged import ProtectedItemResourcePaged +from .backup_management_usage_paged import BackupManagementUsagePaged from .backup_engine_base_resource_paged import BackupEngineBaseResourcePaged +from .protectable_container_resource_paged import ProtectableContainerResourcePaged +from .workload_item_resource_paged import WorkloadItemResourcePaged from .recovery_point_resource_paged import RecoveryPointResourcePaged -from .protection_policy_resource_paged import ProtectionPolicyResourcePaged from .workload_protectable_item_resource_paged import WorkloadProtectableItemResourcePaged -from .protected_item_resource_paged import ProtectedItemResourcePaged from .protection_container_resource_paged import ProtectionContainerResourcePaged -from .backup_management_usage_paged import BackupManagementUsagePaged from .client_discovery_value_for_single_api_paged import ClientDiscoveryValueForSingleApiPaged from .recovery_services_backup_client_enums import ( + ProtectionState, + HealthStatus, JobSupportedAction, + ProtectedItemState, + SupportStatus, + LastBackupStatus, + ProtectedItemHealthStatus, + UsagesUnit, + DataSourceType, + ProtectionStatus, + FabricName, + Type, + RetentionDurationType, BackupManagementType, JobStatus, JobOperationType, + DayOfWeek, + RetentionScheduleFormat, + WeekOfMonth, + MonthOfYear, MabServerType, WorkloadType, - ProtectionState, - HealthStatus, - ProtectedItemState, - UsagesUnit, + HttpStatusCode, + ValidationStatus, + HealthState, + ScheduleRunType, + AzureFileShareType, + RecoveryType, + CopyOptions, + RestoreRequestType, + InquiryStatus, + SQLDataDirectoryType, + BackupType, + RestorePointType, + OverwriteOptions, StorageType, StorageTypeState, EnhancedSecurityState, - Type, ContainerType, - RetentionDurationType, + RestorePointQueryType, + WorkloadItemType, RecoveryPointTierType, RecoveryPointTierStatus, - RecoveryType, - DayOfWeek, - RetentionScheduleFormat, - WeekOfMonth, - MonthOfYear, BackupItemType, OperationStatusValues, - HttpStatusCode, - DataSourceType, - HealthState, - ScheduleRunType, - ProtectionStatus, ) __all__ = [ + 'AzureFileshareProtectedItemExtendedInfo', + 'AzureFileshareProtectedItem', + 'SchedulePolicy', + 'RetentionPolicy', + 'AzureFileShareProtectionPolicy', + 'AzureIaaSClassicComputeVMProtectedItem', + 'AzureIaaSComputeVMProtectedItem', 'AzureIaaSVMErrorInfo', + 'AzureIaaSVMHealthDetails', 'AzureIaaSVMJobTaskDetails', 'AzureIaaSVMJobExtendedInfo', 'AzureIaaSVMJob', + 'AzureIaaSVMProtectedItemExtendedInfo', + 'AzureIaaSVMProtectedItem', + 'AzureIaaSVMProtectionPolicy', + 'AzureResourceProtectionIntent', + 'AzureSqlProtectedItemExtendedInfo', + 'AzureSqlProtectedItem', + 'AzureSqlProtectionPolicy', + 'AzureStorageErrorInfo', + 'AzureStorageJobTaskDetails', + 'AzureStorageJobExtendedInfo', + 'AzureStorageJob', + 'AzureVMResourceFeatureSupportRequest', + 'AzureVMResourceFeatureSupportResponse', + 'AzureVmWorkloadProtectedItemExtendedInfo', + 'Settings', + 'SubProtectionPolicy', + 'AzureVmWorkloadProtectionPolicy', + 'ErrorDetail', + 'AzureVmWorkloadSQLDatabaseProtectedItem', + 'AzureWorkloadErrorInfo', + 'AzureWorkloadJobTaskDetails', + 'AzureWorkloadJobExtendedInfo', + 'AzureWorkloadJob', + 'NameInfo', + 'BackupManagementUsage', + 'BackupStatusRequest', + 'BackupStatusResponse', + 'BMSBackupSummariesQueryObject', + 'Day', + 'DailyRetentionFormat', + 'RetentionDuration', + 'DailyRetentionSchedule', 'DpmErrorInfo', 'DpmJobTaskDetails', 'DpmJobExtendedInfo', 'DpmJob', + 'DPMProtectedItemExtendedInfo', + 'DPMProtectedItem', + 'ExportJobsOperationResultInfo', + 'FeatureSupportRequest', + 'GenericProtectedItem', + 'GenericProtectionPolicy', 'Job', 'JobQueryObject', 'JobResource', + 'LogSchedulePolicy', + 'WeeklyRetentionSchedule', + 'WeeklyRetentionFormat', + 'MonthlyRetentionSchedule', + 'YearlyRetentionSchedule', + 'LongTermRetentionPolicy', + 'LongTermSchedulePolicy', 'MabErrorInfo', + 'MabFileFolderProtectedItemExtendedInfo', + 'MabFileFolderProtectedItem', 'MabJobTaskDetails', 'MabJobExtendedInfo', 'MabJob', + 'MabProtectionPolicy', + 'OperationResultInfo', + 'OperationResultInfoBase', + 'OperationResultInfoBaseResource', + 'OperationWorkerResponse', + 'PreValidateEnableBackupRequest', + 'PreValidateEnableBackupResponse', + 'ProtectedItem', + 'ProtectedItemQueryObject', + 'ProtectedItemResource', + 'ProtectionIntent', + 'ProtectionIntentResource', + 'ProtectionPolicy', + 'ProtectionPolicyQueryObject', + 'ProtectionPolicyResource', 'Resource', 'ResourceList', + 'SimpleRetentionPolicy', + 'SimpleSchedulePolicy', 'DPMContainerExtendedInfo', 'AzureBackupServerContainer', 'AzureBackupServerEngine', + 'AzureFileShareBackupRequest', + 'AzureFileShareProtectableItem', + 'AzureFileShareRecoveryPoint', + 'RestoreFileSpecs', + 'TargetAFSRestoreInfo', + 'AzureFileShareRestoreRequest', 'AzureIaaSClassicComputeVMContainer', 'AzureIaaSClassicComputeVMProtectableItem', - 'AzureIaaSClassicComputeVMProtectedItem', 'AzureIaaSComputeVMContainer', 'AzureIaaSComputeVMProtectableItem', - 'AzureIaaSComputeVMProtectedItem', - 'AzureIaaSVMHealthDetails', - 'AzureIaaSVMProtectedItemExtendedInfo', - 'AzureIaaSVMProtectedItem', - 'SchedulePolicy', - 'RetentionPolicy', - 'AzureIaaSVMProtectionPolicy', + 'AzureSQLAGWorkloadContainerProtectionContainer', 'AzureSqlContainer', - 'AzureSqlProtectedItemExtendedInfo', - 'AzureSqlProtectedItem', - 'AzureSqlProtectionPolicy', + 'AzureStorageContainer', + 'AzureStorageProtectableContainer', + 'AzureVMAppContainerProtectableContainer', + 'AzureVMAppContainerProtectionContainer', + 'AzureVmWorkloadItem', + 'PreBackupValidation', + 'AzureVmWorkloadProtectableItem', + 'AzureVmWorkloadSQLAvailabilityGroupProtectableItem', + 'AzureVmWorkloadSQLDatabaseProtectableItem', + 'AzureVmWorkloadSQLDatabaseWorkloadItem', + 'AzureVmWorkloadSQLInstanceProtectableItem', + 'SQLDataDirectory', + 'AzureVmWorkloadSQLInstanceWorkloadItem', + 'AzureWorkloadBackupRequest', + 'InquiryValidation', + 'WorkloadInquiryDetails', + 'InquiryInfo', + 'DistributedNodesInfo', + 'AzureWorkloadContainerExtendedInfo', + 'AzureWorkloadContainer', + 'AzureWorkloadRecoveryPoint', + 'AzureWorkloadRestoreRequest', + 'PointInTimeRange', + 'AzureWorkloadSQLPointInTimeRecoveryPoint', + 'AzureWorkloadSQLPointInTimeRestoreRequest', + 'AzureWorkloadSQLRecoveryPointExtendedInfo', + 'AzureWorkloadSQLRecoveryPoint', + 'TargetRestoreInfo', + 'SQLDataDirectoryMapping', + 'AzureWorkloadSQLRestoreRequest', 'BackupEngineExtendedInfo', 'BackupEngineBase', 'BackupEngineBaseResource', - 'NameInfo', - 'BackupManagementUsage', 'BackupRequest', 'BackupRequestResource', 'BackupResourceConfig', @@ -224,21 +615,18 @@ 'BEKDetails', 'BMSBackupEngineQueryObject', 'BMSBackupEnginesQueryObject', - 'BMSBackupSummariesQueryObject', 'BMSContainerQueryObject', 'BMSPOQueryObject', + 'BMSRefreshContainersQueryObject', 'BMSRPQueryObject', + 'BMSWorkloadItemQueryObject', 'ClientScriptForConnect', - 'Day', - 'DailyRetentionFormat', - 'RetentionDuration', - 'DailyRetentionSchedule', + 'ContainerIdentityInfo', 'DpmBackupEngine', 'DpmContainer', - 'DPMProtectedItemExtendedInfo', - 'DPMProtectedItem', 'EncryptionDetails', - 'ExportJobsOperationResultInfo', + 'GenericContainerExtendedInfo', + 'GenericContainer', 'GenericRecoveryPoint', 'GetProtectedItemQueryObject', 'IaasVMBackupRequest', @@ -253,42 +641,26 @@ 'ILRRequest', 'ILRRequestResource', 'InstantItemRecoveryTarget', - 'WeeklyRetentionSchedule', - 'WeeklyRetentionFormat', - 'MonthlyRetentionSchedule', - 'YearlyRetentionSchedule', - 'LongTermRetentionPolicy', - 'LongTermSchedulePolicy', 'MabContainerExtendedInfo', + 'MABContainerHealthDetails', 'MabContainer', - 'MabFileFolderProtectedItemExtendedInfo', - 'MabFileFolderProtectedItem', - 'MabProtectionPolicy', - 'OperationResultInfo', - 'OperationResultInfoBase', - 'OperationResultInfoBaseResource', 'OperationStatusError', 'OperationStatusExtendedInfo', 'OperationStatus', 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo', - 'OperationWorkerResponse', - 'ProtectedItem', - 'ProtectedItemQueryObject', - 'ProtectedItemResource', + 'ProtectableContainer', + 'ProtectableContainerResource', 'ProtectionContainer', 'ProtectionContainerResource', - 'ProtectionPolicy', - 'ProtectionPolicyQueryObject', - 'ProtectionPolicyResource', 'RecoveryPoint', 'RecoveryPointResource', 'RestoreRequest', 'RestoreRequestResource', - 'SimpleRetentionPolicy', - 'SimpleSchedulePolicy', 'TokenInformation', + 'WorkloadItem', + 'WorkloadItemResource', 'WorkloadProtectableItem', 'WorkloadProtectableItemResource', 'ClientDiscoveryDisplay', @@ -297,42 +669,59 @@ 'ClientDiscoveryForProperties', 'ClientDiscoveryValueForSingleApi', 'JobResourcePaged', + 'ProtectionPolicyResourcePaged', + 'ProtectedItemResourcePaged', + 'BackupManagementUsagePaged', 'BackupEngineBaseResourcePaged', + 'ProtectableContainerResourcePaged', + 'WorkloadItemResourcePaged', 'RecoveryPointResourcePaged', - 'ProtectionPolicyResourcePaged', 'WorkloadProtectableItemResourcePaged', - 'ProtectedItemResourcePaged', 'ProtectionContainerResourcePaged', - 'BackupManagementUsagePaged', 'ClientDiscoveryValueForSingleApiPaged', + 'ProtectionState', + 'HealthStatus', 'JobSupportedAction', + 'ProtectedItemState', + 'SupportStatus', + 'LastBackupStatus', + 'ProtectedItemHealthStatus', + 'UsagesUnit', + 'DataSourceType', + 'ProtectionStatus', + 'FabricName', + 'Type', + 'RetentionDurationType', 'BackupManagementType', 'JobStatus', 'JobOperationType', + 'DayOfWeek', + 'RetentionScheduleFormat', + 'WeekOfMonth', + 'MonthOfYear', 'MabServerType', 'WorkloadType', - 'ProtectionState', - 'HealthStatus', - 'ProtectedItemState', - 'UsagesUnit', + 'HttpStatusCode', + 'ValidationStatus', + 'HealthState', + 'ScheduleRunType', + 'AzureFileShareType', + 'RecoveryType', + 'CopyOptions', + 'RestoreRequestType', + 'InquiryStatus', + 'SQLDataDirectoryType', + 'BackupType', + 'RestorePointType', + 'OverwriteOptions', 'StorageType', 'StorageTypeState', 'EnhancedSecurityState', - 'Type', 'ContainerType', - 'RetentionDurationType', + 'RestorePointQueryType', + 'WorkloadItemType', 'RecoveryPointTierType', 'RecoveryPointTierStatus', - 'RecoveryType', - 'DayOfWeek', - 'RetentionScheduleFormat', - 'WeekOfMonth', - 'MonthOfYear', 'BackupItemType', 'OperationStatusValues', - 'HttpStatusCode', - 'DataSourceType', - 'HealthState', - 'ScheduleRunType', - 'ProtectionStatus', ] diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_container.py index 29dfcd397c49..2ef97a0659fb 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_container.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_container.py @@ -15,33 +15,23 @@ class AzureBackupServerContainer(ProtectionContainer): """AzureBackupServer (DPMVenus) workload-specific protection container. - 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 friendly_name: Friendly name of the container. :type friendly_name: str :param backup_management_type: Type of backup managemenent for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Status of registration of the container with the Recovery Services Vault. :type registration_status: str :param health_status: Status of health of the container. :type health_status: str - :ivar container_type: Type of the container. The value of this property - for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic - Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is - AzureSqlContainer. Possible values include: 'Invalid', 'Unknown', - 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', - 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - 'AzureSqlContainer', 'Windows', 'VCenter' - :vartype container_type: str or :class:`ContainerType - ` - :param protectable_object_type: Polymorphic Discriminator - :type protectable_object_type: str + :param container_type: Required. Constant filled by server. + :type container_type: str :param can_re_register: Specifies whether the container is re-registrable. :type can_re_register: bool :param container_id: ID of container. @@ -51,19 +41,18 @@ class AzureBackupServerContainer(ProtectionContainer): :param dpm_agent_version: Backup engine Agent version :type dpm_agent_version: str :param dpm_servers: List of BackupEngines protecting the container - :type dpm_servers: list of str + :type dpm_servers: list[str] :param upgrade_available: To check if upgrade available :type upgrade_available: bool :param protection_status: Protection status of the container. :type protection_status: str :param extended_info: Extended Info of the container. - :type extended_info: :class:`DPMContainerExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo """ _validation = { - 'container_type': {'readonly': True}, - 'protectable_object_type': {'required': True}, + 'container_type': {'required': True}, } _attribute_map = { @@ -72,25 +61,24 @@ class AzureBackupServerContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, - 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, 'container_id': {'key': 'containerId', 'type': 'str'}, 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, 'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'}, - 'dpm_servers': {'key': 'DPMServers', 'type': '[str]'}, - 'upgrade_available': {'key': 'UpgradeAvailable', 'type': 'bool'}, + 'dpm_servers': {'key': 'dpmServers', 'type': '[str]'}, + 'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'}, } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, health_status=None, can_re_register=None, container_id=None, protected_item_count=None, dpm_agent_version=None, dpm_servers=None, upgrade_available=None, protection_status=None, extended_info=None): - super(AzureBackupServerContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status) - self.can_re_register = can_re_register - self.container_id = container_id - self.protected_item_count = protected_item_count - self.dpm_agent_version = dpm_agent_version - self.dpm_servers = dpm_servers - self.upgrade_available = upgrade_available - self.protection_status = protection_status - self.extended_info = extended_info - self.protectable_object_type = 'AzureBackupServerContainer' + def __init__(self, **kwargs): + super(AzureBackupServerContainer, self).__init__(**kwargs) + self.can_re_register = kwargs.get('can_re_register', None) + self.container_id = kwargs.get('container_id', None) + self.protected_item_count = kwargs.get('protected_item_count', None) + self.dpm_agent_version = kwargs.get('dpm_agent_version', None) + self.dpm_servers = kwargs.get('dpm_servers', None) + self.upgrade_available = kwargs.get('upgrade_available', None) + self.protection_status = kwargs.get('protection_status', None) + self.extended_info = kwargs.get('extended_info', None) + self.container_type = 'AzureBackupServerContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_container_py3.py new file mode 100644 index 000000000000..32f080a4a6cc --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_container_py3.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_container_py3 import ProtectionContainer + + +class AzureBackupServerContainer(ProtectionContainer): + """AzureBackupServer (DPMVenus) workload-specific protection container. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param can_re_register: Specifies whether the container is re-registrable. + :type can_re_register: bool + :param container_id: ID of container. + :type container_id: str + :param protected_item_count: Number of protected items in the BackupEngine + :type protected_item_count: long + :param dpm_agent_version: Backup engine Agent version + :type dpm_agent_version: str + :param dpm_servers: List of BackupEngines protecting the container + :type dpm_servers: list[str] + :param upgrade_available: To check if upgrade available + :type upgrade_available: bool + :param protection_status: Protection status of the container. + :type protection_status: str + :param extended_info: Extended Info of the container. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, + 'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'}, + 'dpm_servers': {'key': 'dpmServers', 'type': '[str]'}, + 'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, can_re_register: bool=None, container_id: str=None, protected_item_count: int=None, dpm_agent_version: str=None, dpm_servers=None, upgrade_available: bool=None, protection_status: str=None, extended_info=None, **kwargs) -> None: + super(AzureBackupServerContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + self.can_re_register = can_re_register + self.container_id = container_id + self.protected_item_count = protected_item_count + self.dpm_agent_version = dpm_agent_version + self.dpm_servers = dpm_servers + self.upgrade_available = upgrade_available + self.protection_status = protection_status + self.extended_info = extended_info + self.container_type = 'AzureBackupServerContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_engine.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_engine.py index 31e58543fa4c..4a5f2783d116 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_engine.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_engine.py @@ -15,13 +15,16 @@ class AzureBackupServerEngine(BackupEngineBase): """Backup engine type when Azure Backup Server is used to manage the backups. + All required parameters must be populated in order to send to Azure. + :param friendly_name: Friendly name of the backup engine. :type friendly_name: str :param backup_management_type: Type of backup management for the backup engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Registration status of the backup engine with the Recovery Services Vault. :type registration_status: str @@ -46,9 +49,9 @@ class AzureBackupServerEngine(BackupEngineBase): available :type is_dpm_upgrade_available: bool :param extended_info: Extended info of the backupengine - :type extended_info: :class:`BackupEngineExtendedInfo - ` - :param backup_engine_type: Polymorphic Discriminator + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :param backup_engine_type: Required. Constant filled by server. :type backup_engine_type: str """ @@ -56,6 +59,22 @@ class AzureBackupServerEngine(BackupEngineBase): 'backup_engine_type': {'required': True}, } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, backup_engine_state=None, health_status=None, can_re_register=None, backup_engine_id=None, dpm_version=None, azure_backup_agent_version=None, is_azure_backup_agent_upgrade_available=None, is_dpm_upgrade_available=None, extended_info=None): - super(AzureBackupServerEngine, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, backup_engine_state=backup_engine_state, health_status=health_status, can_re_register=can_re_register, backup_engine_id=backup_engine_id, dpm_version=dpm_version, azure_backup_agent_version=azure_backup_agent_version, is_azure_backup_agent_upgrade_available=is_azure_backup_agent_upgrade_available, is_dpm_upgrade_available=is_dpm_upgrade_available, extended_info=extended_info) + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, + 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, + 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, + 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, + 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureBackupServerEngine, self).__init__(**kwargs) self.backup_engine_type = 'AzureBackupServerEngine' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_engine_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_engine_py3.py new file mode 100644 index 000000000000..1aaba9929db0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_engine_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_engine_base_py3 import BackupEngineBase + + +class AzureBackupServerEngine(BackupEngineBase): + """Backup engine type when Azure Backup Server is used to manage the backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the backup engine. + :type friendly_name: str + :param backup_management_type: Type of backup management for the backup + engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Registration status of the backup engine with + the Recovery Services Vault. + :type registration_status: str + :param backup_engine_state: Status of the backup engine with the Recovery + Services Vault. = {Active/Deleting/DeleteFailed} + :type backup_engine_state: str + :param health_status: Backup status of the backup engine. + :type health_status: str + :param can_re_register: Flag indicating if the backup engine be + registered, once already registered. + :type can_re_register: bool + :param backup_engine_id: ID of the backup engine. + :type backup_engine_id: str + :param dpm_version: Backup engine version + :type dpm_version: str + :param azure_backup_agent_version: Backup agent version + :type azure_backup_agent_version: str + :param is_azure_backup_agent_upgrade_available: To check if backup agent + upgrade available + :type is_azure_backup_agent_upgrade_available: bool + :param is_dpm_upgrade_available: To check if backup engine upgrade + available + :type is_dpm_upgrade_available: bool + :param extended_info: Extended info of the backupengine + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :param backup_engine_type: Required. Constant filled by server. + :type backup_engine_type: str + """ + + _validation = { + 'backup_engine_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, + 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, + 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, + 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, + 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, backup_engine_state: str=None, health_status: str=None, can_re_register: bool=None, backup_engine_id: str=None, dpm_version: str=None, azure_backup_agent_version: str=None, is_azure_backup_agent_upgrade_available: bool=None, is_dpm_upgrade_available: bool=None, extended_info=None, **kwargs) -> None: + super(AzureBackupServerEngine, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, backup_engine_state=backup_engine_state, health_status=health_status, can_re_register=can_re_register, backup_engine_id=backup_engine_id, dpm_version=dpm_version, azure_backup_agent_version=azure_backup_agent_version, is_azure_backup_agent_upgrade_available=is_azure_backup_agent_upgrade_available, is_dpm_upgrade_available=is_dpm_upgrade_available, extended_info=extended_info, **kwargs) + self.backup_engine_type = 'AzureBackupServerEngine' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_backup_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_backup_request.py new file mode 100644 index 000000000000..59314ba015ee --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_backup_request.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_request import BackupRequest + + +class AzureFileShareBackupRequest(BackupRequest): + """AzureFileShare workload-specific backup request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_expiry_time_in_utc: Backup copy will expire after + the time specified (UTC). + :type recovery_point_expiry_time_in_utc: datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(AzureFileShareBackupRequest, self).__init__(**kwargs) + self.recovery_point_expiry_time_in_utc = kwargs.get('recovery_point_expiry_time_in_utc', None) + self.object_type = 'AzureFileShareBackupRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_backup_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_backup_request_py3.py new file mode 100644 index 000000000000..0c5b79db093a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_backup_request_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_request_py3 import BackupRequest + + +class AzureFileShareBackupRequest(BackupRequest): + """AzureFileShare workload-specific backup request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_expiry_time_in_utc: Backup copy will expire after + the time specified (UTC). + :type recovery_point_expiry_time_in_utc: datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, + } + + def __init__(self, *, recovery_point_expiry_time_in_utc=None, **kwargs) -> None: + super(AzureFileShareBackupRequest, self).__init__(**kwargs) + self.recovery_point_expiry_time_in_utc = recovery_point_expiry_time_in_utc + self.object_type = 'AzureFileShareBackupRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protectable_item.py new file mode 100644 index 000000000000..c52e8b17ed03 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protectable_item.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .workload_protectable_item import WorkloadProtectableItem + + +class AzureFileShareProtectableItem(WorkloadProtectableItem): + """Protectable item for Azure Fileshare workloads. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_container_fabric_id: Full Fabric ID of container to which + this protectable item belongs. For example, ARM ID. + :type parent_container_fabric_id: str + :param parent_container_friendly_name: Friendly name of container to which + this protectable item belongs. + :type parent_container_friendly_name: str + :param azure_file_share_type: File Share type XSync or XSMB. Possible + values include: 'Invalid', 'XSMB', 'XSync' + :type azure_file_share_type: str or + ~azure.mgmt.recoveryservicesbackup.models.AzureFileShareType + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_container_fabric_id': {'key': 'parentContainerFabricId', 'type': 'str'}, + 'parent_container_friendly_name': {'key': 'parentContainerFriendlyName', 'type': 'str'}, + 'azure_file_share_type': {'key': 'azureFileShareType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureFileShareProtectableItem, self).__init__(**kwargs) + self.parent_container_fabric_id = kwargs.get('parent_container_fabric_id', None) + self.parent_container_friendly_name = kwargs.get('parent_container_friendly_name', None) + self.azure_file_share_type = kwargs.get('azure_file_share_type', None) + self.protectable_item_type = 'AzureFileShare' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protectable_item_py3.py new file mode 100644 index 000000000000..93fd85757510 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protectable_item_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .workload_protectable_item_py3 import WorkloadProtectableItem + + +class AzureFileShareProtectableItem(WorkloadProtectableItem): + """Protectable item for Azure Fileshare workloads. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_container_fabric_id: Full Fabric ID of container to which + this protectable item belongs. For example, ARM ID. + :type parent_container_fabric_id: str + :param parent_container_friendly_name: Friendly name of container to which + this protectable item belongs. + :type parent_container_friendly_name: str + :param azure_file_share_type: File Share type XSync or XSMB. Possible + values include: 'Invalid', 'XSMB', 'XSync' + :type azure_file_share_type: str or + ~azure.mgmt.recoveryservicesbackup.models.AzureFileShareType + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_container_fabric_id': {'key': 'parentContainerFabricId', 'type': 'str'}, + 'parent_container_friendly_name': {'key': 'parentContainerFriendlyName', 'type': 'str'}, + 'azure_file_share_type': {'key': 'azureFileShareType', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, parent_container_fabric_id: str=None, parent_container_friendly_name: str=None, azure_file_share_type=None, **kwargs) -> None: + super(AzureFileShareProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, **kwargs) + self.parent_container_fabric_id = parent_container_fabric_id + self.parent_container_friendly_name = parent_container_friendly_name + self.azure_file_share_type = azure_file_share_type + self.protectable_item_type = 'AzureFileShare' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protection_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protection_policy.py new file mode 100644 index 000000000000..d22ebaef61da --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protection_policy.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_policy import ProtectionPolicy + + +class AzureFileShareProtectionPolicy(ProtectionPolicy): + """AzureStorage backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param work_load_type: Type of workload for the backup management + :type work_load_type: str + :param schedule_policy: Backup schedule specified as part of backup + policy. + :type schedule_policy: + ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :param retention_policy: Retention policy with the details on backup copy + retention ranges. + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :param time_zone: TimeZone optional input as string. For example: TimeZone + = "Pacific Standard Time". + :type time_zone: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureFileShareProtectionPolicy, self).__init__(**kwargs) + self.work_load_type = kwargs.get('work_load_type', None) + self.schedule_policy = kwargs.get('schedule_policy', None) + self.retention_policy = kwargs.get('retention_policy', None) + self.time_zone = kwargs.get('time_zone', None) + self.backup_management_type = 'AzureStorage' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protection_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protection_policy_py3.py new file mode 100644 index 000000000000..b54214ed91d0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protection_policy_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_policy_py3 import ProtectionPolicy + + +class AzureFileShareProtectionPolicy(ProtectionPolicy): + """AzureStorage backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param work_load_type: Type of workload for the backup management + :type work_load_type: str + :param schedule_policy: Backup schedule specified as part of backup + policy. + :type schedule_policy: + ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :param retention_policy: Retention policy with the details on backup copy + retention ranges. + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :param time_zone: TimeZone optional input as string. For example: TimeZone + = "Pacific Standard Time". + :type time_zone: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + } + + def __init__(self, *, protected_items_count: int=None, work_load_type: str=None, schedule_policy=None, retention_policy=None, time_zone: str=None, **kwargs) -> None: + super(AzureFileShareProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + self.work_load_type = work_load_type + self.schedule_policy = schedule_policy + self.retention_policy = retention_policy + self.time_zone = time_zone + self.backup_management_type = 'AzureStorage' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_recovery_point.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_recovery_point.py new file mode 100644 index 000000000000..8e5145dd4c8a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_recovery_point.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .recovery_point import RecoveryPoint + + +class AzureFileShareRecoveryPoint(RecoveryPoint): + """Azure File Share workload specific backup copy. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_type: Type of the backup copy. Specifies whether it + is a crash consistent backup or app consistent. + :type recovery_point_type: str + :param recovery_point_time: Time at which this backup copy was created. + :type recovery_point_time: datetime + :param file_share_snapshot_uri: Contains Url to the snapshot of fileshare, + if applicable + :type file_share_snapshot_uri: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + 'file_share_snapshot_uri': {'key': 'fileShareSnapshotUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureFileShareRecoveryPoint, self).__init__(**kwargs) + self.recovery_point_type = kwargs.get('recovery_point_type', None) + self.recovery_point_time = kwargs.get('recovery_point_time', None) + self.file_share_snapshot_uri = kwargs.get('file_share_snapshot_uri', None) + self.object_type = 'AzureFileShareRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_recovery_point_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_recovery_point_py3.py new file mode 100644 index 000000000000..128bf5e798e4 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_recovery_point_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .recovery_point_py3 import RecoveryPoint + + +class AzureFileShareRecoveryPoint(RecoveryPoint): + """Azure File Share workload specific backup copy. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_type: Type of the backup copy. Specifies whether it + is a crash consistent backup or app consistent. + :type recovery_point_type: str + :param recovery_point_time: Time at which this backup copy was created. + :type recovery_point_time: datetime + :param file_share_snapshot_uri: Contains Url to the snapshot of fileshare, + if applicable + :type file_share_snapshot_uri: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + 'file_share_snapshot_uri': {'key': 'fileShareSnapshotUri', 'type': 'str'}, + } + + def __init__(self, *, recovery_point_type: str=None, recovery_point_time=None, file_share_snapshot_uri: str=None, **kwargs) -> None: + super(AzureFileShareRecoveryPoint, self).__init__(**kwargs) + self.recovery_point_type = recovery_point_type + self.recovery_point_time = recovery_point_time + self.file_share_snapshot_uri = file_share_snapshot_uri + self.object_type = 'AzureFileShareRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_restore_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_restore_request.py new file mode 100644 index 000000000000..a3cd00181ee8 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_restore_request.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .restore_request import RestoreRequest + + +class AzureFileShareRestoreRequest(RestoreRequest): + """AzureFileShare Restore Request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: Type of this recovery. Possible values include: + 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Source storage account ARM Id + :type source_resource_id: str + :param copy_options: Options to resolve copy conflicts. Possible values + include: 'Invalid', 'CreateCopy', 'Skip', 'Overwrite', 'FailOnConflict' + :type copy_options: str or + ~azure.mgmt.recoveryservicesbackup.models.CopyOptions + :param restore_request_type: Restore Type (FullShareRestore or + ItemLevelRestore). Possible values include: 'Invalid', 'FullShareRestore', + 'ItemLevelRestore' + :type restore_request_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestType + :param restore_file_specs: List of Source Files/Folders(which need to + recover) and TargetFolderPath details + :type restore_file_specs: + list[~azure.mgmt.recoveryservicesbackup.models.RestoreFileSpecs] + :param target_details: Target File Share Details + :type target_details: + ~azure.mgmt.recoveryservicesbackup.models.TargetAFSRestoreInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'copy_options': {'key': 'copyOptions', 'type': 'str'}, + 'restore_request_type': {'key': 'restoreRequestType', 'type': 'str'}, + 'restore_file_specs': {'key': 'restoreFileSpecs', 'type': '[RestoreFileSpecs]'}, + 'target_details': {'key': 'targetDetails', 'type': 'TargetAFSRestoreInfo'}, + } + + def __init__(self, **kwargs): + super(AzureFileShareRestoreRequest, self).__init__(**kwargs) + self.recovery_type = kwargs.get('recovery_type', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.copy_options = kwargs.get('copy_options', None) + self.restore_request_type = kwargs.get('restore_request_type', None) + self.restore_file_specs = kwargs.get('restore_file_specs', None) + self.target_details = kwargs.get('target_details', None) + self.object_type = 'AzureFileShareRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_restore_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_restore_request_py3.py new file mode 100644 index 000000000000..8dd0eb1d1bd5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_restore_request_py3.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .restore_request_py3 import RestoreRequest + + +class AzureFileShareRestoreRequest(RestoreRequest): + """AzureFileShare Restore Request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: Type of this recovery. Possible values include: + 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Source storage account ARM Id + :type source_resource_id: str + :param copy_options: Options to resolve copy conflicts. Possible values + include: 'Invalid', 'CreateCopy', 'Skip', 'Overwrite', 'FailOnConflict' + :type copy_options: str or + ~azure.mgmt.recoveryservicesbackup.models.CopyOptions + :param restore_request_type: Restore Type (FullShareRestore or + ItemLevelRestore). Possible values include: 'Invalid', 'FullShareRestore', + 'ItemLevelRestore' + :type restore_request_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestType + :param restore_file_specs: List of Source Files/Folders(which need to + recover) and TargetFolderPath details + :type restore_file_specs: + list[~azure.mgmt.recoveryservicesbackup.models.RestoreFileSpecs] + :param target_details: Target File Share Details + :type target_details: + ~azure.mgmt.recoveryservicesbackup.models.TargetAFSRestoreInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'copy_options': {'key': 'copyOptions', 'type': 'str'}, + 'restore_request_type': {'key': 'restoreRequestType', 'type': 'str'}, + 'restore_file_specs': {'key': 'restoreFileSpecs', 'type': '[RestoreFileSpecs]'}, + 'target_details': {'key': 'targetDetails', 'type': 'TargetAFSRestoreInfo'}, + } + + def __init__(self, *, recovery_type=None, source_resource_id: str=None, copy_options=None, restore_request_type=None, restore_file_specs=None, target_details=None, **kwargs) -> None: + super(AzureFileShareRestoreRequest, self).__init__(**kwargs) + self.recovery_type = recovery_type + self.source_resource_id = source_resource_id + self.copy_options = copy_options + self.restore_request_type = restore_request_type + self.restore_file_specs = restore_file_specs + self.target_details = target_details + self.object_type = 'AzureFileShareRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item.py new file mode 100644 index 000000000000..ab9014c78997 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item.py @@ -0,0 +1,103 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protected_item import ProtectedItem + + +class AzureFileshareProtectedItem(ProtectedItem): + """Azure File Share workload-specific backup item. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the fileshare represented by this + backup item. + :type friendly_name: str + :param protection_status: Backup status of this backup item. + :type protection_status: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param health_status: backups running status for this backup item. + Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', + 'Invalid' + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :param last_backup_status: Last backup operation status. Possible values: + Healthy, Unhealthy. + :type last_backup_status: str + :param last_backup_time: Timestamp of the last backup operation on this + backup item. + :type last_backup_time: datetime + :param extended_info: Additional information with this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureFileshareProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureFileshareProtectedItemExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(AzureFileshareProtectedItem, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.protection_status = kwargs.get('protection_status', None) + self.protection_state = kwargs.get('protection_state', None) + self.health_status = kwargs.get('health_status', None) + self.last_backup_status = kwargs.get('last_backup_status', None) + self.last_backup_time = kwargs.get('last_backup_time', None) + self.extended_info = kwargs.get('extended_info', None) + self.protected_item_type = 'AzureFileShareProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_extended_info.py new file mode 100644 index 000000000000..92790d59f9dd --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_extended_info.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureFileshareProtectedItemExtendedInfo(Model): + """Additional information about Azure File Share backup item. + + :param oldest_recovery_point: The oldest backup copy available for this + item in the service. + :type oldest_recovery_point: datetime + :param recovery_point_count: Number of available backup copies associated + with this backup item. + :type recovery_point_count: int + :param policy_state: Indicates consistency of policy object and policy + applied to this backup item. + :type policy_state: str + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureFileshareProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) + self.policy_state = kwargs.get('policy_state', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_extended_info_py3.py new file mode 100644 index 000000000000..5927f81a2c3a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_extended_info_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureFileshareProtectedItemExtendedInfo(Model): + """Additional information about Azure File Share backup item. + + :param oldest_recovery_point: The oldest backup copy available for this + item in the service. + :type oldest_recovery_point: datetime + :param recovery_point_count: Number of available backup copies associated + with this backup item. + :type recovery_point_count: int + :param policy_state: Indicates consistency of policy object and policy + applied to this backup item. + :type policy_state: str + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + } + + def __init__(self, *, oldest_recovery_point=None, recovery_point_count: int=None, policy_state: str=None, **kwargs) -> None: + super(AzureFileshareProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count + self.policy_state = policy_state diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_py3.py new file mode 100644 index 000000000000..65f0a7367f0d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_py3.py @@ -0,0 +1,103 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protected_item_py3 import ProtectedItem + + +class AzureFileshareProtectedItem(ProtectedItem): + """Azure File Share workload-specific backup item. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the fileshare represented by this + backup item. + :type friendly_name: str + :param protection_status: Backup status of this backup item. + :type protection_status: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param health_status: backups running status for this backup item. + Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', + 'Invalid' + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :param last_backup_status: Last backup operation status. Possible values: + Healthy, Unhealthy. + :type last_backup_status: str + :param last_backup_time: Timestamp of the last backup operation on this + backup item. + :type last_backup_time: datetime + :param extended_info: Additional information with this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureFileshareProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureFileshareProtectedItemExtendedInfo'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, friendly_name: str=None, protection_status: str=None, protection_state=None, health_status=None, last_backup_status: str=None, last_backup_time=None, extended_info=None, **kwargs) -> None: + super(AzureFileshareProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, **kwargs) + self.friendly_name = friendly_name + self.protection_status = protection_status + self.protection_state = protection_state + self.health_status = health_status + self.last_backup_status = last_backup_status + self.last_backup_time = last_backup_time + self.extended_info = extended_info + self.protected_item_type = 'AzureFileShareProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_container.py index 77705478d7e5..05f597febbf6 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_container.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_container.py @@ -16,33 +16,23 @@ class AzureIaaSClassicComputeVMContainer(IaaSVMContainer): """IaaS VM workload-specific backup item representing a classic virtual machine. - 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 friendly_name: Friendly name of the container. :type friendly_name: str :param backup_management_type: Type of backup managemenent for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Status of registration of the container with the Recovery Services Vault. :type registration_status: str :param health_status: Status of health of the container. :type health_status: str - :ivar container_type: Type of the container. The value of this property - for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic - Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is - AzureSqlContainer. Possible values include: 'Invalid', 'Unknown', - 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', - 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - 'AzureSqlContainer', 'Windows', 'VCenter' - :vartype container_type: str or :class:`ContainerType - ` - :param protectable_object_type: Polymorphic Discriminator - :type protectable_object_type: str + :param container_type: Required. Constant filled by server. + :type container_type: str :param virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. :type virtual_machine_id: str @@ -54,10 +44,20 @@ class AzureIaaSClassicComputeVMContainer(IaaSVMContainer): """ _validation = { - 'container_type': {'readonly': True}, - 'protectable_object_type': {'required': True}, + 'container_type': {'required': True}, } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, health_status=None, virtual_machine_id=None, virtual_machine_version=None, resource_group=None): - super(AzureIaaSClassicComputeVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, virtual_machine_id=virtual_machine_id, virtual_machine_version=virtual_machine_version, resource_group=resource_group) - self.protectable_object_type = 'Microsoft.ClassicCompute/virtualMachines' + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureIaaSClassicComputeVMContainer, self).__init__(**kwargs) + self.container_type = 'Microsoft.ClassicCompute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_container_py3.py new file mode 100644 index 000000000000..5ee565b1e5de --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_container_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .iaa_svm_container_py3 import IaaSVMContainer + + +class AzureIaaSClassicComputeVMContainer(IaaSVMContainer): + """IaaS VM workload-specific backup item representing a classic virtual + machine. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param virtual_machine_id: Fully qualified ARM url of the virtual machine + represented by this Azure IaaS VM container. + :type virtual_machine_id: str + :param virtual_machine_version: Specifies whether the container represents + a Classic or an Azure Resource Manager VM. + :type virtual_machine_version: str + :param resource_group: Resource group name of Recovery Services Vault. + :type resource_group: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, virtual_machine_id: str=None, virtual_machine_version: str=None, resource_group: str=None, **kwargs) -> None: + super(AzureIaaSClassicComputeVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, virtual_machine_id=virtual_machine_id, virtual_machine_version=virtual_machine_version, resource_group=resource_group, **kwargs) + self.container_type = 'Microsoft.ClassicCompute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protectable_item.py index dd63ba3122c4..33f16c95968f 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protectable_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protectable_item.py @@ -15,16 +15,21 @@ class AzureIaaSClassicComputeVMProtectableItem(IaaSVMProtectableItem): """IaaS VM workload-specific backup item representing the Classic Compute VM. + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent to backup an item. :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str :param friendly_name: Friendly name of the backup item. :type friendly_name: str :param protection_state: State of the back up item. Possible values - include: 'Invalid', 'NotProtected', 'Protecting', 'Protected' - :type protection_state: str or :class:`ProtectionStatus - ` - :param protectable_item_type: Polymorphic Discriminator + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. :type protectable_item_type: str :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. :type virtual_machine_id: str @@ -34,6 +39,15 @@ class AzureIaaSClassicComputeVMProtectableItem(IaaSVMProtectableItem): 'protectable_item_type': {'required': True}, } - def __init__(self, backup_management_type=None, friendly_name=None, protection_state=None, virtual_machine_id=None): - super(AzureIaaSClassicComputeVMProtectableItem, self).__init__(backup_management_type=backup_management_type, friendly_name=friendly_name, protection_state=protection_state, virtual_machine_id=virtual_machine_id) + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureIaaSClassicComputeVMProtectableItem, self).__init__(**kwargs) self.protectable_item_type = 'Microsoft.ClassicCompute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protectable_item_py3.py new file mode 100644 index 000000000000..d721c5caa23a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protectable_item_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .iaa_svm_protectable_item_py3 import IaaSVMProtectableItem + + +class AzureIaaSClassicComputeVMProtectableItem(IaaSVMProtectableItem): + """IaaS VM workload-specific backup item representing the Classic Compute VM. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :type virtual_machine_id: str + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, virtual_machine_id: str=None, **kwargs) -> None: + super(AzureIaaSClassicComputeVMProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, virtual_machine_id=virtual_machine_id, **kwargs) + self.protectable_item_type = 'Microsoft.ClassicCompute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protected_item.py index 92c85911dab2..27d5496642dd 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protected_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protected_item.py @@ -15,17 +15,20 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): """IaaS VM workload-specific backup item representing the Classic Compute VM. + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param workload_type: Type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - 'GenericDataSource' - :type workload_type: str or :class:`DataSourceType - ` + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType :param container_name: Unique name of container :type container_name: str :param source_resource_id: ARM ID of the resource to be backed up. @@ -36,7 +39,9 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): :param last_recovery_point: Timestamp when the last (latest) backup copy was created for this backup item. :type last_recovery_point: datetime - :param protected_item_type: Polymorphic Discriminator + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. :type protected_item_type: str :param friendly_name: Friendly name of the VM represented by this backup item. @@ -49,17 +54,16 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): :param protection_state: Backup state of this backup item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' - :type protection_state: str or :class:`ProtectionState - ` + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState :param health_status: Health status of protected item. Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' - :type health_status: str or :class:`HealthStatus - ` + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus :param health_details: Health details on this backup item. - :type health_details: list of :class:`AzureIaaSVMHealthDetails - ` - :param last_backup_status: Last backup operation status. Possible values: - Healthy, Unhealthy. + :type health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param last_backup_status: Last backup operation status. :type last_backup_status: str :param last_backup_time: Timestamp of the last backup operation on this backup item. @@ -67,14 +71,35 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): :param protected_item_data_id: Data ID of the protected item. :type protected_item_data_id: str :param extended_info: Additional information for this backup item. - :type extended_info: :class:`AzureIaaSVMProtectedItemExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo """ _validation = { 'protected_item_type': {'required': True}, } - def __init__(self, backup_management_type=None, workload_type=None, container_name=None, source_resource_id=None, policy_id=None, last_recovery_point=None, friendly_name=None, virtual_machine_id=None, protection_status=None, protection_state=None, health_status=None, health_details=None, last_backup_status=None, last_backup_time=None, protected_item_data_id=None, extended_info=None): - super(AzureIaaSClassicComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info) + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMProtectedItemExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(AzureIaaSClassicComputeVMProtectedItem, self).__init__(**kwargs) self.protected_item_type = 'Microsoft.ClassicCompute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protected_item_py3.py new file mode 100644 index 000000000000..532127d50cf0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protected_item_py3.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_iaa_svm_protected_item_py3 import AzureIaaSVMProtectedItem + + +class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): + """IaaS VM workload-specific backup item representing the Classic Compute VM. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the VM represented by this backup + item. + :type friendly_name: str + :param virtual_machine_id: Fully qualified ARM ID of the virtual machine + represented by this item. + :type virtual_machine_id: str + :param protection_status: Backup status of this backup item. + :type protection_status: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param health_status: Health status of protected item. Possible values + include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :param health_details: Health details on this backup item. + :type health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param last_backup_status: Last backup operation status. + :type last_backup_status: str + :param last_backup_time: Timestamp of the last backup operation on this + backup item. + :type last_backup_time: datetime + :param protected_item_data_id: Data ID of the protected item. + :type protected_item_data_id: str + :param extended_info: Additional information for this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMProtectedItemExtendedInfo'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, friendly_name: str=None, virtual_machine_id: str=None, protection_status: str=None, protection_state=None, health_status=None, health_details=None, last_backup_status: str=None, last_backup_time=None, protected_item_data_id: str=None, extended_info=None, **kwargs) -> None: + super(AzureIaaSClassicComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, **kwargs) + self.protected_item_type = 'Microsoft.ClassicCompute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_container.py index b03d4111e6ac..787b118d3871 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_container.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_container.py @@ -16,33 +16,23 @@ class AzureIaaSComputeVMContainer(IaaSVMContainer): """IaaS VM workload-specific backup item representing an Azure Resource Manager virtual machine. - 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 friendly_name: Friendly name of the container. :type friendly_name: str :param backup_management_type: Type of backup managemenent for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Status of registration of the container with the Recovery Services Vault. :type registration_status: str :param health_status: Status of health of the container. :type health_status: str - :ivar container_type: Type of the container. The value of this property - for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic - Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is - AzureSqlContainer. Possible values include: 'Invalid', 'Unknown', - 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', - 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - 'AzureSqlContainer', 'Windows', 'VCenter' - :vartype container_type: str or :class:`ContainerType - ` - :param protectable_object_type: Polymorphic Discriminator - :type protectable_object_type: str + :param container_type: Required. Constant filled by server. + :type container_type: str :param virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. :type virtual_machine_id: str @@ -54,10 +44,20 @@ class AzureIaaSComputeVMContainer(IaaSVMContainer): """ _validation = { - 'container_type': {'readonly': True}, - 'protectable_object_type': {'required': True}, + 'container_type': {'required': True}, } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, health_status=None, virtual_machine_id=None, virtual_machine_version=None, resource_group=None): - super(AzureIaaSComputeVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, virtual_machine_id=virtual_machine_id, virtual_machine_version=virtual_machine_version, resource_group=resource_group) - self.protectable_object_type = 'Microsoft.Compute/virtualMachines' + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureIaaSComputeVMContainer, self).__init__(**kwargs) + self.container_type = 'Microsoft.Compute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_container_py3.py new file mode 100644 index 000000000000..e264ca935f98 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_container_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .iaa_svm_container_py3 import IaaSVMContainer + + +class AzureIaaSComputeVMContainer(IaaSVMContainer): + """IaaS VM workload-specific backup item representing an Azure Resource + Manager virtual machine. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param virtual_machine_id: Fully qualified ARM url of the virtual machine + represented by this Azure IaaS VM container. + :type virtual_machine_id: str + :param virtual_machine_version: Specifies whether the container represents + a Classic or an Azure Resource Manager VM. + :type virtual_machine_version: str + :param resource_group: Resource group name of Recovery Services Vault. + :type resource_group: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, virtual_machine_id: str=None, virtual_machine_version: str=None, resource_group: str=None, **kwargs) -> None: + super(AzureIaaSComputeVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, virtual_machine_id=virtual_machine_id, virtual_machine_version=virtual_machine_version, resource_group=resource_group, **kwargs) + self.container_type = 'Microsoft.Compute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protectable_item.py index 64270c478923..2acfbea97109 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protectable_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protectable_item.py @@ -16,16 +16,21 @@ class AzureIaaSComputeVMProtectableItem(IaaSVMProtectableItem): """IaaS VM workload-specific backup item representing the Azure Resource Manager VM. + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent to backup an item. :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str :param friendly_name: Friendly name of the backup item. :type friendly_name: str :param protection_state: State of the back up item. Possible values - include: 'Invalid', 'NotProtected', 'Protecting', 'Protected' - :type protection_state: str or :class:`ProtectionStatus - ` - :param protectable_item_type: Polymorphic Discriminator + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. :type protectable_item_type: str :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. :type virtual_machine_id: str @@ -35,6 +40,15 @@ class AzureIaaSComputeVMProtectableItem(IaaSVMProtectableItem): 'protectable_item_type': {'required': True}, } - def __init__(self, backup_management_type=None, friendly_name=None, protection_state=None, virtual_machine_id=None): - super(AzureIaaSComputeVMProtectableItem, self).__init__(backup_management_type=backup_management_type, friendly_name=friendly_name, protection_state=protection_state, virtual_machine_id=virtual_machine_id) + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureIaaSComputeVMProtectableItem, self).__init__(**kwargs) self.protectable_item_type = 'Microsoft.Compute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protectable_item_py3.py new file mode 100644 index 000000000000..e041e75aa232 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protectable_item_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .iaa_svm_protectable_item_py3 import IaaSVMProtectableItem + + +class AzureIaaSComputeVMProtectableItem(IaaSVMProtectableItem): + """IaaS VM workload-specific backup item representing the Azure Resource + Manager VM. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :type virtual_machine_id: str + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, virtual_machine_id: str=None, **kwargs) -> None: + super(AzureIaaSComputeVMProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, virtual_machine_id=virtual_machine_id, **kwargs) + self.protectable_item_type = 'Microsoft.Compute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protected_item.py index dc66d5f5320d..f4276eca3742 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protected_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protected_item.py @@ -16,17 +16,20 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): """IaaS VM workload-specific backup item representing the Azure Resource Manager VM. + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param workload_type: Type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - 'GenericDataSource' - :type workload_type: str or :class:`DataSourceType - ` + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType :param container_name: Unique name of container :type container_name: str :param source_resource_id: ARM ID of the resource to be backed up. @@ -37,7 +40,9 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): :param last_recovery_point: Timestamp when the last (latest) backup copy was created for this backup item. :type last_recovery_point: datetime - :param protected_item_type: Polymorphic Discriminator + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. :type protected_item_type: str :param friendly_name: Friendly name of the VM represented by this backup item. @@ -50,17 +55,16 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): :param protection_state: Backup state of this backup item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' - :type protection_state: str or :class:`ProtectionState - ` + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState :param health_status: Health status of protected item. Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' - :type health_status: str or :class:`HealthStatus - ` + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus :param health_details: Health details on this backup item. - :type health_details: list of :class:`AzureIaaSVMHealthDetails - ` - :param last_backup_status: Last backup operation status. Possible values: - Healthy, Unhealthy. + :type health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param last_backup_status: Last backup operation status. :type last_backup_status: str :param last_backup_time: Timestamp of the last backup operation on this backup item. @@ -68,14 +72,35 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): :param protected_item_data_id: Data ID of the protected item. :type protected_item_data_id: str :param extended_info: Additional information for this backup item. - :type extended_info: :class:`AzureIaaSVMProtectedItemExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo """ _validation = { 'protected_item_type': {'required': True}, } - def __init__(self, backup_management_type=None, workload_type=None, container_name=None, source_resource_id=None, policy_id=None, last_recovery_point=None, friendly_name=None, virtual_machine_id=None, protection_status=None, protection_state=None, health_status=None, health_details=None, last_backup_status=None, last_backup_time=None, protected_item_data_id=None, extended_info=None): - super(AzureIaaSComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info) + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMProtectedItemExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(AzureIaaSComputeVMProtectedItem, self).__init__(**kwargs) self.protected_item_type = 'Microsoft.Compute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protected_item_py3.py new file mode 100644 index 000000000000..b41dc1cf10d0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protected_item_py3.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_iaa_svm_protected_item_py3 import AzureIaaSVMProtectedItem + + +class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): + """IaaS VM workload-specific backup item representing the Azure Resource + Manager VM. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the VM represented by this backup + item. + :type friendly_name: str + :param virtual_machine_id: Fully qualified ARM ID of the virtual machine + represented by this item. + :type virtual_machine_id: str + :param protection_status: Backup status of this backup item. + :type protection_status: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param health_status: Health status of protected item. Possible values + include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :param health_details: Health details on this backup item. + :type health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param last_backup_status: Last backup operation status. + :type last_backup_status: str + :param last_backup_time: Timestamp of the last backup operation on this + backup item. + :type last_backup_time: datetime + :param protected_item_data_id: Data ID of the protected item. + :type protected_item_data_id: str + :param extended_info: Additional information for this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMProtectedItemExtendedInfo'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, friendly_name: str=None, virtual_machine_id: str=None, protection_status: str=None, protection_state=None, health_status=None, health_details=None, last_backup_status: str=None, last_backup_time=None, protected_item_data_id: str=None, extended_info=None, **kwargs) -> None: + super(AzureIaaSComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, **kwargs) + self.protected_item_type = 'Microsoft.Compute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_error_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_error_info.py index a1589bba6c2d..a52b009c69de 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_error_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_error_info.py @@ -24,7 +24,7 @@ class AzureIaaSVMErrorInfo(Model): :type error_string: str :param recommendations: List of localized recommendations for above error code. - :type recommendations: list of str + :type recommendations: list[str] """ _attribute_map = { @@ -34,8 +34,9 @@ class AzureIaaSVMErrorInfo(Model): 'recommendations': {'key': 'recommendations', 'type': '[str]'}, } - def __init__(self, error_code=None, error_title=None, error_string=None, recommendations=None): - self.error_code = error_code - self.error_title = error_title - self.error_string = error_string - self.recommendations = recommendations + def __init__(self, **kwargs): + super(AzureIaaSVMErrorInfo, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.error_title = kwargs.get('error_title', None) + self.error_string = kwargs.get('error_string', None) + self.recommendations = kwargs.get('recommendations', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_error_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_error_info_py3.py new file mode 100644 index 000000000000..ff1743e4fb20 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_error_info_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureIaaSVMErrorInfo(Model): + """Azure IaaS VM workload-specific error information. + + :param error_code: Error code. + :type error_code: int + :param error_title: Title: Typically, the entity that the error pertains + to. + :type error_title: str + :param error_string: Localized error string. + :type error_string: str + :param recommendations: List of localized recommendations for above error + code. + :type recommendations: list[str] + """ + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_title': {'key': 'errorTitle', 'type': 'str'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, *, error_code: int=None, error_title: str=None, error_string: str=None, recommendations=None, **kwargs) -> None: + super(AzureIaaSVMErrorInfo, self).__init__(**kwargs) + self.error_code = error_code + self.error_title = error_title + self.error_string = error_string + self.recommendations = recommendations diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_health_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_health_details.py index d8c2c8f7ee8c..c84e0911db5f 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_health_details.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_health_details.py @@ -22,7 +22,7 @@ class AzureIaaSVMHealthDetails(Model): :param message: Health Message :type message: str :param recommendations: Health Recommended Actions - :type recommendations: list of str + :type recommendations: list[str] """ _attribute_map = { @@ -32,8 +32,9 @@ class AzureIaaSVMHealthDetails(Model): 'recommendations': {'key': 'recommendations', 'type': '[str]'}, } - def __init__(self, code=None, title=None, message=None, recommendations=None): - self.code = code - self.title = title - self.message = message - self.recommendations = recommendations + def __init__(self, **kwargs): + super(AzureIaaSVMHealthDetails, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.title = kwargs.get('title', None) + self.message = kwargs.get('message', None) + self.recommendations = kwargs.get('recommendations', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_health_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_health_details_py3.py new file mode 100644 index 000000000000..720bfc0840fc --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_health_details_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureIaaSVMHealthDetails(Model): + """Azure IaaS VM workload-specific Health Details. + + :param code: Health Code + :type code: int + :param title: Health Title + :type title: str + :param message: Health Message + :type message: str + :param recommendations: Health Recommended Actions + :type recommendations: list[str] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'int'}, + 'title': {'key': 'title', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, *, code: int=None, title: str=None, message: str=None, recommendations=None, **kwargs) -> None: + super(AzureIaaSVMHealthDetails, self).__init__(**kwargs) + self.code = code + self.title = title + self.message = message + self.recommendations = recommendations diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job.py index f64195e8b724..fd5e1b68bb29 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job.py @@ -15,14 +15,17 @@ class AzureIaaSVMJob(Job): """Azure IaaS VM workload-specifc job object. + All required parameters must be populated in order to send to Azure. + :param entity_friendly_name: Friendly name of the entity on which the current job is executing. :type entity_friendly_name: str :param backup_management_type: Backup management type to execute the current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param operation: The operation name. :type operation: str :param status: Job status. @@ -33,23 +36,23 @@ class AzureIaaSVMJob(Job): :type end_time: datetime :param activity_id: ActivityId of job. :type activity_id: str - :param job_type: Polymorphic Discriminator + :param job_type: Required. Constant filled by server. :type job_type: str :param duration: Time elapsed during the execution of this job. :type duration: timedelta :param actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. - :type actions_info: list of str or :class:`JobSupportedAction - ` + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] :param error_details: Error details on execution of this job. - :type error_details: list of :class:`AzureIaaSVMErrorInfo - ` + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMErrorInfo] :param virtual_machine_version: Specifies whether the backup item is a Classic or an Azure Resource Manager VM. :type virtual_machine_version: str :param extended_info: Additional information for this job. - :type extended_info: :class:`AzureIaaSVMJobExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobExtendedInfo """ _validation = { @@ -72,11 +75,11 @@ class AzureIaaSVMJob(Job): 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMJobExtendedInfo'}, } - def __init__(self, entity_friendly_name=None, backup_management_type=None, operation=None, status=None, start_time=None, end_time=None, activity_id=None, duration=None, actions_info=None, error_details=None, virtual_machine_version=None, extended_info=None): - super(AzureIaaSVMJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id) - self.duration = duration - self.actions_info = actions_info - self.error_details = error_details - self.virtual_machine_version = virtual_machine_version - self.extended_info = extended_info + def __init__(self, **kwargs): + super(AzureIaaSVMJob, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) + self.actions_info = kwargs.get('actions_info', None) + self.error_details = kwargs.get('error_details', None) + self.virtual_machine_version = kwargs.get('virtual_machine_version', None) + self.extended_info = kwargs.get('extended_info', None) self.job_type = 'AzureIaaSVMJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_extended_info.py index 782e90c60c57..2d33a8378ae4 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_extended_info.py @@ -16,10 +16,10 @@ class AzureIaaSVMJobExtendedInfo(Model): """Azure IaaS VM workload-specific additional information for job. :param tasks_list: List of tasks associated with this job. - :type tasks_list: list of :class:`AzureIaaSVMJobTaskDetails - ` + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobTaskDetails] :param property_bag: Job properties. - :type property_bag: dict + :type property_bag: dict[str, str] :param progress_percentage: Indicates progress of the job. Null if it has not started or completed. :type progress_percentage: float @@ -35,8 +35,9 @@ class AzureIaaSVMJobExtendedInfo(Model): 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, } - def __init__(self, tasks_list=None, property_bag=None, progress_percentage=None, dynamic_error_message=None): - self.tasks_list = tasks_list - self.property_bag = property_bag - self.progress_percentage = progress_percentage - self.dynamic_error_message = dynamic_error_message + def __init__(self, **kwargs): + super(AzureIaaSVMJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = kwargs.get('tasks_list', None) + self.property_bag = kwargs.get('property_bag', None) + self.progress_percentage = kwargs.get('progress_percentage', None) + self.dynamic_error_message = kwargs.get('dynamic_error_message', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_extended_info_py3.py new file mode 100644 index 000000000000..83137dc16eb8 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_extended_info_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureIaaSVMJobExtendedInfo(Model): + """Azure IaaS VM workload-specific additional information for job. + + :param tasks_list: List of tasks associated with this job. + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobTaskDetails] + :param property_bag: Job properties. + :type property_bag: dict[str, str] + :param progress_percentage: Indicates progress of the job. Null if it has + not started or completed. + :type progress_percentage: float + :param dynamic_error_message: Non localized error message on job + execution. + :type dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[AzureIaaSVMJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'progress_percentage': {'key': 'progressPercentage', 'type': 'float'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__(self, *, tasks_list=None, property_bag=None, progress_percentage: float=None, dynamic_error_message: str=None, **kwargs) -> None: + super(AzureIaaSVMJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = tasks_list + self.property_bag = property_bag + self.progress_percentage = progress_percentage + self.dynamic_error_message = dynamic_error_message diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_py3.py new file mode 100644 index 000000000000..625c41dd8a3d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_py3.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .job_py3 import Job + + +class AzureIaaSVMJob(Job): + """Azure IaaS VM workload-specifc job object. + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + :param duration: Time elapsed during the execution of this job. + :type duration: timedelta + :param actions_info: Gets or sets the state/actions applicable on this job + like cancel/retry. + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :param error_details: Error details on execution of this job. + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMErrorInfo] + :param virtual_machine_version: Specifies whether the backup item is a + Classic or an Azure Resource Manager VM. + :type virtual_machine_version: str + :param extended_info: Additional information for this job. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[JobSupportedAction]'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureIaaSVMErrorInfo]'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMJobExtendedInfo'}, + } + + def __init__(self, *, entity_friendly_name: str=None, backup_management_type=None, operation: str=None, status: str=None, start_time=None, end_time=None, activity_id: str=None, duration=None, actions_info=None, error_details=None, virtual_machine_version: str=None, extended_info=None, **kwargs) -> None: + super(AzureIaaSVMJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) + self.duration = duration + self.actions_info = actions_info + self.error_details = error_details + self.virtual_machine_version = virtual_machine_version + self.extended_info = extended_info + self.job_type = 'AzureIaaSVMJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_task_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_task_details.py index e708f8f3ac59..c653cfdfa076 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_task_details.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_task_details.py @@ -41,11 +41,12 @@ class AzureIaaSVMJobTaskDetails(Model): 'progress_percentage': {'key': 'progressPercentage', 'type': 'float'}, } - def __init__(self, task_id=None, start_time=None, end_time=None, instance_id=None, duration=None, status=None, progress_percentage=None): - self.task_id = task_id - self.start_time = start_time - self.end_time = end_time - self.instance_id = instance_id - self.duration = duration - self.status = status - self.progress_percentage = progress_percentage + def __init__(self, **kwargs): + super(AzureIaaSVMJobTaskDetails, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.instance_id = kwargs.get('instance_id', None) + self.duration = kwargs.get('duration', None) + self.status = kwargs.get('status', None) + self.progress_percentage = kwargs.get('progress_percentage', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_task_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_task_details_py3.py new file mode 100644 index 000000000000..c44d39bd3292 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_task_details_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureIaaSVMJobTaskDetails(Model): + """Azure IaaS VM workload-specific job task details. + + :param task_id: The task display name. + :type task_id: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param instance_id: The instanceId. + :type instance_id: str + :param duration: Time elapsed for task. + :type duration: timedelta + :param status: The status. + :type status: str + :param progress_percentage: Progress of the task. + :type progress_percentage: float + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'status': {'key': 'status', 'type': 'str'}, + 'progress_percentage': {'key': 'progressPercentage', 'type': 'float'}, + } + + def __init__(self, *, task_id: str=None, start_time=None, end_time=None, instance_id: str=None, duration=None, status: str=None, progress_percentage: float=None, **kwargs) -> None: + super(AzureIaaSVMJobTaskDetails, self).__init__(**kwargs) + self.task_id = task_id + self.start_time = start_time + self.end_time = end_time + self.instance_id = instance_id + self.duration = duration + self.status = status + self.progress_percentage = progress_percentage diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item.py index abd3bc08da48..558b67d25422 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item.py @@ -15,17 +15,24 @@ class AzureIaaSVMProtectedItem(ProtectedItem): """IaaS VM workload-specific backup item. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMProtectedItem, + AzureIaaSComputeVMProtectedItem + + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param workload_type: Type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - 'GenericDataSource' - :type workload_type: str or :class:`DataSourceType - ` + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType :param container_name: Unique name of container :type container_name: str :param source_resource_id: ARM ID of the resource to be backed up. @@ -36,7 +43,9 @@ class AzureIaaSVMProtectedItem(ProtectedItem): :param last_recovery_point: Timestamp when the last (latest) backup copy was created for this backup item. :type last_recovery_point: datetime - :param protected_item_type: Polymorphic Discriminator + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. :type protected_item_type: str :param friendly_name: Friendly name of the VM represented by this backup item. @@ -49,17 +58,16 @@ class AzureIaaSVMProtectedItem(ProtectedItem): :param protection_state: Backup state of this backup item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' - :type protection_state: str or :class:`ProtectionState - ` + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState :param health_status: Health status of protected item. Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' - :type health_status: str or :class:`HealthStatus - ` + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus :param health_details: Health details on this backup item. - :type health_details: list of :class:`AzureIaaSVMHealthDetails - ` - :param last_backup_status: Last backup operation status. Possible values: - Healthy, Unhealthy. + :type health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param last_backup_status: Last backup operation status. :type last_backup_status: str :param last_backup_time: Timestamp of the last backup operation on this backup item. @@ -67,8 +75,8 @@ class AzureIaaSVMProtectedItem(ProtectedItem): :param protected_item_data_id: Data ID of the protected item. :type protected_item_data_id: str :param extended_info: Additional information for this backup item. - :type extended_info: :class:`AzureIaaSVMProtectedItemExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo """ _validation = { @@ -82,6 +90,7 @@ class AzureIaaSVMProtectedItem(ProtectedItem): 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'policy_id': {'key': 'policyId', 'type': 'str'}, 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, @@ -99,16 +108,16 @@ class AzureIaaSVMProtectedItem(ProtectedItem): 'protected_item_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMProtectedItem', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMProtectedItem'} } - def __init__(self, backup_management_type=None, workload_type=None, container_name=None, source_resource_id=None, policy_id=None, last_recovery_point=None, friendly_name=None, virtual_machine_id=None, protection_status=None, protection_state=None, health_status=None, health_details=None, last_backup_status=None, last_backup_time=None, protected_item_data_id=None, extended_info=None): - super(AzureIaaSVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point) - self.friendly_name = friendly_name - self.virtual_machine_id = virtual_machine_id - self.protection_status = protection_status - self.protection_state = protection_state - self.health_status = health_status - self.health_details = health_details - self.last_backup_status = last_backup_status - self.last_backup_time = last_backup_time - self.protected_item_data_id = protected_item_data_id - self.extended_info = extended_info + def __init__(self, **kwargs): + super(AzureIaaSVMProtectedItem, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.virtual_machine_id = kwargs.get('virtual_machine_id', None) + self.protection_status = kwargs.get('protection_status', None) + self.protection_state = kwargs.get('protection_state', None) + self.health_status = kwargs.get('health_status', None) + self.health_details = kwargs.get('health_details', None) + self.last_backup_status = kwargs.get('last_backup_status', None) + self.last_backup_time = kwargs.get('last_backup_time', None) + self.protected_item_data_id = kwargs.get('protected_item_data_id', None) + self.extended_info = kwargs.get('extended_info', None) self.protected_item_type = 'AzureIaaSVMProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_extended_info.py index d67bd03e0180..6be200ce3cbb 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_extended_info.py @@ -32,7 +32,8 @@ class AzureIaaSVMProtectedItemExtendedInfo(Model): 'policy_inconsistent': {'key': 'policyInconsistent', 'type': 'bool'}, } - def __init__(self, oldest_recovery_point=None, recovery_point_count=None, policy_inconsistent=None): - self.oldest_recovery_point = oldest_recovery_point - self.recovery_point_count = recovery_point_count - self.policy_inconsistent = policy_inconsistent + def __init__(self, **kwargs): + super(AzureIaaSVMProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) + self.policy_inconsistent = kwargs.get('policy_inconsistent', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_extended_info_py3.py new file mode 100644 index 000000000000..278c17d0f10b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_extended_info_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureIaaSVMProtectedItemExtendedInfo(Model): + """Additional information on Azure IaaS VM specific backup item. + + :param oldest_recovery_point: The oldest backup copy available for this + backup item. + :type oldest_recovery_point: datetime + :param recovery_point_count: Number of backup copies available for this + backup item. + :type recovery_point_count: int + :param policy_inconsistent: Specifies if backup policy associated with the + backup item is inconsistent. + :type policy_inconsistent: bool + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_inconsistent': {'key': 'policyInconsistent', 'type': 'bool'}, + } + + def __init__(self, *, oldest_recovery_point=None, recovery_point_count: int=None, policy_inconsistent: bool=None, **kwargs) -> None: + super(AzureIaaSVMProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count + self.policy_inconsistent = policy_inconsistent diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_py3.py new file mode 100644 index 000000000000..cc134305f5ef --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_py3.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protected_item_py3 import ProtectedItem + + +class AzureIaaSVMProtectedItem(ProtectedItem): + """IaaS VM workload-specific backup item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMProtectedItem, + AzureIaaSComputeVMProtectedItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the VM represented by this backup + item. + :type friendly_name: str + :param virtual_machine_id: Fully qualified ARM ID of the virtual machine + represented by this item. + :type virtual_machine_id: str + :param protection_status: Backup status of this backup item. + :type protection_status: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param health_status: Health status of protected item. Possible values + include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :param health_details: Health details on this backup item. + :type health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param last_backup_status: Last backup operation status. + :type last_backup_status: str + :param last_backup_time: Timestamp of the last backup operation on this + backup item. + :type last_backup_time: datetime + :param protected_item_data_id: Data ID of the protected item. + :type protected_item_data_id: str + :param extended_info: Additional information for this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMProtectedItemExtendedInfo'}, + } + + _subtype_map = { + 'protected_item_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMProtectedItem', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMProtectedItem'} + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, friendly_name: str=None, virtual_machine_id: str=None, protection_status: str=None, protection_state=None, health_status=None, health_details=None, last_backup_status: str=None, last_backup_time=None, protected_item_data_id: str=None, extended_info=None, **kwargs) -> None: + super(AzureIaaSVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, **kwargs) + self.friendly_name = friendly_name + self.virtual_machine_id = virtual_machine_id + self.protection_status = protection_status + self.protection_state = protection_state + self.health_status = health_status + self.health_details = health_details + self.last_backup_status = last_backup_status + self.last_backup_time = last_backup_time + self.protected_item_data_id = protected_item_data_id + self.extended_info = extended_info + self.protected_item_type = 'AzureIaaSVMProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protection_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protection_policy.py index ab20b52e2d36..c7c6fd8142d9 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protection_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protection_policy.py @@ -15,18 +15,20 @@ class AzureIaaSVMProtectionPolicy(ProtectionPolicy): """IaaS VM workload-specific backup policy. + All required parameters must be populated in order to send to Azure. + :param protected_items_count: Number of items associated with this policy. :type protected_items_count: int - :param backup_management_type: Polymorphic Discriminator + :param backup_management_type: Required. Constant filled by server. :type backup_management_type: str :param schedule_policy: Backup schedule specified as part of backup policy. - :type schedule_policy: :class:`SchedulePolicy - ` + :type schedule_policy: + ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy :param retention_policy: Retention policy with the details on backup copy retention ranges. - :type retention_policy: :class:`RetentionPolicy - ` + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy :param time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". :type time_zone: str @@ -44,9 +46,9 @@ class AzureIaaSVMProtectionPolicy(ProtectionPolicy): 'time_zone': {'key': 'timeZone', 'type': 'str'}, } - def __init__(self, protected_items_count=None, schedule_policy=None, retention_policy=None, time_zone=None): - super(AzureIaaSVMProtectionPolicy, self).__init__(protected_items_count=protected_items_count) - self.schedule_policy = schedule_policy - self.retention_policy = retention_policy - self.time_zone = time_zone + def __init__(self, **kwargs): + super(AzureIaaSVMProtectionPolicy, self).__init__(**kwargs) + self.schedule_policy = kwargs.get('schedule_policy', None) + self.retention_policy = kwargs.get('retention_policy', None) + self.time_zone = kwargs.get('time_zone', None) self.backup_management_type = 'AzureIaasVM' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protection_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protection_policy_py3.py new file mode 100644 index 000000000000..19902528cdd3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protection_policy_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_policy_py3 import ProtectionPolicy + + +class AzureIaaSVMProtectionPolicy(ProtectionPolicy): + """IaaS VM workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param schedule_policy: Backup schedule specified as part of backup + policy. + :type schedule_policy: + ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :param retention_policy: Retention policy with the details on backup copy + retention ranges. + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :param time_zone: TimeZone optional input as string. For example: TimeZone + = "Pacific Standard Time". + :type time_zone: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + } + + def __init__(self, *, protected_items_count: int=None, schedule_policy=None, retention_policy=None, time_zone: str=None, **kwargs) -> None: + super(AzureIaaSVMProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + self.schedule_policy = schedule_policy + self.retention_policy = retention_policy + self.time_zone = time_zone + self.backup_management_type = 'AzureIaasVM' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_resource_protection_intent.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_resource_protection_intent.py new file mode 100644 index 000000000000..bf255bf15aa2 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_resource_protection_intent.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_intent import ProtectionIntent + + +class AzureResourceProtectionIntent(ProtectionIntent): + """IaaS VM specific backup protection intent item. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param item_id: ID of the item which is getting protected, In case of + Azure Vm , it is ProtectedItemId + :type item_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protection_intent_item_type: Required. Constant filled by server. + :type protection_intent_item_type: str + :param friendly_name: Friendly name of the VM represented by this backup + item. + :type friendly_name: str + """ + + _validation = { + 'protection_intent_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protection_intent_item_type': {'key': 'protectionIntentItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureResourceProtectionIntent, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.protection_intent_item_type = 'AzureResourceItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_resource_protection_intent_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_resource_protection_intent_py3.py new file mode 100644 index 000000000000..90f2fabbd403 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_resource_protection_intent_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_intent_py3 import ProtectionIntent + + +class AzureResourceProtectionIntent(ProtectionIntent): + """IaaS VM specific backup protection intent item. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param item_id: ID of the item which is getting protected, In case of + Azure Vm , it is ProtectedItemId + :type item_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protection_intent_item_type: Required. Constant filled by server. + :type protection_intent_item_type: str + :param friendly_name: Friendly name of the VM represented by this backup + item. + :type friendly_name: str + """ + + _validation = { + 'protection_intent_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protection_intent_item_type': {'key': 'protectionIntentItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type=None, source_resource_id: str=None, item_id: str=None, policy_id: str=None, protection_state=None, friendly_name: str=None, **kwargs) -> None: + super(AzureResourceProtectionIntent, self).__init__(backup_management_type=backup_management_type, source_resource_id=source_resource_id, item_id=item_id, policy_id=policy_id, protection_state=protection_state, **kwargs) + self.friendly_name = friendly_name + self.protection_intent_item_type = 'AzureResourceItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_container.py index c08dce6949be..2ac37c00314f 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_container.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_container.py @@ -15,40 +15,37 @@ class AzureSqlContainer(ProtectionContainer): """Azure Sql workload-specific container. - 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 friendly_name: Friendly name of the container. :type friendly_name: str :param backup_management_type: Type of backup managemenent for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Status of registration of the container with the Recovery Services Vault. :type registration_status: str :param health_status: Status of health of the container. :type health_status: str - :ivar container_type: Type of the container. The value of this property - for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic - Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is - AzureSqlContainer. Possible values include: 'Invalid', 'Unknown', - 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', - 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - 'AzureSqlContainer', 'Windows', 'VCenter' - :vartype container_type: str or :class:`ContainerType - ` - :param protectable_object_type: Polymorphic Discriminator - :type protectable_object_type: str + :param container_type: Required. Constant filled by server. + :type container_type: str """ _validation = { - 'container_type': {'readonly': True}, - 'protectable_object_type': {'required': True}, + 'container_type': {'required': True}, } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, health_status=None): - super(AzureSqlContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status) - self.protectable_object_type = 'AzureSqlContainer' + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureSqlContainer, self).__init__(**kwargs) + self.container_type = 'AzureSqlContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_container_py3.py new file mode 100644 index 000000000000..33165f908d5d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_container_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_container_py3 import ProtectionContainer + + +class AzureSqlContainer(ProtectionContainer): + """Azure Sql workload-specific container. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, **kwargs) -> None: + super(AzureSqlContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + self.container_type = 'AzureSqlContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item.py index 4200727003b4..9f35933d3369 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item.py @@ -15,17 +15,20 @@ class AzureSqlProtectedItem(ProtectedItem): """Azure SQL workload-specific backup item. + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param workload_type: Type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - 'GenericDataSource' - :type workload_type: str or :class:`DataSourceType - ` + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType :param container_name: Unique name of container :type container_name: str :param source_resource_id: ARM ID of the resource to be backed up. @@ -36,7 +39,9 @@ class AzureSqlProtectedItem(ProtectedItem): :param last_recovery_point: Timestamp when the last (latest) backup copy was created for this backup item. :type last_recovery_point: datetime - :param protected_item_type: Polymorphic Discriminator + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. :type protected_item_type: str :param protected_item_data_id: Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. @@ -44,11 +49,11 @@ class AzureSqlProtectedItem(ProtectedItem): :param protection_state: Backup state of the backed up item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' - :type protection_state: str or :class:`ProtectedItemState - ` + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState :param extended_info: Additional information for this backup item. - :type extended_info: :class:`AzureSqlProtectedItemExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureSqlProtectedItemExtendedInfo """ _validation = { @@ -62,15 +67,16 @@ class AzureSqlProtectedItem(ProtectedItem): 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'policy_id': {'key': 'policyId', 'type': 'str'}, 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureSqlProtectedItemExtendedInfo'}, } - def __init__(self, backup_management_type=None, workload_type=None, container_name=None, source_resource_id=None, policy_id=None, last_recovery_point=None, protected_item_data_id=None, protection_state=None, extended_info=None): - super(AzureSqlProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point) - self.protected_item_data_id = protected_item_data_id - self.protection_state = protection_state - self.extended_info = extended_info + def __init__(self, **kwargs): + super(AzureSqlProtectedItem, self).__init__(**kwargs) + self.protected_item_data_id = kwargs.get('protected_item_data_id', None) + self.protection_state = kwargs.get('protection_state', None) + self.extended_info = kwargs.get('extended_info', None) self.protected_item_type = 'Microsoft.Sql/servers/databases' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_extended_info.py index 8b306f3c1868..7b3542dd932d 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_extended_info.py @@ -32,7 +32,8 @@ class AzureSqlProtectedItemExtendedInfo(Model): 'policy_state': {'key': 'policyState', 'type': 'str'}, } - def __init__(self, oldest_recovery_point=None, recovery_point_count=None, policy_state=None): - self.oldest_recovery_point = oldest_recovery_point - self.recovery_point_count = recovery_point_count - self.policy_state = policy_state + def __init__(self, **kwargs): + super(AzureSqlProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) + self.policy_state = kwargs.get('policy_state', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_extended_info_py3.py new file mode 100644 index 000000000000..96c7ad27cdc1 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_extended_info_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureSqlProtectedItemExtendedInfo(Model): + """Additional information on Azure Sql specific protected item. + + :param oldest_recovery_point: The oldest backup copy available for this + item in the service. + :type oldest_recovery_point: datetime + :param recovery_point_count: Number of available backup copies associated + with this backup item. + :type recovery_point_count: int + :param policy_state: State of the backup policy associated with this + backup item. + :type policy_state: str + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + } + + def __init__(self, *, oldest_recovery_point=None, recovery_point_count: int=None, policy_state: str=None, **kwargs) -> None: + super(AzureSqlProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count + self.policy_state = policy_state diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_py3.py new file mode 100644 index 000000000000..0791cf666cc3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_py3.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protected_item_py3 import ProtectedItem + + +class AzureSqlProtectedItem(ProtectedItem): + """Azure SQL workload-specific backup item. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param protected_item_data_id: Internal ID of a backup item. Used by Azure + SQL Backup engine to contact Recovery Services. + :type protected_item_data_id: str + :param protection_state: Backup state of the backed up item. Possible + values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState + :param extended_info: Additional information for this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureSqlProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureSqlProtectedItemExtendedInfo'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, protected_item_data_id: str=None, protection_state=None, extended_info=None, **kwargs) -> None: + super(AzureSqlProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, **kwargs) + self.protected_item_data_id = protected_item_data_id + self.protection_state = protection_state + self.extended_info = extended_info + self.protected_item_type = 'Microsoft.Sql/servers/databases' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protection_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protection_policy.py index 7decd2104be1..3e8a0a04c40a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protection_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protection_policy.py @@ -15,13 +15,15 @@ class AzureSqlProtectionPolicy(ProtectionPolicy): """Azure SQL workload-specific backup policy. + All required parameters must be populated in order to send to Azure. + :param protected_items_count: Number of items associated with this policy. :type protected_items_count: int - :param backup_management_type: Polymorphic Discriminator + :param backup_management_type: Required. Constant filled by server. :type backup_management_type: str :param retention_policy: Retention policy details. - :type retention_policy: :class:`RetentionPolicy - ` + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy """ _validation = { @@ -34,7 +36,7 @@ class AzureSqlProtectionPolicy(ProtectionPolicy): 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, } - def __init__(self, protected_items_count=None, retention_policy=None): - super(AzureSqlProtectionPolicy, self).__init__(protected_items_count=protected_items_count) - self.retention_policy = retention_policy + def __init__(self, **kwargs): + super(AzureSqlProtectionPolicy, self).__init__(**kwargs) + self.retention_policy = kwargs.get('retention_policy', None) self.backup_management_type = 'AzureSql' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protection_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protection_policy_py3.py new file mode 100644 index 000000000000..af341a49fd86 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protection_policy_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_policy_py3 import ProtectionPolicy + + +class AzureSqlProtectionPolicy(ProtectionPolicy): + """Azure SQL workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param retention_policy: Retention policy details. + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__(self, *, protected_items_count: int=None, retention_policy=None, **kwargs) -> None: + super(AzureSqlProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + self.retention_policy = retention_policy + self.backup_management_type = 'AzureSql' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sqlag_workload_container_protection_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sqlag_workload_container_protection_container.py new file mode 100644 index 000000000000..32e7aadc568f --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sqlag_workload_container_protection_container.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_workload_container import AzureWorkloadContainer + + +class AzureSQLAGWorkloadContainerProtectionContainer(AzureWorkloadContainer): + """Container for SQL workloads under SQL Availability Group. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param source_resource_id: ARM ID of the virtual machine represented by + this Azure Workload Container + :type source_resource_id: str + :param last_updated_time: Time stamp when this container was updated. + :type last_updated_time: datetime + :param extended_info: Additional details of a workload container. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(AzureSQLAGWorkloadContainerProtectionContainer, self).__init__(**kwargs) + self.container_type = 'SQLAGWorkLoadContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sqlag_workload_container_protection_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sqlag_workload_container_protection_container_py3.py new file mode 100644 index 000000000000..a8485357c201 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sqlag_workload_container_protection_container_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_workload_container_py3 import AzureWorkloadContainer + + +class AzureSQLAGWorkloadContainerProtectionContainer(AzureWorkloadContainer): + """Container for SQL workloads under SQL Availability Group. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param source_resource_id: ARM ID of the virtual machine represented by + this Azure Workload Container + :type source_resource_id: str + :param last_updated_time: Time stamp when this container was updated. + :type last_updated_time: datetime + :param extended_info: Additional details of a workload container. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, source_resource_id: str=None, last_updated_time=None, extended_info=None, **kwargs) -> None: + super(AzureSQLAGWorkloadContainerProtectionContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, source_resource_id=source_resource_id, last_updated_time=last_updated_time, extended_info=extended_info, **kwargs) + self.container_type = 'SQLAGWorkLoadContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_container.py new file mode 100644 index 000000000000..18db81c8f5de --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_container.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_container import ProtectionContainer + + +class AzureStorageContainer(ProtectionContainer): + """Azure Storage Account workload-specific container. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param source_resource_id: Fully qualified ARM url. + :type source_resource_id: str + :param storage_account_version: Storage account version. + :type storage_account_version: str + :param resource_group: Resource group name of Recovery Services Vault. + :type resource_group: str + :param protected_item_count: Number of items backed up in this container. + :type protected_item_count: long + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'storage_account_version': {'key': 'storageAccountVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(AzureStorageContainer, self).__init__(**kwargs) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.storage_account_version = kwargs.get('storage_account_version', None) + self.resource_group = kwargs.get('resource_group', None) + self.protected_item_count = kwargs.get('protected_item_count', None) + self.container_type = 'StorageContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_container_py3.py new file mode 100644 index 000000000000..7f3a0e0614f7 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_container_py3.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_container_py3 import ProtectionContainer + + +class AzureStorageContainer(ProtectionContainer): + """Azure Storage Account workload-specific container. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param source_resource_id: Fully qualified ARM url. + :type source_resource_id: str + :param storage_account_version: Storage account version. + :type storage_account_version: str + :param resource_group: Resource group name of Recovery Services Vault. + :type resource_group: str + :param protected_item_count: Number of items backed up in this container. + :type protected_item_count: long + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'storage_account_version': {'key': 'storageAccountVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, source_resource_id: str=None, storage_account_version: str=None, resource_group: str=None, protected_item_count: int=None, **kwargs) -> None: + super(AzureStorageContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + self.source_resource_id = source_resource_id + self.storage_account_version = storage_account_version + self.resource_group = resource_group + self.protected_item_count = protected_item_count + self.container_type = 'StorageContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_error_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_error_info.py new file mode 100644 index 000000000000..3854dac09848 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_error_info.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureStorageErrorInfo(Model): + """Azure storage specific error information. + + :param error_code: Error code. + :type error_code: int + :param error_string: Localized error string. + :type error_string: str + :param recommendations: List of localized recommendations for above error + code. + :type recommendations: list[str] + """ + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(AzureStorageErrorInfo, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.error_string = kwargs.get('error_string', None) + self.recommendations = kwargs.get('recommendations', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_error_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_error_info_py3.py new file mode 100644 index 000000000000..f2914ed24b34 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_error_info_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureStorageErrorInfo(Model): + """Azure storage specific error information. + + :param error_code: Error code. + :type error_code: int + :param error_string: Localized error string. + :type error_string: str + :param recommendations: List of localized recommendations for above error + code. + :type recommendations: list[str] + """ + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, *, error_code: int=None, error_string: str=None, recommendations=None, **kwargs) -> None: + super(AzureStorageErrorInfo, self).__init__(**kwargs) + self.error_code = error_code + self.error_string = error_string + self.recommendations = recommendations diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job.py new file mode 100644 index 000000000000..19bcf3d6d0b2 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .job import Job + + +class AzureStorageJob(Job): + """Azure storage specific job. + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + :param duration: Time elapsed during the execution of this job. + :type duration: timedelta + :param actions_info: Gets or sets the state/actions applicable on this job + like cancel/retry. + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :param error_details: Error details on execution of this job. + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageErrorInfo] + :param storage_account_name: Specifies friendly name of the storage + account. + :type storage_account_name: str + :param storage_account_version: Specifies whether the Storage account is a + Classic or an Azure Resource Manager Storage account. + :type storage_account_version: str + :param extended_info: Additional information about the job. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[JobSupportedAction]'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureStorageErrorInfo]'}, + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'storage_account_version': {'key': 'storageAccountVersion', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureStorageJobExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(AzureStorageJob, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) + self.actions_info = kwargs.get('actions_info', None) + self.error_details = kwargs.get('error_details', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.storage_account_version = kwargs.get('storage_account_version', None) + self.extended_info = kwargs.get('extended_info', None) + self.job_type = 'AzureStorageJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_extended_info.py new file mode 100644 index 000000000000..54e3f5b569ea --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_extended_info.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureStorageJobExtendedInfo(Model): + """Azure Storage workload-specific additional information for job. + + :param tasks_list: List of tasks for this job + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobTaskDetails] + :param property_bag: Job properties. + :type property_bag: dict[str, str] + :param dynamic_error_message: Non localized error message on job + execution. + :type dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[AzureStorageJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureStorageJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = kwargs.get('tasks_list', None) + self.property_bag = kwargs.get('property_bag', None) + self.dynamic_error_message = kwargs.get('dynamic_error_message', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_extended_info_py3.py new file mode 100644 index 000000000000..cf82e7b63c9f --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_extended_info_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureStorageJobExtendedInfo(Model): + """Azure Storage workload-specific additional information for job. + + :param tasks_list: List of tasks for this job + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobTaskDetails] + :param property_bag: Job properties. + :type property_bag: dict[str, str] + :param dynamic_error_message: Non localized error message on job + execution. + :type dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[AzureStorageJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__(self, *, tasks_list=None, property_bag=None, dynamic_error_message: str=None, **kwargs) -> None: + super(AzureStorageJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = tasks_list + self.property_bag = property_bag + self.dynamic_error_message = dynamic_error_message diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_py3.py new file mode 100644 index 000000000000..c3a12fabe30a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_py3.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .job_py3 import Job + + +class AzureStorageJob(Job): + """Azure storage specific job. + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + :param duration: Time elapsed during the execution of this job. + :type duration: timedelta + :param actions_info: Gets or sets the state/actions applicable on this job + like cancel/retry. + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :param error_details: Error details on execution of this job. + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageErrorInfo] + :param storage_account_name: Specifies friendly name of the storage + account. + :type storage_account_name: str + :param storage_account_version: Specifies whether the Storage account is a + Classic or an Azure Resource Manager Storage account. + :type storage_account_version: str + :param extended_info: Additional information about the job. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[JobSupportedAction]'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureStorageErrorInfo]'}, + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'storage_account_version': {'key': 'storageAccountVersion', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureStorageJobExtendedInfo'}, + } + + def __init__(self, *, entity_friendly_name: str=None, backup_management_type=None, operation: str=None, status: str=None, start_time=None, end_time=None, activity_id: str=None, duration=None, actions_info=None, error_details=None, storage_account_name: str=None, storage_account_version: str=None, extended_info=None, **kwargs) -> None: + super(AzureStorageJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) + self.duration = duration + self.actions_info = actions_info + self.error_details = error_details + self.storage_account_name = storage_account_name + self.storage_account_version = storage_account_version + self.extended_info = extended_info + self.job_type = 'AzureStorageJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_task_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_task_details.py new file mode 100644 index 000000000000..b6e06b21c7aa --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_task_details.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureStorageJobTaskDetails(Model): + """Azure storage workload specific job task details. + + :param task_id: The task display name. + :type task_id: str + :param status: The status. + :type status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureStorageJobTaskDetails, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_task_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_task_details_py3.py new file mode 100644 index 000000000000..d6a341e6c35a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_task_details_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureStorageJobTaskDetails(Model): + """Azure storage workload specific job task details. + + :param task_id: The task display name. + :type task_id: str + :param status: The status. + :type status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, task_id: str=None, status: str=None, **kwargs) -> None: + super(AzureStorageJobTaskDetails, self).__init__(**kwargs) + self.task_id = task_id + self.status = status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_protectable_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_protectable_container.py new file mode 100644 index 000000000000..b0d663bba3c5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_protectable_container.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protectable_container import ProtectableContainer + + +class AzureStorageProtectableContainer(ProtectableContainer): + """Azure Storage-specific protectable containers. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param health_status: Status of health of the container. + :type health_status: str + :param container_id: Fabric Id of the container such as ARM Id. + :type container_id: str + :param protectable_container_type: Required. Constant filled by server. + :type protectable_container_type: str + """ + + _validation = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureStorageProtectableContainer, self).__init__(**kwargs) + self.protectable_container_type = 'StorageContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_protectable_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_protectable_container_py3.py new file mode 100644 index 000000000000..ba313b6c232d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_protectable_container_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protectable_container_py3 import ProtectableContainer + + +class AzureStorageProtectableContainer(ProtectableContainer): + """Azure Storage-specific protectable containers. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param health_status: Status of health of the container. + :type health_status: str + :param container_id: Fabric Id of the container such as ARM Id. + :type container_id: str + :param protectable_container_type: Required. Constant filled by server. + :type protectable_container_type: str + """ + + _validation = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, health_status: str=None, container_id: str=None, **kwargs) -> None: + super(AzureStorageProtectableContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, health_status=health_status, container_id=container_id, **kwargs) + self.protectable_container_type = 'StorageContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protectable_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protectable_container.py new file mode 100644 index 000000000000..39b044f72693 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protectable_container.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protectable_container import ProtectableContainer + + +class AzureVMAppContainerProtectableContainer(ProtectableContainer): + """Azure workload-specific container. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param health_status: Status of health of the container. + :type health_status: str + :param container_id: Fabric Id of the container such as ARM Id. + :type container_id: str + :param protectable_container_type: Required. Constant filled by server. + :type protectable_container_type: str + """ + + _validation = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureVMAppContainerProtectableContainer, self).__init__(**kwargs) + self.protectable_container_type = 'VMAppContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protectable_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protectable_container_py3.py new file mode 100644 index 000000000000..61d1a07701e7 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protectable_container_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protectable_container_py3 import ProtectableContainer + + +class AzureVMAppContainerProtectableContainer(ProtectableContainer): + """Azure workload-specific container. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param health_status: Status of health of the container. + :type health_status: str + :param container_id: Fabric Id of the container such as ARM Id. + :type container_id: str + :param protectable_container_type: Required. Constant filled by server. + :type protectable_container_type: str + """ + + _validation = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, health_status: str=None, container_id: str=None, **kwargs) -> None: + super(AzureVMAppContainerProtectableContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, health_status=health_status, container_id=container_id, **kwargs) + self.protectable_container_type = 'VMAppContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protection_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protection_container.py new file mode 100644 index 000000000000..8ecd466caa2d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protection_container.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_workload_container import AzureWorkloadContainer + + +class AzureVMAppContainerProtectionContainer(AzureWorkloadContainer): + """Container for SQL workloads under Azure Virtual Machines. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param source_resource_id: ARM ID of the virtual machine represented by + this Azure Workload Container + :type source_resource_id: str + :param last_updated_time: Time stamp when this container was updated. + :type last_updated_time: datetime + :param extended_info: Additional details of a workload container. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(AzureVMAppContainerProtectionContainer, self).__init__(**kwargs) + self.container_type = 'VMAppContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protection_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protection_container_py3.py new file mode 100644 index 000000000000..2393cc9360c0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protection_container_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_workload_container_py3 import AzureWorkloadContainer + + +class AzureVMAppContainerProtectionContainer(AzureWorkloadContainer): + """Container for SQL workloads under Azure Virtual Machines. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param source_resource_id: ARM ID of the virtual machine represented by + this Azure Workload Container + :type source_resource_id: str + :param last_updated_time: Time stamp when this container was updated. + :type last_updated_time: datetime + :param extended_info: Additional details of a workload container. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, source_resource_id: str=None, last_updated_time=None, extended_info=None, **kwargs) -> None: + super(AzureVMAppContainerProtectionContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, source_resource_id=source_resource_id, last_updated_time=last_updated_time, extended_info=extended_info, **kwargs) + self.container_type = 'VMAppContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_request.py new file mode 100644 index 000000000000..dd59b276fd5b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_request.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .feature_support_request import FeatureSupportRequest + + +class AzureVMResourceFeatureSupportRequest(FeatureSupportRequest): + """AzureResource(IaaS VM) Specific feature support request. + + All required parameters must be populated in order to send to Azure. + + :param feature_type: Required. Constant filled by server. + :type feature_type: str + :param vm_size: Size of the resource: VM size(A/D series etc) in case of + IaasVM + :type vm_size: str + :param vm_sku: SKUs (Premium/Managed etc) in case of IaasVM + :type vm_sku: str + """ + + _validation = { + 'feature_type': {'required': True}, + } + + _attribute_map = { + 'feature_type': {'key': 'featureType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vm_sku': {'key': 'vmSku', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureVMResourceFeatureSupportRequest, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + self.vm_sku = kwargs.get('vm_sku', None) + self.feature_type = 'AzureVMResourceBackup' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_request_py3.py new file mode 100644 index 000000000000..8894f7766128 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_request_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .feature_support_request_py3 import FeatureSupportRequest + + +class AzureVMResourceFeatureSupportRequest(FeatureSupportRequest): + """AzureResource(IaaS VM) Specific feature support request. + + All required parameters must be populated in order to send to Azure. + + :param feature_type: Required. Constant filled by server. + :type feature_type: str + :param vm_size: Size of the resource: VM size(A/D series etc) in case of + IaasVM + :type vm_size: str + :param vm_sku: SKUs (Premium/Managed etc) in case of IaasVM + :type vm_sku: str + """ + + _validation = { + 'feature_type': {'required': True}, + } + + _attribute_map = { + 'feature_type': {'key': 'featureType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vm_sku': {'key': 'vmSku', 'type': 'str'}, + } + + def __init__(self, *, vm_size: str=None, vm_sku: str=None, **kwargs) -> None: + super(AzureVMResourceFeatureSupportRequest, self).__init__(**kwargs) + self.vm_size = vm_size + self.vm_sku = vm_sku + self.feature_type = 'AzureVMResourceBackup' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_response.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_response.py new file mode 100644 index 000000000000..01bd45d0db4a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_response.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureVMResourceFeatureSupportResponse(Model): + """Response for feature support requests for Azure IaasVm. + + :param support_status: Support status of feature. Possible values include: + 'Invalid', 'Supported', 'DefaultOFF', 'DefaultON', 'NotSupported' + :type support_status: str or + ~azure.mgmt.recoveryservicesbackup.models.SupportStatus + """ + + _attribute_map = { + 'support_status': {'key': 'supportStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureVMResourceFeatureSupportResponse, self).__init__(**kwargs) + self.support_status = kwargs.get('support_status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_response_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_response_py3.py new file mode 100644 index 000000000000..edaaf251d6a5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_response_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureVMResourceFeatureSupportResponse(Model): + """Response for feature support requests for Azure IaasVm. + + :param support_status: Support status of feature. Possible values include: + 'Invalid', 'Supported', 'DefaultOFF', 'DefaultON', 'NotSupported' + :type support_status: str or + ~azure.mgmt.recoveryservicesbackup.models.SupportStatus + """ + + _attribute_map = { + 'support_status': {'key': 'supportStatus', 'type': 'str'}, + } + + def __init__(self, *, support_status=None, **kwargs) -> None: + super(AzureVMResourceFeatureSupportResponse, self).__init__(**kwargs) + self.support_status = support_status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_item.py new file mode 100644 index 000000000000..cb5fc952701d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_item.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .workload_item import WorkloadItem + + +class AzureVmWorkloadItem(WorkloadItem): + """Azure VM workload-specific workload item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadSQLDatabaseWorkloadItem, + AzureVmWorkloadSQLInstanceWorkloadItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param workload_item_type: Required. Constant filled by server. + :type workload_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if workload item is auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param sub_workload_item_count: For instance or AG, indicates number of + DB's to be protected + :type sub_workload_item_count: int + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + _subtype_map = { + 'workload_item_type': {'SQLDataBase': 'AzureVmWorkloadSQLDatabaseWorkloadItem', 'SQLInstance': 'AzureVmWorkloadSQLInstanceWorkloadItem'} + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadItem, self).__init__(**kwargs) + self.parent_name = kwargs.get('parent_name', None) + self.server_name = kwargs.get('server_name', None) + self.is_auto_protectable = kwargs.get('is_auto_protectable', None) + self.subinquireditemcount = kwargs.get('subinquireditemcount', None) + self.sub_workload_item_count = kwargs.get('sub_workload_item_count', None) + self.workload_item_type = 'AzureVmWorkloadItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_item_py3.py new file mode 100644 index 000000000000..b0aa52cf5701 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_item_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .workload_item_py3 import WorkloadItem + + +class AzureVmWorkloadItem(WorkloadItem): + """Azure VM workload-specific workload item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadSQLDatabaseWorkloadItem, + AzureVmWorkloadSQLInstanceWorkloadItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param workload_item_type: Required. Constant filled by server. + :type workload_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if workload item is auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param sub_workload_item_count: For instance or AG, indicates number of + DB's to be protected + :type sub_workload_item_count: int + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + _subtype_map = { + 'workload_item_type': {'SQLDataBase': 'AzureVmWorkloadSQLDatabaseWorkloadItem', 'SQLInstance': 'AzureVmWorkloadSQLInstanceWorkloadItem'} + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, parent_name: str=None, server_name: str=None, is_auto_protectable: bool=None, subinquireditemcount: int=None, sub_workload_item_count: int=None, **kwargs) -> None: + super(AzureVmWorkloadItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, **kwargs) + self.parent_name = parent_name + self.server_name = server_name + self.is_auto_protectable = is_auto_protectable + self.subinquireditemcount = subinquireditemcount + self.sub_workload_item_count = sub_workload_item_count + self.workload_item_type = 'AzureVmWorkloadItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protectable_item.py new file mode 100644 index 000000000000..8710ed72ec12 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protectable_item.py @@ -0,0 +1,94 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .workload_protectable_item import WorkloadProtectableItem + + +class AzureVmWorkloadProtectableItem(WorkloadProtectableItem): + """Azure VM workload-specific protectable item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadSQLAvailabilityGroupProtectableItem, + AzureVmWorkloadSQLDatabaseProtectableItem, + AzureVmWorkloadSQLInstanceProtectableItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param parent_unique_name: Parent Unique Name is added to provide the + service formatted URI Name of the Parent + Only Applicable for data bases where the parent would be either Instance + or a SQL AG. + :type parent_unique_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if protectable item is + auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param subprotectableitemcount: For instance or AG, indicates number of + DB's to be protected + :type subprotectableitemcount: int + :param prebackupvalidation: Pre-backup validation for protectable objects + :type prebackupvalidation: + ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + _subtype_map = { + 'protectable_item_type': {'SQLAvailabilityGroupContainer': 'AzureVmWorkloadSQLAvailabilityGroupProtectableItem', 'SQLDataBase': 'AzureVmWorkloadSQLDatabaseProtectableItem', 'SQLInstance': 'AzureVmWorkloadSQLInstanceProtectableItem'} + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadProtectableItem, self).__init__(**kwargs) + self.parent_name = kwargs.get('parent_name', None) + self.parent_unique_name = kwargs.get('parent_unique_name', None) + self.server_name = kwargs.get('server_name', None) + self.is_auto_protectable = kwargs.get('is_auto_protectable', None) + self.subinquireditemcount = kwargs.get('subinquireditemcount', None) + self.subprotectableitemcount = kwargs.get('subprotectableitemcount', None) + self.prebackupvalidation = kwargs.get('prebackupvalidation', None) + self.protectable_item_type = 'AzureVmWorkloadProtectableItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protectable_item_py3.py new file mode 100644 index 000000000000..613fd25b4687 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protectable_item_py3.py @@ -0,0 +1,94 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .workload_protectable_item_py3 import WorkloadProtectableItem + + +class AzureVmWorkloadProtectableItem(WorkloadProtectableItem): + """Azure VM workload-specific protectable item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadSQLAvailabilityGroupProtectableItem, + AzureVmWorkloadSQLDatabaseProtectableItem, + AzureVmWorkloadSQLInstanceProtectableItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param parent_unique_name: Parent Unique Name is added to provide the + service formatted URI Name of the Parent + Only Applicable for data bases where the parent would be either Instance + or a SQL AG. + :type parent_unique_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if protectable item is + auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param subprotectableitemcount: For instance or AG, indicates number of + DB's to be protected + :type subprotectableitemcount: int + :param prebackupvalidation: Pre-backup validation for protectable objects + :type prebackupvalidation: + ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + _subtype_map = { + 'protectable_item_type': {'SQLAvailabilityGroupContainer': 'AzureVmWorkloadSQLAvailabilityGroupProtectableItem', 'SQLDataBase': 'AzureVmWorkloadSQLDatabaseProtectableItem', 'SQLInstance': 'AzureVmWorkloadSQLInstanceProtectableItem'} + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, parent_name: str=None, parent_unique_name: str=None, server_name: str=None, is_auto_protectable: bool=None, subinquireditemcount: int=None, subprotectableitemcount: int=None, prebackupvalidation=None, **kwargs) -> None: + super(AzureVmWorkloadProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, **kwargs) + self.parent_name = parent_name + self.parent_unique_name = parent_unique_name + self.server_name = server_name + self.is_auto_protectable = is_auto_protectable + self.subinquireditemcount = subinquireditemcount + self.subprotectableitemcount = subprotectableitemcount + self.prebackupvalidation = prebackupvalidation + self.protectable_item_type = 'AzureVmWorkloadProtectableItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protected_item_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protected_item_extended_info.py new file mode 100644 index 000000000000..87cf569285b5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protected_item_extended_info.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureVmWorkloadProtectedItemExtendedInfo(Model): + """Additional information on Azure Workload for SQL specific backup item. + + :param oldest_recovery_point: The oldest backup copy available for this + backup item. + :type oldest_recovery_point: datetime + :param recovery_point_count: Number of backup copies available for this + backup item. + :type recovery_point_count: int + :param policy_state: Indicates consistency of policy object and policy + applied to this backup item. + :type policy_state: str + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) + self.policy_state = kwargs.get('policy_state', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protected_item_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protected_item_extended_info_py3.py new file mode 100644 index 000000000000..21ffa134e947 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protected_item_extended_info_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureVmWorkloadProtectedItemExtendedInfo(Model): + """Additional information on Azure Workload for SQL specific backup item. + + :param oldest_recovery_point: The oldest backup copy available for this + backup item. + :type oldest_recovery_point: datetime + :param recovery_point_count: Number of backup copies available for this + backup item. + :type recovery_point_count: int + :param policy_state: Indicates consistency of policy object and policy + applied to this backup item. + :type policy_state: str + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + } + + def __init__(self, *, oldest_recovery_point=None, recovery_point_count: int=None, policy_state: str=None, **kwargs) -> None: + super(AzureVmWorkloadProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count + self.policy_state = policy_state diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protection_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protection_policy.py new file mode 100644 index 000000000000..a8fd70352c3b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protection_policy.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_policy import ProtectionPolicy + + +class AzureVmWorkloadProtectionPolicy(ProtectionPolicy): + """Azure VM (Mercury) workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param work_load_type: Type of workload for the backup management + :type work_load_type: str + :param settings: Common settings for the backup management + :type settings: ~azure.mgmt.recoveryservicesbackup.models.Settings + :param sub_protection_policy: List of sub-protection policies which + includes schedule and retention + :type sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, + 'settings': {'key': 'settings', 'type': 'Settings'}, + 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadProtectionPolicy, self).__init__(**kwargs) + self.work_load_type = kwargs.get('work_load_type', None) + self.settings = kwargs.get('settings', None) + self.sub_protection_policy = kwargs.get('sub_protection_policy', None) + self.backup_management_type = 'AzureWorkload' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protection_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protection_policy_py3.py new file mode 100644 index 000000000000..9d10a880a8f4 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protection_policy_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_policy_py3 import ProtectionPolicy + + +class AzureVmWorkloadProtectionPolicy(ProtectionPolicy): + """Azure VM (Mercury) workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param work_load_type: Type of workload for the backup management + :type work_load_type: str + :param settings: Common settings for the backup management + :type settings: ~azure.mgmt.recoveryservicesbackup.models.Settings + :param sub_protection_policy: List of sub-protection policies which + includes schedule and retention + :type sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, + 'settings': {'key': 'settings', 'type': 'Settings'}, + 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, + } + + def __init__(self, *, protected_items_count: int=None, work_load_type: str=None, settings=None, sub_protection_policy=None, **kwargs) -> None: + super(AzureVmWorkloadProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + self.work_load_type = work_load_type + self.settings = settings + self.sub_protection_policy = sub_protection_policy + self.backup_management_type = 'AzureWorkload' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_availability_group_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_availability_group_protectable_item.py new file mode 100644 index 000000000000..17c847e0230d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_availability_group_protectable_item.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_vm_workload_protectable_item import AzureVmWorkloadProtectableItem + + +class AzureVmWorkloadSQLAvailabilityGroupProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Availability + Group. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param parent_unique_name: Parent Unique Name is added to provide the + service formatted URI Name of the Parent + Only Applicable for data bases where the parent would be either Instance + or a SQL AG. + :type parent_unique_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if protectable item is + auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param subprotectableitemcount: For instance or AG, indicates number of + DB's to be protected + :type subprotectableitemcount: int + :param prebackupvalidation: Pre-backup validation for protectable objects + :type prebackupvalidation: + ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadSQLAvailabilityGroupProtectableItem, self).__init__(**kwargs) + self.protectable_item_type = 'SQLAvailabilityGroupContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_availability_group_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_availability_group_protectable_item_py3.py new file mode 100644 index 000000000000..d928c60e93be --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_availability_group_protectable_item_py3.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_vm_workload_protectable_item_py3 import AzureVmWorkloadProtectableItem + + +class AzureVmWorkloadSQLAvailabilityGroupProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Availability + Group. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param parent_unique_name: Parent Unique Name is added to provide the + service formatted URI Name of the Parent + Only Applicable for data bases where the parent would be either Instance + or a SQL AG. + :type parent_unique_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if protectable item is + auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param subprotectableitemcount: For instance or AG, indicates number of + DB's to be protected + :type subprotectableitemcount: int + :param prebackupvalidation: Pre-backup validation for protectable objects + :type prebackupvalidation: + ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, parent_name: str=None, parent_unique_name: str=None, server_name: str=None, is_auto_protectable: bool=None, subinquireditemcount: int=None, subprotectableitemcount: int=None, prebackupvalidation=None, **kwargs) -> None: + super(AzureVmWorkloadSQLAvailabilityGroupProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, parent_unique_name=parent_unique_name, server_name=server_name, is_auto_protectable=is_auto_protectable, subinquireditemcount=subinquireditemcount, subprotectableitemcount=subprotectableitemcount, prebackupvalidation=prebackupvalidation, **kwargs) + self.protectable_item_type = 'SQLAvailabilityGroupContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protectable_item.py new file mode 100644 index 000000000000..4ad8206ff337 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protectable_item.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_vm_workload_protectable_item import AzureVmWorkloadProtectableItem + + +class AzureVmWorkloadSQLDatabaseProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param parent_unique_name: Parent Unique Name is added to provide the + service formatted URI Name of the Parent + Only Applicable for data bases where the parent would be either Instance + or a SQL AG. + :type parent_unique_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if protectable item is + auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param subprotectableitemcount: For instance or AG, indicates number of + DB's to be protected + :type subprotectableitemcount: int + :param prebackupvalidation: Pre-backup validation for protectable objects + :type prebackupvalidation: + ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadSQLDatabaseProtectableItem, self).__init__(**kwargs) + self.protectable_item_type = 'SQLDataBase' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protectable_item_py3.py new file mode 100644 index 000000000000..c13578efb69b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protectable_item_py3.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_vm_workload_protectable_item_py3 import AzureVmWorkloadProtectableItem + + +class AzureVmWorkloadSQLDatabaseProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param parent_unique_name: Parent Unique Name is added to provide the + service formatted URI Name of the Parent + Only Applicable for data bases where the parent would be either Instance + or a SQL AG. + :type parent_unique_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if protectable item is + auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param subprotectableitemcount: For instance or AG, indicates number of + DB's to be protected + :type subprotectableitemcount: int + :param prebackupvalidation: Pre-backup validation for protectable objects + :type prebackupvalidation: + ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, parent_name: str=None, parent_unique_name: str=None, server_name: str=None, is_auto_protectable: bool=None, subinquireditemcount: int=None, subprotectableitemcount: int=None, prebackupvalidation=None, **kwargs) -> None: + super(AzureVmWorkloadSQLDatabaseProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, parent_unique_name=parent_unique_name, server_name=server_name, is_auto_protectable=is_auto_protectable, subinquireditemcount=subinquireditemcount, subprotectableitemcount=subprotectableitemcount, prebackupvalidation=prebackupvalidation, **kwargs) + self.protectable_item_type = 'SQLDataBase' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protected_item.py new file mode 100644 index 000000000000..d18550cee706 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protected_item.py @@ -0,0 +1,127 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protected_item import ProtectedItem + + +class AzureVmWorkloadSQLDatabaseProtectedItem(ProtectedItem): + """Azure VM workload-specific protected item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the DB represented by this backup + item. + :type friendly_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param parent_name: Parent name of the DB such as Instance or Availability + Group. + :type parent_name: str + :param parent_type: Parent type of DB, SQLAG or StandAlone + :type parent_type: str + :param protection_status: Backup status of this backup item. + :type protection_status: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param last_backup_status: Last backup operation status. Possible values: + Healthy, Unhealthy. Possible values include: 'Invalid', 'Healthy', + 'Unhealthy', 'IRPending' + :type last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :param last_backup_time: Timestamp of the last backup operation on this + backup item. + :type last_backup_time: datetime + :param last_backup_error_detail: Error details in last backup + :type last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :param protected_item_data_source_id: Data ID of the protected item. + :type protected_item_data_source_id: str + :param protected_item_health_status: Health status of the backup item, + evaluated based on last heartbeat received. Possible values include: + 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' + :type protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus + :param extended_info: Additional information for this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_type': {'key': 'parentType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, + 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, + 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadSQLDatabaseProtectedItem, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.server_name = kwargs.get('server_name', None) + self.parent_name = kwargs.get('parent_name', None) + self.parent_type = kwargs.get('parent_type', None) + self.protection_status = kwargs.get('protection_status', None) + self.protection_state = kwargs.get('protection_state', None) + self.last_backup_status = kwargs.get('last_backup_status', None) + self.last_backup_time = kwargs.get('last_backup_time', None) + self.last_backup_error_detail = kwargs.get('last_backup_error_detail', None) + self.protected_item_data_source_id = kwargs.get('protected_item_data_source_id', None) + self.protected_item_health_status = kwargs.get('protected_item_health_status', None) + self.extended_info = kwargs.get('extended_info', None) + self.protected_item_type = 'AzureVmWorkloadSQLDatabase' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protected_item_py3.py new file mode 100644 index 000000000000..d1938b620cf3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protected_item_py3.py @@ -0,0 +1,127 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protected_item_py3 import ProtectedItem + + +class AzureVmWorkloadSQLDatabaseProtectedItem(ProtectedItem): + """Azure VM workload-specific protected item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the DB represented by this backup + item. + :type friendly_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param parent_name: Parent name of the DB such as Instance or Availability + Group. + :type parent_name: str + :param parent_type: Parent type of DB, SQLAG or StandAlone + :type parent_type: str + :param protection_status: Backup status of this backup item. + :type protection_status: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param last_backup_status: Last backup operation status. Possible values: + Healthy, Unhealthy. Possible values include: 'Invalid', 'Healthy', + 'Unhealthy', 'IRPending' + :type last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :param last_backup_time: Timestamp of the last backup operation on this + backup item. + :type last_backup_time: datetime + :param last_backup_error_detail: Error details in last backup + :type last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :param protected_item_data_source_id: Data ID of the protected item. + :type protected_item_data_source_id: str + :param protected_item_health_status: Health status of the backup item, + evaluated based on last heartbeat received. Possible values include: + 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' + :type protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus + :param extended_info: Additional information for this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_type': {'key': 'parentType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, + 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, + 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, friendly_name: str=None, server_name: str=None, parent_name: str=None, parent_type: str=None, protection_status: str=None, protection_state=None, last_backup_status=None, last_backup_time=None, last_backup_error_detail=None, protected_item_data_source_id: str=None, protected_item_health_status=None, extended_info=None, **kwargs) -> None: + super(AzureVmWorkloadSQLDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, **kwargs) + self.friendly_name = friendly_name + self.server_name = server_name + self.parent_name = parent_name + self.parent_type = parent_type + self.protection_status = protection_status + self.protection_state = protection_state + self.last_backup_status = last_backup_status + self.last_backup_time = last_backup_time + self.last_backup_error_detail = last_backup_error_detail + self.protected_item_data_source_id = protected_item_data_source_id + self.protected_item_health_status = protected_item_health_status + self.extended_info = extended_info + self.protected_item_type = 'AzureVmWorkloadSQLDatabase' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_workload_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_workload_item.py new file mode 100644 index 000000000000..645538ba2f0e --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_workload_item.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_vm_workload_item import AzureVmWorkloadItem + + +class AzureVmWorkloadSQLDatabaseWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param workload_item_type: Required. Constant filled by server. + :type workload_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if workload item is auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param sub_workload_item_count: For instance or AG, indicates number of + DB's to be protected + :type sub_workload_item_count: int + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadSQLDatabaseWorkloadItem, self).__init__(**kwargs) + self.workload_item_type = 'SQLDataBase' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_workload_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_workload_item_py3.py new file mode 100644 index 000000000000..4156594312ef --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_workload_item_py3.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_vm_workload_item_py3 import AzureVmWorkloadItem + + +class AzureVmWorkloadSQLDatabaseWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param workload_item_type: Required. Constant filled by server. + :type workload_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if workload item is auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param sub_workload_item_count: For instance or AG, indicates number of + DB's to be protected + :type sub_workload_item_count: int + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, parent_name: str=None, server_name: str=None, is_auto_protectable: bool=None, subinquireditemcount: int=None, sub_workload_item_count: int=None, **kwargs) -> None: + super(AzureVmWorkloadSQLDatabaseWorkloadItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, server_name=server_name, is_auto_protectable=is_auto_protectable, subinquireditemcount=subinquireditemcount, sub_workload_item_count=sub_workload_item_count, **kwargs) + self.workload_item_type = 'SQLDataBase' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_protectable_item.py new file mode 100644 index 000000000000..5281a2047b25 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_protectable_item.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_vm_workload_protectable_item import AzureVmWorkloadProtectableItem + + +class AzureVmWorkloadSQLInstanceProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Instance. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param parent_unique_name: Parent Unique Name is added to provide the + service formatted URI Name of the Parent + Only Applicable for data bases where the parent would be either Instance + or a SQL AG. + :type parent_unique_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if protectable item is + auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param subprotectableitemcount: For instance or AG, indicates number of + DB's to be protected + :type subprotectableitemcount: int + :param prebackupvalidation: Pre-backup validation for protectable objects + :type prebackupvalidation: + ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadSQLInstanceProtectableItem, self).__init__(**kwargs) + self.protectable_item_type = 'SQLInstance' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_protectable_item_py3.py new file mode 100644 index 000000000000..e4f23a4b4f3f --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_protectable_item_py3.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_vm_workload_protectable_item_py3 import AzureVmWorkloadProtectableItem + + +class AzureVmWorkloadSQLInstanceProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Instance. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param parent_unique_name: Parent Unique Name is added to provide the + service formatted URI Name of the Parent + Only Applicable for data bases where the parent would be either Instance + or a SQL AG. + :type parent_unique_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if protectable item is + auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param subprotectableitemcount: For instance or AG, indicates number of + DB's to be protected + :type subprotectableitemcount: int + :param prebackupvalidation: Pre-backup validation for protectable objects + :type prebackupvalidation: + ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, parent_name: str=None, parent_unique_name: str=None, server_name: str=None, is_auto_protectable: bool=None, subinquireditemcount: int=None, subprotectableitemcount: int=None, prebackupvalidation=None, **kwargs) -> None: + super(AzureVmWorkloadSQLInstanceProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, parent_unique_name=parent_unique_name, server_name=server_name, is_auto_protectable=is_auto_protectable, subinquireditemcount=subinquireditemcount, subprotectableitemcount=subprotectableitemcount, prebackupvalidation=prebackupvalidation, **kwargs) + self.protectable_item_type = 'SQLInstance' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_workload_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_workload_item.py new file mode 100644 index 000000000000..4842a8ae8448 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_workload_item.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_vm_workload_item import AzureVmWorkloadItem + + +class AzureVmWorkloadSQLInstanceWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SQL Instance. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param workload_item_type: Required. Constant filled by server. + :type workload_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if workload item is auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param sub_workload_item_count: For instance or AG, indicates number of + DB's to be protected + :type sub_workload_item_count: int + :param data_directory_paths: Data Directory Paths for default directories + :type data_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + 'data_directory_paths': {'key': 'dataDirectoryPaths', 'type': '[SQLDataDirectory]'}, + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadSQLInstanceWorkloadItem, self).__init__(**kwargs) + self.data_directory_paths = kwargs.get('data_directory_paths', None) + self.workload_item_type = 'SQLInstance' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_workload_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_workload_item_py3.py new file mode 100644 index 000000000000..14a68cab8040 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_workload_item_py3.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_vm_workload_item_py3 import AzureVmWorkloadItem + + +class AzureVmWorkloadSQLInstanceWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SQL Instance. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param workload_item_type: Required. Constant filled by server. + :type workload_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if workload item is auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param sub_workload_item_count: For instance or AG, indicates number of + DB's to be protected + :type sub_workload_item_count: int + :param data_directory_paths: Data Directory Paths for default directories + :type data_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + 'data_directory_paths': {'key': 'dataDirectoryPaths', 'type': '[SQLDataDirectory]'}, + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, parent_name: str=None, server_name: str=None, is_auto_protectable: bool=None, subinquireditemcount: int=None, sub_workload_item_count: int=None, data_directory_paths=None, **kwargs) -> None: + super(AzureVmWorkloadSQLInstanceWorkloadItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, server_name=server_name, is_auto_protectable=is_auto_protectable, subinquireditemcount=subinquireditemcount, sub_workload_item_count=sub_workload_item_count, **kwargs) + self.data_directory_paths = data_directory_paths + self.workload_item_type = 'SQLInstance' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_backup_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_backup_request.py new file mode 100644 index 000000000000..d1bd18351161 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_backup_request.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_request import BackupRequest + + +class AzureWorkloadBackupRequest(BackupRequest): + """AzureWorkload workload-specific backup request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param backup_type: Type of backup, viz. Full, Differential, Log or + CopyOnlyFull. Possible values include: 'Invalid', 'Full', 'Differential', + 'Log', 'CopyOnlyFull' + :type backup_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupType + :param enable_compression: Bool for Compression setting + :type enable_compression: bool + :param recovery_point_expiry_time_in_utc: Backup copy will expire after + the time specified (UTC). + :type recovery_point_expiry_time_in_utc: datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + 'enable_compression': {'key': 'enableCompression', 'type': 'bool'}, + 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadBackupRequest, self).__init__(**kwargs) + self.backup_type = kwargs.get('backup_type', None) + self.enable_compression = kwargs.get('enable_compression', None) + self.recovery_point_expiry_time_in_utc = kwargs.get('recovery_point_expiry_time_in_utc', None) + self.object_type = 'AzureWorkloadBackupRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_backup_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_backup_request_py3.py new file mode 100644 index 000000000000..2c67d89e11bc --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_backup_request_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_request_py3 import BackupRequest + + +class AzureWorkloadBackupRequest(BackupRequest): + """AzureWorkload workload-specific backup request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param backup_type: Type of backup, viz. Full, Differential, Log or + CopyOnlyFull. Possible values include: 'Invalid', 'Full', 'Differential', + 'Log', 'CopyOnlyFull' + :type backup_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupType + :param enable_compression: Bool for Compression setting + :type enable_compression: bool + :param recovery_point_expiry_time_in_utc: Backup copy will expire after + the time specified (UTC). + :type recovery_point_expiry_time_in_utc: datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + 'enable_compression': {'key': 'enableCompression', 'type': 'bool'}, + 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, + } + + def __init__(self, *, backup_type=None, enable_compression: bool=None, recovery_point_expiry_time_in_utc=None, **kwargs) -> None: + super(AzureWorkloadBackupRequest, self).__init__(**kwargs) + self.backup_type = backup_type + self.enable_compression = enable_compression + self.recovery_point_expiry_time_in_utc = recovery_point_expiry_time_in_utc + self.object_type = 'AzureWorkloadBackupRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container.py new file mode 100644 index 000000000000..543e5c56fbd8 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_container import ProtectionContainer + + +class AzureWorkloadContainer(ProtectionContainer): + """Container for the workloads running inside Azure Compute or Classic + Compute. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureSQLAGWorkloadContainerProtectionContainer, + AzureVMAppContainerProtectionContainer + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param source_resource_id: ARM ID of the virtual machine represented by + this Azure Workload Container + :type source_resource_id: str + :param last_updated_time: Time stamp when this container was updated. + :type last_updated_time: datetime + :param extended_info: Additional details of a workload container. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, + } + + _subtype_map = { + 'container_type': {'SQLAGWorkLoadContainer': 'AzureSQLAGWorkloadContainerProtectionContainer', 'VMAppContainer': 'AzureVMAppContainerProtectionContainer'} + } + + def __init__(self, **kwargs): + super(AzureWorkloadContainer, self).__init__(**kwargs) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.last_updated_time = kwargs.get('last_updated_time', None) + self.extended_info = kwargs.get('extended_info', None) + self.container_type = 'AzureWorkloadContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_extended_info.py new file mode 100644 index 000000000000..82041f6ddf2c --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_extended_info.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureWorkloadContainerExtendedInfo(Model): + """Extended information of the container. + + :param host_server_name: Host Os Name in case of Stand Alone and + Cluster Name in case of distributed container. + :type host_server_name: str + :param inquiry_info: Inquiry Status for the container. + :type inquiry_info: ~azure.mgmt.recoveryservicesbackup.models.InquiryInfo + :param nodes_list: List of the nodes in case of distributed container. + :type nodes_list: + list[~azure.mgmt.recoveryservicesbackup.models.DistributedNodesInfo] + """ + + _attribute_map = { + 'host_server_name': {'key': 'hostServerName', 'type': 'str'}, + 'inquiry_info': {'key': 'inquiryInfo', 'type': 'InquiryInfo'}, + 'nodes_list': {'key': 'nodesList', 'type': '[DistributedNodesInfo]'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadContainerExtendedInfo, self).__init__(**kwargs) + self.host_server_name = kwargs.get('host_server_name', None) + self.inquiry_info = kwargs.get('inquiry_info', None) + self.nodes_list = kwargs.get('nodes_list', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_extended_info_py3.py new file mode 100644 index 000000000000..c69fc5584036 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_extended_info_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureWorkloadContainerExtendedInfo(Model): + """Extended information of the container. + + :param host_server_name: Host Os Name in case of Stand Alone and + Cluster Name in case of distributed container. + :type host_server_name: str + :param inquiry_info: Inquiry Status for the container. + :type inquiry_info: ~azure.mgmt.recoveryservicesbackup.models.InquiryInfo + :param nodes_list: List of the nodes in case of distributed container. + :type nodes_list: + list[~azure.mgmt.recoveryservicesbackup.models.DistributedNodesInfo] + """ + + _attribute_map = { + 'host_server_name': {'key': 'hostServerName', 'type': 'str'}, + 'inquiry_info': {'key': 'inquiryInfo', 'type': 'InquiryInfo'}, + 'nodes_list': {'key': 'nodesList', 'type': '[DistributedNodesInfo]'}, + } + + def __init__(self, *, host_server_name: str=None, inquiry_info=None, nodes_list=None, **kwargs) -> None: + super(AzureWorkloadContainerExtendedInfo, self).__init__(**kwargs) + self.host_server_name = host_server_name + self.inquiry_info = inquiry_info + self.nodes_list = nodes_list diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_py3.py new file mode 100644 index 000000000000..65f3152ad23b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_py3.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_container_py3 import ProtectionContainer + + +class AzureWorkloadContainer(ProtectionContainer): + """Container for the workloads running inside Azure Compute or Classic + Compute. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureSQLAGWorkloadContainerProtectionContainer, + AzureVMAppContainerProtectionContainer + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param source_resource_id: ARM ID of the virtual machine represented by + this Azure Workload Container + :type source_resource_id: str + :param last_updated_time: Time stamp when this container was updated. + :type last_updated_time: datetime + :param extended_info: Additional details of a workload container. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, + } + + _subtype_map = { + 'container_type': {'SQLAGWorkLoadContainer': 'AzureSQLAGWorkloadContainerProtectionContainer', 'VMAppContainer': 'AzureVMAppContainerProtectionContainer'} + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, source_resource_id: str=None, last_updated_time=None, extended_info=None, **kwargs) -> None: + super(AzureWorkloadContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + self.source_resource_id = source_resource_id + self.last_updated_time = last_updated_time + self.extended_info = extended_info + self.container_type = 'AzureWorkloadContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_error_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_error_info.py new file mode 100644 index 000000000000..f57240012dfa --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_error_info.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureWorkloadErrorInfo(Model): + """Azure storage specific error information. + + :param error_code: Error code. + :type error_code: int + :param error_string: Localized error string. + :type error_string: str + :param error_title: Title: Typically, the entity that the error pertains + to. + :type error_title: str + :param recommendations: List of localized recommendations for above error + code. + :type recommendations: list[str] + :param additional_details: Additional details for above error code. + :type additional_details: str + """ + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'error_title': {'key': 'errorTitle', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + 'additional_details': {'key': 'additionalDetails', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadErrorInfo, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.error_string = kwargs.get('error_string', None) + self.error_title = kwargs.get('error_title', None) + self.recommendations = kwargs.get('recommendations', None) + self.additional_details = kwargs.get('additional_details', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_error_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_error_info_py3.py new file mode 100644 index 000000000000..8d62be768dbb --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_error_info_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureWorkloadErrorInfo(Model): + """Azure storage specific error information. + + :param error_code: Error code. + :type error_code: int + :param error_string: Localized error string. + :type error_string: str + :param error_title: Title: Typically, the entity that the error pertains + to. + :type error_title: str + :param recommendations: List of localized recommendations for above error + code. + :type recommendations: list[str] + :param additional_details: Additional details for above error code. + :type additional_details: str + """ + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'error_title': {'key': 'errorTitle', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + 'additional_details': {'key': 'additionalDetails', 'type': 'str'}, + } + + def __init__(self, *, error_code: int=None, error_string: str=None, error_title: str=None, recommendations=None, additional_details: str=None, **kwargs) -> None: + super(AzureWorkloadErrorInfo, self).__init__(**kwargs) + self.error_code = error_code + self.error_string = error_string + self.error_title = error_title + self.recommendations = recommendations + self.additional_details = additional_details diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job.py new file mode 100644 index 000000000000..6d9a48a6f4b6 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .job import Job + + +class AzureWorkloadJob(Job): + """Azure storage specific job. + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + :param duration: Time elapsed during the execution of this job. + :type duration: timedelta + :param actions_info: Gets or sets the state/actions applicable on this job + like cancel/retry. + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :param error_details: Error details on execution of this job. + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadErrorInfo] + :param extended_info: Additional information about the job. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[JobSupportedAction]'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureWorkloadErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadJobExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadJob, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) + self.actions_info = kwargs.get('actions_info', None) + self.error_details = kwargs.get('error_details', None) + self.extended_info = kwargs.get('extended_info', None) + self.job_type = 'AzureWorkloadJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_extended_info.py new file mode 100644 index 000000000000..1a548f304e06 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_extended_info.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureWorkloadJobExtendedInfo(Model): + """Azure VM workload-specific additional information for job. + + :param tasks_list: List of tasks for this job + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobTaskDetails] + :param property_bag: Job properties. + :type property_bag: dict[str, str] + :param dynamic_error_message: Non localized error message on job + execution. + :type dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[AzureWorkloadJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = kwargs.get('tasks_list', None) + self.property_bag = kwargs.get('property_bag', None) + self.dynamic_error_message = kwargs.get('dynamic_error_message', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_extended_info_py3.py new file mode 100644 index 000000000000..3a4451a348d4 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_extended_info_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureWorkloadJobExtendedInfo(Model): + """Azure VM workload-specific additional information for job. + + :param tasks_list: List of tasks for this job + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobTaskDetails] + :param property_bag: Job properties. + :type property_bag: dict[str, str] + :param dynamic_error_message: Non localized error message on job + execution. + :type dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[AzureWorkloadJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__(self, *, tasks_list=None, property_bag=None, dynamic_error_message: str=None, **kwargs) -> None: + super(AzureWorkloadJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = tasks_list + self.property_bag = property_bag + self.dynamic_error_message = dynamic_error_message diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_py3.py new file mode 100644 index 000000000000..f0790858750c --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .job_py3 import Job + + +class AzureWorkloadJob(Job): + """Azure storage specific job. + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + :param duration: Time elapsed during the execution of this job. + :type duration: timedelta + :param actions_info: Gets or sets the state/actions applicable on this job + like cancel/retry. + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :param error_details: Error details on execution of this job. + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadErrorInfo] + :param extended_info: Additional information about the job. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[JobSupportedAction]'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureWorkloadErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadJobExtendedInfo'}, + } + + def __init__(self, *, entity_friendly_name: str=None, backup_management_type=None, operation: str=None, status: str=None, start_time=None, end_time=None, activity_id: str=None, duration=None, actions_info=None, error_details=None, extended_info=None, **kwargs) -> None: + super(AzureWorkloadJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) + self.duration = duration + self.actions_info = actions_info + self.error_details = error_details + self.extended_info = extended_info + self.job_type = 'AzureWorkloadJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_task_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_task_details.py new file mode 100644 index 000000000000..c68497693480 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_task_details.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureWorkloadJobTaskDetails(Model): + """Azure VM workload specific job task details. + + :param task_id: The task display name. + :type task_id: str + :param status: The status. + :type status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadJobTaskDetails, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_task_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_task_details_py3.py new file mode 100644 index 000000000000..d6c57c91ecc7 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_task_details_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureWorkloadJobTaskDetails(Model): + """Azure VM workload specific job task details. + + :param task_id: The task display name. + :type task_id: str + :param status: The status. + :type status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, task_id: str=None, status: str=None, **kwargs) -> None: + super(AzureWorkloadJobTaskDetails, self).__init__(**kwargs) + self.task_id = task_id + self.status = status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_recovery_point.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_recovery_point.py new file mode 100644 index 000000000000..aeda9faaf074 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_recovery_point.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .recovery_point import RecoveryPoint + + +class AzureWorkloadRecoveryPoint(RecoveryPoint): + """Workload specific recoverypoint, specifcally encaspulates full/diff + recoverypoint. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLRecoveryPoint + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_time_in_utc: UTC time at which recoverypoint was + created + :type recovery_point_time_in_utc: datetime + :param type: Type of restore point. Possible values include: 'Invalid', + 'Full', 'Log', 'Differential' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLRecoveryPoint': 'AzureWorkloadSQLRecoveryPoint'} + } + + def __init__(self, **kwargs): + super(AzureWorkloadRecoveryPoint, self).__init__(**kwargs) + self.recovery_point_time_in_utc = kwargs.get('recovery_point_time_in_utc', None) + self.type = kwargs.get('type', None) + self.object_type = 'AzureWorkloadRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_recovery_point_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_recovery_point_py3.py new file mode 100644 index 000000000000..4faafb2eddbb --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_recovery_point_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .recovery_point_py3 import RecoveryPoint + + +class AzureWorkloadRecoveryPoint(RecoveryPoint): + """Workload specific recoverypoint, specifcally encaspulates full/diff + recoverypoint. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLRecoveryPoint + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_time_in_utc: UTC time at which recoverypoint was + created + :type recovery_point_time_in_utc: datetime + :param type: Type of restore point. Possible values include: 'Invalid', + 'Full', 'Log', 'Differential' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLRecoveryPoint': 'AzureWorkloadSQLRecoveryPoint'} + } + + def __init__(self, *, recovery_point_time_in_utc=None, type=None, **kwargs) -> None: + super(AzureWorkloadRecoveryPoint, self).__init__(**kwargs) + self.recovery_point_time_in_utc = recovery_point_time_in_utc + self.type = type + self.object_type = 'AzureWorkloadRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_restore_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_restore_request.py new file mode 100644 index 000000000000..e43a62db1768 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_restore_request.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .restore_request import RestoreRequest + + +class AzureWorkloadRestoreRequest(RestoreRequest): + """AzureWorkload-specific restore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLRestoreRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: OLR/ALR, RestoreDisks is invalid option. Possible + values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', + 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLRestoreRequest': 'AzureWorkloadSQLRestoreRequest'} + } + + def __init__(self, **kwargs): + super(AzureWorkloadRestoreRequest, self).__init__(**kwargs) + self.recovery_type = kwargs.get('recovery_type', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.property_bag = kwargs.get('property_bag', None) + self.object_type = 'AzureWorkloadRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_restore_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_restore_request_py3.py new file mode 100644 index 000000000000..ad4b341ec594 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_restore_request_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .restore_request_py3 import RestoreRequest + + +class AzureWorkloadRestoreRequest(RestoreRequest): + """AzureWorkload-specific restore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLRestoreRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: OLR/ALR, RestoreDisks is invalid option. Possible + values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', + 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLRestoreRequest': 'AzureWorkloadSQLRestoreRequest'} + } + + def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, **kwargs) -> None: + super(AzureWorkloadRestoreRequest, self).__init__(**kwargs) + self.recovery_type = recovery_type + self.source_resource_id = source_resource_id + self.property_bag = property_bag + self.object_type = 'AzureWorkloadRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_recovery_point.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_recovery_point.py new file mode 100644 index 000000000000..b4e7793833fd --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_recovery_point.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_workload_sql_recovery_point import AzureWorkloadSQLRecoveryPoint + + +class AzureWorkloadSQLPointInTimeRecoveryPoint(AzureWorkloadSQLRecoveryPoint): + """Recovery point specific to PointInTime. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_time_in_utc: UTC time at which recoverypoint was + created + :type recovery_point_time_in_utc: datetime + :param type: Type of restore point. Possible values include: 'Invalid', + 'Full', 'Log', 'Differential' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param extended_info: Extended Info that provides data directory details. + Will be populated in two cases: + When a specific recovery point is accessed using GetRecoveryPoint + Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo + query filter + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :param time_ranges: List of log ranges + :type time_ranges: + list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, + 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadSQLPointInTimeRecoveryPoint, self).__init__(**kwargs) + self.time_ranges = kwargs.get('time_ranges', None) + self.object_type = 'AzureWorkloadSQLPointInTimeRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_recovery_point_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_recovery_point_py3.py new file mode 100644 index 000000000000..8a7f76ab55cd --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_recovery_point_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_workload_sql_recovery_point_py3 import AzureWorkloadSQLRecoveryPoint + + +class AzureWorkloadSQLPointInTimeRecoveryPoint(AzureWorkloadSQLRecoveryPoint): + """Recovery point specific to PointInTime. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_time_in_utc: UTC time at which recoverypoint was + created + :type recovery_point_time_in_utc: datetime + :param type: Type of restore point. Possible values include: 'Invalid', + 'Full', 'Log', 'Differential' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param extended_info: Extended Info that provides data directory details. + Will be populated in two cases: + When a specific recovery point is accessed using GetRecoveryPoint + Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo + query filter + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :param time_ranges: List of log ranges + :type time_ranges: + list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, + 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, + } + + def __init__(self, *, recovery_point_time_in_utc=None, type=None, extended_info=None, time_ranges=None, **kwargs) -> None: + super(AzureWorkloadSQLPointInTimeRecoveryPoint, self).__init__(recovery_point_time_in_utc=recovery_point_time_in_utc, type=type, extended_info=extended_info, **kwargs) + self.time_ranges = time_ranges + self.object_type = 'AzureWorkloadSQLPointInTimeRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_restore_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_restore_request.py new file mode 100644 index 000000000000..53c86acf62cd --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_restore_request.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_workload_sql_restore_request import AzureWorkloadSQLRestoreRequest + + +class AzureWorkloadSQLPointInTimeRestoreRequest(AzureWorkloadSQLRestoreRequest): + """AzureWorkload SQL -specific restore. Specifically for PointInTime/Log + restore. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: OLR/ALR, RestoreDisks is invalid option. Possible + values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', + 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + :param should_use_alternate_target_location: Default option set to true. + If this is set to false, alternate data directory must be provided + :type should_use_alternate_target_location: bool + :param is_non_recoverable: SQL specific property where user can chose to + set no-recovery when restore operation is tried + :type is_non_recoverable: bool + :param target_info: Details of target database + :type target_info: + ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :param alternate_directory_paths: Data directory details + :type alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + :param point_in_time: PointInTime value + :type point_in_time: datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadSQLPointInTimeRestoreRequest, self).__init__(**kwargs) + self.point_in_time = kwargs.get('point_in_time', None) + self.object_type = 'AzureWorkloadSQLPointInTimeRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_restore_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_restore_request_py3.py new file mode 100644 index 000000000000..70352a9c2e58 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_restore_request_py3.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_workload_sql_restore_request_py3 import AzureWorkloadSQLRestoreRequest + + +class AzureWorkloadSQLPointInTimeRestoreRequest(AzureWorkloadSQLRestoreRequest): + """AzureWorkload SQL -specific restore. Specifically for PointInTime/Log + restore. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: OLR/ALR, RestoreDisks is invalid option. Possible + values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', + 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + :param should_use_alternate_target_location: Default option set to true. + If this is set to false, alternate data directory must be provided + :type should_use_alternate_target_location: bool + :param is_non_recoverable: SQL specific property where user can chose to + set no-recovery when restore operation is tried + :type is_non_recoverable: bool + :param target_info: Details of target database + :type target_info: + ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :param alternate_directory_paths: Data directory details + :type alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + :param point_in_time: PointInTime value + :type point_in_time: datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, should_use_alternate_target_location: bool=None, is_non_recoverable: bool=None, target_info=None, alternate_directory_paths=None, point_in_time=None, **kwargs) -> None: + super(AzureWorkloadSQLPointInTimeRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, should_use_alternate_target_location=should_use_alternate_target_location, is_non_recoverable=is_non_recoverable, target_info=target_info, alternate_directory_paths=alternate_directory_paths, **kwargs) + self.point_in_time = point_in_time + self.object_type = 'AzureWorkloadSQLPointInTimeRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point.py new file mode 100644 index 000000000000..f5d3f2e04ab9 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_workload_recovery_point import AzureWorkloadRecoveryPoint + + +class AzureWorkloadSQLRecoveryPoint(AzureWorkloadRecoveryPoint): + """SQL specific recoverypoint, specifcally encaspulates full/diff + recoverypoint alongwith extended info. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLPointInTimeRecoveryPoint + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_time_in_utc: UTC time at which recoverypoint was + created + :type recovery_point_time_in_utc: datetime + :param type: Type of restore point. Possible values include: 'Invalid', + 'Full', 'Log', 'Differential' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param extended_info: Extended Info that provides data directory details. + Will be populated in two cases: + When a specific recovery point is accessed using GetRecoveryPoint + Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo + query filter + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLPointInTimeRecoveryPoint': 'AzureWorkloadSQLPointInTimeRecoveryPoint'} + } + + def __init__(self, **kwargs): + super(AzureWorkloadSQLRecoveryPoint, self).__init__(**kwargs) + self.extended_info = kwargs.get('extended_info', None) + self.object_type = 'AzureWorkloadSQLRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_extended_info.py new file mode 100644 index 000000000000..e9833895048c --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_extended_info.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureWorkloadSQLRecoveryPointExtendedInfo(Model): + """Extended info class details. + + :param data_directory_time_in_utc: UTC time at which data directory info + was captured + :type data_directory_time_in_utc: datetime + :param data_directory_paths: List of data directory paths during restore + operation. + :type data_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] + """ + + _attribute_map = { + 'data_directory_time_in_utc': {'key': 'dataDirectoryTimeInUTC', 'type': 'iso-8601'}, + 'data_directory_paths': {'key': 'dataDirectoryPaths', 'type': '[SQLDataDirectory]'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadSQLRecoveryPointExtendedInfo, self).__init__(**kwargs) + self.data_directory_time_in_utc = kwargs.get('data_directory_time_in_utc', None) + self.data_directory_paths = kwargs.get('data_directory_paths', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_extended_info_py3.py new file mode 100644 index 000000000000..62481c5488bd --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_extended_info_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureWorkloadSQLRecoveryPointExtendedInfo(Model): + """Extended info class details. + + :param data_directory_time_in_utc: UTC time at which data directory info + was captured + :type data_directory_time_in_utc: datetime + :param data_directory_paths: List of data directory paths during restore + operation. + :type data_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] + """ + + _attribute_map = { + 'data_directory_time_in_utc': {'key': 'dataDirectoryTimeInUTC', 'type': 'iso-8601'}, + 'data_directory_paths': {'key': 'dataDirectoryPaths', 'type': '[SQLDataDirectory]'}, + } + + def __init__(self, *, data_directory_time_in_utc=None, data_directory_paths=None, **kwargs) -> None: + super(AzureWorkloadSQLRecoveryPointExtendedInfo, self).__init__(**kwargs) + self.data_directory_time_in_utc = data_directory_time_in_utc + self.data_directory_paths = data_directory_paths diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_py3.py new file mode 100644 index 000000000000..a7463257dd06 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_workload_recovery_point_py3 import AzureWorkloadRecoveryPoint + + +class AzureWorkloadSQLRecoveryPoint(AzureWorkloadRecoveryPoint): + """SQL specific recoverypoint, specifcally encaspulates full/diff + recoverypoint alongwith extended info. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLPointInTimeRecoveryPoint + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_time_in_utc: UTC time at which recoverypoint was + created + :type recovery_point_time_in_utc: datetime + :param type: Type of restore point. Possible values include: 'Invalid', + 'Full', 'Log', 'Differential' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param extended_info: Extended Info that provides data directory details. + Will be populated in two cases: + When a specific recovery point is accessed using GetRecoveryPoint + Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo + query filter + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLPointInTimeRecoveryPoint': 'AzureWorkloadSQLPointInTimeRecoveryPoint'} + } + + def __init__(self, *, recovery_point_time_in_utc=None, type=None, extended_info=None, **kwargs) -> None: + super(AzureWorkloadSQLRecoveryPoint, self).__init__(recovery_point_time_in_utc=recovery_point_time_in_utc, type=type, **kwargs) + self.extended_info = extended_info + self.object_type = 'AzureWorkloadSQLRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_restore_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_restore_request.py new file mode 100644 index 000000000000..536e4afe3713 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_restore_request.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_workload_restore_request import AzureWorkloadRestoreRequest + + +class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): + """AzureWorkload SQL -specific restore. Specifically for full/diff restore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLPointInTimeRestoreRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: OLR/ALR, RestoreDisks is invalid option. Possible + values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', + 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + :param should_use_alternate_target_location: Default option set to true. + If this is set to false, alternate data directory must be provided + :type should_use_alternate_target_location: bool + :param is_non_recoverable: SQL specific property where user can chose to + set no-recovery when restore operation is tried + :type is_non_recoverable: bool + :param target_info: Details of target database + :type target_info: + ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :param alternate_directory_paths: Data directory details + :type alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLPointInTimeRestoreRequest': 'AzureWorkloadSQLPointInTimeRestoreRequest'} + } + + def __init__(self, **kwargs): + super(AzureWorkloadSQLRestoreRequest, self).__init__(**kwargs) + self.should_use_alternate_target_location = kwargs.get('should_use_alternate_target_location', None) + self.is_non_recoverable = kwargs.get('is_non_recoverable', None) + self.target_info = kwargs.get('target_info', None) + self.alternate_directory_paths = kwargs.get('alternate_directory_paths', None) + self.object_type = 'AzureWorkloadSQLRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_restore_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_restore_request_py3.py new file mode 100644 index 000000000000..711bb4f1d18d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_restore_request_py3.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_workload_restore_request_py3 import AzureWorkloadRestoreRequest + + +class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): + """AzureWorkload SQL -specific restore. Specifically for full/diff restore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLPointInTimeRestoreRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: OLR/ALR, RestoreDisks is invalid option. Possible + values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', + 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + :param should_use_alternate_target_location: Default option set to true. + If this is set to false, alternate data directory must be provided + :type should_use_alternate_target_location: bool + :param is_non_recoverable: SQL specific property where user can chose to + set no-recovery when restore operation is tried + :type is_non_recoverable: bool + :param target_info: Details of target database + :type target_info: + ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :param alternate_directory_paths: Data directory details + :type alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLPointInTimeRestoreRequest': 'AzureWorkloadSQLPointInTimeRestoreRequest'} + } + + def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, should_use_alternate_target_location: bool=None, is_non_recoverable: bool=None, target_info=None, alternate_directory_paths=None, **kwargs) -> None: + super(AzureWorkloadSQLRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, **kwargs) + self.should_use_alternate_target_location = should_use_alternate_target_location + self.is_non_recoverable = is_non_recoverable + self.target_info = target_info + self.alternate_directory_paths = alternate_directory_paths + self.object_type = 'AzureWorkloadSQLRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base.py index f9b91db0a01a..0cdb3706c690 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base.py @@ -16,13 +16,19 @@ class BackupEngineBase(Model): """The base backup engine class. All workload specific backup engines derive from this class. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupServerEngine, DpmBackupEngine + + All required parameters must be populated in order to send to Azure. + :param friendly_name: Friendly name of the backup engine. :type friendly_name: str :param backup_management_type: Type of backup management for the backup engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Registration status of the backup engine with the Recovery Services Vault. :type registration_status: str @@ -47,9 +53,9 @@ class BackupEngineBase(Model): available :type is_dpm_upgrade_available: bool :param extended_info: Extended info of the backupengine - :type extended_info: :class:`BackupEngineExtendedInfo - ` - :param backup_engine_type: Polymorphic Discriminator + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :param backup_engine_type: Required. Constant filled by server. :type backup_engine_type: str """ @@ -68,7 +74,7 @@ class BackupEngineBase(Model): 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, - 'is_dpm_upgrade_available': {'key': 'isDPMUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, } @@ -77,17 +83,18 @@ class BackupEngineBase(Model): 'backup_engine_type': {'AzureBackupServerEngine': 'AzureBackupServerEngine', 'DpmBackupEngine': 'DpmBackupEngine'} } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, backup_engine_state=None, health_status=None, can_re_register=None, backup_engine_id=None, dpm_version=None, azure_backup_agent_version=None, is_azure_backup_agent_upgrade_available=None, is_dpm_upgrade_available=None, extended_info=None): - self.friendly_name = friendly_name - self.backup_management_type = backup_management_type - self.registration_status = registration_status - self.backup_engine_state = backup_engine_state - self.health_status = health_status - self.can_re_register = can_re_register - self.backup_engine_id = backup_engine_id - self.dpm_version = dpm_version - self.azure_backup_agent_version = azure_backup_agent_version - self.is_azure_backup_agent_upgrade_available = is_azure_backup_agent_upgrade_available - self.is_dpm_upgrade_available = is_dpm_upgrade_available - self.extended_info = extended_info + def __init__(self, **kwargs): + super(BackupEngineBase, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.registration_status = kwargs.get('registration_status', None) + self.backup_engine_state = kwargs.get('backup_engine_state', None) + self.health_status = kwargs.get('health_status', None) + self.can_re_register = kwargs.get('can_re_register', None) + self.backup_engine_id = kwargs.get('backup_engine_id', None) + self.dpm_version = kwargs.get('dpm_version', None) + self.azure_backup_agent_version = kwargs.get('azure_backup_agent_version', None) + self.is_azure_backup_agent_upgrade_available = kwargs.get('is_azure_backup_agent_upgrade_available', None) + self.is_dpm_upgrade_available = kwargs.get('is_dpm_upgrade_available', None) + self.extended_info = kwargs.get('extended_info', None) self.backup_engine_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_py3.py new file mode 100644 index 000000000000..ec49d322d2cb --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_py3.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupEngineBase(Model): + """The base backup engine class. All workload specific backup engines derive + from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupServerEngine, DpmBackupEngine + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the backup engine. + :type friendly_name: str + :param backup_management_type: Type of backup management for the backup + engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Registration status of the backup engine with + the Recovery Services Vault. + :type registration_status: str + :param backup_engine_state: Status of the backup engine with the Recovery + Services Vault. = {Active/Deleting/DeleteFailed} + :type backup_engine_state: str + :param health_status: Backup status of the backup engine. + :type health_status: str + :param can_re_register: Flag indicating if the backup engine be + registered, once already registered. + :type can_re_register: bool + :param backup_engine_id: ID of the backup engine. + :type backup_engine_id: str + :param dpm_version: Backup engine version + :type dpm_version: str + :param azure_backup_agent_version: Backup agent version + :type azure_backup_agent_version: str + :param is_azure_backup_agent_upgrade_available: To check if backup agent + upgrade available + :type is_azure_backup_agent_upgrade_available: bool + :param is_dpm_upgrade_available: To check if backup engine upgrade + available + :type is_dpm_upgrade_available: bool + :param extended_info: Extended info of the backupengine + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :param backup_engine_type: Required. Constant filled by server. + :type backup_engine_type: str + """ + + _validation = { + 'backup_engine_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, + 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, + 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, + 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, + 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, + } + + _subtype_map = { + 'backup_engine_type': {'AzureBackupServerEngine': 'AzureBackupServerEngine', 'DpmBackupEngine': 'DpmBackupEngine'} + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, backup_engine_state: str=None, health_status: str=None, can_re_register: bool=None, backup_engine_id: str=None, dpm_version: str=None, azure_backup_agent_version: str=None, is_azure_backup_agent_upgrade_available: bool=None, is_dpm_upgrade_available: bool=None, extended_info=None, **kwargs) -> None: + super(BackupEngineBase, self).__init__(**kwargs) + self.friendly_name = friendly_name + self.backup_management_type = backup_management_type + self.registration_status = registration_status + self.backup_engine_state = backup_engine_state + self.health_status = health_status + self.can_re_register = can_re_register + self.backup_engine_id = backup_engine_id + self.dpm_version = dpm_version + self.azure_backup_agent_version = azure_backup_agent_version + self.is_azure_backup_agent_upgrade_available = is_azure_backup_agent_upgrade_available + self.is_dpm_upgrade_available = is_dpm_upgrade_available + self.extended_info = extended_info + self.backup_engine_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_resource.py index 52253a45d182..ae46131075b6 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_resource.py @@ -29,12 +29,12 @@ class BackupEngineBaseResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: BackupEngineBaseResource properties - :type properties: :class:`BackupEngineBase - ` + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBase """ _validation = { @@ -53,6 +53,6 @@ class BackupEngineBaseResource(Resource): 'properties': {'key': 'properties', 'type': 'BackupEngineBase'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(BackupEngineBaseResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(BackupEngineBaseResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_resource_py3.py new file mode 100644 index 000000000000..45748b34a630 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_resource_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class BackupEngineBaseResource(Resource): + """The base backup engine class. All workload specific backup engines derive + from this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: BackupEngineBaseResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBase + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BackupEngineBase'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(BackupEngineBaseResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_extended_info.py index ea92d78c0f97..77f8334ce9f7 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_extended_info.py @@ -48,12 +48,13 @@ class BackupEngineExtendedInfo(Model): 'azure_protected_instances': {'key': 'azureProtectedInstances', 'type': 'int'}, } - def __init__(self, database_name=None, protected_items_count=None, protected_servers_count=None, disk_count=None, used_disk_space=None, available_disk_space=None, refreshed_at=None, azure_protected_instances=None): - self.database_name = database_name - self.protected_items_count = protected_items_count - self.protected_servers_count = protected_servers_count - self.disk_count = disk_count - self.used_disk_space = used_disk_space - self.available_disk_space = available_disk_space - self.refreshed_at = refreshed_at - self.azure_protected_instances = azure_protected_instances + def __init__(self, **kwargs): + super(BackupEngineExtendedInfo, self).__init__(**kwargs) + self.database_name = kwargs.get('database_name', None) + self.protected_items_count = kwargs.get('protected_items_count', None) + self.protected_servers_count = kwargs.get('protected_servers_count', None) + self.disk_count = kwargs.get('disk_count', None) + self.used_disk_space = kwargs.get('used_disk_space', None) + self.available_disk_space = kwargs.get('available_disk_space', None) + self.refreshed_at = kwargs.get('refreshed_at', None) + self.azure_protected_instances = kwargs.get('azure_protected_instances', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_extended_info_py3.py new file mode 100644 index 000000000000..4631dc11e281 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_extended_info_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupEngineExtendedInfo(Model): + """Additional information on backup engine. + + :param database_name: Database name of backup engine. + :type database_name: str + :param protected_items_count: Number of protected items in the backup + engine. + :type protected_items_count: int + :param protected_servers_count: Number of protected servers in the backup + engine. + :type protected_servers_count: int + :param disk_count: Number of disks in the backup engine. + :type disk_count: int + :param used_disk_space: Diskspace used in the backup engine. + :type used_disk_space: float + :param available_disk_space: Diskspace currently available in the backup + engine. + :type available_disk_space: float + :param refreshed_at: Last refresh time in the backup engine. + :type refreshed_at: datetime + :param azure_protected_instances: Protected instances in the backup + engine. + :type azure_protected_instances: int + """ + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'protected_servers_count': {'key': 'protectedServersCount', 'type': 'int'}, + 'disk_count': {'key': 'diskCount', 'type': 'int'}, + 'used_disk_space': {'key': 'usedDiskSpace', 'type': 'float'}, + 'available_disk_space': {'key': 'availableDiskSpace', 'type': 'float'}, + 'refreshed_at': {'key': 'refreshedAt', 'type': 'iso-8601'}, + 'azure_protected_instances': {'key': 'azureProtectedInstances', 'type': 'int'}, + } + + def __init__(self, *, database_name: str=None, protected_items_count: int=None, protected_servers_count: int=None, disk_count: int=None, used_disk_space: float=None, available_disk_space: float=None, refreshed_at=None, azure_protected_instances: int=None, **kwargs) -> None: + super(BackupEngineExtendedInfo, self).__init__(**kwargs) + self.database_name = database_name + self.protected_items_count = protected_items_count + self.protected_servers_count = protected_servers_count + self.disk_count = disk_count + self.used_disk_space = used_disk_space + self.available_disk_space = available_disk_space + self.refreshed_at = refreshed_at + self.azure_protected_instances = azure_protected_instances diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_management_usage.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_management_usage.py index 1d9f79b02464..5270e7fb4f16 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_management_usage.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_management_usage.py @@ -17,8 +17,7 @@ class BackupManagementUsage(Model): :param unit: Unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - :type unit: str or :class:`UsagesUnit - ` + :type unit: str or ~azure.mgmt.recoveryservicesbackup.models.UsagesUnit :param quota_period: Quota period of usage. :type quota_period: str :param next_reset_time: Next reset time of usage. @@ -28,8 +27,7 @@ class BackupManagementUsage(Model): :param limit: Limit of usage. :type limit: long :param name: Name of usage. - :type name: :class:`NameInfo - ` + :type name: ~azure.mgmt.recoveryservicesbackup.models.NameInfo """ _attribute_map = { @@ -41,10 +39,11 @@ class BackupManagementUsage(Model): 'name': {'key': 'name', 'type': 'NameInfo'}, } - def __init__(self, unit=None, quota_period=None, next_reset_time=None, current_value=None, limit=None, name=None): - self.unit = unit - self.quota_period = quota_period - self.next_reset_time = next_reset_time - self.current_value = current_value - self.limit = limit - self.name = name + def __init__(self, **kwargs): + super(BackupManagementUsage, self).__init__(**kwargs) + self.unit = kwargs.get('unit', None) + self.quota_period = kwargs.get('quota_period', None) + self.next_reset_time = kwargs.get('next_reset_time', None) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_management_usage_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_management_usage_py3.py new file mode 100644 index 000000000000..32baaa0cc26d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_management_usage_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupManagementUsage(Model): + """Backup management usages of a vault. + + :param unit: Unit of the usage. Possible values include: 'Count', 'Bytes', + 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + :type unit: str or ~azure.mgmt.recoveryservicesbackup.models.UsagesUnit + :param quota_period: Quota period of usage. + :type quota_period: str + :param next_reset_time: Next reset time of usage. + :type next_reset_time: datetime + :param current_value: Current value of usage. + :type current_value: long + :param limit: Limit of usage. + :type limit: long + :param name: Name of usage. + :type name: ~azure.mgmt.recoveryservicesbackup.models.NameInfo + """ + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'NameInfo'}, + } + + def __init__(self, *, unit=None, quota_period: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: + super(BackupManagementUsage, self).__init__(**kwargs) + self.unit = unit + self.quota_period = quota_period + self.next_reset_time = next_reset_time + self.current_value = current_value + self.limit = limit + self.name = name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request.py index e4669df9bd3e..767c62f47a94 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request.py @@ -16,7 +16,13 @@ class BackupRequest(Model): """Base class for backup request. Workload-specific backup requests are derived from this class. - :param object_type: Polymorphic Discriminator + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareBackupRequest, AzureWorkloadBackupRequest, + IaasVMBackupRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str """ @@ -29,8 +35,9 @@ class BackupRequest(Model): } _subtype_map = { - 'object_type': {'IaasVMBackupRequest': 'IaasVMBackupRequest'} + 'object_type': {'AzureFileShareBackupRequest': 'AzureFileShareBackupRequest', 'AzureWorkloadBackupRequest': 'AzureWorkloadBackupRequest', 'IaasVMBackupRequest': 'IaasVMBackupRequest'} } - def __init__(self): + def __init__(self, **kwargs): + super(BackupRequest, self).__init__(**kwargs) self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_py3.py new file mode 100644 index 000000000000..cfff72e59785 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupRequest(Model): + """Base class for backup request. Workload-specific backup requests are + derived from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareBackupRequest, AzureWorkloadBackupRequest, + IaasVMBackupRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureFileShareBackupRequest': 'AzureFileShareBackupRequest', 'AzureWorkloadBackupRequest': 'AzureWorkloadBackupRequest', 'IaasVMBackupRequest': 'IaasVMBackupRequest'} + } + + def __init__(self, **kwargs) -> None: + super(BackupRequest, self).__init__(**kwargs) + self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_resource.py index 715e406bee74..6a44c20b9fd9 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_resource.py @@ -29,12 +29,11 @@ class BackupRequestResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: BackupRequestResource properties - :type properties: :class:`BackupRequest - ` + :type properties: ~azure.mgmt.recoveryservicesbackup.models.BackupRequest """ _validation = { @@ -53,6 +52,6 @@ class BackupRequestResource(Resource): 'properties': {'key': 'properties', 'type': 'BackupRequest'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(BackupRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(BackupRequestResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_resource_py3.py new file mode 100644 index 000000000000..d251d72bfeea --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_resource_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class BackupRequestResource(Resource): + """Base class for backup request. Workload-specific backup requests are + derived from this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: BackupRequestResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.BackupRequest + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BackupRequest'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(BackupRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config.py index aff6daa3398b..e3aa05d35790 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config.py @@ -15,22 +15,29 @@ class BackupResourceConfig(Model): """The resource storage details. + :param storage_model_type: Storage type. Possible values include: + 'Invalid', 'GeoRedundant', 'LocallyRedundant' + :type storage_model_type: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageType :param storage_type: Storage type. Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant' - :type storage_type: str or :class:`StorageType - ` + :type storage_type: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageType :param storage_type_state: Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'Invalid', 'Locked', 'Unlocked' - :type storage_type_state: str or :class:`StorageTypeState - ` + :type storage_type_state: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState """ _attribute_map = { + 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, 'storage_type': {'key': 'storageType', 'type': 'str'}, 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, } - def __init__(self, storage_type=None, storage_type_state=None): - self.storage_type = storage_type - self.storage_type_state = storage_type_state + def __init__(self, **kwargs): + super(BackupResourceConfig, self).__init__(**kwargs) + self.storage_model_type = kwargs.get('storage_model_type', None) + self.storage_type = kwargs.get('storage_type', None) + self.storage_type_state = kwargs.get('storage_type_state', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_py3.py new file mode 100644 index 000000000000..2a2521a6d519 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupResourceConfig(Model): + """The resource storage details. + + :param storage_model_type: Storage type. Possible values include: + 'Invalid', 'GeoRedundant', 'LocallyRedundant' + :type storage_model_type: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageType + :param storage_type: Storage type. Possible values include: 'Invalid', + 'GeoRedundant', 'LocallyRedundant' + :type storage_type: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageType + :param storage_type_state: Locked or Unlocked. Once a machine is + registered against a resource, the storageTypeState is always Locked. + Possible values include: 'Invalid', 'Locked', 'Unlocked' + :type storage_type_state: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState + """ + + _attribute_map = { + 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, + } + + def __init__(self, *, storage_model_type=None, storage_type=None, storage_type_state=None, **kwargs) -> None: + super(BackupResourceConfig, self).__init__(**kwargs) + self.storage_model_type = storage_model_type + self.storage_type = storage_type + self.storage_type_state = storage_type_state diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_resource.py index 2e5004998915..bbe4915987ce 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_resource.py @@ -28,12 +28,12 @@ class BackupResourceConfigResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: BackupResourceConfigResource properties - :type properties: :class:`BackupResourceConfig - ` + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfig """ _validation = { @@ -52,6 +52,6 @@ class BackupResourceConfigResource(Resource): 'properties': {'key': 'properties', 'type': 'BackupResourceConfig'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(BackupResourceConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(BackupResourceConfigResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_resource_py3.py new file mode 100644 index 000000000000..fc12fbd0c9cc --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_resource_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class BackupResourceConfigResource(Resource): + """The resource storage details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: BackupResourceConfigResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfig + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BackupResourceConfig'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(BackupResourceConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config.py index bd3af53de403..dfd35a8188ca 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config.py @@ -15,28 +15,35 @@ class BackupResourceVaultConfig(Model): """Backup resource vault config details. + :param storage_model_type: Storage type. Possible values include: + 'Invalid', 'GeoRedundant', 'LocallyRedundant' + :type storage_model_type: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageType :param storage_type: Storage type. Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant' - :type storage_type: str or :class:`StorageType - ` + :type storage_type: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageType :param storage_type_state: Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'Invalid', 'Locked', 'Unlocked' - :type storage_type_state: str or :class:`StorageTypeState - ` + :type storage_type_state: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState :param enhanced_security_state: Enabled or Disabled. Possible values include: 'Invalid', 'Enabled', 'Disabled' - :type enhanced_security_state: str or :class:`EnhancedSecurityState - ` + :type enhanced_security_state: str or + ~azure.mgmt.recoveryservicesbackup.models.EnhancedSecurityState """ _attribute_map = { + 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, 'storage_type': {'key': 'storageType', 'type': 'str'}, 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, 'enhanced_security_state': {'key': 'enhancedSecurityState', 'type': 'str'}, } - def __init__(self, storage_type=None, storage_type_state=None, enhanced_security_state=None): - self.storage_type = storage_type - self.storage_type_state = storage_type_state - self.enhanced_security_state = enhanced_security_state + def __init__(self, **kwargs): + super(BackupResourceVaultConfig, self).__init__(**kwargs) + self.storage_model_type = kwargs.get('storage_model_type', None) + self.storage_type = kwargs.get('storage_type', None) + self.storage_type_state = kwargs.get('storage_type_state', None) + self.enhanced_security_state = kwargs.get('enhanced_security_state', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_py3.py new file mode 100644 index 000000000000..89a2b66157c2 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupResourceVaultConfig(Model): + """Backup resource vault config details. + + :param storage_model_type: Storage type. Possible values include: + 'Invalid', 'GeoRedundant', 'LocallyRedundant' + :type storage_model_type: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageType + :param storage_type: Storage type. Possible values include: 'Invalid', + 'GeoRedundant', 'LocallyRedundant' + :type storage_type: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageType + :param storage_type_state: Locked or Unlocked. Once a machine is + registered against a resource, the storageTypeState is always Locked. + Possible values include: 'Invalid', 'Locked', 'Unlocked' + :type storage_type_state: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState + :param enhanced_security_state: Enabled or Disabled. Possible values + include: 'Invalid', 'Enabled', 'Disabled' + :type enhanced_security_state: str or + ~azure.mgmt.recoveryservicesbackup.models.EnhancedSecurityState + """ + + _attribute_map = { + 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, + 'enhanced_security_state': {'key': 'enhancedSecurityState', 'type': 'str'}, + } + + def __init__(self, *, storage_model_type=None, storage_type=None, storage_type_state=None, enhanced_security_state=None, **kwargs) -> None: + super(BackupResourceVaultConfig, self).__init__(**kwargs) + self.storage_model_type = storage_model_type + self.storage_type = storage_type + self.storage_type_state = storage_type_state + self.enhanced_security_state = enhanced_security_state diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_resource.py index 71e6eaaaa35e..fd1d87aa7b15 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_resource.py @@ -28,12 +28,12 @@ class BackupResourceVaultConfigResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: BackupResourceVaultConfigResource properties - :type properties: :class:`BackupResourceVaultConfig - ` + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfig """ _validation = { @@ -52,6 +52,6 @@ class BackupResourceVaultConfigResource(Resource): 'properties': {'key': 'properties', 'type': 'BackupResourceVaultConfig'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(BackupResourceVaultConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(BackupResourceVaultConfigResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_resource_py3.py new file mode 100644 index 000000000000..410c47ef4b52 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_resource_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class BackupResourceVaultConfigResource(Resource): + """Backup resource vault config details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: BackupResourceVaultConfigResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfig + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BackupResourceVaultConfig'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(BackupResourceVaultConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_request.py new file mode 100644 index 000000000000..aa4ff0110d16 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_request.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupStatusRequest(Model): + """BackupStatus request. + + :param resource_type: Container Type - VM, SQLPaaS, DPM, AzureFileShare. + Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type resource_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param resource_id: Entire ARM resource id of the resource + :type resource_id: str + :param po_logical_name: Protectable Item Logical Name + :type po_logical_name: str + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'po_logical_name': {'key': 'poLogicalName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BackupStatusRequest, self).__init__(**kwargs) + self.resource_type = kwargs.get('resource_type', None) + self.resource_id = kwargs.get('resource_id', None) + self.po_logical_name = kwargs.get('po_logical_name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_request_py3.py new file mode 100644 index 000000000000..660f7ef77535 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_request_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupStatusRequest(Model): + """BackupStatus request. + + :param resource_type: Container Type - VM, SQLPaaS, DPM, AzureFileShare. + Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type resource_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param resource_id: Entire ARM resource id of the resource + :type resource_id: str + :param po_logical_name: Protectable Item Logical Name + :type po_logical_name: str + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'po_logical_name': {'key': 'poLogicalName', 'type': 'str'}, + } + + def __init__(self, *, resource_type=None, resource_id: str=None, po_logical_name: str=None, **kwargs) -> None: + super(BackupStatusRequest, self).__init__(**kwargs) + self.resource_type = resource_type + self.resource_id = resource_id + self.po_logical_name = po_logical_name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_response.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_response.py new file mode 100644 index 000000000000..73c3e7f2eab0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_response.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupStatusResponse(Model): + """BackupStatus response. + + :param protection_status: Specifies whether the container is registered or + not. Possible values include: 'Invalid', 'NotProtected', 'Protecting', + 'Protected', 'ProtectionFailed' + :type protection_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param vault_id: Specifies the arm resource id of the vault + :type vault_id: str + :param fabric_name: Specifies the fabric name - Azure or AAD. Possible + values include: 'Invalid', 'Azure' + :type fabric_name: str or + ~azure.mgmt.recoveryservicesbackup.models.FabricName + :param container_name: Specifies the product specific container name. E.g. + iaasvmcontainer;iaasvmcontainer;csname;vmname. This is required for portal + :type container_name: str + :param protected_item_name: Specifies the product specific ds name. E.g. + vm;iaasvmcontainer;csname;vmname. This is required for portal + :type protected_item_name: str + :param error_code: ErrorCode in case of intent failed + :type error_code: str + :param error_message: ErrorMessage in case of intent failed. + :type error_message: str + :param policy_name: Specifies the policy name which is used for protection + :type policy_name: str + :param registration_status: Container registration status + :type registration_status: str + """ + + _attribute_map = { + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'vault_id': {'key': 'vaultId', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'protected_item_name': {'key': 'protectedItemName', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BackupStatusResponse, self).__init__(**kwargs) + self.protection_status = kwargs.get('protection_status', None) + self.vault_id = kwargs.get('vault_id', None) + self.fabric_name = kwargs.get('fabric_name', None) + self.container_name = kwargs.get('container_name', None) + self.protected_item_name = kwargs.get('protected_item_name', None) + self.error_code = kwargs.get('error_code', None) + self.error_message = kwargs.get('error_message', None) + self.policy_name = kwargs.get('policy_name', None) + self.registration_status = kwargs.get('registration_status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_response_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_response_py3.py new file mode 100644 index 000000000000..4c2a61e02acd --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_response_py3.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupStatusResponse(Model): + """BackupStatus response. + + :param protection_status: Specifies whether the container is registered or + not. Possible values include: 'Invalid', 'NotProtected', 'Protecting', + 'Protected', 'ProtectionFailed' + :type protection_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param vault_id: Specifies the arm resource id of the vault + :type vault_id: str + :param fabric_name: Specifies the fabric name - Azure or AAD. Possible + values include: 'Invalid', 'Azure' + :type fabric_name: str or + ~azure.mgmt.recoveryservicesbackup.models.FabricName + :param container_name: Specifies the product specific container name. E.g. + iaasvmcontainer;iaasvmcontainer;csname;vmname. This is required for portal + :type container_name: str + :param protected_item_name: Specifies the product specific ds name. E.g. + vm;iaasvmcontainer;csname;vmname. This is required for portal + :type protected_item_name: str + :param error_code: ErrorCode in case of intent failed + :type error_code: str + :param error_message: ErrorMessage in case of intent failed. + :type error_message: str + :param policy_name: Specifies the policy name which is used for protection + :type policy_name: str + :param registration_status: Container registration status + :type registration_status: str + """ + + _attribute_map = { + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'vault_id': {'key': 'vaultId', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'protected_item_name': {'key': 'protectedItemName', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + } + + def __init__(self, *, protection_status=None, vault_id: str=None, fabric_name=None, container_name: str=None, protected_item_name: str=None, error_code: str=None, error_message: str=None, policy_name: str=None, registration_status: str=None, **kwargs) -> None: + super(BackupStatusResponse, self).__init__(**kwargs) + self.protection_status = protection_status + self.vault_id = vault_id + self.fabric_name = fabric_name + self.container_name = container_name + self.protected_item_name = protected_item_name + self.error_code = error_code + self.error_message = error_message + self.policy_name = policy_name + self.registration_status = registration_status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bek_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bek_details.py index 99532fe0648b..9b6af4177bbf 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bek_details.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bek_details.py @@ -29,7 +29,8 @@ class BEKDetails(Model): 'secret_data': {'key': 'secretData', 'type': 'str'}, } - def __init__(self, secret_url=None, secret_vault_id=None, secret_data=None): - self.secret_url = secret_url - self.secret_vault_id = secret_vault_id - self.secret_data = secret_data + def __init__(self, **kwargs): + super(BEKDetails, self).__init__(**kwargs) + self.secret_url = kwargs.get('secret_url', None) + self.secret_vault_id = kwargs.get('secret_vault_id', None) + self.secret_data = kwargs.get('secret_data', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bek_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bek_details_py3.py new file mode 100644 index 000000000000..9dc2d6166a2b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bek_details_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BEKDetails(Model): + """BEK is bitlocker encrpytion key. + + :param secret_url: Secret is BEK. + :type secret_url: str + :param secret_vault_id: ID of the Key Vault where this Secret is stored. + :type secret_vault_id: str + :param secret_data: BEK data. + :type secret_data: str + """ + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'secret_vault_id': {'key': 'secretVaultId', 'type': 'str'}, + 'secret_data': {'key': 'secretData', 'type': 'str'}, + } + + def __init__(self, *, secret_url: str=None, secret_vault_id: str=None, secret_data: str=None, **kwargs) -> None: + super(BEKDetails, self).__init__(**kwargs) + self.secret_url = secret_url + self.secret_vault_id = secret_vault_id + self.secret_data = secret_data diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engine_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engine_query_object.py index c765c043c74f..fce28e4791b0 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engine_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engine_query_object.py @@ -23,5 +23,6 @@ class BMSBackupEngineQueryObject(Model): 'expand': {'key': 'expand', 'type': 'str'}, } - def __init__(self, expand=None): - self.expand = expand + def __init__(self, **kwargs): + super(BMSBackupEngineQueryObject, self).__init__(**kwargs) + self.expand = kwargs.get('expand', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engine_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engine_query_object_py3.py new file mode 100644 index 000000000000..03b20834b6e9 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engine_query_object_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BMSBackupEngineQueryObject(Model): + """Query parameters to fetch list of backup engines. + + :param expand: attribute to add extended info + :type expand: str + """ + + _attribute_map = { + 'expand': {'key': 'expand', 'type': 'str'}, + } + + def __init__(self, *, expand: str=None, **kwargs) -> None: + super(BMSBackupEngineQueryObject, self).__init__(**kwargs) + self.expand = expand diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engines_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engines_query_object.py index 7d92b9d8bfe4..ce54a15579d5 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engines_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engines_query_object.py @@ -17,9 +17,10 @@ class BMSBackupEnginesQueryObject(Model): :param backup_management_type: Backup management type for the backup engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param friendly_name: Friendly name of the backup engine. :type friendly_name: str :param expand: Attribute to add extended info. @@ -32,7 +33,8 @@ class BMSBackupEnginesQueryObject(Model): 'expand': {'key': 'expand', 'type': 'str'}, } - def __init__(self, backup_management_type=None, friendly_name=None, expand=None): - self.backup_management_type = backup_management_type - self.friendly_name = friendly_name - self.expand = expand + def __init__(self, **kwargs): + super(BMSBackupEnginesQueryObject, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.expand = kwargs.get('expand', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engines_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engines_query_object_py3.py new file mode 100644 index 000000000000..427b3a8d2861 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engines_query_object_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BMSBackupEnginesQueryObject(Model): + """Query parameters to fetch list of backup engines. + + :param backup_management_type: Backup management type for the backup + engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param friendly_name: Friendly name of the backup engine. + :type friendly_name: str + :param expand: Attribute to add extended info. + :type expand: str + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'expand': {'key': 'expand', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type=None, friendly_name: str=None, expand: str=None, **kwargs) -> None: + super(BMSBackupEnginesQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.friendly_name = friendly_name + self.expand = expand diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_summaries_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_summaries_query_object.py index f3241255ae0d..9d953bf5098f 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_summaries_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_summaries_query_object.py @@ -18,13 +18,13 @@ class BMSBackupSummariesQueryObject(Model): :param type: Backup management type for this container. Possible values include: 'Invalid', 'BackupProtectedItemCountSummary', 'BackupProtectionContainerCountSummary' - :type type: str or :class:`Type - ` + :type type: str or ~azure.mgmt.recoveryservicesbackup.models.Type """ _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, type=None): - self.type = type + def __init__(self, **kwargs): + super(BMSBackupSummariesQueryObject, self).__init__(**kwargs) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_summaries_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_summaries_query_object_py3.py new file mode 100644 index 000000000000..78ba8dfab7f5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_summaries_query_object_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BMSBackupSummariesQueryObject(Model): + """Query parameters to fetch backup summaries. + + :param type: Backup management type for this container. Possible values + include: 'Invalid', 'BackupProtectedItemCountSummary', + 'BackupProtectionContainerCountSummary' + :type type: str or ~azure.mgmt.recoveryservicesbackup.models.Type + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(BMSBackupSummariesQueryObject, self).__init__(**kwargs) + self.type = type diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_container_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_container_query_object.py index 5e8ce41d3d9e..60fc16110e72 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_container_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_container_query_object.py @@ -15,19 +15,26 @@ class BMSContainerQueryObject(Model): """The query filters that can be used with the list containers API. - :param backup_management_type: Backup management type for this container. - Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Required. Backup management type for this + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param container_type: Type of container for filter. Possible values include: 'Invalid', 'Unknown', 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', 'AzureBackupServerContainer', - 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter' - :type container_type: str or :class:`ContainerType - ` + 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter', + 'VMAppContainer', 'SQLAGWorkLoadContainer', 'StorageContainer', + 'GenericContainer' + :type container_type: str or + ~azure.mgmt.recoveryservicesbackup.models.ContainerType :param backup_engine_name: Backup engine name :type backup_engine_name: str + :param fabric_name: Fabric name for filter + :type fabric_name: str :param status: Status of registration of this container with the Recovery Services Vault. :type status: str @@ -43,13 +50,16 @@ class BMSContainerQueryObject(Model): 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, 'status': {'key': 'status', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, } - def __init__(self, backup_management_type, container_type=None, backup_engine_name=None, status=None, friendly_name=None): - self.backup_management_type = backup_management_type - self.container_type = container_type - self.backup_engine_name = backup_engine_name - self.status = status - self.friendly_name = friendly_name + def __init__(self, **kwargs): + super(BMSContainerQueryObject, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.container_type = kwargs.get('container_type', None) + self.backup_engine_name = kwargs.get('backup_engine_name', None) + self.fabric_name = kwargs.get('fabric_name', None) + self.status = kwargs.get('status', None) + self.friendly_name = kwargs.get('friendly_name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_container_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_container_query_object_py3.py new file mode 100644 index 000000000000..f941a05d0469 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_container_query_object_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BMSContainerQueryObject(Model): + """The query filters that can be used with the list containers API. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Required. Backup management type for this + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param container_type: Type of container for filter. Possible values + include: 'Invalid', 'Unknown', 'IaasVMContainer', + 'IaasVMServiceContainer', 'DPMContainer', 'AzureBackupServerContainer', + 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter', + 'VMAppContainer', 'SQLAGWorkLoadContainer', 'StorageContainer', + 'GenericContainer' + :type container_type: str or + ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :param backup_engine_name: Backup engine name + :type backup_engine_name: str + :param fabric_name: Fabric name for filter + :type fabric_name: str + :param status: Status of registration of this container with the Recovery + Services Vault. + :type status: str + :param friendly_name: Friendly name of this container. + :type friendly_name: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type, container_type=None, backup_engine_name: str=None, fabric_name: str=None, status: str=None, friendly_name: str=None, **kwargs) -> None: + super(BMSContainerQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.container_type = container_type + self.backup_engine_name = backup_engine_name + self.fabric_name = fabric_name + self.status = status + self.friendly_name = friendly_name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_refresh_containers_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_refresh_containers_query_object.py new file mode 100644 index 000000000000..e781671827fe --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_refresh_containers_query_object.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BMSRefreshContainersQueryObject(Model): + """The query filters that can be used with the list containers API. + + :param backup_management_type: Backup management type for this container. + Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BMSRefreshContainersQueryObject, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_refresh_containers_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_refresh_containers_query_object_py3.py new file mode 100644 index 000000000000..250bc8b15692 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_refresh_containers_query_object_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BMSRefreshContainersQueryObject(Model): + """The query filters that can be used with the list containers API. + + :param backup_management_type: Backup management type for this container. + Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type=None, **kwargs) -> None: + super(BMSRefreshContainersQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_type diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_workload_item_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_workload_item_query_object.py new file mode 100644 index 000000000000..b91b23fe7059 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_workload_item_query_object.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BMSWorkloadItemQueryObject(Model): + """Filters to list items that can be backed up. + + :param backup_management_type: Backup management type. Possible values + include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', + 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_item_type: Workload Item type. Possible values include: + 'Invalid', 'SQLInstance', 'SQLDataBase' + :type workload_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType + :param workload_type: Workload type. Possible values include: 'Invalid', + 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', + 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', + 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :param protection_status: Backup status query parameter. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BMSWorkloadItemQueryObject, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.workload_item_type = kwargs.get('workload_item_type', None) + self.workload_type = kwargs.get('workload_type', None) + self.protection_status = kwargs.get('protection_status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_workload_item_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_workload_item_query_object_py3.py new file mode 100644 index 000000000000..4e9799049f70 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_workload_item_query_object_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BMSWorkloadItemQueryObject(Model): + """Filters to list items that can be backed up. + + :param backup_management_type: Backup management type. Possible values + include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', + 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_item_type: Workload Item type. Possible values include: + 'Invalid', 'SQLInstance', 'SQLDataBase' + :type workload_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType + :param workload_type: Workload type. Possible values include: 'Invalid', + 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', + 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', + 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :param protection_status: Backup status query parameter. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type=None, workload_item_type=None, workload_type=None, protection_status=None, **kwargs) -> None: + super(BMSWorkloadItemQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.workload_item_type = workload_item_type + self.workload_type = workload_type + self.protection_status = protection_status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmspo_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmspo_query_object.py index 3ea23b587105..bfe4d1466505 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmspo_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmspo_query_object.py @@ -17,9 +17,18 @@ class BMSPOQueryObject(Model): :param backup_management_type: Backup management type. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', - 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Workload type. Possible values include: 'Invalid', + 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', + 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', + 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :param container_name: Full name of the container whose Protectable + Objects should be returned. + :type container_name: str :param status: Backup status query parameter. :type status: str :param friendly_name: Friendly name. @@ -28,11 +37,16 @@ class BMSPOQueryObject(Model): _attribute_map = { 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, 'status': {'key': 'status', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, } - def __init__(self, backup_management_type=None, status=None, friendly_name=None): - self.backup_management_type = backup_management_type - self.status = status - self.friendly_name = friendly_name + def __init__(self, **kwargs): + super(BMSPOQueryObject, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.workload_type = kwargs.get('workload_type', None) + self.container_name = kwargs.get('container_name', None) + self.status = kwargs.get('status', None) + self.friendly_name = kwargs.get('friendly_name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmspo_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmspo_query_object_py3.py new file mode 100644 index 000000000000..9cdfc290eec3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmspo_query_object_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BMSPOQueryObject(Model): + """Filters to list items that can be backed up. + + :param backup_management_type: Backup management type. Possible values + include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', + 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Workload type. Possible values include: 'Invalid', + 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', + 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', + 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :param container_name: Full name of the container whose Protectable + Objects should be returned. + :type container_name: str + :param status: Backup status query parameter. + :type status: str + :param friendly_name: Friendly name. + :type friendly_name: str + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, status: str=None, friendly_name: str=None, **kwargs) -> None: + super(BMSPOQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.workload_type = workload_type + self.container_name = container_name + self.status = status + self.friendly_name = friendly_name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmsrp_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmsrp_query_object.py index c061a90e0956..7230da406afd 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmsrp_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmsrp_query_object.py @@ -19,13 +19,26 @@ class BMSRPQueryObject(Model): :type start_date: datetime :param end_date: Backup copies created before this time. :type end_date: datetime + :param restore_point_query_type: RestorePoint type. Possible values + include: 'Invalid', 'Full', 'Log', 'Differential', 'FullAndDifferential', + 'All' + :type restore_point_query_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointQueryType + :param extended_info: In Get Recovery Point, it tells whether extended + information about recovery point is asked. + :type extended_info: bool """ _attribute_map = { 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'restore_point_query_type': {'key': 'restorePointQueryType', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'bool'}, } - def __init__(self, start_date=None, end_date=None): - self.start_date = start_date - self.end_date = end_date + def __init__(self, **kwargs): + super(BMSRPQueryObject, self).__init__(**kwargs) + self.start_date = kwargs.get('start_date', None) + self.end_date = kwargs.get('end_date', None) + self.restore_point_query_type = kwargs.get('restore_point_query_type', None) + self.extended_info = kwargs.get('extended_info', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmsrp_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmsrp_query_object_py3.py new file mode 100644 index 000000000000..91fe873bcaa1 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmsrp_query_object_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BMSRPQueryObject(Model): + """Filters to list backup copies. + + :param start_date: Backup copies created after this time. + :type start_date: datetime + :param end_date: Backup copies created before this time. + :type end_date: datetime + :param restore_point_query_type: RestorePoint type. Possible values + include: 'Invalid', 'Full', 'Log', 'Differential', 'FullAndDifferential', + 'All' + :type restore_point_query_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointQueryType + :param extended_info: In Get Recovery Point, it tells whether extended + information about recovery point is asked. + :type extended_info: bool + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'restore_point_query_type': {'key': 'restorePointQueryType', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'bool'}, + } + + def __init__(self, *, start_date=None, end_date=None, restore_point_query_type=None, extended_info: bool=None, **kwargs) -> None: + super(BMSRPQueryObject, self).__init__(**kwargs) + self.start_date = start_date + self.end_date = end_date + self.restore_point_query_type = restore_point_query_type + self.extended_info = extended_info diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_display.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_display.py index dbc271de1f39..d9557c7b3122 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_display.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_display.py @@ -17,23 +17,25 @@ class ClientDiscoveryDisplay(Model): :param provider: Name of the provider for display purposes :type provider: str - :param resource: Name of the resource type for display purposes + :param resource: ResourceType for which this Operation can be performed. :type resource: str - :param operation: Name of the operation for display purposes + :param operation: Operations Name itself. :type operation: str - :param description: Description of the operation for display purposes + :param description: Description of the operation having details of what + operation is about. :type description: str """ _attribute_map = { - 'provider': {'key': 'Provider', 'type': 'str'}, - 'resource': {'key': 'Resource', 'type': 'str'}, - 'operation': {'key': 'Operation', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, resource=None, operation=None, description=None): - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description + def __init__(self, **kwargs): + super(ClientDiscoveryDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_display_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_display_py3.py new file mode 100644 index 000000000000..61ce520a52bd --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_display_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClientDiscoveryDisplay(Model): + """Localized display information of an operation. + + :param provider: Name of the provider for display purposes + :type provider: str + :param resource: ResourceType for which this Operation can be performed. + :type resource: str + :param operation: Operations Name itself. + :type operation: str + :param description: Description of the operation having details of what + operation is about. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(ClientDiscoveryDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_log_specification.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_log_specification.py index 7180ca7b37d9..139a249e82d2 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_log_specification.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_log_specification.py @@ -15,11 +15,11 @@ class ClientDiscoveryForLogSpecification(Model): """Class to represent shoebox log specification in json client discovery. - :param name: Name + :param name: Name for shoebox log specification. :type name: str :param display_name: Localized display name :type display_name: str - :param blob_duration: blob duration + :param blob_duration: blob duration of shoebox log specification :type blob_duration: str """ @@ -29,7 +29,8 @@ class ClientDiscoveryForLogSpecification(Model): 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, } - def __init__(self, name=None, display_name=None, blob_duration=None): - self.name = name - self.display_name = display_name - self.blob_duration = blob_duration + def __init__(self, **kwargs): + super(ClientDiscoveryForLogSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.blob_duration = kwargs.get('blob_duration', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_log_specification_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_log_specification_py3.py new file mode 100644 index 000000000000..10c285303734 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_log_specification_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClientDiscoveryForLogSpecification(Model): + """Class to represent shoebox log specification in json client discovery. + + :param name: Name for shoebox log specification. + :type name: str + :param display_name: Localized display name + :type display_name: str + :param blob_duration: blob duration of shoebox log specification + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, blob_duration: str=None, **kwargs) -> None: + super(ClientDiscoveryForLogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_properties.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_properties.py index 1899787fd6cb..04533c66702e 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_properties.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_properties.py @@ -17,13 +17,13 @@ class ClientDiscoveryForProperties(Model): :param service_specification: Operation properties. :type service_specification: - :class:`ClientDiscoveryForServiceSpecification - ` + ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForServiceSpecification """ _attribute_map = { 'service_specification': {'key': 'serviceSpecification', 'type': 'ClientDiscoveryForServiceSpecification'}, } - def __init__(self, service_specification=None): - self.service_specification = service_specification + def __init__(self, **kwargs): + super(ClientDiscoveryForProperties, self).__init__(**kwargs) + self.service_specification = kwargs.get('service_specification', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_properties_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_properties_py3.py new file mode 100644 index 000000000000..6d38e3b28eb0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_properties_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClientDiscoveryForProperties(Model): + """Class to represent shoebox properties in json client discovery. + + :param service_specification: Operation properties. + :type service_specification: + ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ClientDiscoveryForServiceSpecification'}, + } + + def __init__(self, *, service_specification=None, **kwargs) -> None: + super(ClientDiscoveryForProperties, self).__init__(**kwargs) + self.service_specification = service_specification diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_service_specification.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_service_specification.py index ff9a41aa81e7..f4cdef1ebb56 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_service_specification.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_service_specification.py @@ -16,14 +16,14 @@ class ClientDiscoveryForServiceSpecification(Model): """Class to represent shoebox service specification in json client discovery. :param log_specifications: List of log specifications of this operation. - :type log_specifications: list of - :class:`ClientDiscoveryForLogSpecification - ` + :type log_specifications: + list[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForLogSpecification] """ _attribute_map = { 'log_specifications': {'key': 'logSpecifications', 'type': '[ClientDiscoveryForLogSpecification]'}, } - def __init__(self, log_specifications=None): - self.log_specifications = log_specifications + def __init__(self, **kwargs): + super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_service_specification_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_service_specification_py3.py new file mode 100644 index 000000000000..7e53d894a468 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_service_specification_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClientDiscoveryForServiceSpecification(Model): + """Class to represent shoebox service specification in json client discovery. + + :param log_specifications: List of log specifications of this operation. + :type log_specifications: + list[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForLogSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[ClientDiscoveryForLogSpecification]'}, + } + + def __init__(self, *, log_specifications=None, **kwargs) -> None: + super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api.py index f54c40e3f02d..0f3256de9959 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api.py @@ -15,29 +15,30 @@ class ClientDiscoveryValueForSingleApi(Model): """Available operation details. - :param name: Name + :param name: Name of the Operation. :type name: str :param display: Contains the localized display information for this particular operation - :type display: :class:`ClientDiscoveryDisplay - ` + :type display: + ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryDisplay :param origin: The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX :type origin: str - :param properties: Properties - :type properties: :class:`ClientDiscoveryForProperties - ` + :param properties: ShoeBox properties for the given operation. + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForProperties """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'display': {'key': 'Display', 'type': 'ClientDiscoveryDisplay'}, - 'origin': {'key': 'Origin', 'type': 'str'}, - 'properties': {'key': 'Properties', 'type': 'ClientDiscoveryForProperties'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ClientDiscoveryDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClientDiscoveryForProperties'}, } - def __init__(self, name=None, display=None, origin=None, properties=None): - self.name = name - self.display = display - self.origin = origin - self.properties = properties + def __init__(self, **kwargs): + super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api_paged.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api_paged.py index 06f86acadd6a..bc7b09691a43 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api_paged.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api_paged.py @@ -18,8 +18,8 @@ class ClientDiscoveryValueForSingleApiPaged(Paged): """ _attribute_map = { - 'next_link': {'key': 'NextLink', 'type': 'str'}, - 'current_page': {'key': 'Value', 'type': '[ClientDiscoveryValueForSingleApi]'} + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ClientDiscoveryValueForSingleApi]'} } def __init__(self, *args, **kwargs): diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api_py3.py new file mode 100644 index 000000000000..9fd16e7785e3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClientDiscoveryValueForSingleApi(Model): + """Available operation details. + + :param name: Name of the Operation. + :type name: str + :param display: Contains the localized display information for this + particular operation + :type display: + ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryDisplay + :param origin: The intended executor of the operation;governs the display + of the operation in the RBAC UX and the audit logs UX + :type origin: str + :param properties: ShoeBox properties for the given operation. + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ClientDiscoveryDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClientDiscoveryForProperties'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_script_for_connect.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_script_for_connect.py index 2cc3977710e3..a4bb71aa83f7 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_script_for_connect.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_script_for_connect.py @@ -41,9 +41,10 @@ class ClientScriptForConnect(Model): 'script_name_suffix': {'key': 'scriptNameSuffix', 'type': 'str'}, } - def __init__(self, script_content=None, script_extension=None, os_type=None, url=None, script_name_suffix=None): - self.script_content = script_content - self.script_extension = script_extension - self.os_type = os_type - self.url = url - self.script_name_suffix = script_name_suffix + def __init__(self, **kwargs): + super(ClientScriptForConnect, self).__init__(**kwargs) + self.script_content = kwargs.get('script_content', None) + self.script_extension = kwargs.get('script_extension', None) + self.os_type = kwargs.get('os_type', None) + self.url = kwargs.get('url', None) + self.script_name_suffix = kwargs.get('script_name_suffix', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_script_for_connect_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_script_for_connect_py3.py new file mode 100644 index 000000000000..c43e2efc94ae --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_script_for_connect_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClientScriptForConnect(Model): + """Client script details for file / folder restore. + + :param script_content: File content of the client script for file / folder + restore. + :type script_content: str + :param script_extension: File extension of the client script for file / + folder restore - .ps1 , .sh , etc. + :type script_extension: str + :param os_type: OS type - Windows, Linux etc. for which this file / folder + restore client script works. + :type os_type: str + :param url: URL of Executable from where to source the content. If this is + not null then ScriptContent should not be used + :type url: str + :param script_name_suffix: Mandator suffix that should be added to the + name of script that is given for download to user. + If its null or empty then , ignore it. + :type script_name_suffix: str + """ + + _attribute_map = { + 'script_content': {'key': 'scriptContent', 'type': 'str'}, + 'script_extension': {'key': 'scriptExtension', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'script_name_suffix': {'key': 'scriptNameSuffix', 'type': 'str'}, + } + + def __init__(self, *, script_content: str=None, script_extension: str=None, os_type: str=None, url: str=None, script_name_suffix: str=None, **kwargs) -> None: + super(ClientScriptForConnect, self).__init__(**kwargs) + self.script_content = script_content + self.script_extension = script_extension + self.os_type = os_type + self.url = url + self.script_name_suffix = script_name_suffix diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/container_identity_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/container_identity_info.py new file mode 100644 index 000000000000..fedf3666b33c --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/container_identity_info.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerIdentityInfo(Model): + """Container identity information. + + :param unique_name: Unique name of the container + :type unique_name: str + :param aad_tenant_id: Protection container identity - AAD Tenant + :type aad_tenant_id: str + :param service_principal_client_id: Protection container identity - AAD + Service Principal + :type service_principal_client_id: str + :param audience: Protection container identity - Audience + :type audience: str + """ + + _attribute_map = { + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, + 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerIdentityInfo, self).__init__(**kwargs) + self.unique_name = kwargs.get('unique_name', None) + self.aad_tenant_id = kwargs.get('aad_tenant_id', None) + self.service_principal_client_id = kwargs.get('service_principal_client_id', None) + self.audience = kwargs.get('audience', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/container_identity_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/container_identity_info_py3.py new file mode 100644 index 000000000000..e94bc41c6905 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/container_identity_info_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerIdentityInfo(Model): + """Container identity information. + + :param unique_name: Unique name of the container + :type unique_name: str + :param aad_tenant_id: Protection container identity - AAD Tenant + :type aad_tenant_id: str + :param service_principal_client_id: Protection container identity - AAD + Service Principal + :type service_principal_client_id: str + :param audience: Protection container identity - Audience + :type audience: str + """ + + _attribute_map = { + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, + 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, + } + + def __init__(self, *, unique_name: str=None, aad_tenant_id: str=None, service_principal_client_id: str=None, audience: str=None, **kwargs) -> None: + super(ContainerIdentityInfo, self).__init__(**kwargs) + self.unique_name = unique_name + self.aad_tenant_id = aad_tenant_id + self.service_principal_client_id = service_principal_client_id + self.audience = audience diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_format.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_format.py index 4f851fc1c95f..652748549107 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_format.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_format.py @@ -16,13 +16,14 @@ class DailyRetentionFormat(Model): """Daily retention format. :param days_of_the_month: List of days of the month. - :type days_of_the_month: list of :class:`Day - ` + :type days_of_the_month: + list[~azure.mgmt.recoveryservicesbackup.models.Day] """ _attribute_map = { 'days_of_the_month': {'key': 'daysOfTheMonth', 'type': '[Day]'}, } - def __init__(self, days_of_the_month=None): - self.days_of_the_month = days_of_the_month + def __init__(self, **kwargs): + super(DailyRetentionFormat, self).__init__(**kwargs) + self.days_of_the_month = kwargs.get('days_of_the_month', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_format_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_format_py3.py new file mode 100644 index 000000000000..35e4fff27b05 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_format_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DailyRetentionFormat(Model): + """Daily retention format. + + :param days_of_the_month: List of days of the month. + :type days_of_the_month: + list[~azure.mgmt.recoveryservicesbackup.models.Day] + """ + + _attribute_map = { + 'days_of_the_month': {'key': 'daysOfTheMonth', 'type': '[Day]'}, + } + + def __init__(self, *, days_of_the_month=None, **kwargs) -> None: + super(DailyRetentionFormat, self).__init__(**kwargs) + self.days_of_the_month = days_of_the_month diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_schedule.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_schedule.py index 337da1689ccc..c12b5c466e45 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_schedule.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_schedule.py @@ -16,10 +16,10 @@ class DailyRetentionSchedule(Model): """Daily retention schedule. :param retention_times: Retention times of retention policy. - :type retention_times: list of datetime + :type retention_times: list[datetime] :param retention_duration: Retention duration of retention Policy. - :type retention_duration: :class:`RetentionDuration - ` + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _attribute_map = { @@ -27,6 +27,7 @@ class DailyRetentionSchedule(Model): 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, } - def __init__(self, retention_times=None, retention_duration=None): - self.retention_times = retention_times - self.retention_duration = retention_duration + def __init__(self, **kwargs): + super(DailyRetentionSchedule, self).__init__(**kwargs) + self.retention_times = kwargs.get('retention_times', None) + self.retention_duration = kwargs.get('retention_duration', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_schedule_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_schedule_py3.py new file mode 100644 index 000000000000..ff5842e35192 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_schedule_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DailyRetentionSchedule(Model): + """Daily retention schedule. + + :param retention_times: Retention times of retention policy. + :type retention_times: list[datetime] + :param retention_duration: Retention duration of retention Policy. + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ + + _attribute_map = { + 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + def __init__(self, *, retention_times=None, retention_duration=None, **kwargs) -> None: + super(DailyRetentionSchedule, self).__init__(**kwargs) + self.retention_times = retention_times + self.retention_duration = retention_duration diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/day.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/day.py index 55c736f2d102..8a7c1d5f576a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/day.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/day.py @@ -26,6 +26,7 @@ class Day(Model): 'is_last': {'key': 'isLast', 'type': 'bool'}, } - def __init__(self, date_property=None, is_last=None): - self.date_property = date_property - self.is_last = is_last + def __init__(self, **kwargs): + super(Day, self).__init__(**kwargs) + self.date_property = kwargs.get('date_property', None) + self.is_last = kwargs.get('is_last', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/day_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/day_py3.py new file mode 100644 index 000000000000..682ed8c4c949 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/day_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Day(Model): + """Day of the week. + + :param date_property: Date of the month + :type date_property: int + :param is_last: Whether Date is last date of month + :type is_last: bool + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'int'}, + 'is_last': {'key': 'isLast', 'type': 'bool'}, + } + + def __init__(self, *, date_property: int=None, is_last: bool=None, **kwargs) -> None: + super(Day, self).__init__(**kwargs) + self.date_property = date_property + self.is_last = is_last diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/distributed_nodes_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/distributed_nodes_info.py new file mode 100644 index 000000000000..1d4704723e57 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/distributed_nodes_info.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DistributedNodesInfo(Model): + """This is used to represent the various nodes of the distributed container. + + :param node_name: Name of the node under a distributed container. + :type node_name: str + :param status: Status of this Node. + Failed | Succeeded + :type status: str + :param error_detail: Error Details if the Status is non-success. + :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + """ + + _attribute_map = { + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + } + + def __init__(self, **kwargs): + super(DistributedNodesInfo, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.status = kwargs.get('status', None) + self.error_detail = kwargs.get('error_detail', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/distributed_nodes_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/distributed_nodes_info_py3.py new file mode 100644 index 000000000000..7491ca827c74 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/distributed_nodes_info_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DistributedNodesInfo(Model): + """This is used to represent the various nodes of the distributed container. + + :param node_name: Name of the node under a distributed container. + :type node_name: str + :param status: Status of this Node. + Failed | Succeeded + :type status: str + :param error_detail: Error Details if the Status is non-success. + :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + """ + + _attribute_map = { + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + } + + def __init__(self, *, node_name: str=None, status: str=None, error_detail=None, **kwargs) -> None: + super(DistributedNodesInfo, self).__init__(**kwargs) + self.node_name = node_name + self.status = status + self.error_detail = error_detail diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_backup_engine.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_backup_engine.py index 8f48c94ab6cb..df5c918d22fd 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_backup_engine.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_backup_engine.py @@ -15,13 +15,16 @@ class DpmBackupEngine(BackupEngineBase): """Data Protection Manager (DPM) specific backup engine. + All required parameters must be populated in order to send to Azure. + :param friendly_name: Friendly name of the backup engine. :type friendly_name: str :param backup_management_type: Type of backup management for the backup engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Registration status of the backup engine with the Recovery Services Vault. :type registration_status: str @@ -46,9 +49,9 @@ class DpmBackupEngine(BackupEngineBase): available :type is_dpm_upgrade_available: bool :param extended_info: Extended info of the backupengine - :type extended_info: :class:`BackupEngineExtendedInfo - ` - :param backup_engine_type: Polymorphic Discriminator + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :param backup_engine_type: Required. Constant filled by server. :type backup_engine_type: str """ @@ -56,6 +59,22 @@ class DpmBackupEngine(BackupEngineBase): 'backup_engine_type': {'required': True}, } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, backup_engine_state=None, health_status=None, can_re_register=None, backup_engine_id=None, dpm_version=None, azure_backup_agent_version=None, is_azure_backup_agent_upgrade_available=None, is_dpm_upgrade_available=None, extended_info=None): - super(DpmBackupEngine, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, backup_engine_state=backup_engine_state, health_status=health_status, can_re_register=can_re_register, backup_engine_id=backup_engine_id, dpm_version=dpm_version, azure_backup_agent_version=azure_backup_agent_version, is_azure_backup_agent_upgrade_available=is_azure_backup_agent_upgrade_available, is_dpm_upgrade_available=is_dpm_upgrade_available, extended_info=extended_info) + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, + 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, + 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, + 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, + 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DpmBackupEngine, self).__init__(**kwargs) self.backup_engine_type = 'DpmBackupEngine' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_backup_engine_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_backup_engine_py3.py new file mode 100644 index 000000000000..421b22f5a77d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_backup_engine_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_engine_base_py3 import BackupEngineBase + + +class DpmBackupEngine(BackupEngineBase): + """Data Protection Manager (DPM) specific backup engine. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the backup engine. + :type friendly_name: str + :param backup_management_type: Type of backup management for the backup + engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Registration status of the backup engine with + the Recovery Services Vault. + :type registration_status: str + :param backup_engine_state: Status of the backup engine with the Recovery + Services Vault. = {Active/Deleting/DeleteFailed} + :type backup_engine_state: str + :param health_status: Backup status of the backup engine. + :type health_status: str + :param can_re_register: Flag indicating if the backup engine be + registered, once already registered. + :type can_re_register: bool + :param backup_engine_id: ID of the backup engine. + :type backup_engine_id: str + :param dpm_version: Backup engine version + :type dpm_version: str + :param azure_backup_agent_version: Backup agent version + :type azure_backup_agent_version: str + :param is_azure_backup_agent_upgrade_available: To check if backup agent + upgrade available + :type is_azure_backup_agent_upgrade_available: bool + :param is_dpm_upgrade_available: To check if backup engine upgrade + available + :type is_dpm_upgrade_available: bool + :param extended_info: Extended info of the backupengine + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :param backup_engine_type: Required. Constant filled by server. + :type backup_engine_type: str + """ + + _validation = { + 'backup_engine_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, + 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, + 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, + 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, + 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, backup_engine_state: str=None, health_status: str=None, can_re_register: bool=None, backup_engine_id: str=None, dpm_version: str=None, azure_backup_agent_version: str=None, is_azure_backup_agent_upgrade_available: bool=None, is_dpm_upgrade_available: bool=None, extended_info=None, **kwargs) -> None: + super(DpmBackupEngine, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, backup_engine_state=backup_engine_state, health_status=health_status, can_re_register=can_re_register, backup_engine_id=backup_engine_id, dpm_version=dpm_version, azure_backup_agent_version=azure_backup_agent_version, is_azure_backup_agent_upgrade_available=is_azure_backup_agent_upgrade_available, is_dpm_upgrade_available=is_dpm_upgrade_available, extended_info=extended_info, **kwargs) + self.backup_engine_type = 'DpmBackupEngine' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container.py index 6704fc6d1e65..8afa45340990 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container.py @@ -15,33 +15,23 @@ class DpmContainer(ProtectionContainer): """DPM workload-specific protection container. - 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 friendly_name: Friendly name of the container. :type friendly_name: str :param backup_management_type: Type of backup managemenent for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Status of registration of the container with the Recovery Services Vault. :type registration_status: str :param health_status: Status of health of the container. :type health_status: str - :ivar container_type: Type of the container. The value of this property - for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic - Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is - AzureSqlContainer. Possible values include: 'Invalid', 'Unknown', - 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', - 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - 'AzureSqlContainer', 'Windows', 'VCenter' - :vartype container_type: str or :class:`ContainerType - ` - :param protectable_object_type: Polymorphic Discriminator - :type protectable_object_type: str + :param container_type: Required. Constant filled by server. + :type container_type: str :param can_re_register: Specifies whether the container is re-registrable. :type can_re_register: bool :param container_id: ID of container. @@ -51,19 +41,18 @@ class DpmContainer(ProtectionContainer): :param dpm_agent_version: Backup engine Agent version :type dpm_agent_version: str :param dpm_servers: List of BackupEngines protecting the container - :type dpm_servers: list of str + :type dpm_servers: list[str] :param upgrade_available: To check if upgrade available :type upgrade_available: bool :param protection_status: Protection status of the container. :type protection_status: str :param extended_info: Extended Info of the container. - :type extended_info: :class:`DPMContainerExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo """ _validation = { - 'container_type': {'readonly': True}, - 'protectable_object_type': {'required': True}, + 'container_type': {'required': True}, } _attribute_map = { @@ -72,25 +61,24 @@ class DpmContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, - 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, 'container_id': {'key': 'containerId', 'type': 'str'}, 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, 'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'}, - 'dpm_servers': {'key': 'DPMServers', 'type': '[str]'}, - 'upgrade_available': {'key': 'UpgradeAvailable', 'type': 'bool'}, + 'dpm_servers': {'key': 'dpmServers', 'type': '[str]'}, + 'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'}, } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, health_status=None, can_re_register=None, container_id=None, protected_item_count=None, dpm_agent_version=None, dpm_servers=None, upgrade_available=None, protection_status=None, extended_info=None): - super(DpmContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status) - self.can_re_register = can_re_register - self.container_id = container_id - self.protected_item_count = protected_item_count - self.dpm_agent_version = dpm_agent_version - self.dpm_servers = dpm_servers - self.upgrade_available = upgrade_available - self.protection_status = protection_status - self.extended_info = extended_info - self.protectable_object_type = 'DPMContainer' + def __init__(self, **kwargs): + super(DpmContainer, self).__init__(**kwargs) + self.can_re_register = kwargs.get('can_re_register', None) + self.container_id = kwargs.get('container_id', None) + self.protected_item_count = kwargs.get('protected_item_count', None) + self.dpm_agent_version = kwargs.get('dpm_agent_version', None) + self.dpm_servers = kwargs.get('dpm_servers', None) + self.upgrade_available = kwargs.get('upgrade_available', None) + self.protection_status = kwargs.get('protection_status', None) + self.extended_info = kwargs.get('extended_info', None) + self.container_type = 'DPMContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_extended_info.py index 07e66a823f12..67bffbfbb39f 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_extended_info.py @@ -23,5 +23,6 @@ class DPMContainerExtendedInfo(Model): 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, } - def __init__(self, last_refreshed_at=None): - self.last_refreshed_at = last_refreshed_at + def __init__(self, **kwargs): + super(DPMContainerExtendedInfo, self).__init__(**kwargs) + self.last_refreshed_at = kwargs.get('last_refreshed_at', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_extended_info_py3.py new file mode 100644 index 000000000000..4af64b9cbc4b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_extended_info_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DPMContainerExtendedInfo(Model): + """Additional information of the DPMContainer. + + :param last_refreshed_at: Last refresh time of the DPMContainer. + :type last_refreshed_at: datetime + """ + + _attribute_map = { + 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, last_refreshed_at=None, **kwargs) -> None: + super(DPMContainerExtendedInfo, self).__init__(**kwargs) + self.last_refreshed_at = last_refreshed_at diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_py3.py new file mode 100644 index 000000000000..e22cb7d8a8f9 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_py3.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_container_py3 import ProtectionContainer + + +class DpmContainer(ProtectionContainer): + """DPM workload-specific protection container. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param can_re_register: Specifies whether the container is re-registrable. + :type can_re_register: bool + :param container_id: ID of container. + :type container_id: str + :param protected_item_count: Number of protected items in the BackupEngine + :type protected_item_count: long + :param dpm_agent_version: Backup engine Agent version + :type dpm_agent_version: str + :param dpm_servers: List of BackupEngines protecting the container + :type dpm_servers: list[str] + :param upgrade_available: To check if upgrade available + :type upgrade_available: bool + :param protection_status: Protection status of the container. + :type protection_status: str + :param extended_info: Extended Info of the container. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, + 'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'}, + 'dpm_servers': {'key': 'dpmServers', 'type': '[str]'}, + 'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, can_re_register: bool=None, container_id: str=None, protected_item_count: int=None, dpm_agent_version: str=None, dpm_servers=None, upgrade_available: bool=None, protection_status: str=None, extended_info=None, **kwargs) -> None: + super(DpmContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + self.can_re_register = can_re_register + self.container_id = container_id + self.protected_item_count = protected_item_count + self.dpm_agent_version = dpm_agent_version + self.dpm_servers = dpm_servers + self.upgrade_available = upgrade_available + self.protection_status = protection_status + self.extended_info = extended_info + self.container_type = 'DPMContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_error_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_error_info.py index 35d1c704762f..5d932919b0b4 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_error_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_error_info.py @@ -19,7 +19,7 @@ class DpmErrorInfo(Model): :type error_string: str :param recommendations: List of localized recommendations for above error code. - :type recommendations: list of str + :type recommendations: list[str] """ _attribute_map = { @@ -27,6 +27,7 @@ class DpmErrorInfo(Model): 'recommendations': {'key': 'recommendations', 'type': '[str]'}, } - def __init__(self, error_string=None, recommendations=None): - self.error_string = error_string - self.recommendations = recommendations + def __init__(self, **kwargs): + super(DpmErrorInfo, self).__init__(**kwargs) + self.error_string = kwargs.get('error_string', None) + self.recommendations = kwargs.get('recommendations', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_error_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_error_info_py3.py new file mode 100644 index 000000000000..e4806c947e22 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_error_info_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DpmErrorInfo(Model): + """DPM workload-specific error information. + + :param error_string: Localized error string. + :type error_string: str + :param recommendations: List of localized recommendations for above error + code. + :type recommendations: list[str] + """ + + _attribute_map = { + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, *, error_string: str=None, recommendations=None, **kwargs) -> None: + super(DpmErrorInfo, self).__init__(**kwargs) + self.error_string = error_string + self.recommendations = recommendations diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job.py index 9f4fb0794329..cbd00e99a4ce 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job.py @@ -15,14 +15,17 @@ class DpmJob(Job): """DPM workload-specifc job object. + All required parameters must be populated in order to send to Azure. + :param entity_friendly_name: Friendly name of the entity on which the current job is executing. :type entity_friendly_name: str :param backup_management_type: Backup management type to execute the current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param operation: The operation name. :type operation: str :param status: Job status. @@ -33,7 +36,7 @@ class DpmJob(Job): :type end_time: datetime :param activity_id: ActivityId of job. :type activity_id: str - :param job_type: Polymorphic Discriminator + :param job_type: Required. Constant filled by server. :type job_type: str :param duration: Time elapsed for job. :type duration: timedelta @@ -49,14 +52,14 @@ class DpmJob(Job): :type workload_type: str :param actions_info: The state/actions applicable on this job like cancel/retry. - :type actions_info: list of str or :class:`JobSupportedAction - ` + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] :param error_details: The errors. - :type error_details: list of :class:`DpmErrorInfo - ` + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.DpmErrorInfo] :param extended_info: Additional information for this job. - :type extended_info: :class:`DpmJobExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DpmJobExtendedInfo """ _validation = { @@ -82,14 +85,14 @@ class DpmJob(Job): 'extended_info': {'key': 'extendedInfo', 'type': 'DpmJobExtendedInfo'}, } - def __init__(self, entity_friendly_name=None, backup_management_type=None, operation=None, status=None, start_time=None, end_time=None, activity_id=None, duration=None, dpm_server_name=None, container_name=None, container_type=None, workload_type=None, actions_info=None, error_details=None, extended_info=None): - super(DpmJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id) - self.duration = duration - self.dpm_server_name = dpm_server_name - self.container_name = container_name - self.container_type = container_type - self.workload_type = workload_type - self.actions_info = actions_info - self.error_details = error_details - self.extended_info = extended_info + def __init__(self, **kwargs): + super(DpmJob, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) + self.dpm_server_name = kwargs.get('dpm_server_name', None) + self.container_name = kwargs.get('container_name', None) + self.container_type = kwargs.get('container_type', None) + self.workload_type = kwargs.get('workload_type', None) + self.actions_info = kwargs.get('actions_info', None) + self.error_details = kwargs.get('error_details', None) + self.extended_info = kwargs.get('extended_info', None) self.job_type = 'DpmJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_extended_info.py index 11c596d89593..838e5e040ec4 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_extended_info.py @@ -16,10 +16,10 @@ class DpmJobExtendedInfo(Model): """Additional information on the DPM workload-specific job. :param tasks_list: List of tasks associated with this job. - :type tasks_list: list of :class:`DpmJobTaskDetails - ` + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.DpmJobTaskDetails] :param property_bag: The job properties. - :type property_bag: dict + :type property_bag: dict[str, str] :param dynamic_error_message: Non localized error message on job execution. :type dynamic_error_message: str @@ -31,7 +31,8 @@ class DpmJobExtendedInfo(Model): 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, } - def __init__(self, tasks_list=None, property_bag=None, dynamic_error_message=None): - self.tasks_list = tasks_list - self.property_bag = property_bag - self.dynamic_error_message = dynamic_error_message + def __init__(self, **kwargs): + super(DpmJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = kwargs.get('tasks_list', None) + self.property_bag = kwargs.get('property_bag', None) + self.dynamic_error_message = kwargs.get('dynamic_error_message', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_extended_info_py3.py new file mode 100644 index 000000000000..577a16ff7e97 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_extended_info_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DpmJobExtendedInfo(Model): + """Additional information on the DPM workload-specific job. + + :param tasks_list: List of tasks associated with this job. + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.DpmJobTaskDetails] + :param property_bag: The job properties. + :type property_bag: dict[str, str] + :param dynamic_error_message: Non localized error message on job + execution. + :type dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[DpmJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__(self, *, tasks_list=None, property_bag=None, dynamic_error_message: str=None, **kwargs) -> None: + super(DpmJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = tasks_list + self.property_bag = property_bag + self.dynamic_error_message = dynamic_error_message diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_py3.py new file mode 100644 index 000000000000..bdf9247db742 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_py3.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .job_py3 import Job + + +class DpmJob(Job): + """DPM workload-specifc job object. + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + :param duration: Time elapsed for job. + :type duration: timedelta + :param dpm_server_name: DPM server name managing the backup item or backup + job. + :type dpm_server_name: str + :param container_name: Name of cluster/server protecting current backup + item, if any. + :type container_name: str + :param container_type: Type of container. + :type container_type: str + :param workload_type: Type of backup item. + :type workload_type: str + :param actions_info: The state/actions applicable on this job like + cancel/retry. + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :param error_details: The errors. + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.DpmErrorInfo] + :param extended_info: Additional information for this job. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DpmJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'dpm_server_name': {'key': 'dpmServerName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[JobSupportedAction]'}, + 'error_details': {'key': 'errorDetails', 'type': '[DpmErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'DpmJobExtendedInfo'}, + } + + def __init__(self, *, entity_friendly_name: str=None, backup_management_type=None, operation: str=None, status: str=None, start_time=None, end_time=None, activity_id: str=None, duration=None, dpm_server_name: str=None, container_name: str=None, container_type: str=None, workload_type: str=None, actions_info=None, error_details=None, extended_info=None, **kwargs) -> None: + super(DpmJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) + self.duration = duration + self.dpm_server_name = dpm_server_name + self.container_name = container_name + self.container_type = container_type + self.workload_type = workload_type + self.actions_info = actions_info + self.error_details = error_details + self.extended_info = extended_info + self.job_type = 'DpmJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_task_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_task_details.py index 99ae0f74d0a4..66ad8b27d105 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_task_details.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_task_details.py @@ -35,9 +35,10 @@ class DpmJobTaskDetails(Model): 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, task_id=None, start_time=None, end_time=None, duration=None, status=None): - self.task_id = task_id - self.start_time = start_time - self.end_time = end_time - self.duration = duration - self.status = status + def __init__(self, **kwargs): + super(DpmJobTaskDetails, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.duration = kwargs.get('duration', None) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_task_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_task_details_py3.py new file mode 100644 index 000000000000..aa641bd67510 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_task_details_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DpmJobTaskDetails(Model): + """DPM workload-specific job task details. + + :param task_id: The task display name. + :type task_id: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param duration: Time elapsed for task. + :type duration: timedelta + :param status: The status. + :type status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, task_id: str=None, start_time=None, end_time=None, duration=None, status: str=None, **kwargs) -> None: + super(DpmJobTaskDetails, self).__init__(**kwargs) + self.task_id = task_id + self.start_time = start_time + self.end_time = end_time + self.duration = duration + self.status = status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item.py index a718e01852e5..c6ebdd4f0a1c 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item.py @@ -15,17 +15,20 @@ class DPMProtectedItem(ProtectedItem): """Additional information on Backup engine specific backup item. + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param workload_type: Type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - 'GenericDataSource' - :type workload_type: str or :class:`DataSourceType - ` + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType :param container_name: Unique name of container :type container_name: str :param source_resource_id: ARM ID of the resource to be backed up. @@ -36,7 +39,9 @@ class DPMProtectedItem(ProtectedItem): :param last_recovery_point: Timestamp when the last (latest) backup copy was created for this backup item. :type last_recovery_point: datetime - :param protected_item_type: Polymorphic Discriminator + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. :type protected_item_type: str :param friendly_name: Friendly name of the managed item :type friendly_name: str @@ -46,14 +51,14 @@ class DPMProtectedItem(ProtectedItem): :param protection_state: Protection state of the backupengine. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' - :type protection_state: str or :class:`ProtectedItemState - ` + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState :param is_scheduled_for_deferred_delete: To check if backup item is scheduled for deferred delete :type is_scheduled_for_deferred_delete: bool :param extended_info: Extended info of the backup item. - :type extended_info: :class:`DPMProtectedItemExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DPMProtectedItemExtendedInfo """ _validation = { @@ -67,6 +72,7 @@ class DPMProtectedItem(ProtectedItem): 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'policy_id': {'key': 'policyId', 'type': 'str'}, 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, @@ -75,11 +81,11 @@ class DPMProtectedItem(ProtectedItem): 'extended_info': {'key': 'extendedInfo', 'type': 'DPMProtectedItemExtendedInfo'}, } - def __init__(self, backup_management_type=None, workload_type=None, container_name=None, source_resource_id=None, policy_id=None, last_recovery_point=None, friendly_name=None, backup_engine_name=None, protection_state=None, is_scheduled_for_deferred_delete=None, extended_info=None): - super(DPMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point) - self.friendly_name = friendly_name - self.backup_engine_name = backup_engine_name - self.protection_state = protection_state - self.is_scheduled_for_deferred_delete = is_scheduled_for_deferred_delete - self.extended_info = extended_info + def __init__(self, **kwargs): + super(DPMProtectedItem, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.backup_engine_name = kwargs.get('backup_engine_name', None) + self.protection_state = kwargs.get('protection_state', None) + self.is_scheduled_for_deferred_delete = kwargs.get('is_scheduled_for_deferred_delete', None) + self.extended_info = kwargs.get('extended_info', None) self.protected_item_type = 'DPMProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_extended_info.py index 25d1e65d3620..0b09e52b592e 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_extended_info.py @@ -17,7 +17,7 @@ class DPMProtectedItemExtendedInfo(Model): :param protectable_object_load_path: Attribute to provide information on various DBs. - :type protectable_object_load_path: dict + :type protectable_object_load_path: dict[str, str] :param protected: To check if backup item is disk protected. :type protected: bool :param is_present_on_cloud: To check if backup item is cloud protected. @@ -63,18 +63,19 @@ class DPMProtectedItemExtendedInfo(Model): 'total_disk_storage_size_in_bytes': {'key': 'totalDiskStorageSizeInBytes', 'type': 'str'}, } - def __init__(self, protectable_object_load_path=None, protected=None, is_present_on_cloud=None, last_backup_status=None, last_refreshed_at=None, oldest_recovery_point=None, recovery_point_count=None, on_premise_oldest_recovery_point=None, on_premise_latest_recovery_point=None, on_premise_recovery_point_count=None, is_collocated=None, protection_group_name=None, disk_storage_used_in_bytes=None, total_disk_storage_size_in_bytes=None): - self.protectable_object_load_path = protectable_object_load_path - self.protected = protected - self.is_present_on_cloud = is_present_on_cloud - self.last_backup_status = last_backup_status - self.last_refreshed_at = last_refreshed_at - self.oldest_recovery_point = oldest_recovery_point - self.recovery_point_count = recovery_point_count - self.on_premise_oldest_recovery_point = on_premise_oldest_recovery_point - self.on_premise_latest_recovery_point = on_premise_latest_recovery_point - self.on_premise_recovery_point_count = on_premise_recovery_point_count - self.is_collocated = is_collocated - self.protection_group_name = protection_group_name - self.disk_storage_used_in_bytes = disk_storage_used_in_bytes - self.total_disk_storage_size_in_bytes = total_disk_storage_size_in_bytes + def __init__(self, **kwargs): + super(DPMProtectedItemExtendedInfo, self).__init__(**kwargs) + self.protectable_object_load_path = kwargs.get('protectable_object_load_path', None) + self.protected = kwargs.get('protected', None) + self.is_present_on_cloud = kwargs.get('is_present_on_cloud', None) + self.last_backup_status = kwargs.get('last_backup_status', None) + self.last_refreshed_at = kwargs.get('last_refreshed_at', None) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) + self.on_premise_oldest_recovery_point = kwargs.get('on_premise_oldest_recovery_point', None) + self.on_premise_latest_recovery_point = kwargs.get('on_premise_latest_recovery_point', None) + self.on_premise_recovery_point_count = kwargs.get('on_premise_recovery_point_count', None) + self.is_collocated = kwargs.get('is_collocated', None) + self.protection_group_name = kwargs.get('protection_group_name', None) + self.disk_storage_used_in_bytes = kwargs.get('disk_storage_used_in_bytes', None) + self.total_disk_storage_size_in_bytes = kwargs.get('total_disk_storage_size_in_bytes', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_extended_info_py3.py new file mode 100644 index 000000000000..3458fdb847e8 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_extended_info_py3.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DPMProtectedItemExtendedInfo(Model): + """Additional information of DPM Protected item. + + :param protectable_object_load_path: Attribute to provide information on + various DBs. + :type protectable_object_load_path: dict[str, str] + :param protected: To check if backup item is disk protected. + :type protected: bool + :param is_present_on_cloud: To check if backup item is cloud protected. + :type is_present_on_cloud: bool + :param last_backup_status: Last backup status information on backup item. + :type last_backup_status: str + :param last_refreshed_at: Last refresh time on backup item. + :type last_refreshed_at: datetime + :param oldest_recovery_point: Oldest cloud recovery point time. + :type oldest_recovery_point: datetime + :param recovery_point_count: cloud recovery point count. + :type recovery_point_count: int + :param on_premise_oldest_recovery_point: Oldest disk recovery point time. + :type on_premise_oldest_recovery_point: datetime + :param on_premise_latest_recovery_point: latest disk recovery point time. + :type on_premise_latest_recovery_point: datetime + :param on_premise_recovery_point_count: disk recovery point count. + :type on_premise_recovery_point_count: int + :param is_collocated: To check if backup item is collocated. + :type is_collocated: bool + :param protection_group_name: Protection group name of the backup item. + :type protection_group_name: str + :param disk_storage_used_in_bytes: Used Disk storage in bytes. + :type disk_storage_used_in_bytes: str + :param total_disk_storage_size_in_bytes: total Disk storage in bytes. + :type total_disk_storage_size_in_bytes: str + """ + + _attribute_map = { + 'protectable_object_load_path': {'key': 'protectableObjectLoadPath', 'type': '{str}'}, + 'protected': {'key': 'protected', 'type': 'bool'}, + 'is_present_on_cloud': {'key': 'isPresentOnCloud', 'type': 'bool'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'on_premise_oldest_recovery_point': {'key': 'onPremiseOldestRecoveryPoint', 'type': 'iso-8601'}, + 'on_premise_latest_recovery_point': {'key': 'onPremiseLatestRecoveryPoint', 'type': 'iso-8601'}, + 'on_premise_recovery_point_count': {'key': 'onPremiseRecoveryPointCount', 'type': 'int'}, + 'is_collocated': {'key': 'isCollocated', 'type': 'bool'}, + 'protection_group_name': {'key': 'protectionGroupName', 'type': 'str'}, + 'disk_storage_used_in_bytes': {'key': 'diskStorageUsedInBytes', 'type': 'str'}, + 'total_disk_storage_size_in_bytes': {'key': 'totalDiskStorageSizeInBytes', 'type': 'str'}, + } + + def __init__(self, *, protectable_object_load_path=None, protected: bool=None, is_present_on_cloud: bool=None, last_backup_status: str=None, last_refreshed_at=None, oldest_recovery_point=None, recovery_point_count: int=None, on_premise_oldest_recovery_point=None, on_premise_latest_recovery_point=None, on_premise_recovery_point_count: int=None, is_collocated: bool=None, protection_group_name: str=None, disk_storage_used_in_bytes: str=None, total_disk_storage_size_in_bytes: str=None, **kwargs) -> None: + super(DPMProtectedItemExtendedInfo, self).__init__(**kwargs) + self.protectable_object_load_path = protectable_object_load_path + self.protected = protected + self.is_present_on_cloud = is_present_on_cloud + self.last_backup_status = last_backup_status + self.last_refreshed_at = last_refreshed_at + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count + self.on_premise_oldest_recovery_point = on_premise_oldest_recovery_point + self.on_premise_latest_recovery_point = on_premise_latest_recovery_point + self.on_premise_recovery_point_count = on_premise_recovery_point_count + self.is_collocated = is_collocated + self.protection_group_name = protection_group_name + self.disk_storage_used_in_bytes = disk_storage_used_in_bytes + self.total_disk_storage_size_in_bytes = total_disk_storage_size_in_bytes diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_py3.py new file mode 100644 index 000000000000..0796c3150308 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_py3.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protected_item_py3 import ProtectedItem + + +class DPMProtectedItem(ProtectedItem): + """Additional information on Backup engine specific backup item. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the managed item + :type friendly_name: str + :param backup_engine_name: Backup Management server protecting this backup + item + :type backup_engine_name: str + :param protection_state: Protection state of the backupengine. Possible + values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState + :param is_scheduled_for_deferred_delete: To check if backup item is + scheduled for deferred delete + :type is_scheduled_for_deferred_delete: bool + :param extended_info: Extended info of the backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DPMProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'is_scheduled_for_deferred_delete': {'key': 'isScheduledForDeferredDelete', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'DPMProtectedItemExtendedInfo'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, friendly_name: str=None, backup_engine_name: str=None, protection_state=None, is_scheduled_for_deferred_delete: bool=None, extended_info=None, **kwargs) -> None: + super(DPMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, **kwargs) + self.friendly_name = friendly_name + self.backup_engine_name = backup_engine_name + self.protection_state = protection_state + self.is_scheduled_for_deferred_delete = is_scheduled_for_deferred_delete + self.extended_info = extended_info + self.protected_item_type = 'DPMProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/encryption_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/encryption_details.py index 409b93a678fd..3444fbcb0414 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/encryption_details.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/encryption_details.py @@ -36,9 +36,10 @@ class EncryptionDetails(Model): 'secret_key_vault_id': {'key': 'secretKeyVaultId', 'type': 'str'}, } - def __init__(self, encryption_enabled=None, kek_url=None, secret_key_url=None, kek_vault_id=None, secret_key_vault_id=None): - self.encryption_enabled = encryption_enabled - self.kek_url = kek_url - self.secret_key_url = secret_key_url - self.kek_vault_id = kek_vault_id - self.secret_key_vault_id = secret_key_vault_id + def __init__(self, **kwargs): + super(EncryptionDetails, self).__init__(**kwargs) + self.encryption_enabled = kwargs.get('encryption_enabled', None) + self.kek_url = kwargs.get('kek_url', None) + self.secret_key_url = kwargs.get('secret_key_url', None) + self.kek_vault_id = kwargs.get('kek_vault_id', None) + self.secret_key_vault_id = kwargs.get('secret_key_vault_id', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/encryption_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/encryption_details_py3.py new file mode 100644 index 000000000000..1549a4f757c9 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/encryption_details_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EncryptionDetails(Model): + """Details needed if the VM was encrypted at the time of backup. + + :param encryption_enabled: Identifies whether this backup copy represents + an encrypted VM at the time of backup. + :type encryption_enabled: bool + :param kek_url: Key Url. + :type kek_url: str + :param secret_key_url: Secret Url. + :type secret_key_url: str + :param kek_vault_id: ID of Key Vault where KEK is stored. + :type kek_vault_id: str + :param secret_key_vault_id: ID of Key Vault where Secret is stored. + :type secret_key_vault_id: str + """ + + _attribute_map = { + 'encryption_enabled': {'key': 'encryptionEnabled', 'type': 'bool'}, + 'kek_url': {'key': 'kekUrl', 'type': 'str'}, + 'secret_key_url': {'key': 'secretKeyUrl', 'type': 'str'}, + 'kek_vault_id': {'key': 'kekVaultId', 'type': 'str'}, + 'secret_key_vault_id': {'key': 'secretKeyVaultId', 'type': 'str'}, + } + + def __init__(self, *, encryption_enabled: bool=None, kek_url: str=None, secret_key_url: str=None, kek_vault_id: str=None, secret_key_vault_id: str=None, **kwargs) -> None: + super(EncryptionDetails, self).__init__(**kwargs) + self.encryption_enabled = encryption_enabled + self.kek_url = kek_url + self.secret_key_url = secret_key_url + self.kek_vault_id = kek_vault_id + self.secret_key_vault_id = secret_key_vault_id diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/error_detail.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/error_detail.py new file mode 100644 index 000000000000..6214b21c5eed --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/error_detail.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorDetail(Model): + """Error Detail class which encapsulates Code, Message and Recommendations. + + :param code: Error code. + :type code: str + :param message: Error Message related to the Code. + :type message: str + :param recommendations: List of recommendation strings. + :type recommendations: list[str] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ErrorDetail, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.recommendations = kwargs.get('recommendations', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/error_detail_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/error_detail_py3.py new file mode 100644 index 000000000000..3b5282aeeaac --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/error_detail_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorDetail(Model): + """Error Detail class which encapsulates Code, Message and Recommendations. + + :param code: Error code. + :type code: str + :param message: Error Message related to the Code. + :type message: str + :param recommendations: List of recommendation strings. + :type recommendations: list[str] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, *, code: str=None, message: str=None, recommendations=None, **kwargs) -> None: + super(ErrorDetail, self).__init__(**kwargs) + self.code = code + self.message = message + self.recommendations = recommendations diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/export_jobs_operation_result_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/export_jobs_operation_result_info.py index b2a6358e8ca4..cbfd3d06c161 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/export_jobs_operation_result_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/export_jobs_operation_result_info.py @@ -15,7 +15,9 @@ class ExportJobsOperationResultInfo(OperationResultInfoBase): """This class is used to send blob details after exporting jobs. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param blob_url: URL of the blob into which the serialized string of list of jobs is exported. @@ -34,8 +36,8 @@ class ExportJobsOperationResultInfo(OperationResultInfoBase): 'blob_sas_key': {'key': 'blobSasKey', 'type': 'str'}, } - def __init__(self, blob_url=None, blob_sas_key=None): - super(ExportJobsOperationResultInfo, self).__init__() - self.blob_url = blob_url - self.blob_sas_key = blob_sas_key + def __init__(self, **kwargs): + super(ExportJobsOperationResultInfo, self).__init__(**kwargs) + self.blob_url = kwargs.get('blob_url', None) + self.blob_sas_key = kwargs.get('blob_sas_key', None) self.object_type = 'ExportJobsOperationResultInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/export_jobs_operation_result_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/export_jobs_operation_result_info_py3.py new file mode 100644 index 000000000000..1325aca53840 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/export_jobs_operation_result_info_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .operation_result_info_base_py3 import OperationResultInfoBase + + +class ExportJobsOperationResultInfo(OperationResultInfoBase): + """This class is used to send blob details after exporting jobs. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param blob_url: URL of the blob into which the serialized string of list + of jobs is exported. + :type blob_url: str + :param blob_sas_key: SAS key to access the blob. It expires in 15 mins. + :type blob_sas_key: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'blob_url': {'key': 'blobUrl', 'type': 'str'}, + 'blob_sas_key': {'key': 'blobSasKey', 'type': 'str'}, + } + + def __init__(self, *, blob_url: str=None, blob_sas_key: str=None, **kwargs) -> None: + super(ExportJobsOperationResultInfo, self).__init__(**kwargs) + self.blob_url = blob_url + self.blob_sas_key = blob_sas_key + self.object_type = 'ExportJobsOperationResultInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/feature_support_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/feature_support_request.py new file mode 100644 index 000000000000..b739bdd9a923 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/feature_support_request.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FeatureSupportRequest(Model): + """Base class for feature request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVMResourceFeatureSupportRequest + + All required parameters must be populated in order to send to Azure. + + :param feature_type: Required. Constant filled by server. + :type feature_type: str + """ + + _validation = { + 'feature_type': {'required': True}, + } + + _attribute_map = { + 'feature_type': {'key': 'featureType', 'type': 'str'}, + } + + _subtype_map = { + 'feature_type': {'AzureVMResourceBackup': 'AzureVMResourceFeatureSupportRequest'} + } + + def __init__(self, **kwargs): + super(FeatureSupportRequest, self).__init__(**kwargs) + self.feature_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/feature_support_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/feature_support_request_py3.py new file mode 100644 index 000000000000..ee165936837e --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/feature_support_request_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FeatureSupportRequest(Model): + """Base class for feature request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVMResourceFeatureSupportRequest + + All required parameters must be populated in order to send to Azure. + + :param feature_type: Required. Constant filled by server. + :type feature_type: str + """ + + _validation = { + 'feature_type': {'required': True}, + } + + _attribute_map = { + 'feature_type': {'key': 'featureType', 'type': 'str'}, + } + + _subtype_map = { + 'feature_type': {'AzureVMResourceBackup': 'AzureVMResourceFeatureSupportRequest'} + } + + def __init__(self, **kwargs) -> None: + super(FeatureSupportRequest, self).__init__(**kwargs) + self.feature_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container.py new file mode 100644 index 000000000000..f6e8fff7ae9f --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_container import ProtectionContainer + + +class GenericContainer(ProtectionContainer): + """Base class for generic container of backup items. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param fabric_name: Name of the container's fabric + :type fabric_name: str + :param extended_information: Extended information (not returned in List + container API calls) + :type extended_information: + ~azure.mgmt.recoveryservicesbackup.models.GenericContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'extended_information': {'key': 'extendedInformation', 'type': 'GenericContainerExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(GenericContainer, self).__init__(**kwargs) + self.fabric_name = kwargs.get('fabric_name', None) + self.extended_information = kwargs.get('extended_information', None) + self.container_type = 'GenericContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_extended_info.py new file mode 100644 index 000000000000..b5873d24f8e7 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_extended_info.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GenericContainerExtendedInfo(Model): + """Container extended information. + + :param raw_cert_data: Public key of container cert + :type raw_cert_data: str + :param container_identity_info: Container identity information + :type container_identity_info: + ~azure.mgmt.recoveryservicesbackup.models.ContainerIdentityInfo + :param service_endpoints: Azure Backup Service Endpoints for the container + :type service_endpoints: dict[str, str] + """ + + _attribute_map = { + 'raw_cert_data': {'key': 'rawCertData', 'type': 'str'}, + 'container_identity_info': {'key': 'containerIdentityInfo', 'type': 'ContainerIdentityInfo'}, + 'service_endpoints': {'key': 'serviceEndpoints', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(GenericContainerExtendedInfo, self).__init__(**kwargs) + self.raw_cert_data = kwargs.get('raw_cert_data', None) + self.container_identity_info = kwargs.get('container_identity_info', None) + self.service_endpoints = kwargs.get('service_endpoints', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_extended_info_py3.py new file mode 100644 index 000000000000..fdec4c143961 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_extended_info_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GenericContainerExtendedInfo(Model): + """Container extended information. + + :param raw_cert_data: Public key of container cert + :type raw_cert_data: str + :param container_identity_info: Container identity information + :type container_identity_info: + ~azure.mgmt.recoveryservicesbackup.models.ContainerIdentityInfo + :param service_endpoints: Azure Backup Service Endpoints for the container + :type service_endpoints: dict[str, str] + """ + + _attribute_map = { + 'raw_cert_data': {'key': 'rawCertData', 'type': 'str'}, + 'container_identity_info': {'key': 'containerIdentityInfo', 'type': 'ContainerIdentityInfo'}, + 'service_endpoints': {'key': 'serviceEndpoints', 'type': '{str}'}, + } + + def __init__(self, *, raw_cert_data: str=None, container_identity_info=None, service_endpoints=None, **kwargs) -> None: + super(GenericContainerExtendedInfo, self).__init__(**kwargs) + self.raw_cert_data = raw_cert_data + self.container_identity_info = container_identity_info + self.service_endpoints = service_endpoints diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_py3.py new file mode 100644 index 000000000000..798bed079b56 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_container_py3 import ProtectionContainer + + +class GenericContainer(ProtectionContainer): + """Base class for generic container of backup items. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param fabric_name: Name of the container's fabric + :type fabric_name: str + :param extended_information: Extended information (not returned in List + container API calls) + :type extended_information: + ~azure.mgmt.recoveryservicesbackup.models.GenericContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'extended_information': {'key': 'extendedInformation', 'type': 'GenericContainerExtendedInfo'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, fabric_name: str=None, extended_information=None, **kwargs) -> None: + super(GenericContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + self.fabric_name = fabric_name + self.extended_information = extended_information + self.container_type = 'GenericContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protected_item.py new file mode 100644 index 000000000000..94562b06e9e5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protected_item.py @@ -0,0 +1,94 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protected_item import ProtectedItem + + +class GenericProtectedItem(ProtectedItem): + """Base class for backup items. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param policy_state: Indicates consistency of policy object and policy + applied to this backup item. + :type policy_state: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param protected_item_id: Data Plane Service ID of the protected item. + :type protected_item_id: long + :param source_associations: Loosely coupled (type, value) associations + (example - parent of a protected item) + :type source_associations: dict[str, str] + :param fabric_name: Name of this backup item's fabric. + :type fabric_name: str + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protected_item_id': {'key': 'protectedItemId', 'type': 'long'}, + 'source_associations': {'key': 'sourceAssociations', 'type': '{str}'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenericProtectedItem, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.policy_state = kwargs.get('policy_state', None) + self.protection_state = kwargs.get('protection_state', None) + self.protected_item_id = kwargs.get('protected_item_id', None) + self.source_associations = kwargs.get('source_associations', None) + self.fabric_name = kwargs.get('fabric_name', None) + self.protected_item_type = 'GenericProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protected_item_py3.py new file mode 100644 index 000000000000..50bf890f08fb --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protected_item_py3.py @@ -0,0 +1,94 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protected_item_py3 import ProtectedItem + + +class GenericProtectedItem(ProtectedItem): + """Base class for backup items. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param policy_state: Indicates consistency of policy object and policy + applied to this backup item. + :type policy_state: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param protected_item_id: Data Plane Service ID of the protected item. + :type protected_item_id: long + :param source_associations: Loosely coupled (type, value) associations + (example - parent of a protected item) + :type source_associations: dict[str, str] + :param fabric_name: Name of this backup item's fabric. + :type fabric_name: str + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protected_item_id': {'key': 'protectedItemId', 'type': 'long'}, + 'source_associations': {'key': 'sourceAssociations', 'type': '{str}'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, friendly_name: str=None, policy_state: str=None, protection_state=None, protected_item_id: int=None, source_associations=None, fabric_name: str=None, **kwargs) -> None: + super(GenericProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, **kwargs) + self.friendly_name = friendly_name + self.policy_state = policy_state + self.protection_state = protection_state + self.protected_item_id = protected_item_id + self.source_associations = source_associations + self.fabric_name = fabric_name + self.protected_item_type = 'GenericProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protection_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protection_policy.py new file mode 100644 index 000000000000..7fffd691ec15 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protection_policy.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_policy import ProtectionPolicy + + +class GenericProtectionPolicy(ProtectionPolicy): + """Azure VM (Mercury) workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param sub_protection_policy: List of sub-protection policies which + includes schedule and retention + :type sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] + :param time_zone: TimeZone optional input as string. For example: TimeZone + = "Pacific Standard Time". + :type time_zone: str + :param fabric_name: Name of this policy's fabric. + :type fabric_name: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenericProtectionPolicy, self).__init__(**kwargs) + self.sub_protection_policy = kwargs.get('sub_protection_policy', None) + self.time_zone = kwargs.get('time_zone', None) + self.fabric_name = kwargs.get('fabric_name', None) + self.backup_management_type = 'GenericProtectionPolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protection_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protection_policy_py3.py new file mode 100644 index 000000000000..bbead520304a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protection_policy_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_policy_py3 import ProtectionPolicy + + +class GenericProtectionPolicy(ProtectionPolicy): + """Azure VM (Mercury) workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param sub_protection_policy: List of sub-protection policies which + includes schedule and retention + :type sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] + :param time_zone: TimeZone optional input as string. For example: TimeZone + = "Pacific Standard Time". + :type time_zone: str + :param fabric_name: Name of this policy's fabric. + :type fabric_name: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + } + + def __init__(self, *, protected_items_count: int=None, sub_protection_policy=None, time_zone: str=None, fabric_name: str=None, **kwargs) -> None: + super(GenericProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + self.sub_protection_policy = sub_protection_policy + self.time_zone = time_zone + self.fabric_name = fabric_name + self.backup_management_type = 'GenericProtectionPolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_recovery_point.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_recovery_point.py index 7b64f5d9840e..fee7c7287519 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_recovery_point.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_recovery_point.py @@ -15,7 +15,9 @@ class GenericRecoveryPoint(RecoveryPoint): """Generic backup copy. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param friendly_name: Friendly name of the backup copy. :type friendly_name: str @@ -40,10 +42,10 @@ class GenericRecoveryPoint(RecoveryPoint): 'recovery_point_additional_info': {'key': 'recoveryPointAdditionalInfo', 'type': 'str'}, } - def __init__(self, friendly_name=None, recovery_point_type=None, recovery_point_time=None, recovery_point_additional_info=None): - super(GenericRecoveryPoint, self).__init__() - self.friendly_name = friendly_name - self.recovery_point_type = recovery_point_type - self.recovery_point_time = recovery_point_time - self.recovery_point_additional_info = recovery_point_additional_info + def __init__(self, **kwargs): + super(GenericRecoveryPoint, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.recovery_point_type = kwargs.get('recovery_point_type', None) + self.recovery_point_time = kwargs.get('recovery_point_time', None) + self.recovery_point_additional_info = kwargs.get('recovery_point_additional_info', None) self.object_type = 'GenericRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_recovery_point_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_recovery_point_py3.py new file mode 100644 index 000000000000..33b3743a9351 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_recovery_point_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .recovery_point_py3 import RecoveryPoint + + +class GenericRecoveryPoint(RecoveryPoint): + """Generic backup copy. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param friendly_name: Friendly name of the backup copy. + :type friendly_name: str + :param recovery_point_type: Type of the backup copy. + :type recovery_point_type: str + :param recovery_point_time: Time at which this backup copy was created. + :type recovery_point_time: datetime + :param recovery_point_additional_info: Additional information associated + with this backup copy. + :type recovery_point_additional_info: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + 'recovery_point_additional_info': {'key': 'recoveryPointAdditionalInfo', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, recovery_point_type: str=None, recovery_point_time=None, recovery_point_additional_info: str=None, **kwargs) -> None: + super(GenericRecoveryPoint, self).__init__(**kwargs) + self.friendly_name = friendly_name + self.recovery_point_type = recovery_point_type + self.recovery_point_time = recovery_point_time + self.recovery_point_additional_info = recovery_point_additional_info + self.object_type = 'GenericRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/get_protected_item_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/get_protected_item_query_object.py index 2c6cd9e1db40..75c1eebca8de 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/get_protected_item_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/get_protected_item_query_object.py @@ -24,5 +24,6 @@ class GetProtectedItemQueryObject(Model): 'expand': {'key': 'expand', 'type': 'str'}, } - def __init__(self, expand=None): - self.expand = expand + def __init__(self, **kwargs): + super(GetProtectedItemQueryObject, self).__init__(**kwargs) + self.expand = kwargs.get('expand', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/get_protected_item_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/get_protected_item_query_object_py3.py new file mode 100644 index 000000000000..0954d0b1cb3a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/get_protected_item_query_object_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GetProtectedItemQueryObject(Model): + """Filters to list backup items. + + :param expand: Specifies if the additional information should be provided + for this item. + :type expand: str + """ + + _attribute_map = { + 'expand': {'key': 'expand', 'type': 'str'}, + } + + def __init__(self, *, expand: str=None, **kwargs) -> None: + super(GetProtectedItemQueryObject, self).__init__(**kwargs) + self.expand = expand diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_container.py index d62a466b95a6..e6cff11c018b 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_container.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_container.py @@ -15,33 +15,27 @@ class IaaSVMContainer(ProtectionContainer): """IaaS VM workload-specific container. - Variables are only populated by the server, and will be ignored when - sending a request. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMContainer, + AzureIaaSComputeVMContainer + + All required parameters must be populated in order to send to Azure. :param friendly_name: Friendly name of the container. :type friendly_name: str :param backup_management_type: Type of backup managemenent for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Status of registration of the container with the Recovery Services Vault. :type registration_status: str :param health_status: Status of health of the container. :type health_status: str - :ivar container_type: Type of the container. The value of this property - for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic - Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is - AzureSqlContainer. Possible values include: 'Invalid', 'Unknown', - 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', - 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - 'AzureSqlContainer', 'Windows', 'VCenter' - :vartype container_type: str or :class:`ContainerType - ` - :param protectable_object_type: Polymorphic Discriminator - :type protectable_object_type: str + :param container_type: Required. Constant filled by server. + :type container_type: str :param virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. :type virtual_machine_id: str @@ -53,8 +47,7 @@ class IaaSVMContainer(ProtectionContainer): """ _validation = { - 'container_type': {'readonly': True}, - 'protectable_object_type': {'required': True}, + 'container_type': {'required': True}, } _attribute_map = { @@ -63,19 +56,18 @@ class IaaSVMContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, - 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, } _subtype_map = { - 'protectable_object_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMContainer', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMContainer'} + 'container_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMContainer', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMContainer'} } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, health_status=None, virtual_machine_id=None, virtual_machine_version=None, resource_group=None): - super(IaaSVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status) - self.virtual_machine_id = virtual_machine_id - self.virtual_machine_version = virtual_machine_version - self.resource_group = resource_group - self.protectable_object_type = 'IaaSVMContainer' + def __init__(self, **kwargs): + super(IaaSVMContainer, self).__init__(**kwargs) + self.virtual_machine_id = kwargs.get('virtual_machine_id', None) + self.virtual_machine_version = kwargs.get('virtual_machine_version', None) + self.resource_group = kwargs.get('resource_group', None) + self.container_type = 'IaaSVMContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_container_py3.py new file mode 100644 index 000000000000..aa191ed67510 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_container_py3.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_container_py3 import ProtectionContainer + + +class IaaSVMContainer(ProtectionContainer): + """IaaS VM workload-specific container. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMContainer, + AzureIaaSComputeVMContainer + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param virtual_machine_id: Fully qualified ARM url of the virtual machine + represented by this Azure IaaS VM container. + :type virtual_machine_id: str + :param virtual_machine_version: Specifies whether the container represents + a Classic or an Azure Resource Manager VM. + :type virtual_machine_version: str + :param resource_group: Resource group name of Recovery Services Vault. + :type resource_group: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + _subtype_map = { + 'container_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMContainer', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMContainer'} + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, virtual_machine_id: str=None, virtual_machine_version: str=None, resource_group: str=None, **kwargs) -> None: + super(IaaSVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + self.virtual_machine_id = virtual_machine_id + self.virtual_machine_version = virtual_machine_version + self.resource_group = resource_group + self.container_type = 'IaaSVMContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_protectable_item.py index 91f80ce4dc67..91ee79134281 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_protectable_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_protectable_item.py @@ -15,16 +15,25 @@ class IaaSVMProtectableItem(WorkloadProtectableItem): """IaaS VM workload-specific backup item. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMProtectableItem, + AzureIaaSComputeVMProtectableItem + + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent to backup an item. :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str :param friendly_name: Friendly name of the backup item. :type friendly_name: str :param protection_state: State of the back up item. Possible values - include: 'Invalid', 'NotProtected', 'Protecting', 'Protected' - :type protection_state: str or :class:`ProtectionStatus - ` - :param protectable_item_type: Polymorphic Discriminator + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. :type protectable_item_type: str :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. :type virtual_machine_id: str @@ -36,6 +45,7 @@ class IaaSVMProtectableItem(WorkloadProtectableItem): _attribute_map = { 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, @@ -46,7 +56,7 @@ class IaaSVMProtectableItem(WorkloadProtectableItem): 'protectable_item_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMProtectableItem', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMProtectableItem'} } - def __init__(self, backup_management_type=None, friendly_name=None, protection_state=None, virtual_machine_id=None): - super(IaaSVMProtectableItem, self).__init__(backup_management_type=backup_management_type, friendly_name=friendly_name, protection_state=protection_state) - self.virtual_machine_id = virtual_machine_id + def __init__(self, **kwargs): + super(IaaSVMProtectableItem, self).__init__(**kwargs) + self.virtual_machine_id = kwargs.get('virtual_machine_id', None) self.protectable_item_type = 'IaaSVMProtectableItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_protectable_item_py3.py new file mode 100644 index 000000000000..1bba588a7717 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_protectable_item_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .workload_protectable_item_py3 import WorkloadProtectableItem + + +class IaaSVMProtectableItem(WorkloadProtectableItem): + """IaaS VM workload-specific backup item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMProtectableItem, + AzureIaaSComputeVMProtectableItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :type virtual_machine_id: str + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + } + + _subtype_map = { + 'protectable_item_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMProtectableItem', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMProtectableItem'} + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, virtual_machine_id: str=None, **kwargs) -> None: + super(IaaSVMProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, **kwargs) + self.virtual_machine_id = virtual_machine_id + self.protectable_item_type = 'IaaSVMProtectableItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_backup_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_backup_request.py index c22594118d27..c3603259a10b 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_backup_request.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_backup_request.py @@ -15,7 +15,9 @@ class IaasVMBackupRequest(BackupRequest): """IaaS VM workload-specific backup request. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param recovery_point_expiry_time_in_utc: Backup copy will expire after the time specified (UTC). @@ -31,7 +33,7 @@ class IaasVMBackupRequest(BackupRequest): 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, } - def __init__(self, recovery_point_expiry_time_in_utc=None): - super(IaasVMBackupRequest, self).__init__() - self.recovery_point_expiry_time_in_utc = recovery_point_expiry_time_in_utc + def __init__(self, **kwargs): + super(IaasVMBackupRequest, self).__init__(**kwargs) + self.recovery_point_expiry_time_in_utc = kwargs.get('recovery_point_expiry_time_in_utc', None) self.object_type = 'IaasVMBackupRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_backup_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_backup_request_py3.py new file mode 100644 index 000000000000..af4e4a228c6b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_backup_request_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_request_py3 import BackupRequest + + +class IaasVMBackupRequest(BackupRequest): + """IaaS VM workload-specific backup request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_expiry_time_in_utc: Backup copy will expire after + the time specified (UTC). + :type recovery_point_expiry_time_in_utc: datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, + } + + def __init__(self, *, recovery_point_expiry_time_in_utc=None, **kwargs) -> None: + super(IaasVMBackupRequest, self).__init__(**kwargs) + self.recovery_point_expiry_time_in_utc = recovery_point_expiry_time_in_utc + self.object_type = 'IaasVMBackupRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_recovery_point.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_recovery_point.py index c63ee3597a56..19d50115fb87 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_recovery_point.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_recovery_point.py @@ -15,7 +15,9 @@ class IaasVMRecoveryPoint(RecoveryPoint): """IaaS VM workload specific backup copy. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param recovery_point_type: Type of the backup copy. :type recovery_point_type: str @@ -32,15 +34,14 @@ class IaasVMRecoveryPoint(RecoveryPoint): :type is_source_vm_encrypted: bool :param key_and_secret: Required details for recovering an encrypted VM. Applicable only when IsSourceVMEncrypted is true. - :type key_and_secret: :class:`KeyAndSecretDetails - ` + :type key_and_secret: + ~azure.mgmt.recoveryservicesbackup.models.KeyAndSecretDetails :param is_instant_ilr_session_active: Is the session to recover items from this backup copy still active. :type is_instant_ilr_session_active: bool :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: list of - :class:`RecoveryPointTierInformation - ` + :type recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] :param is_managed_virtual_machine: Whether VM is with Managed Disks :type is_managed_virtual_machine: bool :param virtual_machine_size: Virtual Machine Size @@ -61,24 +62,24 @@ class IaasVMRecoveryPoint(RecoveryPoint): 'source_vm_storage_type': {'key': 'sourceVMStorageType', 'type': 'str'}, 'is_source_vm_encrypted': {'key': 'isSourceVMEncrypted', 'type': 'bool'}, 'key_and_secret': {'key': 'keyAndSecret', 'type': 'KeyAndSecretDetails'}, - 'is_instant_ilr_session_active': {'key': 'isInstantILRSessionActive', 'type': 'bool'}, + 'is_instant_ilr_session_active': {'key': 'isInstantIlrSessionActive', 'type': 'bool'}, 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, 'is_managed_virtual_machine': {'key': 'isManagedVirtualMachine', 'type': 'bool'}, 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, } - def __init__(self, recovery_point_type=None, recovery_point_time=None, recovery_point_additional_info=None, source_vm_storage_type=None, is_source_vm_encrypted=None, key_and_secret=None, is_instant_ilr_session_active=None, recovery_point_tier_details=None, is_managed_virtual_machine=None, virtual_machine_size=None, original_storage_account_option=None): - super(IaasVMRecoveryPoint, self).__init__() - self.recovery_point_type = recovery_point_type - self.recovery_point_time = recovery_point_time - self.recovery_point_additional_info = recovery_point_additional_info - self.source_vm_storage_type = source_vm_storage_type - self.is_source_vm_encrypted = is_source_vm_encrypted - self.key_and_secret = key_and_secret - self.is_instant_ilr_session_active = is_instant_ilr_session_active - self.recovery_point_tier_details = recovery_point_tier_details - self.is_managed_virtual_machine = is_managed_virtual_machine - self.virtual_machine_size = virtual_machine_size - self.original_storage_account_option = original_storage_account_option + def __init__(self, **kwargs): + super(IaasVMRecoveryPoint, self).__init__(**kwargs) + self.recovery_point_type = kwargs.get('recovery_point_type', None) + self.recovery_point_time = kwargs.get('recovery_point_time', None) + self.recovery_point_additional_info = kwargs.get('recovery_point_additional_info', None) + self.source_vm_storage_type = kwargs.get('source_vm_storage_type', None) + self.is_source_vm_encrypted = kwargs.get('is_source_vm_encrypted', None) + self.key_and_secret = kwargs.get('key_and_secret', None) + self.is_instant_ilr_session_active = kwargs.get('is_instant_ilr_session_active', None) + self.recovery_point_tier_details = kwargs.get('recovery_point_tier_details', None) + self.is_managed_virtual_machine = kwargs.get('is_managed_virtual_machine', None) + self.virtual_machine_size = kwargs.get('virtual_machine_size', None) + self.original_storage_account_option = kwargs.get('original_storage_account_option', None) self.object_type = 'IaasVMRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_recovery_point_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_recovery_point_py3.py new file mode 100644 index 000000000000..533f533b0078 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_recovery_point_py3.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .recovery_point_py3 import RecoveryPoint + + +class IaasVMRecoveryPoint(RecoveryPoint): + """IaaS VM workload specific backup copy. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_type: Type of the backup copy. + :type recovery_point_type: str + :param recovery_point_time: Time at which this backup copy was created. + :type recovery_point_time: datetime + :param recovery_point_additional_info: Additional information associated + with this backup copy. + :type recovery_point_additional_info: str + :param source_vm_storage_type: Storage type of the VM whose backup copy is + created. + :type source_vm_storage_type: str + :param is_source_vm_encrypted: Identifies whether the VM was encrypted + when the backup copy is created. + :type is_source_vm_encrypted: bool + :param key_and_secret: Required details for recovering an encrypted VM. + Applicable only when IsSourceVMEncrypted is true. + :type key_and_secret: + ~azure.mgmt.recoveryservicesbackup.models.KeyAndSecretDetails + :param is_instant_ilr_session_active: Is the session to recover items from + this backup copy still active. + :type is_instant_ilr_session_active: bool + :param recovery_point_tier_details: Recovery point tier information. + :type recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] + :param is_managed_virtual_machine: Whether VM is with Managed Disks + :type is_managed_virtual_machine: bool + :param virtual_machine_size: Virtual Machine Size + :type virtual_machine_size: str + :param original_storage_account_option: Original SA Option + :type original_storage_account_option: bool + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + 'recovery_point_additional_info': {'key': 'recoveryPointAdditionalInfo', 'type': 'str'}, + 'source_vm_storage_type': {'key': 'sourceVMStorageType', 'type': 'str'}, + 'is_source_vm_encrypted': {'key': 'isSourceVMEncrypted', 'type': 'bool'}, + 'key_and_secret': {'key': 'keyAndSecret', 'type': 'KeyAndSecretDetails'}, + 'is_instant_ilr_session_active': {'key': 'isInstantIlrSessionActive', 'type': 'bool'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'is_managed_virtual_machine': {'key': 'isManagedVirtualMachine', 'type': 'bool'}, + 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, + 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, + } + + def __init__(self, *, recovery_point_type: str=None, recovery_point_time=None, recovery_point_additional_info: str=None, source_vm_storage_type: str=None, is_source_vm_encrypted: bool=None, key_and_secret=None, is_instant_ilr_session_active: bool=None, recovery_point_tier_details=None, is_managed_virtual_machine: bool=None, virtual_machine_size: str=None, original_storage_account_option: bool=None, **kwargs) -> None: + super(IaasVMRecoveryPoint, self).__init__(**kwargs) + self.recovery_point_type = recovery_point_type + self.recovery_point_time = recovery_point_time + self.recovery_point_additional_info = recovery_point_additional_info + self.source_vm_storage_type = source_vm_storage_type + self.is_source_vm_encrypted = is_source_vm_encrypted + self.key_and_secret = key_and_secret + self.is_instant_ilr_session_active = is_instant_ilr_session_active + self.recovery_point_tier_details = recovery_point_tier_details + self.is_managed_virtual_machine = is_managed_virtual_machine + self.virtual_machine_size = virtual_machine_size + self.original_storage_account_option = original_storage_account_option + self.object_type = 'IaasVMRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_restore_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_restore_request.py index 6cf482e860e1..88695e95a6bf 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_restore_request.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_restore_request.py @@ -15,14 +15,16 @@ class IaasVMRestoreRequest(RestoreRequest): """IaaS VM workload-specific restore. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param recovery_point_id: ID of the backup copy to be recovered. :type recovery_point_id: str :param recovery_type: Type of this recovery. Possible values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks' - :type recovery_type: str or :class:`RecoveryType - ` + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType :param source_resource_id: Fully qualified ARM ID of the VM which is being recovered. :type source_resource_id: str @@ -60,12 +62,12 @@ class IaasVMRestoreRequest(RestoreRequest): while restoring the VM. If this is false, VM will be restored to the same cloud service as it was at the time of backup. :type create_new_cloud_service: bool - :param original_storage_account_option: + :param original_storage_account_option: Original SA Option :type original_storage_account_option: bool :param encryption_details: Details needed if the VM was encrypted at the time of backup. - :type encryption_details: :class:`EncryptionDetails - ` + :type encryption_details: + ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails """ _validation = { @@ -90,20 +92,20 @@ class IaasVMRestoreRequest(RestoreRequest): 'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'}, } - def __init__(self, recovery_point_id=None, recovery_type=None, source_resource_id=None, target_virtual_machine_id=None, target_resource_group_id=None, storage_account_id=None, virtual_network_id=None, subnet_id=None, target_domain_name_id=None, region=None, affinity_group=None, create_new_cloud_service=None, original_storage_account_option=None, encryption_details=None): - super(IaasVMRestoreRequest, self).__init__() - self.recovery_point_id = recovery_point_id - self.recovery_type = recovery_type - self.source_resource_id = source_resource_id - self.target_virtual_machine_id = target_virtual_machine_id - self.target_resource_group_id = target_resource_group_id - self.storage_account_id = storage_account_id - self.virtual_network_id = virtual_network_id - self.subnet_id = subnet_id - self.target_domain_name_id = target_domain_name_id - self.region = region - self.affinity_group = affinity_group - self.create_new_cloud_service = create_new_cloud_service - self.original_storage_account_option = original_storage_account_option - self.encryption_details = encryption_details + def __init__(self, **kwargs): + super(IaasVMRestoreRequest, self).__init__(**kwargs) + self.recovery_point_id = kwargs.get('recovery_point_id', None) + self.recovery_type = kwargs.get('recovery_type', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.target_virtual_machine_id = kwargs.get('target_virtual_machine_id', None) + self.target_resource_group_id = kwargs.get('target_resource_group_id', None) + self.storage_account_id = kwargs.get('storage_account_id', None) + self.virtual_network_id = kwargs.get('virtual_network_id', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.target_domain_name_id = kwargs.get('target_domain_name_id', None) + self.region = kwargs.get('region', None) + self.affinity_group = kwargs.get('affinity_group', None) + self.create_new_cloud_service = kwargs.get('create_new_cloud_service', None) + self.original_storage_account_option = kwargs.get('original_storage_account_option', None) + self.encryption_details = kwargs.get('encryption_details', None) self.object_type = 'IaasVMRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_restore_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_restore_request_py3.py new file mode 100644 index 000000000000..91bb2c31beff --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_restore_request_py3.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .restore_request_py3 import RestoreRequest + + +class IaasVMRestoreRequest(RestoreRequest): + """IaaS VM workload-specific restore. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_id: ID of the backup copy to be recovered. + :type recovery_point_id: str + :param recovery_type: Type of this recovery. Possible values include: + 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM which is being + recovered. + :type source_resource_id: str + :param target_virtual_machine_id: This is the complete ARM Id of the VM + that will be created. + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str + :param target_resource_group_id: This is the ARM Id of the resource group + that you want to create for this Virtual machine and other artifacts. + For e.g. /subscriptions/{subId}/resourcegroups/{rg} + :type target_resource_group_id: str + :param storage_account_id: Fully qualified ARM ID of the storage account + to which the VM has to be restored. + :type storage_account_id: str + :param virtual_network_id: This is the virtual network Id of the vnet that + will be attached to the virtual machine. + User will be validated for join action permissions in the linked access. + :type virtual_network_id: str + :param subnet_id: Subnet ID, is the subnet ID associated with the to be + restored VM. For Classic VMs it would be {VnetID}/Subnet/{SubnetName} and, + for the Azure Resource Manager VMs it would be ARM resource ID used to + represent the subnet. + :type subnet_id: str + :param target_domain_name_id: Fully qualified ARM ID of the domain name to + be associated to the VM being restored. This applies only to Classic + Virtual Machines. + :type target_domain_name_id: str + :param region: Region in which the virtual machine is restored. + :type region: str + :param affinity_group: Affinity group associated to VM to be restored. + Used only for Classic Compute Virtual Machines. + :type affinity_group: str + :param create_new_cloud_service: Should a new cloud service be created + while restoring the VM. If this is false, VM will be restored to the same + cloud service as it was at the time of backup. + :type create_new_cloud_service: bool + :param original_storage_account_option: Original SA Option + :type original_storage_account_option: bool + :param encryption_details: Details needed if the VM was encrypted at the + time of backup. + :type encryption_details: + ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'affinity_group': {'key': 'affinityGroup', 'type': 'str'}, + 'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'}, + 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, + 'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'}, + } + + def __init__(self, *, recovery_point_id: str=None, recovery_type=None, source_resource_id: str=None, target_virtual_machine_id: str=None, target_resource_group_id: str=None, storage_account_id: str=None, virtual_network_id: str=None, subnet_id: str=None, target_domain_name_id: str=None, region: str=None, affinity_group: str=None, create_new_cloud_service: bool=None, original_storage_account_option: bool=None, encryption_details=None, **kwargs) -> None: + super(IaasVMRestoreRequest, self).__init__(**kwargs) + self.recovery_point_id = recovery_point_id + self.recovery_type = recovery_type + self.source_resource_id = source_resource_id + self.target_virtual_machine_id = target_virtual_machine_id + self.target_resource_group_id = target_resource_group_id + self.storage_account_id = storage_account_id + self.virtual_network_id = virtual_network_id + self.subnet_id = subnet_id + self.target_domain_name_id = target_domain_name_id + self.region = region + self.affinity_group = affinity_group + self.create_new_cloud_service = create_new_cloud_service + self.original_storage_account_option = original_storage_account_option + self.encryption_details = encryption_details + self.object_type = 'IaasVMRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vmilr_registration_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vmilr_registration_request.py index a0ecb03aa0dd..6ab623f22e73 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vmilr_registration_request.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vmilr_registration_request.py @@ -15,7 +15,9 @@ class IaasVMILRRegistrationRequest(ILRRequest): """Restore files/folders from a backup copy of IaaS VM. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param recovery_point_id: ID of the IaaS VM backup copy from where the files/folders have to be restored. @@ -42,10 +44,10 @@ class IaasVMILRRegistrationRequest(ILRRequest): 'renew_existing_registration': {'key': 'renewExistingRegistration', 'type': 'bool'}, } - def __init__(self, recovery_point_id=None, virtual_machine_id=None, initiator_name=None, renew_existing_registration=None): - super(IaasVMILRRegistrationRequest, self).__init__() - self.recovery_point_id = recovery_point_id - self.virtual_machine_id = virtual_machine_id - self.initiator_name = initiator_name - self.renew_existing_registration = renew_existing_registration + def __init__(self, **kwargs): + super(IaasVMILRRegistrationRequest, self).__init__(**kwargs) + self.recovery_point_id = kwargs.get('recovery_point_id', None) + self.virtual_machine_id = kwargs.get('virtual_machine_id', None) + self.initiator_name = kwargs.get('initiator_name', None) + self.renew_existing_registration = kwargs.get('renew_existing_registration', None) self.object_type = 'IaasVMILRRegistrationRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vmilr_registration_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vmilr_registration_request_py3.py new file mode 100644 index 000000000000..65c309171e34 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vmilr_registration_request_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .ilr_request_py3 import ILRRequest + + +class IaasVMILRRegistrationRequest(ILRRequest): + """Restore files/folders from a backup copy of IaaS VM. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_id: ID of the IaaS VM backup copy from where the + files/folders have to be restored. + :type recovery_point_id: str + :param virtual_machine_id: Fully qualified ARM ID of the virtual machine + whose the files / folders have to be restored. + :type virtual_machine_id: str + :param initiator_name: iSCSI initiator name. + :type initiator_name: str + :param renew_existing_registration: Whether to renew existing registration + with the iSCSI server. + :type renew_existing_registration: bool + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'initiator_name': {'key': 'initiatorName', 'type': 'str'}, + 'renew_existing_registration': {'key': 'renewExistingRegistration', 'type': 'bool'}, + } + + def __init__(self, *, recovery_point_id: str=None, virtual_machine_id: str=None, initiator_name: str=None, renew_existing_registration: bool=None, **kwargs) -> None: + super(IaasVMILRRegistrationRequest, self).__init__(**kwargs) + self.recovery_point_id = recovery_point_id + self.virtual_machine_id = virtual_machine_id + self.initiator_name = initiator_name + self.renew_existing_registration = renew_existing_registration + self.object_type = 'IaasVMILRRegistrationRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request.py index 496bfb107837..277056ae7482 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request.py @@ -15,7 +15,12 @@ class ILRRequest(Model): """Parameters to restore file/folders API. - :param object_type: Polymorphic Discriminator + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: IaasVMILRRegistrationRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str """ @@ -31,5 +36,6 @@ class ILRRequest(Model): 'object_type': {'IaasVMILRRegistrationRequest': 'IaasVMILRRegistrationRequest'} } - def __init__(self): + def __init__(self, **kwargs): + super(ILRRequest, self).__init__(**kwargs) self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_py3.py new file mode 100644 index 000000000000..318d3106ac80 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ILRRequest(Model): + """Parameters to restore file/folders API. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: IaasVMILRRegistrationRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'IaasVMILRRegistrationRequest': 'IaasVMILRRegistrationRequest'} + } + + def __init__(self, **kwargs) -> None: + super(ILRRequest, self).__init__(**kwargs) + self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_resource.py index 93f036c382de..c5686c5cb5f2 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_resource.py @@ -28,12 +28,11 @@ class ILRRequestResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: ILRRequestResource properties - :type properties: :class:`ILRRequest - ` + :type properties: ~azure.mgmt.recoveryservicesbackup.models.ILRRequest """ _validation = { @@ -52,6 +51,6 @@ class ILRRequestResource(Resource): 'properties': {'key': 'properties', 'type': 'ILRRequest'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(ILRRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(ILRRequestResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_resource_py3.py new file mode 100644 index 000000000000..c5556e712450 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_resource_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ILRRequestResource(Resource): + """Parameters to restore file/folders API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ILRRequestResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.ILRRequest + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ILRRequest'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(ILRRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_info.py new file mode 100644 index 000000000000..560696785506 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_info.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class InquiryInfo(Model): + """Details about inquired protectable items under a given container. + + :param status: Inquiry Status for this container such as + InProgress | Failed | Succeeded + :type status: str + :param error_detail: Error Details if the Status is non-success. + :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :param inquiry_details: Inquiry Details which will have workload specific + details. + For e.g. - For SQL and oracle this will contain different details. + :type inquiry_details: + list[~azure.mgmt.recoveryservicesbackup.models.WorkloadInquiryDetails] + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + 'inquiry_details': {'key': 'inquiryDetails', 'type': '[WorkloadInquiryDetails]'}, + } + + def __init__(self, **kwargs): + super(InquiryInfo, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.error_detail = kwargs.get('error_detail', None) + self.inquiry_details = kwargs.get('inquiry_details', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_info_py3.py new file mode 100644 index 000000000000..85838afd1907 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_info_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class InquiryInfo(Model): + """Details about inquired protectable items under a given container. + + :param status: Inquiry Status for this container such as + InProgress | Failed | Succeeded + :type status: str + :param error_detail: Error Details if the Status is non-success. + :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :param inquiry_details: Inquiry Details which will have workload specific + details. + For e.g. - For SQL and oracle this will contain different details. + :type inquiry_details: + list[~azure.mgmt.recoveryservicesbackup.models.WorkloadInquiryDetails] + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + 'inquiry_details': {'key': 'inquiryDetails', 'type': '[WorkloadInquiryDetails]'}, + } + + def __init__(self, *, status: str=None, error_detail=None, inquiry_details=None, **kwargs) -> None: + super(InquiryInfo, self).__init__(**kwargs) + self.status = status + self.error_detail = error_detail + self.inquiry_details = inquiry_details diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_validation.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_validation.py new file mode 100644 index 000000000000..3940e1cb0232 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_validation.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class InquiryValidation(Model): + """Validation for inquired protectable items under a given container. + + :param status: Status for the Inquiry Validation. + :type status: str + :param error_detail: Error Detail in case the status is non-success. + :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + } + + def __init__(self, **kwargs): + super(InquiryValidation, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.error_detail = kwargs.get('error_detail', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_validation_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_validation_py3.py new file mode 100644 index 000000000000..149ecb872812 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_validation_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class InquiryValidation(Model): + """Validation for inquired protectable items under a given container. + + :param status: Status for the Inquiry Validation. + :type status: str + :param error_detail: Error Detail in case the status is non-success. + :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + } + + def __init__(self, *, status: str=None, error_detail=None, **kwargs) -> None: + super(InquiryValidation, self).__init__(**kwargs) + self.status = status + self.error_detail = error_detail diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/instant_item_recovery_target.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/instant_item_recovery_target.py index 04bea6f37492..353ed474bbc1 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/instant_item_recovery_target.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/instant_item_recovery_target.py @@ -16,13 +16,14 @@ class InstantItemRecoveryTarget(Model): """Target details for file / folder restore. :param client_scripts: List of client scripts. - :type client_scripts: list of :class:`ClientScriptForConnect - ` + :type client_scripts: + list[~azure.mgmt.recoveryservicesbackup.models.ClientScriptForConnect] """ _attribute_map = { 'client_scripts': {'key': 'clientScripts', 'type': '[ClientScriptForConnect]'}, } - def __init__(self, client_scripts=None): - self.client_scripts = client_scripts + def __init__(self, **kwargs): + super(InstantItemRecoveryTarget, self).__init__(**kwargs) + self.client_scripts = kwargs.get('client_scripts', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/instant_item_recovery_target_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/instant_item_recovery_target_py3.py new file mode 100644 index 000000000000..096ccb322e2a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/instant_item_recovery_target_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class InstantItemRecoveryTarget(Model): + """Target details for file / folder restore. + + :param client_scripts: List of client scripts. + :type client_scripts: + list[~azure.mgmt.recoveryservicesbackup.models.ClientScriptForConnect] + """ + + _attribute_map = { + 'client_scripts': {'key': 'clientScripts', 'type': '[ClientScriptForConnect]'}, + } + + def __init__(self, *, client_scripts=None, **kwargs) -> None: + super(InstantItemRecoveryTarget, self).__init__(**kwargs) + self.client_scripts = client_scripts diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job.py index f9b11988760e..8f92979c163f 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job.py @@ -15,14 +15,21 @@ class Job(Model): """Defines workload agnostic properties for a job. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSVMJob, AzureStorageJob, AzureWorkloadJob, DpmJob, + MabJob + + All required parameters must be populated in order to send to Azure. + :param entity_friendly_name: Friendly name of the entity on which the current job is executing. :type entity_friendly_name: str :param backup_management_type: Backup management type to execute the current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param operation: The operation name. :type operation: str :param status: Job status. @@ -33,7 +40,7 @@ class Job(Model): :type end_time: datetime :param activity_id: ActivityId of job. :type activity_id: str - :param job_type: Polymorphic Discriminator + :param job_type: Required. Constant filled by server. :type job_type: str """ @@ -53,15 +60,16 @@ class Job(Model): } _subtype_map = { - 'job_type': {'AzureIaaSVMJob': 'AzureIaaSVMJob', 'DpmJob': 'DpmJob', 'MabJob': 'MabJob'} + 'job_type': {'AzureIaaSVMJob': 'AzureIaaSVMJob', 'AzureStorageJob': 'AzureStorageJob', 'AzureWorkloadJob': 'AzureWorkloadJob', 'DpmJob': 'DpmJob', 'MabJob': 'MabJob'} } - def __init__(self, entity_friendly_name=None, backup_management_type=None, operation=None, status=None, start_time=None, end_time=None, activity_id=None): - self.entity_friendly_name = entity_friendly_name - self.backup_management_type = backup_management_type - self.operation = operation - self.status = status - self.start_time = start_time - self.end_time = end_time - self.activity_id = activity_id + def __init__(self, **kwargs): + super(Job, self).__init__(**kwargs) + self.entity_friendly_name = kwargs.get('entity_friendly_name', None) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.operation = kwargs.get('operation', None) + self.status = kwargs.get('status', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.activity_id = kwargs.get('activity_id', None) self.job_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_py3.py new file mode 100644 index 000000000000..2b826769010e --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_py3.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Job(Model): + """Defines workload agnostic properties for a job. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSVMJob, AzureStorageJob, AzureWorkloadJob, DpmJob, + MabJob + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + } + + _subtype_map = { + 'job_type': {'AzureIaaSVMJob': 'AzureIaaSVMJob', 'AzureStorageJob': 'AzureStorageJob', 'AzureWorkloadJob': 'AzureWorkloadJob', 'DpmJob': 'DpmJob', 'MabJob': 'MabJob'} + } + + def __init__(self, *, entity_friendly_name: str=None, backup_management_type=None, operation: str=None, status: str=None, start_time=None, end_time=None, activity_id: str=None, **kwargs) -> None: + super(Job, self).__init__(**kwargs) + self.entity_friendly_name = entity_friendly_name + self.backup_management_type = backup_management_type + self.operation = operation + self.status = status + self.start_time = start_time + self.end_time = end_time + self.activity_id = activity_id + self.job_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_query_object.py index 9c1e3235e80a..49844525d847 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_query_object.py @@ -18,18 +18,18 @@ class JobQueryObject(Model): :param status: Status of the job. Possible values include: 'Invalid', 'InProgress', 'Completed', 'Failed', 'CompletedWithWarnings', 'Cancelled', 'Cancelling' - :type status: str or :class:`JobStatus - ` + :type status: str or ~azure.mgmt.recoveryservicesbackup.models.JobStatus :param backup_management_type: Type of backup managmenent for the job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param operation: Type of operation. Possible values include: 'Invalid', 'Register', 'UnRegister', 'ConfigureBackup', 'Backup', 'Restore', 'DisableBackup', 'DeleteBackupData' - :type operation: str or :class:`JobOperationType - ` + :type operation: str or + ~azure.mgmt.recoveryservicesbackup.models.JobOperationType :param job_id: JobID represents the job uniquely. :type job_id: str :param start_time: Job has started at this time. Value is in UTC. @@ -47,10 +47,11 @@ class JobQueryObject(Model): 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, } - def __init__(self, status=None, backup_management_type=None, operation=None, job_id=None, start_time=None, end_time=None): - self.status = status - self.backup_management_type = backup_management_type - self.operation = operation - self.job_id = job_id - self.start_time = start_time - self.end_time = end_time + def __init__(self, **kwargs): + super(JobQueryObject, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.operation = kwargs.get('operation', None) + self.job_id = kwargs.get('job_id', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_query_object_py3.py new file mode 100644 index 000000000000..dd765394d866 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_query_object_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobQueryObject(Model): + """Filters to list the jobs. + + :param status: Status of the job. Possible values include: 'Invalid', + 'InProgress', 'Completed', 'Failed', 'CompletedWithWarnings', 'Cancelled', + 'Cancelling' + :type status: str or ~azure.mgmt.recoveryservicesbackup.models.JobStatus + :param backup_management_type: Type of backup managmenent for the job. + Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: Type of operation. Possible values include: 'Invalid', + 'Register', 'UnRegister', 'ConfigureBackup', 'Backup', 'Restore', + 'DisableBackup', 'DeleteBackupData' + :type operation: str or + ~azure.mgmt.recoveryservicesbackup.models.JobOperationType + :param job_id: JobID represents the job uniquely. + :type job_id: str + :param start_time: Job has started at this time. Value is in UTC. + :type start_time: datetime + :param end_time: Job has ended at this time. Value is in UTC. + :type end_time: datetime + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, status=None, backup_management_type=None, operation=None, job_id: str=None, start_time=None, end_time=None, **kwargs) -> None: + super(JobQueryObject, self).__init__(**kwargs) + self.status = status + self.backup_management_type = backup_management_type + self.operation = operation + self.job_id = job_id + self.start_time = start_time + self.end_time = end_time diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_resource.py index daf894e97687..b66dadbeb2da 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_resource.py @@ -28,12 +28,11 @@ class JobResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: JobResource properties - :type properties: :class:`Job - ` + :type properties: ~azure.mgmt.recoveryservicesbackup.models.Job """ _validation = { @@ -52,6 +51,6 @@ class JobResource(Resource): 'properties': {'key': 'properties', 'type': 'Job'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(JobResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(JobResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_resource_py3.py new file mode 100644 index 000000000000..844c8775d27e --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_resource_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class JobResource(Resource): + """Defines workload agnostic properties for a job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: JobResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.Job + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'Job'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(JobResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/kek_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/kek_details.py index 33585955a5ae..7497bcb8c2a8 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/kek_details.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/kek_details.py @@ -29,7 +29,8 @@ class KEKDetails(Model): 'key_backup_data': {'key': 'keyBackupData', 'type': 'str'}, } - def __init__(self, key_url=None, key_vault_id=None, key_backup_data=None): - self.key_url = key_url - self.key_vault_id = key_vault_id - self.key_backup_data = key_backup_data + def __init__(self, **kwargs): + super(KEKDetails, self).__init__(**kwargs) + self.key_url = kwargs.get('key_url', None) + self.key_vault_id = kwargs.get('key_vault_id', None) + self.key_backup_data = kwargs.get('key_backup_data', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/kek_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/kek_details_py3.py new file mode 100644 index 000000000000..0dc4ab746c3b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/kek_details_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KEKDetails(Model): + """KEK is encryption key for BEK. + + :param key_url: Key is KEK. + :type key_url: str + :param key_vault_id: Key Vault ID where this Key is stored. + :type key_vault_id: str + :param key_backup_data: KEK data. + :type key_backup_data: str + """ + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + 'key_backup_data': {'key': 'keyBackupData', 'type': 'str'}, + } + + def __init__(self, *, key_url: str=None, key_vault_id: str=None, key_backup_data: str=None, **kwargs) -> None: + super(KEKDetails, self).__init__(**kwargs) + self.key_url = key_url + self.key_vault_id = key_vault_id + self.key_backup_data = key_backup_data diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/key_and_secret_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/key_and_secret_details.py index 4b19658a7142..03652133a779 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/key_and_secret_details.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/key_and_secret_details.py @@ -21,11 +21,9 @@ class KeyAndSecretDetails(Model): BEK and KEK can potentiallty have different vault ids. :param kek_details: KEK is encryption key for BEK. - :type kek_details: :class:`KEKDetails - ` + :type kek_details: ~azure.mgmt.recoveryservicesbackup.models.KEKDetails :param bek_details: BEK is bitlocker encrpytion key. - :type bek_details: :class:`BEKDetails - ` + :type bek_details: ~azure.mgmt.recoveryservicesbackup.models.BEKDetails """ _attribute_map = { @@ -33,6 +31,7 @@ class KeyAndSecretDetails(Model): 'bek_details': {'key': 'bekDetails', 'type': 'BEKDetails'}, } - def __init__(self, kek_details=None, bek_details=None): - self.kek_details = kek_details - self.bek_details = bek_details + def __init__(self, **kwargs): + super(KeyAndSecretDetails, self).__init__(**kwargs) + self.kek_details = kwargs.get('kek_details', None) + self.bek_details = kwargs.get('bek_details', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/key_and_secret_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/key_and_secret_details_py3.py new file mode 100644 index 000000000000..cb66582adff4 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/key_and_secret_details_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyAndSecretDetails(Model): + """BEK is bitlocker key. + KEK is encryption key for BEK + If the VM was encrypted then we will store follwing details : + 1. Secret(BEK) - Url + Backup Data + vaultId. + 2. Key(KEK) - Url + Backup Data + vaultId. + BEK and KEK can potentiallty have different vault ids. + + :param kek_details: KEK is encryption key for BEK. + :type kek_details: ~azure.mgmt.recoveryservicesbackup.models.KEKDetails + :param bek_details: BEK is bitlocker encrpytion key. + :type bek_details: ~azure.mgmt.recoveryservicesbackup.models.BEKDetails + """ + + _attribute_map = { + 'kek_details': {'key': 'kekDetails', 'type': 'KEKDetails'}, + 'bek_details': {'key': 'bekDetails', 'type': 'BEKDetails'}, + } + + def __init__(self, *, kek_details=None, bek_details=None, **kwargs) -> None: + super(KeyAndSecretDetails, self).__init__(**kwargs) + self.kek_details = kek_details + self.bek_details = bek_details diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/log_schedule_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/log_schedule_policy.py new file mode 100644 index 000000000000..f5ccd6e0544c --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/log_schedule_policy.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .schedule_policy import SchedulePolicy + + +class LogSchedulePolicy(SchedulePolicy): + """Log policy schedule. + + All required parameters must be populated in order to send to Azure. + + :param schedule_policy_type: Required. Constant filled by server. + :type schedule_policy_type: str + :param schedule_frequency_in_mins: Frequency of the log schedule operation + of this policy in minutes. + :type schedule_frequency_in_mins: int + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + 'schedule_frequency_in_mins': {'key': 'scheduleFrequencyInMins', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(LogSchedulePolicy, self).__init__(**kwargs) + self.schedule_frequency_in_mins = kwargs.get('schedule_frequency_in_mins', None) + self.schedule_policy_type = 'LogSchedulePolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/log_schedule_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/log_schedule_policy_py3.py new file mode 100644 index 000000000000..19495f52c8db --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/log_schedule_policy_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .schedule_policy_py3 import SchedulePolicy + + +class LogSchedulePolicy(SchedulePolicy): + """Log policy schedule. + + All required parameters must be populated in order to send to Azure. + + :param schedule_policy_type: Required. Constant filled by server. + :type schedule_policy_type: str + :param schedule_frequency_in_mins: Frequency of the log schedule operation + of this policy in minutes. + :type schedule_frequency_in_mins: int + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + 'schedule_frequency_in_mins': {'key': 'scheduleFrequencyInMins', 'type': 'int'}, + } + + def __init__(self, *, schedule_frequency_in_mins: int=None, **kwargs) -> None: + super(LogSchedulePolicy, self).__init__(**kwargs) + self.schedule_frequency_in_mins = schedule_frequency_in_mins + self.schedule_policy_type = 'LogSchedulePolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_retention_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_retention_policy.py index bd997bd87ba9..9d7a905f80d7 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_retention_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_retention_policy.py @@ -15,23 +15,25 @@ class LongTermRetentionPolicy(RetentionPolicy): """Long term retention policy. - :param retention_policy_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. :type retention_policy_type: str :param daily_schedule: Daily retention schedule of the protection policy. - :type daily_schedule: :class:`DailyRetentionSchedule - ` + :type daily_schedule: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionSchedule :param weekly_schedule: Weekly retention schedule of the protection policy. - :type weekly_schedule: :class:`WeeklyRetentionSchedule - ` + :type weekly_schedule: + ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionSchedule :param monthly_schedule: Monthly retention schedule of the protection policy. - :type monthly_schedule: :class:`MonthlyRetentionSchedule - ` + :type monthly_schedule: + ~azure.mgmt.recoveryservicesbackup.models.MonthlyRetentionSchedule :param yearly_schedule: Yearly retention schedule of the protection policy. - :type yearly_schedule: :class:`YearlyRetentionSchedule - ` + :type yearly_schedule: + ~azure.mgmt.recoveryservicesbackup.models.YearlyRetentionSchedule """ _validation = { @@ -46,10 +48,10 @@ class LongTermRetentionPolicy(RetentionPolicy): 'yearly_schedule': {'key': 'yearlySchedule', 'type': 'YearlyRetentionSchedule'}, } - def __init__(self, daily_schedule=None, weekly_schedule=None, monthly_schedule=None, yearly_schedule=None): - super(LongTermRetentionPolicy, self).__init__() - self.daily_schedule = daily_schedule - self.weekly_schedule = weekly_schedule - self.monthly_schedule = monthly_schedule - self.yearly_schedule = yearly_schedule + def __init__(self, **kwargs): + super(LongTermRetentionPolicy, self).__init__(**kwargs) + self.daily_schedule = kwargs.get('daily_schedule', None) + self.weekly_schedule = kwargs.get('weekly_schedule', None) + self.monthly_schedule = kwargs.get('monthly_schedule', None) + self.yearly_schedule = kwargs.get('yearly_schedule', None) self.retention_policy_type = 'LongTermRetentionPolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_retention_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_retention_policy_py3.py new file mode 100644 index 000000000000..d153eac6bd20 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_retention_policy_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .retention_policy_py3 import RetentionPolicy + + +class LongTermRetentionPolicy(RetentionPolicy): + """Long term retention policy. + + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. + :type retention_policy_type: str + :param daily_schedule: Daily retention schedule of the protection policy. + :type daily_schedule: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionSchedule + :param weekly_schedule: Weekly retention schedule of the protection + policy. + :type weekly_schedule: + ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionSchedule + :param monthly_schedule: Monthly retention schedule of the protection + policy. + :type monthly_schedule: + ~azure.mgmt.recoveryservicesbackup.models.MonthlyRetentionSchedule + :param yearly_schedule: Yearly retention schedule of the protection + policy. + :type yearly_schedule: + ~azure.mgmt.recoveryservicesbackup.models.YearlyRetentionSchedule + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, + 'daily_schedule': {'key': 'dailySchedule', 'type': 'DailyRetentionSchedule'}, + 'weekly_schedule': {'key': 'weeklySchedule', 'type': 'WeeklyRetentionSchedule'}, + 'monthly_schedule': {'key': 'monthlySchedule', 'type': 'MonthlyRetentionSchedule'}, + 'yearly_schedule': {'key': 'yearlySchedule', 'type': 'YearlyRetentionSchedule'}, + } + + def __init__(self, *, daily_schedule=None, weekly_schedule=None, monthly_schedule=None, yearly_schedule=None, **kwargs) -> None: + super(LongTermRetentionPolicy, self).__init__(**kwargs) + self.daily_schedule = daily_schedule + self.weekly_schedule = weekly_schedule + self.monthly_schedule = monthly_schedule + self.yearly_schedule = yearly_schedule + self.retention_policy_type = 'LongTermRetentionPolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_schedule_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_schedule_policy.py index c3357df16160..b288abafc000 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_schedule_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_schedule_policy.py @@ -15,7 +15,9 @@ class LongTermSchedulePolicy(SchedulePolicy): """Long term policy schedule. - :param schedule_policy_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param schedule_policy_type: Required. Constant filled by server. :type schedule_policy_type: str """ @@ -23,6 +25,10 @@ class LongTermSchedulePolicy(SchedulePolicy): 'schedule_policy_type': {'required': True}, } - def __init__(self): - super(LongTermSchedulePolicy, self).__init__() + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LongTermSchedulePolicy, self).__init__(**kwargs) self.schedule_policy_type = 'LongTermSchedulePolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_schedule_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_schedule_policy_py3.py new file mode 100644 index 000000000000..af275e0ccf3d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_schedule_policy_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .schedule_policy_py3 import SchedulePolicy + + +class LongTermSchedulePolicy(SchedulePolicy): + """Long term policy schedule. + + All required parameters must be populated in order to send to Azure. + + :param schedule_policy_type: Required. Constant filled by server. + :type schedule_policy_type: str + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LongTermSchedulePolicy, self).__init__(**kwargs) + self.schedule_policy_type = 'LongTermSchedulePolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container.py index cffbc38ea2af..290446d78c3d 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container.py @@ -15,33 +15,23 @@ class MabContainer(ProtectionContainer): """Container with items backed up using MAB backup engine. - 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 friendly_name: Friendly name of the container. :type friendly_name: str :param backup_management_type: Type of backup managemenent for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Status of registration of the container with the Recovery Services Vault. :type registration_status: str :param health_status: Status of health of the container. :type health_status: str - :ivar container_type: Type of the container. The value of this property - for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic - Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is - AzureSqlContainer. Possible values include: 'Invalid', 'Unknown', - 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', - 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - 'AzureSqlContainer', 'Windows', 'VCenter' - :vartype container_type: str or :class:`ContainerType - ` - :param protectable_object_type: Polymorphic Discriminator - :type protectable_object_type: str + :param container_type: Required. Constant filled by server. + :type container_type: str :param can_re_register: Can the container be registered one more time. :type can_re_register: bool :param container_id: ContainerID represents the container. @@ -51,13 +41,17 @@ class MabContainer(ProtectionContainer): :param agent_version: Agent version of this container. :type agent_version: str :param extended_info: Additional information for this container - :type extended_info: :class:`MabContainerExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.MabContainerExtendedInfo + :param mab_container_health_details: Health details on this mab container. + :type mab_container_health_details: + list[~azure.mgmt.recoveryservicesbackup.models.MABContainerHealthDetails] + :param container_health_state: Health state of mab container. + :type container_health_state: str """ _validation = { - 'container_type': {'readonly': True}, - 'protectable_object_type': {'required': True}, + 'container_type': {'required': True}, } _attribute_map = { @@ -66,19 +60,22 @@ class MabContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, - 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, 'container_id': {'key': 'containerId', 'type': 'long'}, 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, 'agent_version': {'key': 'agentVersion', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'MabContainerExtendedInfo'}, + 'mab_container_health_details': {'key': 'mabContainerHealthDetails', 'type': '[MABContainerHealthDetails]'}, + 'container_health_state': {'key': 'containerHealthState', 'type': 'str'}, } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, health_status=None, can_re_register=None, container_id=None, protected_item_count=None, agent_version=None, extended_info=None): - super(MabContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status) - self.can_re_register = can_re_register - self.container_id = container_id - self.protected_item_count = protected_item_count - self.agent_version = agent_version - self.extended_info = extended_info - self.protectable_object_type = 'MABWindowsContainer' + def __init__(self, **kwargs): + super(MabContainer, self).__init__(**kwargs) + self.can_re_register = kwargs.get('can_re_register', None) + self.container_id = kwargs.get('container_id', None) + self.protected_item_count = kwargs.get('protected_item_count', None) + self.agent_version = kwargs.get('agent_version', None) + self.extended_info = kwargs.get('extended_info', None) + self.mab_container_health_details = kwargs.get('mab_container_health_details', None) + self.container_health_state = kwargs.get('container_health_state', None) + self.container_type = 'MABWindowsContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_extended_info.py index 515cbbd9f164..300c7892ca5c 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_extended_info.py @@ -20,11 +20,12 @@ class MabContainerExtendedInfo(Model): :param backup_item_type: Type of backup items associated with this container. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - 'SystemState', 'Client', 'GenericDataSource' - :type backup_item_type: str or :class:`BackupItemType - ` + 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', + 'AzureFileShare' + :type backup_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupItemType :param backup_items: List of backup items associated with this container. - :type backup_items: list of str + :type backup_items: list[str] :param policy_name: Backup policy associated with this container. :type policy_name: str :param last_backup_status: Latest backup status of this container. @@ -39,9 +40,10 @@ class MabContainerExtendedInfo(Model): 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, } - def __init__(self, last_refreshed_at=None, backup_item_type=None, backup_items=None, policy_name=None, last_backup_status=None): - self.last_refreshed_at = last_refreshed_at - self.backup_item_type = backup_item_type - self.backup_items = backup_items - self.policy_name = policy_name - self.last_backup_status = last_backup_status + def __init__(self, **kwargs): + super(MabContainerExtendedInfo, self).__init__(**kwargs) + self.last_refreshed_at = kwargs.get('last_refreshed_at', None) + self.backup_item_type = kwargs.get('backup_item_type', None) + self.backup_items = kwargs.get('backup_items', None) + self.policy_name = kwargs.get('policy_name', None) + self.last_backup_status = kwargs.get('last_backup_status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_extended_info_py3.py new file mode 100644 index 000000000000..6fa456af82dc --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_extended_info_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MabContainerExtendedInfo(Model): + """Additional information of the container. + + :param last_refreshed_at: Time stamp when this container was refreshed. + :type last_refreshed_at: datetime + :param backup_item_type: Type of backup items associated with this + container. Possible values include: 'Invalid', 'VM', 'FileFolder', + 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', + 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', + 'AzureFileShare' + :type backup_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupItemType + :param backup_items: List of backup items associated with this container. + :type backup_items: list[str] + :param policy_name: Backup policy associated with this container. + :type policy_name: str + :param last_backup_status: Latest backup status of this container. + :type last_backup_status: str + """ + + _attribute_map = { + 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, + 'backup_item_type': {'key': 'backupItemType', 'type': 'str'}, + 'backup_items': {'key': 'backupItems', 'type': '[str]'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + } + + def __init__(self, *, last_refreshed_at=None, backup_item_type=None, backup_items=None, policy_name: str=None, last_backup_status: str=None, **kwargs) -> None: + super(MabContainerExtendedInfo, self).__init__(**kwargs) + self.last_refreshed_at = last_refreshed_at + self.backup_item_type = backup_item_type + self.backup_items = backup_items + self.policy_name = policy_name + self.last_backup_status = last_backup_status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_health_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_health_details.py new file mode 100644 index 000000000000..854c2d790cf5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_health_details.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MABContainerHealthDetails(Model): + """MAB workload-specific Health Details. + + :param code: Health Code + :type code: int + :param title: Health Title + :type title: str + :param message: Health Message + :type message: str + :param recommendations: Health Recommended Actions + :type recommendations: list[str] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'int'}, + 'title': {'key': 'title', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(MABContainerHealthDetails, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.title = kwargs.get('title', None) + self.message = kwargs.get('message', None) + self.recommendations = kwargs.get('recommendations', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_health_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_health_details_py3.py new file mode 100644 index 000000000000..1acdd3eca91b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_health_details_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MABContainerHealthDetails(Model): + """MAB workload-specific Health Details. + + :param code: Health Code + :type code: int + :param title: Health Title + :type title: str + :param message: Health Message + :type message: str + :param recommendations: Health Recommended Actions + :type recommendations: list[str] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'int'}, + 'title': {'key': 'title', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, *, code: int=None, title: str=None, message: str=None, recommendations=None, **kwargs) -> None: + super(MABContainerHealthDetails, self).__init__(**kwargs) + self.code = code + self.title = title + self.message = message + self.recommendations = recommendations diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_py3.py new file mode 100644 index 000000000000..042cea2fa5cb --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_py3.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_container_py3 import ProtectionContainer + + +class MabContainer(ProtectionContainer): + """Container with items backed up using MAB backup engine. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param can_re_register: Can the container be registered one more time. + :type can_re_register: bool + :param container_id: ContainerID represents the container. + :type container_id: long + :param protected_item_count: Number of items backed up in this container. + :type protected_item_count: long + :param agent_version: Agent version of this container. + :type agent_version: str + :param extended_info: Additional information for this container + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.MabContainerExtendedInfo + :param mab_container_health_details: Health details on this mab container. + :type mab_container_health_details: + list[~azure.mgmt.recoveryservicesbackup.models.MABContainerHealthDetails] + :param container_health_state: Health state of mab container. + :type container_health_state: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'container_id': {'key': 'containerId', 'type': 'long'}, + 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, + 'agent_version': {'key': 'agentVersion', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'MabContainerExtendedInfo'}, + 'mab_container_health_details': {'key': 'mabContainerHealthDetails', 'type': '[MABContainerHealthDetails]'}, + 'container_health_state': {'key': 'containerHealthState', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, can_re_register: bool=None, container_id: int=None, protected_item_count: int=None, agent_version: str=None, extended_info=None, mab_container_health_details=None, container_health_state: str=None, **kwargs) -> None: + super(MabContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + self.can_re_register = can_re_register + self.container_id = container_id + self.protected_item_count = protected_item_count + self.agent_version = agent_version + self.extended_info = extended_info + self.mab_container_health_details = mab_container_health_details + self.container_health_state = container_health_state + self.container_type = 'MABWindowsContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_error_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_error_info.py index d57e90b3fdea..9ef4846087a4 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_error_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_error_info.py @@ -18,7 +18,7 @@ class MabErrorInfo(Model): :param error_string: Localized error string. :type error_string: str :param recommendations: List of localized recommendations. - :type recommendations: list of str + :type recommendations: list[str] """ _attribute_map = { @@ -26,6 +26,7 @@ class MabErrorInfo(Model): 'recommendations': {'key': 'recommendations', 'type': '[str]'}, } - def __init__(self, error_string=None, recommendations=None): - self.error_string = error_string - self.recommendations = recommendations + def __init__(self, **kwargs): + super(MabErrorInfo, self).__init__(**kwargs) + self.error_string = kwargs.get('error_string', None) + self.recommendations = kwargs.get('recommendations', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_error_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_error_info_py3.py new file mode 100644 index 000000000000..89a026089da1 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_error_info_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MabErrorInfo(Model): + """MAB workload-specific error information. + + :param error_string: Localized error string. + :type error_string: str + :param recommendations: List of localized recommendations. + :type recommendations: list[str] + """ + + _attribute_map = { + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, *, error_string: str=None, recommendations=None, **kwargs) -> None: + super(MabErrorInfo, self).__init__(**kwargs) + self.error_string = error_string + self.recommendations = recommendations diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item.py index 25969c227884..7e406334f413 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item.py @@ -15,17 +15,20 @@ class MabFileFolderProtectedItem(ProtectedItem): """MAB workload-specific backup item. + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param workload_type: Type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - 'GenericDataSource' - :type workload_type: str or :class:`DataSourceType - ` + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType :param container_name: Unique name of container :type container_name: str :param source_resource_id: ARM ID of the resource to be backed up. @@ -36,7 +39,9 @@ class MabFileFolderProtectedItem(ProtectedItem): :param last_recovery_point: Timestamp when the last (latest) backup copy was created for this backup item. :type last_recovery_point: datetime - :param protected_item_type: Polymorphic Discriminator + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. :type protected_item_type: str :param friendly_name: Friendly name of this backup item. :type friendly_name: str @@ -54,8 +59,8 @@ class MabFileFolderProtectedItem(ProtectedItem): :param deferred_delete_sync_time_in_utc: Sync time for deferred deletion. :type deferred_delete_sync_time_in_utc: long :param extended_info: Additional information with this backup item. - :type extended_info: :class:`MabFileFolderProtectedItemExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.MabFileFolderProtectedItemExtendedInfo """ _validation = { @@ -69,6 +74,7 @@ class MabFileFolderProtectedItem(ProtectedItem): 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'policy_id': {'key': 'policyId', 'type': 'str'}, 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'computer_name': {'key': 'computerName', 'type': 'str'}, @@ -79,13 +85,13 @@ class MabFileFolderProtectedItem(ProtectedItem): 'extended_info': {'key': 'extendedInfo', 'type': 'MabFileFolderProtectedItemExtendedInfo'}, } - def __init__(self, backup_management_type=None, workload_type=None, container_name=None, source_resource_id=None, policy_id=None, last_recovery_point=None, friendly_name=None, computer_name=None, last_backup_status=None, protection_state=None, is_scheduled_for_deferred_delete=None, deferred_delete_sync_time_in_utc=None, extended_info=None): - super(MabFileFolderProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point) - self.friendly_name = friendly_name - self.computer_name = computer_name - self.last_backup_status = last_backup_status - self.protection_state = protection_state - self.is_scheduled_for_deferred_delete = is_scheduled_for_deferred_delete - self.deferred_delete_sync_time_in_utc = deferred_delete_sync_time_in_utc - self.extended_info = extended_info + def __init__(self, **kwargs): + super(MabFileFolderProtectedItem, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.computer_name = kwargs.get('computer_name', None) + self.last_backup_status = kwargs.get('last_backup_status', None) + self.protection_state = kwargs.get('protection_state', None) + self.is_scheduled_for_deferred_delete = kwargs.get('is_scheduled_for_deferred_delete', None) + self.deferred_delete_sync_time_in_utc = kwargs.get('deferred_delete_sync_time_in_utc', None) + self.extended_info = kwargs.get('extended_info', None) self.protected_item_type = 'MabFileFolderProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_extended_info.py index 07c902a4fb9e..9b5dbe440819 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_extended_info.py @@ -30,7 +30,8 @@ class MabFileFolderProtectedItemExtendedInfo(Model): 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, } - def __init__(self, last_refreshed_at=None, oldest_recovery_point=None, recovery_point_count=None): - self.last_refreshed_at = last_refreshed_at - self.oldest_recovery_point = oldest_recovery_point - self.recovery_point_count = recovery_point_count + def __init__(self, **kwargs): + super(MabFileFolderProtectedItemExtendedInfo, self).__init__(**kwargs) + self.last_refreshed_at = kwargs.get('last_refreshed_at', None) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_extended_info_py3.py new file mode 100644 index 000000000000..246830841cfe --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_extended_info_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MabFileFolderProtectedItemExtendedInfo(Model): + """Additional information on the backed up item. + + :param last_refreshed_at: Last time when the agent data synced to service. + :type last_refreshed_at: datetime + :param oldest_recovery_point: The oldest backup copy available. + :type oldest_recovery_point: datetime + :param recovery_point_count: Number of backup copies associated with the + backup item. + :type recovery_point_count: int + """ + + _attribute_map = { + 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + } + + def __init__(self, *, last_refreshed_at=None, oldest_recovery_point=None, recovery_point_count: int=None, **kwargs) -> None: + super(MabFileFolderProtectedItemExtendedInfo, self).__init__(**kwargs) + self.last_refreshed_at = last_refreshed_at + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_py3.py new file mode 100644 index 000000000000..77dc4ffc8a24 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_py3.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protected_item_py3 import ProtectedItem + + +class MabFileFolderProtectedItem(ProtectedItem): + """MAB workload-specific backup item. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of this backup item. + :type friendly_name: str + :param computer_name: Name of the computer associated with this backup + item. + :type computer_name: str + :param last_backup_status: Status of last backup operation. + :type last_backup_status: str + :param protection_state: Protected, ProtectionStopped, IRPending or + ProtectionError + :type protection_state: str + :param is_scheduled_for_deferred_delete: Specifies if the item is + scheduled for deferred deletion. + :type is_scheduled_for_deferred_delete: bool + :param deferred_delete_sync_time_in_utc: Sync time for deferred deletion. + :type deferred_delete_sync_time_in_utc: long + :param extended_info: Additional information with this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.MabFileFolderProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'is_scheduled_for_deferred_delete': {'key': 'isScheduledForDeferredDelete', 'type': 'bool'}, + 'deferred_delete_sync_time_in_utc': {'key': 'deferredDeleteSyncTimeInUTC', 'type': 'long'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'MabFileFolderProtectedItemExtendedInfo'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, friendly_name: str=None, computer_name: str=None, last_backup_status: str=None, protection_state: str=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_sync_time_in_utc: int=None, extended_info=None, **kwargs) -> None: + super(MabFileFolderProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, **kwargs) + self.friendly_name = friendly_name + self.computer_name = computer_name + self.last_backup_status = last_backup_status + self.protection_state = protection_state + self.is_scheduled_for_deferred_delete = is_scheduled_for_deferred_delete + self.deferred_delete_sync_time_in_utc = deferred_delete_sync_time_in_utc + self.extended_info = extended_info + self.protected_item_type = 'MabFileFolderProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job.py index 2e568b44e66d..39b5ca2f1797 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job.py @@ -15,14 +15,17 @@ class MabJob(Job): """MAB workload-specific job. + All required parameters must be populated in order to send to Azure. + :param entity_friendly_name: Friendly name of the entity on which the current job is executing. :type entity_friendly_name: str :param backup_management_type: Backup management type to execute the current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param operation: The operation name. :type operation: str :param status: Job status. @@ -33,33 +36,36 @@ class MabJob(Job): :type end_time: datetime :param activity_id: ActivityId of job. :type activity_id: str - :param job_type: Polymorphic Discriminator + :param job_type: Required. Constant filled by server. :type job_type: str :param duration: Time taken by job to run. :type duration: timedelta :param actions_info: The state/actions applicable on jobs like cancel/retry. - :type actions_info: list of str or :class:`JobSupportedAction - ` + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] :param mab_server_name: Name of server protecting the DS. :type mab_server_name: str :param mab_server_type: Server type of MAB container. Possible values include: 'Invalid', 'Unknown', 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', 'AzureBackupServerContainer', - 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter' - :type mab_server_type: str or :class:`MabServerType - ` + 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter', + 'VMAppContainer', 'SQLAGWorkLoadContainer', 'StorageContainer', + 'GenericContainer' + :type mab_server_type: str or + ~azure.mgmt.recoveryservicesbackup.models.MabServerType :param workload_type: Workload type of backup item. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', - 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource' - :type workload_type: str or :class:`WorkloadType - ` + 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', + 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadType :param error_details: The errors. - :type error_details: list of :class:`MabErrorInfo - ` + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.MabErrorInfo] :param extended_info: Additional information on the job. - :type extended_info: :class:`MabJobExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.MabJobExtendedInfo """ _validation = { @@ -84,13 +90,13 @@ class MabJob(Job): 'extended_info': {'key': 'extendedInfo', 'type': 'MabJobExtendedInfo'}, } - def __init__(self, entity_friendly_name=None, backup_management_type=None, operation=None, status=None, start_time=None, end_time=None, activity_id=None, duration=None, actions_info=None, mab_server_name=None, mab_server_type=None, workload_type=None, error_details=None, extended_info=None): - super(MabJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id) - self.duration = duration - self.actions_info = actions_info - self.mab_server_name = mab_server_name - self.mab_server_type = mab_server_type - self.workload_type = workload_type - self.error_details = error_details - self.extended_info = extended_info + def __init__(self, **kwargs): + super(MabJob, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) + self.actions_info = kwargs.get('actions_info', None) + self.mab_server_name = kwargs.get('mab_server_name', None) + self.mab_server_type = kwargs.get('mab_server_type', None) + self.workload_type = kwargs.get('workload_type', None) + self.error_details = kwargs.get('error_details', None) + self.extended_info = kwargs.get('extended_info', None) self.job_type = 'MabJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_extended_info.py index 4f1e4616e72d..a0bec3fdf6c3 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_extended_info.py @@ -16,10 +16,10 @@ class MabJobExtendedInfo(Model): """Additional information for the MAB workload-specific job. :param tasks_list: List of tasks for this job. - :type tasks_list: list of :class:`MabJobTaskDetails - ` + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.MabJobTaskDetails] :param property_bag: The job properties. - :type property_bag: dict + :type property_bag: dict[str, str] :param dynamic_error_message: Non localized error message specific to this job. :type dynamic_error_message: str @@ -31,7 +31,8 @@ class MabJobExtendedInfo(Model): 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, } - def __init__(self, tasks_list=None, property_bag=None, dynamic_error_message=None): - self.tasks_list = tasks_list - self.property_bag = property_bag - self.dynamic_error_message = dynamic_error_message + def __init__(self, **kwargs): + super(MabJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = kwargs.get('tasks_list', None) + self.property_bag = kwargs.get('property_bag', None) + self.dynamic_error_message = kwargs.get('dynamic_error_message', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_extended_info_py3.py new file mode 100644 index 000000000000..33b4c436af78 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_extended_info_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MabJobExtendedInfo(Model): + """Additional information for the MAB workload-specific job. + + :param tasks_list: List of tasks for this job. + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.MabJobTaskDetails] + :param property_bag: The job properties. + :type property_bag: dict[str, str] + :param dynamic_error_message: Non localized error message specific to this + job. + :type dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[MabJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__(self, *, tasks_list=None, property_bag=None, dynamic_error_message: str=None, **kwargs) -> None: + super(MabJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = tasks_list + self.property_bag = property_bag + self.dynamic_error_message = dynamic_error_message diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_py3.py new file mode 100644 index 000000000000..77822f0e41f9 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_py3.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .job_py3 import Job + + +class MabJob(Job): + """MAB workload-specific job. + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + :param duration: Time taken by job to run. + :type duration: timedelta + :param actions_info: The state/actions applicable on jobs like + cancel/retry. + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :param mab_server_name: Name of server protecting the DS. + :type mab_server_name: str + :param mab_server_type: Server type of MAB container. Possible values + include: 'Invalid', 'Unknown', 'IaasVMContainer', + 'IaasVMServiceContainer', 'DPMContainer', 'AzureBackupServerContainer', + 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter', + 'VMAppContainer', 'SQLAGWorkLoadContainer', 'StorageContainer', + 'GenericContainer' + :type mab_server_type: str or + ~azure.mgmt.recoveryservicesbackup.models.MabServerType + :param workload_type: Workload type of backup item. Possible values + include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', + 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', + 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :param error_details: The errors. + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.MabErrorInfo] + :param extended_info: Additional information on the job. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.MabJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[JobSupportedAction]'}, + 'mab_server_name': {'key': 'mabServerName', 'type': 'str'}, + 'mab_server_type': {'key': 'mabServerType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'error_details': {'key': 'errorDetails', 'type': '[MabErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'MabJobExtendedInfo'}, + } + + def __init__(self, *, entity_friendly_name: str=None, backup_management_type=None, operation: str=None, status: str=None, start_time=None, end_time=None, activity_id: str=None, duration=None, actions_info=None, mab_server_name: str=None, mab_server_type=None, workload_type=None, error_details=None, extended_info=None, **kwargs) -> None: + super(MabJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) + self.duration = duration + self.actions_info = actions_info + self.mab_server_name = mab_server_name + self.mab_server_type = mab_server_type + self.workload_type = workload_type + self.error_details = error_details + self.extended_info = extended_info + self.job_type = 'MabJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_task_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_task_details.py index 79c06f11d80d..4bdd129d8932 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_task_details.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_task_details.py @@ -35,9 +35,10 @@ class MabJobTaskDetails(Model): 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, task_id=None, start_time=None, end_time=None, duration=None, status=None): - self.task_id = task_id - self.start_time = start_time - self.end_time = end_time - self.duration = duration - self.status = status + def __init__(self, **kwargs): + super(MabJobTaskDetails, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.duration = kwargs.get('duration', None) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_task_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_task_details_py3.py new file mode 100644 index 000000000000..da73da96a7f0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_task_details_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MabJobTaskDetails(Model): + """MAB workload-specific job task details. + + :param task_id: The task display name. + :type task_id: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param duration: Time elapsed for task. + :type duration: timedelta + :param status: The status. + :type status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, task_id: str=None, start_time=None, end_time=None, duration=None, status: str=None, **kwargs) -> None: + super(MabJobTaskDetails, self).__init__(**kwargs) + self.task_id = task_id + self.start_time = start_time + self.end_time = end_time + self.duration = duration + self.status = status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_protection_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_protection_policy.py index e3082f9017a4..f44ea6e7311a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_protection_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_protection_policy.py @@ -15,16 +15,18 @@ class MabProtectionPolicy(ProtectionPolicy): """Mab container-specific backup policy. + All required parameters must be populated in order to send to Azure. + :param protected_items_count: Number of items associated with this policy. :type protected_items_count: int - :param backup_management_type: Polymorphic Discriminator + :param backup_management_type: Required. Constant filled by server. :type backup_management_type: str :param schedule_policy: Backup schedule of backup policy. - :type schedule_policy: :class:`SchedulePolicy - ` + :type schedule_policy: + ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy :param retention_policy: Retention policy details. - :type retention_policy: :class:`RetentionPolicy - ` + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy """ _validation = { @@ -38,8 +40,8 @@ class MabProtectionPolicy(ProtectionPolicy): 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, } - def __init__(self, protected_items_count=None, schedule_policy=None, retention_policy=None): - super(MabProtectionPolicy, self).__init__(protected_items_count=protected_items_count) - self.schedule_policy = schedule_policy - self.retention_policy = retention_policy + def __init__(self, **kwargs): + super(MabProtectionPolicy, self).__init__(**kwargs) + self.schedule_policy = kwargs.get('schedule_policy', None) + self.retention_policy = kwargs.get('retention_policy', None) self.backup_management_type = 'MAB' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_protection_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_protection_policy_py3.py new file mode 100644 index 000000000000..e5ef4e29d7b5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_protection_policy_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_policy_py3 import ProtectionPolicy + + +class MabProtectionPolicy(ProtectionPolicy): + """Mab container-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param schedule_policy: Backup schedule of backup policy. + :type schedule_policy: + ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :param retention_policy: Retention policy details. + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__(self, *, protected_items_count: int=None, schedule_policy=None, retention_policy=None, **kwargs) -> None: + super(MabProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + self.schedule_policy = schedule_policy + self.retention_policy = retention_policy + self.backup_management_type = 'MAB' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/monthly_retention_schedule.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/monthly_retention_schedule.py index f3a4ea2e5ff6..27a68660d1f9 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/monthly_retention_schedule.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/monthly_retention_schedule.py @@ -19,21 +19,20 @@ class MonthlyRetentionSchedule(Model): monthly retention policy. Possible values include: 'Invalid', 'Daily', 'Weekly' :type retention_schedule_format_type: str or - :class:`RetentionScheduleFormat - ` + ~azure.mgmt.recoveryservicesbackup.models.RetentionScheduleFormat :param retention_schedule_daily: Daily retention format for monthly retention policy. - :type retention_schedule_daily: :class:`DailyRetentionFormat - ` + :type retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat :param retention_schedule_weekly: Weekly retention format for monthly retention policy. - :type retention_schedule_weekly: :class:`WeeklyRetentionFormat - ` + :type retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionFormat :param retention_times: Retention times of retention policy. - :type retention_times: list of datetime + :type retention_times: list[datetime] :param retention_duration: Retention duration of retention Policy. - :type retention_duration: :class:`RetentionDuration - ` + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _attribute_map = { @@ -44,9 +43,10 @@ class MonthlyRetentionSchedule(Model): 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, } - def __init__(self, retention_schedule_format_type=None, retention_schedule_daily=None, retention_schedule_weekly=None, retention_times=None, retention_duration=None): - self.retention_schedule_format_type = retention_schedule_format_type - self.retention_schedule_daily = retention_schedule_daily - self.retention_schedule_weekly = retention_schedule_weekly - self.retention_times = retention_times - self.retention_duration = retention_duration + def __init__(self, **kwargs): + super(MonthlyRetentionSchedule, self).__init__(**kwargs) + self.retention_schedule_format_type = kwargs.get('retention_schedule_format_type', None) + self.retention_schedule_daily = kwargs.get('retention_schedule_daily', None) + self.retention_schedule_weekly = kwargs.get('retention_schedule_weekly', None) + self.retention_times = kwargs.get('retention_times', None) + self.retention_duration = kwargs.get('retention_duration', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/monthly_retention_schedule_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/monthly_retention_schedule_py3.py new file mode 100644 index 000000000000..0f76a43c6d4c --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/monthly_retention_schedule_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MonthlyRetentionSchedule(Model): + """Monthly retention schedule. + + :param retention_schedule_format_type: Retention schedule format type for + monthly retention policy. Possible values include: 'Invalid', 'Daily', + 'Weekly' + :type retention_schedule_format_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RetentionScheduleFormat + :param retention_schedule_daily: Daily retention format for monthly + retention policy. + :type retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat + :param retention_schedule_weekly: Weekly retention format for monthly + retention policy. + :type retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionFormat + :param retention_times: Retention times of retention policy. + :type retention_times: list[datetime] + :param retention_duration: Retention duration of retention Policy. + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ + + _attribute_map = { + 'retention_schedule_format_type': {'key': 'retentionScheduleFormatType', 'type': 'str'}, + 'retention_schedule_daily': {'key': 'retentionScheduleDaily', 'type': 'DailyRetentionFormat'}, + 'retention_schedule_weekly': {'key': 'retentionScheduleWeekly', 'type': 'WeeklyRetentionFormat'}, + 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + def __init__(self, *, retention_schedule_format_type=None, retention_schedule_daily=None, retention_schedule_weekly=None, retention_times=None, retention_duration=None, **kwargs) -> None: + super(MonthlyRetentionSchedule, self).__init__(**kwargs) + self.retention_schedule_format_type = retention_schedule_format_type + self.retention_schedule_daily = retention_schedule_daily + self.retention_schedule_weekly = retention_schedule_weekly + self.retention_times = retention_times + self.retention_duration = retention_duration diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/name_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/name_info.py index 647b137a7f5d..fe124296d77a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/name_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/name_info.py @@ -26,6 +26,7 @@ class NameInfo(Model): 'localized_value': {'key': 'localizedValue', 'type': 'str'}, } - def __init__(self, value=None, localized_value=None): - self.value = value - self.localized_value = localized_value + def __init__(self, **kwargs): + super(NameInfo, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/name_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/name_info_py3.py new file mode 100644 index 000000000000..92ebeac4e05f --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/name_info_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NameInfo(Model): + """The name of usage. + + :param value: Value of usage. + :type value: str + :param localized_value: Localized value of usage. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(NameInfo, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info.py index 8d367af660b3..d8ef467de12e 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info.py @@ -15,10 +15,12 @@ class OperationResultInfo(OperationResultInfoBase): """Operation result info. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param job_list: List of jobs created by this operation. - :type job_list: list of str + :type job_list: list[str] """ _validation = { @@ -30,7 +32,7 @@ class OperationResultInfo(OperationResultInfoBase): 'job_list': {'key': 'jobList', 'type': '[str]'}, } - def __init__(self, job_list=None): - super(OperationResultInfo, self).__init__() - self.job_list = job_list + def __init__(self, **kwargs): + super(OperationResultInfo, self).__init__(**kwargs) + self.job_list = kwargs.get('job_list', None) self.object_type = 'OperationResultInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base.py index 0952b67e9fb0..ce015a5df5b2 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base.py @@ -15,7 +15,12 @@ class OperationResultInfoBase(Model): """Base class for operation result info. - :param object_type: Polymorphic Discriminator + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ExportJobsOperationResultInfo, OperationResultInfo + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str """ @@ -31,5 +36,6 @@ class OperationResultInfoBase(Model): 'object_type': {'ExportJobsOperationResultInfo': 'ExportJobsOperationResultInfo', 'OperationResultInfo': 'OperationResultInfo'} } - def __init__(self): + def __init__(self, **kwargs): + super(OperationResultInfoBase, self).__init__(**kwargs) self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_py3.py new file mode 100644 index 000000000000..e39b4b30edf3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationResultInfoBase(Model): + """Base class for operation result info. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ExportJobsOperationResultInfo, OperationResultInfo + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'ExportJobsOperationResultInfo': 'ExportJobsOperationResultInfo', 'OperationResultInfo': 'OperationResultInfo'} + } + + def __init__(self, **kwargs) -> None: + super(OperationResultInfoBase, self).__init__(**kwargs) + self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_resource.py index 4f6580c62f60..8c5aa269a2dc 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_resource.py @@ -29,21 +29,21 @@ class OperationResultInfoBaseResource(OperationWorkerResponse): 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HttpVersionNotSupported' - :type status_code: str or :class:`HttpStatusCode - ` + :type status_code: str or + ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode :param headers: HTTP headers associated with this operation. - :type headers: dict + :type headers: dict[str, list[str]] :param operation: OperationResultInfoBaseResource operation - :type operation: :class:`OperationResultInfoBase - ` + :type operation: + ~azure.mgmt.recoveryservicesbackup.models.OperationResultInfoBase """ _attribute_map = { 'status_code': {'key': 'statusCode', 'type': 'HttpStatusCode'}, - 'headers': {'key': 'Headers', 'type': '{[str]}'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, 'operation': {'key': 'operation', 'type': 'OperationResultInfoBase'}, } - def __init__(self, status_code=None, headers=None, operation=None): - super(OperationResultInfoBaseResource, self).__init__(status_code=status_code, headers=headers) - self.operation = operation + def __init__(self, **kwargs): + super(OperationResultInfoBaseResource, self).__init__(**kwargs) + self.operation = kwargs.get('operation', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_resource_py3.py new file mode 100644 index 000000000000..e784f7d5884a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_resource_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .operation_worker_response_py3 import OperationWorkerResponse + + +class OperationResultInfoBaseResource(OperationWorkerResponse): + """Base class for operation result info. + + :param status_code: HTTP Status Code of the operation. Possible values + include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', + 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', + 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', + 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', + 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', + 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', + 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', + 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', + 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + 'HttpVersionNotSupported' + :type status_code: str or + ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode + :param headers: HTTP headers associated with this operation. + :type headers: dict[str, list[str]] + :param operation: OperationResultInfoBaseResource operation + :type operation: + ~azure.mgmt.recoveryservicesbackup.models.OperationResultInfoBase + """ + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'HttpStatusCode'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + 'operation': {'key': 'operation', 'type': 'OperationResultInfoBase'}, + } + + def __init__(self, *, status_code=None, headers=None, operation=None, **kwargs) -> None: + super(OperationResultInfoBaseResource, self).__init__(status_code=status_code, headers=headers, **kwargs) + self.operation = operation diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_py3.py new file mode 100644 index 000000000000..28273a8f3a78 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .operation_result_info_base_py3 import OperationResultInfoBase + + +class OperationResultInfo(OperationResultInfoBase): + """Operation result info. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param job_list: List of jobs created by this operation. + :type job_list: list[str] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'job_list': {'key': 'jobList', 'type': '[str]'}, + } + + def __init__(self, *, job_list=None, **kwargs) -> None: + super(OperationResultInfo, self).__init__(**kwargs) + self.job_list = job_list + self.object_type = 'OperationResultInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status.py index baeceaec7bc9..e57e8b6be760 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status.py @@ -21,18 +21,18 @@ class OperationStatus(Model): :type name: str :param status: Operation status. Possible values include: 'Invalid', 'InProgress', 'Succeeded', 'Failed', 'Canceled' - :type status: str or :class:`OperationStatusValues - ` + :type status: str or + ~azure.mgmt.recoveryservicesbackup.models.OperationStatusValues :param start_time: Operation start time. Format: ISO-8601. :type start_time: datetime :param end_time: Operation end time. Format: ISO-8601. :type end_time: datetime :param error: Error information related to this operation. - :type error: :class:`OperationStatusError - ` + :type error: + ~azure.mgmt.recoveryservicesbackup.models.OperationStatusError :param properties: Additional information associated with this operation. - :type properties: :class:`OperationStatusExtendedInfo - ` + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.OperationStatusExtendedInfo """ _attribute_map = { @@ -45,11 +45,12 @@ class OperationStatus(Model): 'properties': {'key': 'properties', 'type': 'OperationStatusExtendedInfo'}, } - def __init__(self, id=None, name=None, status=None, start_time=None, end_time=None, error=None, properties=None): - self.id = id - self.name = name - self.status = status - self.start_time = start_time - self.end_time = end_time - self.error = error - self.properties = properties + def __init__(self, **kwargs): + super(OperationStatus, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.status = kwargs.get('status', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.error = kwargs.get('error', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_error.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_error.py index 2284b1fe67fe..a7414e3400c6 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_error.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_error.py @@ -26,6 +26,7 @@ class OperationStatusError(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, code=None, message=None): - self.code = code - self.message = message + def __init__(self, **kwargs): + super(OperationStatusError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_error_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_error_py3.py new file mode 100644 index 000000000000..982a7c177867 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_error_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationStatusError(Model): + """Error information associated with operation status call. + + :param code: Error code of the operation failure. + :type code: str + :param message: Error message displayed if the operation failure. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(OperationStatusError, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_extended_info.py index 300596c78941..f89804223cd0 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_extended_info.py @@ -15,7 +15,13 @@ class OperationStatusExtendedInfo(Model): """Base class for additional information of operation status. - :param object_type: Polymorphic Discriminator + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: OperationStatusJobExtendedInfo, + OperationStatusJobsExtendedInfo, OperationStatusProvisionILRExtendedInfo + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str """ @@ -31,5 +37,6 @@ class OperationStatusExtendedInfo(Model): 'object_type': {'OperationStatusJobExtendedInfo': 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo': 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo': 'OperationStatusProvisionILRExtendedInfo'} } - def __init__(self): + def __init__(self, **kwargs): + super(OperationStatusExtendedInfo, self).__init__(**kwargs) self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_extended_info_py3.py new file mode 100644 index 000000000000..166aab47470d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_extended_info_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationStatusExtendedInfo(Model): + """Base class for additional information of operation status. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: OperationStatusJobExtendedInfo, + OperationStatusJobsExtendedInfo, OperationStatusProvisionILRExtendedInfo + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'OperationStatusJobExtendedInfo': 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo': 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo': 'OperationStatusProvisionILRExtendedInfo'} + } + + def __init__(self, **kwargs) -> None: + super(OperationStatusExtendedInfo, self).__init__(**kwargs) + self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_job_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_job_extended_info.py index 854b1cb311e2..5357cae92e03 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_job_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_job_extended_info.py @@ -15,7 +15,9 @@ class OperationStatusJobExtendedInfo(OperationStatusExtendedInfo): """Operation status job extended info. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param job_id: ID of the job created for this protected item. :type job_id: str @@ -30,7 +32,7 @@ class OperationStatusJobExtendedInfo(OperationStatusExtendedInfo): 'job_id': {'key': 'jobId', 'type': 'str'}, } - def __init__(self, job_id=None): - super(OperationStatusJobExtendedInfo, self).__init__() - self.job_id = job_id + def __init__(self, **kwargs): + super(OperationStatusJobExtendedInfo, self).__init__(**kwargs) + self.job_id = kwargs.get('job_id', None) self.object_type = 'OperationStatusJobExtendedInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_job_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_job_extended_info_py3.py new file mode 100644 index 000000000000..a64796ae4fd3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_job_extended_info_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .operation_status_extended_info_py3 import OperationStatusExtendedInfo + + +class OperationStatusJobExtendedInfo(OperationStatusExtendedInfo): + """Operation status job extended info. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param job_id: ID of the job created for this protected item. + :type job_id: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + } + + def __init__(self, *, job_id: str=None, **kwargs) -> None: + super(OperationStatusJobExtendedInfo, self).__init__(**kwargs) + self.job_id = job_id + self.object_type = 'OperationStatusJobExtendedInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_jobs_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_jobs_extended_info.py index b0e9428364e0..a28b6b8690ba 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_jobs_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_jobs_extended_info.py @@ -15,13 +15,15 @@ class OperationStatusJobsExtendedInfo(OperationStatusExtendedInfo): """Operation status extended info for list of jobs. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param job_ids: IDs of the jobs created for the protected item. - :type job_ids: list of str + :type job_ids: list[str] :param failed_jobs_error: Stores all the failed jobs along with the corresponding error codes. - :type failed_jobs_error: dict + :type failed_jobs_error: dict[str, str] """ _validation = { @@ -34,8 +36,8 @@ class OperationStatusJobsExtendedInfo(OperationStatusExtendedInfo): 'failed_jobs_error': {'key': 'failedJobsError', 'type': '{str}'}, } - def __init__(self, job_ids=None, failed_jobs_error=None): - super(OperationStatusJobsExtendedInfo, self).__init__() - self.job_ids = job_ids - self.failed_jobs_error = failed_jobs_error + def __init__(self, **kwargs): + super(OperationStatusJobsExtendedInfo, self).__init__(**kwargs) + self.job_ids = kwargs.get('job_ids', None) + self.failed_jobs_error = kwargs.get('failed_jobs_error', None) self.object_type = 'OperationStatusJobsExtendedInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_jobs_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_jobs_extended_info_py3.py new file mode 100644 index 000000000000..afa2cc0a4bbb --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_jobs_extended_info_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .operation_status_extended_info_py3 import OperationStatusExtendedInfo + + +class OperationStatusJobsExtendedInfo(OperationStatusExtendedInfo): + """Operation status extended info for list of jobs. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param job_ids: IDs of the jobs created for the protected item. + :type job_ids: list[str] + :param failed_jobs_error: Stores all the failed jobs along with the + corresponding error codes. + :type failed_jobs_error: dict[str, str] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'job_ids': {'key': 'jobIds', 'type': '[str]'}, + 'failed_jobs_error': {'key': 'failedJobsError', 'type': '{str}'}, + } + + def __init__(self, *, job_ids=None, failed_jobs_error=None, **kwargs) -> None: + super(OperationStatusJobsExtendedInfo, self).__init__(**kwargs) + self.job_ids = job_ids + self.failed_jobs_error = failed_jobs_error + self.object_type = 'OperationStatusJobsExtendedInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_provision_ilr_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_provision_ilr_extended_info.py index dc701c4810b5..3a18cc08753b 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_provision_ilr_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_provision_ilr_extended_info.py @@ -15,11 +15,13 @@ class OperationStatusProvisionILRExtendedInfo(OperationStatusExtendedInfo): """Operation status extended info for ILR provision action. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param recovery_target: Target details for file / folder restore. - :type recovery_target: :class:`InstantItemRecoveryTarget - ` + :type recovery_target: + ~azure.mgmt.recoveryservicesbackup.models.InstantItemRecoveryTarget """ _validation = { @@ -31,7 +33,7 @@ class OperationStatusProvisionILRExtendedInfo(OperationStatusExtendedInfo): 'recovery_target': {'key': 'recoveryTarget', 'type': 'InstantItemRecoveryTarget'}, } - def __init__(self, recovery_target=None): - super(OperationStatusProvisionILRExtendedInfo, self).__init__() - self.recovery_target = recovery_target + def __init__(self, **kwargs): + super(OperationStatusProvisionILRExtendedInfo, self).__init__(**kwargs) + self.recovery_target = kwargs.get('recovery_target', None) self.object_type = 'OperationStatusProvisionILRExtendedInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_provision_ilr_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_provision_ilr_extended_info_py3.py new file mode 100644 index 000000000000..8f6b4e9c6552 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_provision_ilr_extended_info_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .operation_status_extended_info_py3 import OperationStatusExtendedInfo + + +class OperationStatusProvisionILRExtendedInfo(OperationStatusExtendedInfo): + """Operation status extended info for ILR provision action. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_target: Target details for file / folder restore. + :type recovery_target: + ~azure.mgmt.recoveryservicesbackup.models.InstantItemRecoveryTarget + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_target': {'key': 'recoveryTarget', 'type': 'InstantItemRecoveryTarget'}, + } + + def __init__(self, *, recovery_target=None, **kwargs) -> None: + super(OperationStatusProvisionILRExtendedInfo, self).__init__(**kwargs) + self.recovery_target = recovery_target + self.object_type = 'OperationStatusProvisionILRExtendedInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_py3.py new file mode 100644 index 000000000000..8c8891c2ac3a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationStatus(Model): + """Operation status. + + :param id: ID of the operation. + :type id: str + :param name: Name of the operation. + :type name: str + :param status: Operation status. Possible values include: 'Invalid', + 'InProgress', 'Succeeded', 'Failed', 'Canceled' + :type status: str or + ~azure.mgmt.recoveryservicesbackup.models.OperationStatusValues + :param start_time: Operation start time. Format: ISO-8601. + :type start_time: datetime + :param end_time: Operation end time. Format: ISO-8601. + :type end_time: datetime + :param error: Error information related to this operation. + :type error: + ~azure.mgmt.recoveryservicesbackup.models.OperationStatusError + :param properties: Additional information associated with this operation. + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.OperationStatusExtendedInfo + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'OperationStatusError'}, + 'properties': {'key': 'properties', 'type': 'OperationStatusExtendedInfo'}, + } + + def __init__(self, *, id: str=None, name: str=None, status=None, start_time=None, end_time=None, error=None, properties=None, **kwargs) -> None: + super(OperationStatus, self).__init__(**kwargs) + self.id = id + self.name = name + self.status = status + self.start_time = start_time + self.end_time = end_time + self.error = error + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_worker_response.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_worker_response.py index 720cf4c736f9..8ac66d5c1115 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_worker_response.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_worker_response.py @@ -29,17 +29,18 @@ class OperationWorkerResponse(Model): 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HttpVersionNotSupported' - :type status_code: str or :class:`HttpStatusCode - ` + :type status_code: str or + ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode :param headers: HTTP headers associated with this operation. - :type headers: dict + :type headers: dict[str, list[str]] """ _attribute_map = { 'status_code': {'key': 'statusCode', 'type': 'HttpStatusCode'}, - 'headers': {'key': 'Headers', 'type': '{[str]}'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, } - def __init__(self, status_code=None, headers=None): - self.status_code = status_code - self.headers = headers + def __init__(self, **kwargs): + super(OperationWorkerResponse, self).__init__(**kwargs) + self.status_code = kwargs.get('status_code', None) + self.headers = kwargs.get('headers', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_worker_response_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_worker_response_py3.py new file mode 100644 index 000000000000..018ac4341bca --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_worker_response_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationWorkerResponse(Model): + """This is the base class for operation result responses. + + :param status_code: HTTP Status Code of the operation. Possible values + include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', + 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', + 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', + 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', + 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', + 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', + 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', + 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', + 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + 'HttpVersionNotSupported' + :type status_code: str or + ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode + :param headers: HTTP headers associated with this operation. + :type headers: dict[str, list[str]] + """ + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'HttpStatusCode'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + } + + def __init__(self, *, status_code=None, headers=None, **kwargs) -> None: + super(OperationWorkerResponse, self).__init__(**kwargs) + self.status_code = status_code + self.headers = headers diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/point_in_time_range.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/point_in_time_range.py new file mode 100644 index 000000000000..bbea884d6f6a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/point_in_time_range.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PointInTimeRange(Model): + """Provides details for log ranges. + + :param start_time: Start time of the time range for log recovery. + :type start_time: datetime + :param end_time: End time of the time range for log recovery. + :type end_time: datetime + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(PointInTimeRange, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/point_in_time_range_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/point_in_time_range_py3.py new file mode 100644 index 000000000000..1298a1590f57 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/point_in_time_range_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PointInTimeRange(Model): + """Provides details for log ranges. + + :param start_time: Start time of the time range for log recovery. + :type start_time: datetime + :param end_time: End time of the time range for log recovery. + :type end_time: datetime + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, start_time=None, end_time=None, **kwargs) -> None: + super(PointInTimeRange, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_backup_validation.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_backup_validation.py new file mode 100644 index 000000000000..4f0faa2b829b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_backup_validation.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PreBackupValidation(Model): + """Pre-backup validation for Azure VM Workload provider. + + :param status: Status of protectable item, i.e. + InProgress,Succeeded,Failed. Possible values include: 'Invalid', + 'Success', 'Failed' + :type status: str or + ~azure.mgmt.recoveryservicesbackup.models.InquiryStatus + :param code: Error code of protectable item + :type code: str + :param message: Message corresponding to the error code for the + protectable item + :type message: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PreBackupValidation, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_backup_validation_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_backup_validation_py3.py new file mode 100644 index 000000000000..afa24b320665 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_backup_validation_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PreBackupValidation(Model): + """Pre-backup validation for Azure VM Workload provider. + + :param status: Status of protectable item, i.e. + InProgress,Succeeded,Failed. Possible values include: 'Invalid', + 'Success', 'Failed' + :type status: str or + ~azure.mgmt.recoveryservicesbackup.models.InquiryStatus + :param code: Error code of protectable item + :type code: str + :param message: Message corresponding to the error code for the + protectable item + :type message: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, status=None, code: str=None, message: str=None, **kwargs) -> None: + super(PreBackupValidation, self).__init__(**kwargs) + self.status = status + self.code = code + self.message = message diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_request.py new file mode 100644 index 000000000000..116f56e224e1 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_request.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PreValidateEnableBackupRequest(Model): + """Contract to validate if backup can be enabled on the given resource in a + given vault and given configuration. + It will validate followings + 1. Vault capacity + 2. VM is already protected + 3. Any VM related configuration passed in properties. + + :param resource_type: Container Type - VM, SQLPaaS, DPM etc. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type resource_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param resource_id: Entire ARM VM Id + :type resource_id: str + :param vault_id: Entire vault id of the resource + :type vault_id: str + :param properties: Configuration of VM if any needs to be validated like + OS type etc + :type properties: str + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'vault_id': {'key': 'vaultId', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PreValidateEnableBackupRequest, self).__init__(**kwargs) + self.resource_type = kwargs.get('resource_type', None) + self.resource_id = kwargs.get('resource_id', None) + self.vault_id = kwargs.get('vault_id', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_request_py3.py new file mode 100644 index 000000000000..61b556bce8d8 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_request_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PreValidateEnableBackupRequest(Model): + """Contract to validate if backup can be enabled on the given resource in a + given vault and given configuration. + It will validate followings + 1. Vault capacity + 2. VM is already protected + 3. Any VM related configuration passed in properties. + + :param resource_type: Container Type - VM, SQLPaaS, DPM etc. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type resource_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param resource_id: Entire ARM VM Id + :type resource_id: str + :param vault_id: Entire vault id of the resource + :type vault_id: str + :param properties: Configuration of VM if any needs to be validated like + OS type etc + :type properties: str + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'vault_id': {'key': 'vaultId', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'str'}, + } + + def __init__(self, *, resource_type=None, resource_id: str=None, vault_id: str=None, properties: str=None, **kwargs) -> None: + super(PreValidateEnableBackupRequest, self).__init__(**kwargs) + self.resource_type = resource_type + self.resource_id = resource_id + self.vault_id = vault_id + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_response.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_response.py new file mode 100644 index 000000000000..e99d75d55ada --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_response.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PreValidateEnableBackupResponse(Model): + """Response contract for enable backup validation request. + + :param status: Validation Status. Possible values include: 'Invalid', + 'Succeeded', 'Failed' + :type status: str or + ~azure.mgmt.recoveryservicesbackup.models.ValidationStatus + :param error_code: Response error code + :type error_code: str + :param error_message: Response error message + :type error_message: str + :param recommendation: Recommended action for user + :type recommendation: str + :param container_name: Specifies the product specific container name. E.g. + iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required for portal + :type container_name: str + :param protected_item_name: Specifies the product specific ds name. E.g. + vm;iaasvmcontainer;rgname;vmname. This is required for portal + :type protected_item_name: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'recommendation': {'key': 'recommendation', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'protected_item_name': {'key': 'protectedItemName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PreValidateEnableBackupResponse, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.error_code = kwargs.get('error_code', None) + self.error_message = kwargs.get('error_message', None) + self.recommendation = kwargs.get('recommendation', None) + self.container_name = kwargs.get('container_name', None) + self.protected_item_name = kwargs.get('protected_item_name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_response_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_response_py3.py new file mode 100644 index 000000000000..b8bd4db91af6 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_response_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PreValidateEnableBackupResponse(Model): + """Response contract for enable backup validation request. + + :param status: Validation Status. Possible values include: 'Invalid', + 'Succeeded', 'Failed' + :type status: str or + ~azure.mgmt.recoveryservicesbackup.models.ValidationStatus + :param error_code: Response error code + :type error_code: str + :param error_message: Response error message + :type error_message: str + :param recommendation: Recommended action for user + :type recommendation: str + :param container_name: Specifies the product specific container name. E.g. + iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required for portal + :type container_name: str + :param protected_item_name: Specifies the product specific ds name. E.g. + vm;iaasvmcontainer;rgname;vmname. This is required for portal + :type protected_item_name: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'recommendation': {'key': 'recommendation', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'protected_item_name': {'key': 'protectedItemName', 'type': 'str'}, + } + + def __init__(self, *, status=None, error_code: str=None, error_message: str=None, recommendation: str=None, container_name: str=None, protected_item_name: str=None, **kwargs) -> None: + super(PreValidateEnableBackupResponse, self).__init__(**kwargs) + self.status = status + self.error_code = error_code + self.error_message = error_message + self.recommendation = recommendation + self.container_name = container_name + self.protected_item_name = protected_item_name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container.py new file mode 100644 index 000000000000..38b505835a97 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProtectableContainer(Model): + """Protectable Container Class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureStorageProtectableContainer, + AzureVMAppContainerProtectableContainer + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param health_status: Status of health of the container. + :type health_status: str + :param container_id: Fabric Id of the container such as ARM Id. + :type container_id: str + :param protectable_container_type: Required. Constant filled by server. + :type protectable_container_type: str + """ + + _validation = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + } + + _subtype_map = { + 'protectable_container_type': {'StorageContainer': 'AzureStorageProtectableContainer', 'VMAppContainer': 'AzureVMAppContainerProtectableContainer'} + } + + def __init__(self, **kwargs): + super(ProtectableContainer, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.health_status = kwargs.get('health_status', None) + self.container_id = kwargs.get('container_id', None) + self.protectable_container_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_py3.py new file mode 100644 index 000000000000..2356a1036f4e --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProtectableContainer(Model): + """Protectable Container Class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureStorageProtectableContainer, + AzureVMAppContainerProtectableContainer + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param health_status: Status of health of the container. + :type health_status: str + :param container_id: Fabric Id of the container such as ARM Id. + :type container_id: str + :param protectable_container_type: Required. Constant filled by server. + :type protectable_container_type: str + """ + + _validation = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + } + + _subtype_map = { + 'protectable_container_type': {'StorageContainer': 'AzureStorageProtectableContainer', 'VMAppContainer': 'AzureVMAppContainerProtectableContainer'} + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, health_status: str=None, container_id: str=None, **kwargs) -> None: + super(ProtectableContainer, self).__init__(**kwargs) + self.friendly_name = friendly_name + self.backup_management_type = backup_management_type + self.health_status = health_status + self.container_id = container_id + self.protectable_container_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource.py new file mode 100644 index 000000000000..383e12d15ddc --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ProtectableContainerResource(Resource): + """Protectable Container Class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ProtectableContainerResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ProtectableContainer + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProtectableContainer'}, + } + + def __init__(self, **kwargs): + super(ProtectableContainerResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource_paged.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource_paged.py new file mode 100644 index 000000000000..a02dfe9b0496 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ProtectableContainerResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ProtectableContainerResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProtectableContainerResource]'} + } + + def __init__(self, *args, **kwargs): + + super(ProtectableContainerResourcePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource_py3.py new file mode 100644 index 000000000000..e24aa5568a44 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ProtectableContainerResource(Resource): + """Protectable Container Class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ProtectableContainerResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ProtectableContainer + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProtectableContainer'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(ProtectableContainerResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item.py index ea82418794fd..65e486c106ff 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item.py @@ -15,17 +15,25 @@ class ProtectedItem(Model): """Base class for backup items. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileshareProtectedItem, AzureIaaSVMProtectedItem, + AzureSqlProtectedItem, AzureVmWorkloadSQLDatabaseProtectedItem, + DPMProtectedItem, GenericProtectedItem, MabFileFolderProtectedItem + + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param workload_type: Type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - 'GenericDataSource' - :type workload_type: str or :class:`DataSourceType - ` + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType :param container_name: Unique name of container :type container_name: str :param source_resource_id: ARM ID of the resource to be backed up. @@ -36,7 +44,9 @@ class ProtectedItem(Model): :param last_recovery_point: Timestamp when the last (latest) backup copy was created for this backup item. :type last_recovery_point: datetime - :param protected_item_type: Polymorphic Discriminator + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. :type protected_item_type: str """ @@ -51,18 +61,21 @@ class ProtectedItem(Model): 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'policy_id': {'key': 'policyId', 'type': 'str'}, 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, } _subtype_map = { - 'protected_item_type': {'AzureIaaSVMProtectedItem': 'AzureIaaSVMProtectedItem', 'Microsoft.Sql/servers/databases': 'AzureSqlProtectedItem', 'DPMProtectedItem': 'DPMProtectedItem', 'MabFileFolderProtectedItem': 'MabFileFolderProtectedItem'} + 'protected_item_type': {'AzureFileShareProtectedItem': 'AzureFileshareProtectedItem', 'AzureIaaSVMProtectedItem': 'AzureIaaSVMProtectedItem', 'Microsoft.Sql/servers/databases': 'AzureSqlProtectedItem', 'AzureVmWorkloadSQLDatabase': 'AzureVmWorkloadSQLDatabaseProtectedItem', 'DPMProtectedItem': 'DPMProtectedItem', 'GenericProtectedItem': 'GenericProtectedItem', 'MabFileFolderProtectedItem': 'MabFileFolderProtectedItem'} } - def __init__(self, backup_management_type=None, workload_type=None, container_name=None, source_resource_id=None, policy_id=None, last_recovery_point=None): - self.backup_management_type = backup_management_type - self.workload_type = workload_type - self.container_name = container_name - self.source_resource_id = source_resource_id - self.policy_id = policy_id - self.last_recovery_point = last_recovery_point + def __init__(self, **kwargs): + super(ProtectedItem, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.workload_type = kwargs.get('workload_type', None) + self.container_name = kwargs.get('container_name', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.policy_id = kwargs.get('policy_id', None) + self.last_recovery_point = kwargs.get('last_recovery_point', None) + self.backup_set_name = kwargs.get('backup_set_name', None) self.protected_item_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_py3.py new file mode 100644 index 000000000000..44a04e035871 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_py3.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProtectedItem(Model): + """Base class for backup items. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileshareProtectedItem, AzureIaaSVMProtectedItem, + AzureSqlProtectedItem, AzureVmWorkloadSQLDatabaseProtectedItem, + DPMProtectedItem, GenericProtectedItem, MabFileFolderProtectedItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + } + + _subtype_map = { + 'protected_item_type': {'AzureFileShareProtectedItem': 'AzureFileshareProtectedItem', 'AzureIaaSVMProtectedItem': 'AzureIaaSVMProtectedItem', 'Microsoft.Sql/servers/databases': 'AzureSqlProtectedItem', 'AzureVmWorkloadSQLDatabase': 'AzureVmWorkloadSQLDatabaseProtectedItem', 'DPMProtectedItem': 'DPMProtectedItem', 'GenericProtectedItem': 'GenericProtectedItem', 'MabFileFolderProtectedItem': 'MabFileFolderProtectedItem'} + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, **kwargs) -> None: + super(ProtectedItem, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.workload_type = workload_type + self.container_name = container_name + self.source_resource_id = source_resource_id + self.policy_id = policy_id + self.last_recovery_point = last_recovery_point + self.backup_set_name = backup_set_name + self.protected_item_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_query_object.py index c9340f195a69..3d60de184520 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_query_object.py @@ -17,18 +17,20 @@ class ProtectedItemQueryObject(Model): :param health_state: Health State for the backed up item. Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' - :type health_state: str or :class:`HealthState - ` + :type health_state: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthState :param backup_management_type: Backup management type for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param item_type: Type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', - 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource' - :type item_type: str or :class:`DataSourceType - ` + 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', + 'SQLDataBase', 'AzureFileShare' + :type item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType :param policy_name: Backup policy name associated with the backup item. :type policy_name: str :param container_name: Name of the container. @@ -37,6 +39,10 @@ class ProtectedItemQueryObject(Model): :type backup_engine_name: str :param friendly_name: Friendly name of protected item :type friendly_name: str + :param fabric_name: Name of the fabric. + :type fabric_name: str + :param backup_set_name: Name of the backup set. + :type backup_set_name: str """ _attribute_map = { @@ -47,13 +53,18 @@ class ProtectedItemQueryObject(Model): 'container_name': {'key': 'containerName', 'type': 'str'}, 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, } - def __init__(self, health_state=None, backup_management_type=None, item_type=None, policy_name=None, container_name=None, backup_engine_name=None, friendly_name=None): - self.health_state = health_state - self.backup_management_type = backup_management_type - self.item_type = item_type - self.policy_name = policy_name - self.container_name = container_name - self.backup_engine_name = backup_engine_name - self.friendly_name = friendly_name + def __init__(self, **kwargs): + super(ProtectedItemQueryObject, self).__init__(**kwargs) + self.health_state = kwargs.get('health_state', None) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.item_type = kwargs.get('item_type', None) + self.policy_name = kwargs.get('policy_name', None) + self.container_name = kwargs.get('container_name', None) + self.backup_engine_name = kwargs.get('backup_engine_name', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.fabric_name = kwargs.get('fabric_name', None) + self.backup_set_name = kwargs.get('backup_set_name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_query_object_py3.py new file mode 100644 index 000000000000..d34d1077699f --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_query_object_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProtectedItemQueryObject(Model): + """Filters to list backup items. + + :param health_state: Health State for the backed up item. Possible values + include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' + :type health_state: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthState + :param backup_management_type: Backup management type for the backed up + item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param item_type: Type of workload this item represents. Possible values + include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', + 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', + 'SQLDataBase', 'AzureFileShare' + :type item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param policy_name: Backup policy name associated with the backup item. + :type policy_name: str + :param container_name: Name of the container. + :type container_name: str + :param backup_engine_name: Backup Engine name + :type backup_engine_name: str + :param friendly_name: Friendly name of protected item + :type friendly_name: str + :param fabric_name: Name of the fabric. + :type fabric_name: str + :param backup_set_name: Name of the backup set. + :type backup_set_name: str + """ + + _attribute_map = { + 'health_state': {'key': 'healthState', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'item_type': {'key': 'itemType', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + } + + def __init__(self, *, health_state=None, backup_management_type=None, item_type=None, policy_name: str=None, container_name: str=None, backup_engine_name: str=None, friendly_name: str=None, fabric_name: str=None, backup_set_name: str=None, **kwargs) -> None: + super(ProtectedItemQueryObject, self).__init__(**kwargs) + self.health_state = health_state + self.backup_management_type = backup_management_type + self.item_type = item_type + self.policy_name = policy_name + self.container_name = container_name + self.backup_engine_name = backup_engine_name + self.friendly_name = friendly_name + self.fabric_name = fabric_name + self.backup_set_name = backup_set_name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_resource.py index 7177c53a18f2..3f7dca67b95c 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_resource.py @@ -28,12 +28,11 @@ class ProtectedItemResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: ProtectedItemResource properties - :type properties: :class:`ProtectedItem - ` + :type properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItem """ _validation = { @@ -52,6 +51,6 @@ class ProtectedItemResource(Resource): 'properties': {'key': 'properties', 'type': 'ProtectedItem'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(ProtectedItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(ProtectedItemResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_resource_py3.py new file mode 100644 index 000000000000..22de3391b49f --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_resource_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ProtectedItemResource(Resource): + """Base class for backup items. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ProtectedItemResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItem + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProtectedItem'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(ProtectedItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container.py index ca9f5b852163..1b3911fea1de 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container.py @@ -16,38 +16,32 @@ class ProtectionContainer(Model): """Base class for container with backup items. Containers with specific workloads are derived from this class. - Variables are only populated by the server, and will be ignored when - sending a request. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupServerContainer, AzureSqlContainer, + AzureStorageContainer, AzureWorkloadContainer, DpmContainer, + GenericContainer, IaaSVMContainer, MabContainer + + All required parameters must be populated in order to send to Azure. :param friendly_name: Friendly name of the container. :type friendly_name: str :param backup_management_type: Type of backup managemenent for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Status of registration of the container with the Recovery Services Vault. :type registration_status: str :param health_status: Status of health of the container. :type health_status: str - :ivar container_type: Type of the container. The value of this property - for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic - Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is - AzureSqlContainer. Possible values include: 'Invalid', 'Unknown', - 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', - 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - 'AzureSqlContainer', 'Windows', 'VCenter' - :vartype container_type: str or :class:`ContainerType - ` - :param protectable_object_type: Polymorphic Discriminator - :type protectable_object_type: str + :param container_type: Required. Constant filled by server. + :type container_type: str """ _validation = { - 'container_type': {'readonly': True}, - 'protectable_object_type': {'required': True}, + 'container_type': {'required': True}, } _attribute_map = { @@ -56,17 +50,16 @@ class ProtectionContainer(Model): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, - 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, } _subtype_map = { - 'protectable_object_type': {'AzureBackupServerContainer': 'AzureBackupServerContainer', 'AzureSqlContainer': 'AzureSqlContainer', 'DPMContainer': 'DpmContainer', 'IaaSVMContainer': 'IaaSVMContainer', 'MABWindowsContainer': 'MabContainer'} + 'container_type': {'AzureBackupServerContainer': 'AzureBackupServerContainer', 'AzureSqlContainer': 'AzureSqlContainer', 'StorageContainer': 'AzureStorageContainer', 'AzureWorkloadContainer': 'AzureWorkloadContainer', 'DPMContainer': 'DpmContainer', 'GenericContainer': 'GenericContainer', 'IaaSVMContainer': 'IaaSVMContainer', 'MABWindowsContainer': 'MabContainer'} } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, health_status=None): - self.friendly_name = friendly_name - self.backup_management_type = backup_management_type - self.registration_status = registration_status - self.health_status = health_status + def __init__(self, **kwargs): + super(ProtectionContainer, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.registration_status = kwargs.get('registration_status', None) + self.health_status = kwargs.get('health_status', None) self.container_type = None - self.protectable_object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_py3.py new file mode 100644 index 000000000000..243490500ff6 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProtectionContainer(Model): + """Base class for container with backup items. Containers with specific + workloads are derived from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupServerContainer, AzureSqlContainer, + AzureStorageContainer, AzureWorkloadContainer, DpmContainer, + GenericContainer, IaaSVMContainer, MabContainer + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + } + + _subtype_map = { + 'container_type': {'AzureBackupServerContainer': 'AzureBackupServerContainer', 'AzureSqlContainer': 'AzureSqlContainer', 'StorageContainer': 'AzureStorageContainer', 'AzureWorkloadContainer': 'AzureWorkloadContainer', 'DPMContainer': 'DpmContainer', 'GenericContainer': 'GenericContainer', 'IaaSVMContainer': 'IaaSVMContainer', 'MABWindowsContainer': 'MabContainer'} + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, **kwargs) -> None: + super(ProtectionContainer, self).__init__(**kwargs) + self.friendly_name = friendly_name + self.backup_management_type = backup_management_type + self.registration_status = registration_status + self.health_status = health_status + self.container_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_resource.py index 01742f2fb136..5029205928c2 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_resource.py @@ -29,12 +29,12 @@ class ProtectionContainerResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: ProtectionContainerResource properties - :type properties: :class:`ProtectionContainer - ` + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainer """ _validation = { @@ -53,6 +53,6 @@ class ProtectionContainerResource(Resource): 'properties': {'key': 'properties', 'type': 'ProtectionContainer'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(ProtectionContainerResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(ProtectionContainerResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_resource_py3.py new file mode 100644 index 000000000000..e639bac8de5b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_resource_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ProtectionContainerResource(Resource): + """Base class for container with backup items. Containers with specific + workloads are derived from this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ProtectionContainerResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainer + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProtectionContainer'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(ProtectionContainerResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent.py new file mode 100644 index 000000000000..f37c921d311b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProtectionIntent(Model): + """Base class for backup ProtectionIntent. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureResourceProtectionIntent + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param item_id: ID of the item which is getting protected, In case of + Azure Vm , it is ProtectedItemId + :type item_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protection_intent_item_type: Required. Constant filled by server. + :type protection_intent_item_type: str + """ + + _validation = { + 'protection_intent_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protection_intent_item_type': {'key': 'protectionIntentItemType', 'type': 'str'}, + } + + _subtype_map = { + 'protection_intent_item_type': {'AzureResourceItem': 'AzureResourceProtectionIntent'} + } + + def __init__(self, **kwargs): + super(ProtectionIntent, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.item_id = kwargs.get('item_id', None) + self.policy_id = kwargs.get('policy_id', None) + self.protection_state = kwargs.get('protection_state', None) + self.protection_intent_item_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_py3.py new file mode 100644 index 000000000000..35a27f2925b3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProtectionIntent(Model): + """Base class for backup ProtectionIntent. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureResourceProtectionIntent + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param item_id: ID of the item which is getting protected, In case of + Azure Vm , it is ProtectedItemId + :type item_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protection_intent_item_type: Required. Constant filled by server. + :type protection_intent_item_type: str + """ + + _validation = { + 'protection_intent_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protection_intent_item_type': {'key': 'protectionIntentItemType', 'type': 'str'}, + } + + _subtype_map = { + 'protection_intent_item_type': {'AzureResourceItem': 'AzureResourceProtectionIntent'} + } + + def __init__(self, *, backup_management_type=None, source_resource_id: str=None, item_id: str=None, policy_id: str=None, protection_state=None, **kwargs) -> None: + super(ProtectionIntent, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.source_resource_id = source_resource_id + self.item_id = item_id + self.policy_id = policy_id + self.protection_state = protection_state + self.protection_intent_item_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_resource.py new file mode 100644 index 000000000000..359e90f255e7 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_resource.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ProtectionIntentResource(Resource): + """Base class for backup ProtectionIntent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ProtectionIntentResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntent + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProtectionIntent'}, + } + + def __init__(self, **kwargs): + super(ProtectionIntentResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_resource_py3.py new file mode 100644 index 000000000000..96f0f8ff1395 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_resource_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ProtectionIntentResource(Resource): + """Base class for backup ProtectionIntent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ProtectionIntentResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntent + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProtectionIntent'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(ProtectionIntentResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy.py index 68e359989c2e..cfadd161a3b2 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy.py @@ -16,9 +16,17 @@ class ProtectionPolicy(Model): """Base class for backup policy. Workload-specific backup policies are derived from this class. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareProtectionPolicy, + AzureIaaSVMProtectionPolicy, AzureSqlProtectionPolicy, + AzureVmWorkloadProtectionPolicy, GenericProtectionPolicy, + MabProtectionPolicy + + All required parameters must be populated in order to send to Azure. + :param protected_items_count: Number of items associated with this policy. :type protected_items_count: int - :param backup_management_type: Polymorphic Discriminator + :param backup_management_type: Required. Constant filled by server. :type backup_management_type: str """ @@ -32,9 +40,10 @@ class ProtectionPolicy(Model): } _subtype_map = { - 'backup_management_type': {'AzureIaasVM': 'AzureIaaSVMProtectionPolicy', 'AzureSql': 'AzureSqlProtectionPolicy', 'MAB': 'MabProtectionPolicy'} + 'backup_management_type': {'AzureStorage': 'AzureFileShareProtectionPolicy', 'AzureIaasVM': 'AzureIaaSVMProtectionPolicy', 'AzureSql': 'AzureSqlProtectionPolicy', 'AzureWorkload': 'AzureVmWorkloadProtectionPolicy', 'GenericProtectionPolicy': 'GenericProtectionPolicy', 'MAB': 'MabProtectionPolicy'} } - def __init__(self, protected_items_count=None): - self.protected_items_count = protected_items_count + def __init__(self, **kwargs): + super(ProtectionPolicy, self).__init__(**kwargs) + self.protected_items_count = kwargs.get('protected_items_count', None) self.backup_management_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_py3.py new file mode 100644 index 000000000000..961d40e9c0fb --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProtectionPolicy(Model): + """Base class for backup policy. Workload-specific backup policies are derived + from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareProtectionPolicy, + AzureIaaSVMProtectionPolicy, AzureSqlProtectionPolicy, + AzureVmWorkloadProtectionPolicy, GenericProtectionPolicy, + MabProtectionPolicy + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + } + + _subtype_map = { + 'backup_management_type': {'AzureStorage': 'AzureFileShareProtectionPolicy', 'AzureIaasVM': 'AzureIaaSVMProtectionPolicy', 'AzureSql': 'AzureSqlProtectionPolicy', 'AzureWorkload': 'AzureVmWorkloadProtectionPolicy', 'GenericProtectionPolicy': 'GenericProtectionPolicy', 'MAB': 'MabProtectionPolicy'} + } + + def __init__(self, *, protected_items_count: int=None, **kwargs) -> None: + super(ProtectionPolicy, self).__init__(**kwargs) + self.protected_items_count = protected_items_count + self.backup_management_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_query_object.py index b02b7605f3f6..b9714ef633c8 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_query_object.py @@ -17,14 +17,20 @@ class ProtectionPolicyQueryObject(Model): :param backup_management_type: Backup management type for the backup policy. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param fabric_name: Fabric name for filter + :type fabric_name: str """ _attribute_map = { 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, } - def __init__(self, backup_management_type=None): - self.backup_management_type = backup_management_type + def __init__(self, **kwargs): + super(ProtectionPolicyQueryObject, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.fabric_name = kwargs.get('fabric_name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_query_object_py3.py new file mode 100644 index 000000000000..08d9df201d1b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_query_object_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProtectionPolicyQueryObject(Model): + """Filters the list backup policies API. + + :param backup_management_type: Backup management type for the backup + policy. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param fabric_name: Fabric name for filter + :type fabric_name: str + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type=None, fabric_name: str=None, **kwargs) -> None: + super(ProtectionPolicyQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.fabric_name = fabric_name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_resource.py index 2dca26343699..b96d7201ed2a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_resource.py @@ -29,12 +29,12 @@ class ProtectionPolicyResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: ProtectionPolicyResource properties - :type properties: :class:`ProtectionPolicy - ` + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicy """ _validation = { @@ -53,6 +53,6 @@ class ProtectionPolicyResource(Resource): 'properties': {'key': 'properties', 'type': 'ProtectionPolicy'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(ProtectionPolicyResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(ProtectionPolicyResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_resource_py3.py new file mode 100644 index 000000000000..d21d01b75ab7 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_resource_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ProtectionPolicyResource(Resource): + """Base class for backup policy. Workload-specific backup policies are derived + from this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ProtectionPolicyResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProtectionPolicy'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(ProtectionPolicyResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point.py index 1c2c872739c7..514f61bbc720 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point.py @@ -16,7 +16,13 @@ class RecoveryPoint(Model): """Base class for backup copies. Workload-specific backup copies are derived from this class. - :param object_type: Polymorphic Discriminator + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareRecoveryPoint, AzureWorkloadRecoveryPoint, + GenericRecoveryPoint, IaasVMRecoveryPoint + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str """ @@ -29,8 +35,9 @@ class RecoveryPoint(Model): } _subtype_map = { - 'object_type': {'GenericRecoveryPoint': 'GenericRecoveryPoint', 'IaasVMRecoveryPoint': 'IaasVMRecoveryPoint'} + 'object_type': {'AzureFileShareRecoveryPoint': 'AzureFileShareRecoveryPoint', 'AzureWorkloadRecoveryPoint': 'AzureWorkloadRecoveryPoint', 'GenericRecoveryPoint': 'GenericRecoveryPoint', 'IaasVMRecoveryPoint': 'IaasVMRecoveryPoint'} } - def __init__(self): + def __init__(self, **kwargs): + super(RecoveryPoint, self).__init__(**kwargs) self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_py3.py new file mode 100644 index 000000000000..e2e87c51e520 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RecoveryPoint(Model): + """Base class for backup copies. Workload-specific backup copies are derived + from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareRecoveryPoint, AzureWorkloadRecoveryPoint, + GenericRecoveryPoint, IaasVMRecoveryPoint + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureFileShareRecoveryPoint': 'AzureFileShareRecoveryPoint', 'AzureWorkloadRecoveryPoint': 'AzureWorkloadRecoveryPoint', 'GenericRecoveryPoint': 'GenericRecoveryPoint', 'IaasVMRecoveryPoint': 'IaasVMRecoveryPoint'} + } + + def __init__(self, **kwargs) -> None: + super(RecoveryPoint, self).__init__(**kwargs) + self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_resource.py index 9ffd786b7ff1..54a9ac18aa40 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_resource.py @@ -29,12 +29,11 @@ class RecoveryPointResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: RecoveryPointResource properties - :type properties: :class:`RecoveryPoint - ` + :type properties: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPoint """ _validation = { @@ -53,6 +52,6 @@ class RecoveryPointResource(Resource): 'properties': {'key': 'properties', 'type': 'RecoveryPoint'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(RecoveryPointResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(RecoveryPointResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_resource_py3.py new file mode 100644 index 000000000000..6ea4d805d721 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_resource_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class RecoveryPointResource(Resource): + """Base class for backup copies. Workload-specific backup copies are derived + from this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: RecoveryPointResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPoint + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'RecoveryPoint'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(RecoveryPointResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_tier_information.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_tier_information.py index 883e76d7b8a3..fcccab9d9b27 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_tier_information.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_tier_information.py @@ -17,12 +17,12 @@ class RecoveryPointTierInformation(Model): :param type: Recovery point tier type. Possible values include: 'Invalid', 'InstantRP', 'HardenedRP' - :type type: str or :class:`RecoveryPointTierType - ` + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType :param status: Recovery point tier status. Possible values include: 'Invalid', 'Valid', 'Disabled', 'Deleted' - :type status: str or :class:`RecoveryPointTierStatus - ` + :type status: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus """ _attribute_map = { @@ -30,6 +30,7 @@ class RecoveryPointTierInformation(Model): 'status': {'key': 'status', 'type': 'RecoveryPointTierStatus'}, } - def __init__(self, type=None, status=None): - self.type = type - self.status = status + def __init__(self, **kwargs): + super(RecoveryPointTierInformation, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_tier_information_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_tier_information_py3.py new file mode 100644 index 000000000000..b7e25cb4b34e --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_tier_information_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RecoveryPointTierInformation(Model): + """Recovery point tier information. + + :param type: Recovery point tier type. Possible values include: 'Invalid', + 'InstantRP', 'HardenedRP' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :param status: Recovery point tier status. Possible values include: + 'Invalid', 'Valid', 'Disabled', 'Deleted' + :type status: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'RecoveryPointTierType'}, + 'status': {'key': 'status', 'type': 'RecoveryPointTierStatus'}, + } + + def __init__(self, *, type=None, status=None, **kwargs) -> None: + super(RecoveryPointTierInformation, self).__init__(**kwargs) + self.type = type + self.status = status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_services_backup_client_enums.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_services_backup_client_enums.py index a71d068bc700..c65bb4a3066a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_services_backup_client_enums.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_services_backup_client_enums.py @@ -12,77 +12,32 @@ from enum import Enum -class JobSupportedAction(Enum): +class ProtectionState(str, Enum): invalid = "Invalid" - cancellable = "Cancellable" - retriable = "Retriable" - - -class BackupManagementType(Enum): - - invalid = "Invalid" - azure_iaas_vm = "AzureIaasVM" - mab = "MAB" - dpm = "DPM" - azure_backup_server = "AzureBackupServer" - azure_sql = "AzureSql" - - -class JobStatus(Enum): - - invalid = "Invalid" - in_progress = "InProgress" - completed = "Completed" - failed = "Failed" - completed_with_warnings = "CompletedWithWarnings" - cancelled = "Cancelled" - cancelling = "Cancelling" - - -class JobOperationType(Enum): - - invalid = "Invalid" - register = "Register" - un_register = "UnRegister" - configure_backup = "ConfigureBackup" - backup = "Backup" - restore = "Restore" - disable_backup = "DisableBackup" - delete_backup_data = "DeleteBackupData" + ir_pending = "IRPending" + protected = "Protected" + protection_error = "ProtectionError" + protection_stopped = "ProtectionStopped" + protection_paused = "ProtectionPaused" -class MabServerType(Enum): +class HealthStatus(str, Enum): + passed = "Passed" + action_required = "ActionRequired" + action_suggested = "ActionSuggested" invalid = "Invalid" - unknown = "Unknown" - iaas_vm_container = "IaasVMContainer" - iaas_vm_service_container = "IaasVMServiceContainer" - dpm_container = "DPMContainer" - azure_backup_server_container = "AzureBackupServerContainer" - mab_container = "MABContainer" - cluster = "Cluster" - azure_sql_container = "AzureSqlContainer" - windows = "Windows" - vcenter = "VCenter" -class WorkloadType(Enum): +class JobSupportedAction(str, Enum): invalid = "Invalid" - vm = "VM" - file_folder = "FileFolder" - azure_sql_db = "AzureSqlDb" - sqldb = "SQLDB" - exchange = "Exchange" - sharepoint = "Sharepoint" - vmware_vm = "VMwareVM" - system_state = "SystemState" - client = "Client" - generic_data_source = "GenericDataSource" + cancellable = "Cancellable" + retriable = "Retriable" -class ProtectionState(Enum): +class ProtectedItemState(str, Enum): invalid = "Invalid" ir_pending = "IRPending" @@ -92,25 +47,33 @@ class ProtectionState(Enum): protection_paused = "ProtectionPaused" -class HealthStatus(Enum): +class SupportStatus(str, Enum): - passed = "Passed" - action_required = "ActionRequired" - action_suggested = "ActionSuggested" invalid = "Invalid" + supported = "Supported" + default_off = "DefaultOFF" + default_on = "DefaultON" + not_supported = "NotSupported" -class ProtectedItemState(Enum): +class LastBackupStatus(str, Enum): invalid = "Invalid" + healthy = "Healthy" + unhealthy = "Unhealthy" ir_pending = "IRPending" - protected = "Protected" - protection_error = "ProtectionError" - protection_stopped = "ProtectionStopped" - protection_paused = "ProtectionPaused" -class UsagesUnit(Enum): +class ProtectedItemHealthStatus(str, Enum): + + invalid = "Invalid" + healthy = "Healthy" + unhealthy = "Unhealthy" + not_reachable = "NotReachable" + ir_pending = "IRPending" + + +class UsagesUnit(str, Enum): count = "Count" bytes = "Bytes" @@ -120,50 +83,46 @@ class UsagesUnit(Enum): bytes_per_second = "BytesPerSecond" -class StorageType(Enum): +class DataSourceType(str, Enum): invalid = "Invalid" - geo_redundant = "GeoRedundant" - locally_redundant = "LocallyRedundant" + vm = "VM" + file_folder = "FileFolder" + azure_sql_db = "AzureSqlDb" + sqldb = "SQLDB" + exchange = "Exchange" + sharepoint = "Sharepoint" + vmware_vm = "VMwareVM" + system_state = "SystemState" + client = "Client" + generic_data_source = "GenericDataSource" + sql_data_base = "SQLDataBase" + azure_file_share = "AzureFileShare" -class StorageTypeState(Enum): +class ProtectionStatus(str, Enum): invalid = "Invalid" - locked = "Locked" - unlocked = "Unlocked" + not_protected = "NotProtected" + protecting = "Protecting" + protected = "Protected" + protection_failed = "ProtectionFailed" -class EnhancedSecurityState(Enum): +class FabricName(str, Enum): invalid = "Invalid" - enabled = "Enabled" - disabled = "Disabled" + azure = "Azure" -class Type(Enum): +class Type(str, Enum): invalid = "Invalid" backup_protected_item_count_summary = "BackupProtectedItemCountSummary" backup_protection_container_count_summary = "BackupProtectionContainerCountSummary" -class ContainerType(Enum): - - invalid = "Invalid" - unknown = "Unknown" - iaas_vm_container = "IaasVMContainer" - iaas_vm_service_container = "IaasVMServiceContainer" - dpm_container = "DPMContainer" - azure_backup_server_container = "AzureBackupServerContainer" - mab_container = "MABContainer" - cluster = "Cluster" - azure_sql_container = "AzureSqlContainer" - windows = "Windows" - vcenter = "VCenter" - - -class RetentionDurationType(Enum): +class RetentionDurationType(str, Enum): invalid = "Invalid" days = "Days" @@ -172,30 +131,43 @@ class RetentionDurationType(Enum): years = "Years" -class RecoveryPointTierType(Enum): +class BackupManagementType(str, Enum): invalid = "Invalid" - instant_rp = "InstantRP" - hardened_rp = "HardenedRP" + azure_iaas_vm = "AzureIaasVM" + mab = "MAB" + dpm = "DPM" + azure_backup_server = "AzureBackupServer" + azure_sql = "AzureSql" + azure_storage = "AzureStorage" + azure_workload = "AzureWorkload" + default_backup = "DefaultBackup" -class RecoveryPointTierStatus(Enum): +class JobStatus(str, Enum): invalid = "Invalid" - valid = "Valid" - disabled = "Disabled" - deleted = "Deleted" + in_progress = "InProgress" + completed = "Completed" + failed = "Failed" + completed_with_warnings = "CompletedWithWarnings" + cancelled = "Cancelled" + cancelling = "Cancelling" -class RecoveryType(Enum): +class JobOperationType(str, Enum): invalid = "Invalid" - original_location = "OriginalLocation" - alternate_location = "AlternateLocation" - restore_disks = "RestoreDisks" + register = "Register" + un_register = "UnRegister" + configure_backup = "ConfigureBackup" + backup = "Backup" + restore = "Restore" + disable_backup = "DisableBackup" + delete_backup_data = "DeleteBackupData" -class DayOfWeek(Enum): +class DayOfWeek(str, Enum): sunday = "Sunday" monday = "Monday" @@ -206,14 +178,14 @@ class DayOfWeek(Enum): saturday = "Saturday" -class RetentionScheduleFormat(Enum): +class RetentionScheduleFormat(str, Enum): invalid = "Invalid" daily = "Daily" weekly = "Weekly" -class WeekOfMonth(Enum): +class WeekOfMonth(str, Enum): first = "First" second = "Second" @@ -222,7 +194,7 @@ class WeekOfMonth(Enum): last = "Last" -class MonthOfYear(Enum): +class MonthOfYear(str, Enum): invalid = "Invalid" january = "January" @@ -239,7 +211,26 @@ class MonthOfYear(Enum): december = "December" -class BackupItemType(Enum): +class MabServerType(str, Enum): + + invalid = "Invalid" + unknown = "Unknown" + iaas_vm_container = "IaasVMContainer" + iaas_vm_service_container = "IaasVMServiceContainer" + dpm_container = "DPMContainer" + azure_backup_server_container = "AzureBackupServerContainer" + mab_container = "MABContainer" + cluster = "Cluster" + azure_sql_container = "AzureSqlContainer" + windows = "Windows" + vcenter = "VCenter" + vm_app_container = "VMAppContainer" + sqlag_work_load_container = "SQLAGWorkLoadContainer" + storage_container = "StorageContainer" + generic_container = "GenericContainer" + + +class WorkloadType(str, Enum): invalid = "Invalid" vm = "VM" @@ -252,18 +243,11 @@ class BackupItemType(Enum): system_state = "SystemState" client = "Client" generic_data_source = "GenericDataSource" + sql_data_base = "SQLDataBase" + azure_file_share = "AzureFileShare" -class OperationStatusValues(Enum): - - invalid = "Invalid" - in_progress = "InProgress" - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - - -class HttpStatusCode(Enum): +class HttpStatusCode(str, Enum): continue_enum = "Continue" switching_protocols = "SwitchingProtocols" @@ -314,22 +298,14 @@ class HttpStatusCode(Enum): http_version_not_supported = "HttpVersionNotSupported" -class DataSourceType(Enum): +class ValidationStatus(str, Enum): invalid = "Invalid" - vm = "VM" - file_folder = "FileFolder" - azure_sql_db = "AzureSqlDb" - sqldb = "SQLDB" - exchange = "Exchange" - sharepoint = "Sharepoint" - vmware_vm = "VMwareVM" - system_state = "SystemState" - client = "Client" - generic_data_source = "GenericDataSource" + succeeded = "Succeeded" + failed = "Failed" -class HealthState(Enum): +class HealthState(str, Enum): passed = "Passed" action_required = "ActionRequired" @@ -337,16 +313,175 @@ class HealthState(Enum): invalid = "Invalid" -class ScheduleRunType(Enum): +class ScheduleRunType(str, Enum): invalid = "Invalid" daily = "Daily" weekly = "Weekly" -class ProtectionStatus(Enum): +class AzureFileShareType(str, Enum): invalid = "Invalid" - not_protected = "NotProtected" - protecting = "Protecting" - protected = "Protected" + xsmb = "XSMB" + xsync = "XSync" + + +class RecoveryType(str, Enum): + + invalid = "Invalid" + original_location = "OriginalLocation" + alternate_location = "AlternateLocation" + restore_disks = "RestoreDisks" + + +class CopyOptions(str, Enum): + + invalid = "Invalid" + create_copy = "CreateCopy" + skip = "Skip" + overwrite = "Overwrite" + fail_on_conflict = "FailOnConflict" + + +class RestoreRequestType(str, Enum): + + invalid = "Invalid" + full_share_restore = "FullShareRestore" + item_level_restore = "ItemLevelRestore" + + +class InquiryStatus(str, Enum): + + invalid = "Invalid" + success = "Success" + failed = "Failed" + + +class SQLDataDirectoryType(str, Enum): + + invalid = "Invalid" + data = "Data" + log = "Log" + + +class BackupType(str, Enum): + + invalid = "Invalid" + full = "Full" + differential = "Differential" + log = "Log" + copy_only_full = "CopyOnlyFull" + + +class RestorePointType(str, Enum): + + invalid = "Invalid" + full = "Full" + log = "Log" + differential = "Differential" + + +class OverwriteOptions(str, Enum): + + invalid = "Invalid" + fail_on_conflict = "FailOnConflict" + overwrite = "Overwrite" + + +class StorageType(str, Enum): + + invalid = "Invalid" + geo_redundant = "GeoRedundant" + locally_redundant = "LocallyRedundant" + + +class StorageTypeState(str, Enum): + + invalid = "Invalid" + locked = "Locked" + unlocked = "Unlocked" + + +class EnhancedSecurityState(str, Enum): + + invalid = "Invalid" + enabled = "Enabled" + disabled = "Disabled" + + +class ContainerType(str, Enum): + + invalid = "Invalid" + unknown = "Unknown" + iaas_vm_container = "IaasVMContainer" + iaas_vm_service_container = "IaasVMServiceContainer" + dpm_container = "DPMContainer" + azure_backup_server_container = "AzureBackupServerContainer" + mab_container = "MABContainer" + cluster = "Cluster" + azure_sql_container = "AzureSqlContainer" + windows = "Windows" + vcenter = "VCenter" + vm_app_container = "VMAppContainer" + sqlag_work_load_container = "SQLAGWorkLoadContainer" + storage_container = "StorageContainer" + generic_container = "GenericContainer" + + +class RestorePointQueryType(str, Enum): + + invalid = "Invalid" + full = "Full" + log = "Log" + differential = "Differential" + full_and_differential = "FullAndDifferential" + all = "All" + + +class WorkloadItemType(str, Enum): + + invalid = "Invalid" + sql_instance = "SQLInstance" + sql_data_base = "SQLDataBase" + + +class RecoveryPointTierType(str, Enum): + + invalid = "Invalid" + instant_rp = "InstantRP" + hardened_rp = "HardenedRP" + + +class RecoveryPointTierStatus(str, Enum): + + invalid = "Invalid" + valid = "Valid" + disabled = "Disabled" + deleted = "Deleted" + + +class BackupItemType(str, Enum): + + invalid = "Invalid" + vm = "VM" + file_folder = "FileFolder" + azure_sql_db = "AzureSqlDb" + sqldb = "SQLDB" + exchange = "Exchange" + sharepoint = "Sharepoint" + vmware_vm = "VMwareVM" + system_state = "SystemState" + client = "Client" + generic_data_source = "GenericDataSource" + sql_data_base = "SQLDataBase" + azure_file_share = "AzureFileShare" + + +class OperationStatusValues(str, Enum): + + invalid = "Invalid" + in_progress = "InProgress" + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource.py index 43478f3ea1b1..a8bb01618a5a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource.py @@ -28,7 +28,7 @@ class Resource(Model): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str """ @@ -48,10 +48,11 @@ class Resource(Model): 'e_tag': {'key': 'eTag', 'type': 'str'}, } - def __init__(self, location=None, tags=None, e_tag=None): + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = location - self.tags = tags - self.e_tag = e_tag + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.e_tag = kwargs.get('e_tag', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_list.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_list.py index cdc500e1398e..44b328e46bd6 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_list.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_list.py @@ -24,5 +24,6 @@ class ResourceList(Model): 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, next_link=None): - self.next_link = next_link + def __init__(self, **kwargs): + super(ResourceList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_list_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_list_py3.py new file mode 100644 index 000000000000..4e92209d5903 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_list_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceList(Model): + """Base for all lists of resources. + + :param next_link: The uri to fetch the next page of resources. Call + ListNext() fetches next page of resources. + :type next_link: str + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, next_link: str=None, **kwargs) -> None: + super(ResourceList, self).__init__(**kwargs) + self.next_link = next_link diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_py3.py new file mode 100644 index 000000000000..a45b6c84b923 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """ARM Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + self.e_tag = e_tag diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_file_specs.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_file_specs.py new file mode 100644 index 000000000000..7715c324cbc6 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_file_specs.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RestoreFileSpecs(Model): + """Restore file specs like file path, type and target folder path info. + + :param path: Source File/Folder path + :type path: str + :param file_spec_type: Indicates what the Path variable stands for + :type file_spec_type: str + :param target_folder_path: Destination folder path in target FileShare + :type target_folder_path: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'file_spec_type': {'key': 'fileSpecType', 'type': 'str'}, + 'target_folder_path': {'key': 'targetFolderPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RestoreFileSpecs, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.file_spec_type = kwargs.get('file_spec_type', None) + self.target_folder_path = kwargs.get('target_folder_path', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_file_specs_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_file_specs_py3.py new file mode 100644 index 000000000000..3aa79fe8162a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_file_specs_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RestoreFileSpecs(Model): + """Restore file specs like file path, type and target folder path info. + + :param path: Source File/Folder path + :type path: str + :param file_spec_type: Indicates what the Path variable stands for + :type file_spec_type: str + :param target_folder_path: Destination folder path in target FileShare + :type target_folder_path: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'file_spec_type': {'key': 'fileSpecType', 'type': 'str'}, + 'target_folder_path': {'key': 'targetFolderPath', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, file_spec_type: str=None, target_folder_path: str=None, **kwargs) -> None: + super(RestoreFileSpecs, self).__init__(**kwargs) + self.path = path + self.file_spec_type = file_spec_type + self.target_folder_path = target_folder_path diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request.py index e662315f9bdf..d18be734a9ee 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request.py @@ -16,7 +16,13 @@ class RestoreRequest(Model): """Base class for restore request. Workload-specific restore requests are derived from this class. - :param object_type: Polymorphic Discriminator + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, + IaasVMRestoreRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str """ @@ -29,8 +35,9 @@ class RestoreRequest(Model): } _subtype_map = { - 'object_type': {'IaasVMRestoreRequest': 'IaasVMRestoreRequest'} + 'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequest'} } - def __init__(self): + def __init__(self, **kwargs): + super(RestoreRequest, self).__init__(**kwargs) self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_py3.py new file mode 100644 index 000000000000..659d951369f9 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RestoreRequest(Model): + """Base class for restore request. Workload-specific restore requests are + derived from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, + IaasVMRestoreRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequest'} + } + + def __init__(self, **kwargs) -> None: + super(RestoreRequest, self).__init__(**kwargs) + self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_resource.py index 91bd09fc9f45..beca6e1710ca 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_resource.py @@ -29,12 +29,11 @@ class RestoreRequestResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: RestoreRequestResource properties - :type properties: :class:`RestoreRequest - ` + :type properties: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest """ _validation = { @@ -53,6 +52,6 @@ class RestoreRequestResource(Resource): 'properties': {'key': 'properties', 'type': 'RestoreRequest'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(RestoreRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(RestoreRequestResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_resource_py3.py new file mode 100644 index 000000000000..c488620de4f8 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_resource_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class RestoreRequestResource(Resource): + """Base class for restore request. Workload-specific restore requests are + derived from this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: RestoreRequestResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'RestoreRequest'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(RestoreRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_duration.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_duration.py index a8d6b6cc43e9..caac4911f800 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_duration.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_duration.py @@ -22,8 +22,8 @@ class RetentionDuration(Model): :type count: int :param duration_type: Retention duration type of retention policy. Possible values include: 'Invalid', 'Days', 'Weeks', 'Months', 'Years' - :type duration_type: str or :class:`RetentionDurationType - ` + :type duration_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RetentionDurationType """ _attribute_map = { @@ -31,6 +31,7 @@ class RetentionDuration(Model): 'duration_type': {'key': 'durationType', 'type': 'str'}, } - def __init__(self, count=None, duration_type=None): - self.count = count - self.duration_type = duration_type + def __init__(self, **kwargs): + super(RetentionDuration, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.duration_type = kwargs.get('duration_type', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_duration_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_duration_py3.py new file mode 100644 index 000000000000..d2eccbffaed5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_duration_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RetentionDuration(Model): + """Retention duration. + + :param count: Count of duration types. Retention duration is obtained by + the counting the duration type Count times. + For example, when Count = 3 and DurationType = Weeks, retention duration + will be three weeks. + :type count: int + :param duration_type: Retention duration type of retention policy. + Possible values include: 'Invalid', 'Days', 'Weeks', 'Months', 'Years' + :type duration_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RetentionDurationType + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'duration_type': {'key': 'durationType', 'type': 'str'}, + } + + def __init__(self, *, count: int=None, duration_type=None, **kwargs) -> None: + super(RetentionDuration, self).__init__(**kwargs) + self.count = count + self.duration_type = duration_type diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_policy.py index f200b036b2cf..f8bf392172bd 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_policy.py @@ -15,7 +15,12 @@ class RetentionPolicy(Model): """Base class for retention policy. - :param retention_policy_type: Polymorphic Discriminator + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LongTermRetentionPolicy, SimpleRetentionPolicy + + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. :type retention_policy_type: str """ @@ -31,5 +36,6 @@ class RetentionPolicy(Model): 'retention_policy_type': {'LongTermRetentionPolicy': 'LongTermRetentionPolicy', 'SimpleRetentionPolicy': 'SimpleRetentionPolicy'} } - def __init__(self): + def __init__(self, **kwargs): + super(RetentionPolicy, self).__init__(**kwargs) self.retention_policy_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_policy_py3.py new file mode 100644 index 000000000000..7628a70dd614 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_policy_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RetentionPolicy(Model): + """Base class for retention policy. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LongTermRetentionPolicy, SimpleRetentionPolicy + + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. + :type retention_policy_type: str + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, + } + + _subtype_map = { + 'retention_policy_type': {'LongTermRetentionPolicy': 'LongTermRetentionPolicy', 'SimpleRetentionPolicy': 'SimpleRetentionPolicy'} + } + + def __init__(self, **kwargs) -> None: + super(RetentionPolicy, self).__init__(**kwargs) + self.retention_policy_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy.py index 1c478921c642..87f4bb99f669 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy.py @@ -15,7 +15,13 @@ class SchedulePolicy(Model): """Base class for backup schedule. - :param schedule_policy_type: Polymorphic Discriminator + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LogSchedulePolicy, LongTermSchedulePolicy, + SimpleSchedulePolicy + + All required parameters must be populated in order to send to Azure. + + :param schedule_policy_type: Required. Constant filled by server. :type schedule_policy_type: str """ @@ -28,8 +34,9 @@ class SchedulePolicy(Model): } _subtype_map = { - 'schedule_policy_type': {'LongTermSchedulePolicy': 'LongTermSchedulePolicy', 'SimpleSchedulePolicy': 'SimpleSchedulePolicy'} + 'schedule_policy_type': {'LogSchedulePolicy': 'LogSchedulePolicy', 'LongTermSchedulePolicy': 'LongTermSchedulePolicy', 'SimpleSchedulePolicy': 'SimpleSchedulePolicy'} } - def __init__(self): + def __init__(self, **kwargs): + super(SchedulePolicy, self).__init__(**kwargs) self.schedule_policy_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy_py3.py new file mode 100644 index 000000000000..a9f280e16951 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SchedulePolicy(Model): + """Base class for backup schedule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LogSchedulePolicy, LongTermSchedulePolicy, + SimpleSchedulePolicy + + All required parameters must be populated in order to send to Azure. + + :param schedule_policy_type: Required. Constant filled by server. + :type schedule_policy_type: str + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + } + + _subtype_map = { + 'schedule_policy_type': {'LogSchedulePolicy': 'LogSchedulePolicy', 'LongTermSchedulePolicy': 'LongTermSchedulePolicy', 'SimpleSchedulePolicy': 'SimpleSchedulePolicy'} + } + + def __init__(self, **kwargs) -> None: + super(SchedulePolicy, self).__init__(**kwargs) + self.schedule_policy_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/settings.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/settings.py new file mode 100644 index 000000000000..e7f38a6d995b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/settings.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Settings(Model): + """Common settings field for backup management. + + :param time_zone: TimeZone optional input as string. For example: TimeZone + = "Pacific Standard Time". + :type time_zone: str + :param issqlcompression: SQL compression flag + :type issqlcompression: bool + """ + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'issqlcompression': {'key': 'issqlcompression', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(Settings, self).__init__(**kwargs) + self.time_zone = kwargs.get('time_zone', None) + self.issqlcompression = kwargs.get('issqlcompression', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/settings_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/settings_py3.py new file mode 100644 index 000000000000..260c77d0dc13 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/settings_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Settings(Model): + """Common settings field for backup management. + + :param time_zone: TimeZone optional input as string. For example: TimeZone + = "Pacific Standard Time". + :type time_zone: str + :param issqlcompression: SQL compression flag + :type issqlcompression: bool + """ + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'issqlcompression': {'key': 'issqlcompression', 'type': 'bool'}, + } + + def __init__(self, *, time_zone: str=None, issqlcompression: bool=None, **kwargs) -> None: + super(Settings, self).__init__(**kwargs) + self.time_zone = time_zone + self.issqlcompression = issqlcompression diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_retention_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_retention_policy.py index 7f26a5b6f93e..6e0a54f04e7a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_retention_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_retention_policy.py @@ -15,11 +15,13 @@ class SimpleRetentionPolicy(RetentionPolicy): """Simple policy retention. - :param retention_policy_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. :type retention_policy_type: str :param retention_duration: Retention duration of the protection policy. - :type retention_duration: :class:`RetentionDuration - ` + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _validation = { @@ -31,7 +33,7 @@ class SimpleRetentionPolicy(RetentionPolicy): 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, } - def __init__(self, retention_duration=None): - super(SimpleRetentionPolicy, self).__init__() - self.retention_duration = retention_duration + def __init__(self, **kwargs): + super(SimpleRetentionPolicy, self).__init__(**kwargs) + self.retention_duration = kwargs.get('retention_duration', None) self.retention_policy_type = 'SimpleRetentionPolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_retention_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_retention_policy_py3.py new file mode 100644 index 000000000000..71416b26af7b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_retention_policy_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .retention_policy_py3 import RetentionPolicy + + +class SimpleRetentionPolicy(RetentionPolicy): + """Simple policy retention. + + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. + :type retention_policy_type: str + :param retention_duration: Retention duration of the protection policy. + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + def __init__(self, *, retention_duration=None, **kwargs) -> None: + super(SimpleRetentionPolicy, self).__init__(**kwargs) + self.retention_duration = retention_duration + self.retention_policy_type = 'SimpleRetentionPolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_schedule_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_schedule_policy.py index 965a5e64e6a7..bad416583e2f 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_schedule_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_schedule_policy.py @@ -15,19 +15,21 @@ class SimpleSchedulePolicy(SchedulePolicy): """Simple policy schedule. - :param schedule_policy_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param schedule_policy_type: Required. Constant filled by server. :type schedule_policy_type: str :param schedule_run_frequency: Frequency of the schedule operation of this policy. Possible values include: 'Invalid', 'Daily', 'Weekly' - :type schedule_run_frequency: str or :class:`ScheduleRunType - ` + :type schedule_run_frequency: str or + ~azure.mgmt.recoveryservicesbackup.models.ScheduleRunType :param schedule_run_days: List of days of week this schedule has to be run. - :type schedule_run_days: list of str or :class:`DayOfWeek - ` + :type schedule_run_days: list[str or + ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] :param schedule_run_times: List of times of day this schedule has to be run. - :type schedule_run_times: list of datetime + :type schedule_run_times: list[datetime] :param schedule_weekly_frequency: At every number weeks this schedule has to be run. :type schedule_weekly_frequency: int @@ -45,10 +47,10 @@ class SimpleSchedulePolicy(SchedulePolicy): 'schedule_weekly_frequency': {'key': 'scheduleWeeklyFrequency', 'type': 'int'}, } - def __init__(self, schedule_run_frequency=None, schedule_run_days=None, schedule_run_times=None, schedule_weekly_frequency=None): - super(SimpleSchedulePolicy, self).__init__() - self.schedule_run_frequency = schedule_run_frequency - self.schedule_run_days = schedule_run_days - self.schedule_run_times = schedule_run_times - self.schedule_weekly_frequency = schedule_weekly_frequency + def __init__(self, **kwargs): + super(SimpleSchedulePolicy, self).__init__(**kwargs) + self.schedule_run_frequency = kwargs.get('schedule_run_frequency', None) + self.schedule_run_days = kwargs.get('schedule_run_days', None) + self.schedule_run_times = kwargs.get('schedule_run_times', None) + self.schedule_weekly_frequency = kwargs.get('schedule_weekly_frequency', None) self.schedule_policy_type = 'SimpleSchedulePolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_schedule_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_schedule_policy_py3.py new file mode 100644 index 000000000000..cdee86fd1bbf --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_schedule_policy_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .schedule_policy_py3 import SchedulePolicy + + +class SimpleSchedulePolicy(SchedulePolicy): + """Simple policy schedule. + + All required parameters must be populated in order to send to Azure. + + :param schedule_policy_type: Required. Constant filled by server. + :type schedule_policy_type: str + :param schedule_run_frequency: Frequency of the schedule operation of this + policy. Possible values include: 'Invalid', 'Daily', 'Weekly' + :type schedule_run_frequency: str or + ~azure.mgmt.recoveryservicesbackup.models.ScheduleRunType + :param schedule_run_days: List of days of week this schedule has to be + run. + :type schedule_run_days: list[str or + ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :param schedule_run_times: List of times of day this schedule has to be + run. + :type schedule_run_times: list[datetime] + :param schedule_weekly_frequency: At every number weeks this schedule has + to be run. + :type schedule_weekly_frequency: int + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + 'schedule_run_frequency': {'key': 'scheduleRunFrequency', 'type': 'str'}, + 'schedule_run_days': {'key': 'scheduleRunDays', 'type': '[DayOfWeek]'}, + 'schedule_run_times': {'key': 'scheduleRunTimes', 'type': '[iso-8601]'}, + 'schedule_weekly_frequency': {'key': 'scheduleWeeklyFrequency', 'type': 'int'}, + } + + def __init__(self, *, schedule_run_frequency=None, schedule_run_days=None, schedule_run_times=None, schedule_weekly_frequency: int=None, **kwargs) -> None: + super(SimpleSchedulePolicy, self).__init__(**kwargs) + self.schedule_run_frequency = schedule_run_frequency + self.schedule_run_days = schedule_run_days + self.schedule_run_times = schedule_run_times + self.schedule_weekly_frequency = schedule_weekly_frequency + self.schedule_policy_type = 'SimpleSchedulePolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory.py new file mode 100644 index 000000000000..1b2c5562aee4 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SQLDataDirectory(Model): + """SQLDataDirectory info. + + :param type: Type of data directory mapping. Possible values include: + 'Invalid', 'Data', 'Log' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType + :param path: File path + :type path: str + :param logical_name: Logical name of the file + :type logical_name: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'logical_name': {'key': 'logicalName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SQLDataDirectory, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.path = kwargs.get('path', None) + self.logical_name = kwargs.get('logical_name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_mapping.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_mapping.py new file mode 100644 index 000000000000..6eed363c64e3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_mapping.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SQLDataDirectoryMapping(Model): + """Encapsulates information regarding data directory. + + :param mapping_type: Type of data directory mapping. Possible values + include: 'Invalid', 'Data', 'Log' + :type mapping_type: str or + ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType + :param source_logical_name: Restore source logical name path + :type source_logical_name: str + :param source_path: Restore source path + :type source_path: str + :param target_path: Target path + :type target_path: str + """ + + _attribute_map = { + 'mapping_type': {'key': 'mappingType', 'type': 'str'}, + 'source_logical_name': {'key': 'sourceLogicalName', 'type': 'str'}, + 'source_path': {'key': 'sourcePath', 'type': 'str'}, + 'target_path': {'key': 'targetPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SQLDataDirectoryMapping, self).__init__(**kwargs) + self.mapping_type = kwargs.get('mapping_type', None) + self.source_logical_name = kwargs.get('source_logical_name', None) + self.source_path = kwargs.get('source_path', None) + self.target_path = kwargs.get('target_path', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_mapping_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_mapping_py3.py new file mode 100644 index 000000000000..6048d6787ca1 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_mapping_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SQLDataDirectoryMapping(Model): + """Encapsulates information regarding data directory. + + :param mapping_type: Type of data directory mapping. Possible values + include: 'Invalid', 'Data', 'Log' + :type mapping_type: str or + ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType + :param source_logical_name: Restore source logical name path + :type source_logical_name: str + :param source_path: Restore source path + :type source_path: str + :param target_path: Target path + :type target_path: str + """ + + _attribute_map = { + 'mapping_type': {'key': 'mappingType', 'type': 'str'}, + 'source_logical_name': {'key': 'sourceLogicalName', 'type': 'str'}, + 'source_path': {'key': 'sourcePath', 'type': 'str'}, + 'target_path': {'key': 'targetPath', 'type': 'str'}, + } + + def __init__(self, *, mapping_type=None, source_logical_name: str=None, source_path: str=None, target_path: str=None, **kwargs) -> None: + super(SQLDataDirectoryMapping, self).__init__(**kwargs) + self.mapping_type = mapping_type + self.source_logical_name = source_logical_name + self.source_path = source_path + self.target_path = target_path diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_py3.py new file mode 100644 index 000000000000..3ac31f086a93 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SQLDataDirectory(Model): + """SQLDataDirectory info. + + :param type: Type of data directory mapping. Possible values include: + 'Invalid', 'Data', 'Log' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType + :param path: File path + :type path: str + :param logical_name: Logical name of the file + :type logical_name: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'logical_name': {'key': 'logicalName', 'type': 'str'}, + } + + def __init__(self, *, type=None, path: str=None, logical_name: str=None, **kwargs) -> None: + super(SQLDataDirectory, self).__init__(**kwargs) + self.type = type + self.path = path + self.logical_name = logical_name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sub_protection_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sub_protection_policy.py new file mode 100644 index 000000000000..f7216d1ac89a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sub_protection_policy.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubProtectionPolicy(Model): + """Sub-protection policy which includes schedule and retention. + + :param policy_type: Type of backup policy type + :type policy_type: str + :param schedule_policy: Backup schedule specified as part of backup + policy. + :type schedule_policy: + ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :param retention_policy: Retention policy with the details on backup copy + retention ranges. + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + """ + + _attribute_map = { + 'policy_type': {'key': 'policyType', 'type': 'str'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__(self, **kwargs): + super(SubProtectionPolicy, self).__init__(**kwargs) + self.policy_type = kwargs.get('policy_type', None) + self.schedule_policy = kwargs.get('schedule_policy', None) + self.retention_policy = kwargs.get('retention_policy', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sub_protection_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sub_protection_policy_py3.py new file mode 100644 index 000000000000..3744766dcefd --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sub_protection_policy_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubProtectionPolicy(Model): + """Sub-protection policy which includes schedule and retention. + + :param policy_type: Type of backup policy type + :type policy_type: str + :param schedule_policy: Backup schedule specified as part of backup + policy. + :type schedule_policy: + ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :param retention_policy: Retention policy with the details on backup copy + retention ranges. + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + """ + + _attribute_map = { + 'policy_type': {'key': 'policyType', 'type': 'str'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__(self, *, policy_type: str=None, schedule_policy=None, retention_policy=None, **kwargs) -> None: + super(SubProtectionPolicy, self).__init__(**kwargs) + self.policy_type = policy_type + self.schedule_policy = schedule_policy + self.retention_policy = retention_policy diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_afs_restore_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_afs_restore_info.py new file mode 100644 index 000000000000..2df823901d50 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_afs_restore_info.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TargetAFSRestoreInfo(Model): + """Target Azure File Share Info. + + :param name: File share name + :type name: str + :param target_resource_id: Target file share resource ARM ID + :type target_resource_id: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TargetAFSRestoreInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.target_resource_id = kwargs.get('target_resource_id', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_afs_restore_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_afs_restore_info_py3.py new file mode 100644 index 000000000000..91c8c8dc786d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_afs_restore_info_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TargetAFSRestoreInfo(Model): + """Target Azure File Share Info. + + :param name: File share name + :type name: str + :param target_resource_id: Target file share resource ARM ID + :type target_resource_id: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, target_resource_id: str=None, **kwargs) -> None: + super(TargetAFSRestoreInfo, self).__init__(**kwargs) + self.name = name + self.target_resource_id = target_resource_id diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_restore_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_restore_info.py new file mode 100644 index 000000000000..de2d8363ff7b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_restore_info.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TargetRestoreInfo(Model): + """Details about target workload during restore operation. + + :param overwrite_option: Can Overwrite if Target DataBase already exists. + Possible values include: 'Invalid', 'FailOnConflict', 'Overwrite' + :type overwrite_option: str or + ~azure.mgmt.recoveryservicesbackup.models.OverwriteOptions + :param container_id: Resource Id name of the container in which Target + DataBase resides + :type container_id: str + :param database_name: Database name SQL InstanceName/DataBaseName + :type database_name: str + """ + + _attribute_map = { + 'overwrite_option': {'key': 'overwriteOption', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TargetRestoreInfo, self).__init__(**kwargs) + self.overwrite_option = kwargs.get('overwrite_option', None) + self.container_id = kwargs.get('container_id', None) + self.database_name = kwargs.get('database_name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_restore_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_restore_info_py3.py new file mode 100644 index 000000000000..717765ad36ac --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_restore_info_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TargetRestoreInfo(Model): + """Details about target workload during restore operation. + + :param overwrite_option: Can Overwrite if Target DataBase already exists. + Possible values include: 'Invalid', 'FailOnConflict', 'Overwrite' + :type overwrite_option: str or + ~azure.mgmt.recoveryservicesbackup.models.OverwriteOptions + :param container_id: Resource Id name of the container in which Target + DataBase resides + :type container_id: str + :param database_name: Database name SQL InstanceName/DataBaseName + :type database_name: str + """ + + _attribute_map = { + 'overwrite_option': {'key': 'overwriteOption', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, *, overwrite_option=None, container_id: str=None, database_name: str=None, **kwargs) -> None: + super(TargetRestoreInfo, self).__init__(**kwargs) + self.overwrite_option = overwrite_option + self.container_id = container_id + self.database_name = database_name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/token_information.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/token_information.py index 8c8c0d6349ab..d374326d5884 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/token_information.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/token_information.py @@ -29,7 +29,8 @@ class TokenInformation(Model): 'security_pin': {'key': 'securityPIN', 'type': 'str'}, } - def __init__(self, token=None, expiry_time_in_utc_ticks=None, security_pin=None): - self.token = token - self.expiry_time_in_utc_ticks = expiry_time_in_utc_ticks - self.security_pin = security_pin + def __init__(self, **kwargs): + super(TokenInformation, self).__init__(**kwargs) + self.token = kwargs.get('token', None) + self.expiry_time_in_utc_ticks = kwargs.get('expiry_time_in_utc_ticks', None) + self.security_pin = kwargs.get('security_pin', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/token_information_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/token_information_py3.py new file mode 100644 index 000000000000..566366c0b1a4 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/token_information_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TokenInformation(Model): + """The token information details. + + :param token: Token value. + :type token: str + :param expiry_time_in_utc_ticks: Expiry time of token. + :type expiry_time_in_utc_ticks: long + :param security_pin: Security PIN + :type security_pin: str + """ + + _attribute_map = { + 'token': {'key': 'token', 'type': 'str'}, + 'expiry_time_in_utc_ticks': {'key': 'expiryTimeInUtcTicks', 'type': 'long'}, + 'security_pin': {'key': 'securityPIN', 'type': 'str'}, + } + + def __init__(self, *, token: str=None, expiry_time_in_utc_ticks: int=None, security_pin: str=None, **kwargs) -> None: + super(TokenInformation, self).__init__(**kwargs) + self.token = token + self.expiry_time_in_utc_ticks = expiry_time_in_utc_ticks + self.security_pin = security_pin diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_format.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_format.py index c2142f048f6b..71938a69bb68 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_format.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_format.py @@ -16,11 +16,11 @@ class WeeklyRetentionFormat(Model): """Weekly retention format. :param days_of_the_week: List of days of the week. - :type days_of_the_week: list of str or :class:`DayOfWeek - ` + :type days_of_the_week: list[str or + ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] :param weeks_of_the_month: List of weeks of month. - :type weeks_of_the_month: list of str or :class:`WeekOfMonth - ` + :type weeks_of_the_month: list[str or + ~azure.mgmt.recoveryservicesbackup.models.WeekOfMonth] """ _attribute_map = { @@ -28,6 +28,7 @@ class WeeklyRetentionFormat(Model): 'weeks_of_the_month': {'key': 'weeksOfTheMonth', 'type': '[WeekOfMonth]'}, } - def __init__(self, days_of_the_week=None, weeks_of_the_month=None): - self.days_of_the_week = days_of_the_week - self.weeks_of_the_month = weeks_of_the_month + def __init__(self, **kwargs): + super(WeeklyRetentionFormat, self).__init__(**kwargs) + self.days_of_the_week = kwargs.get('days_of_the_week', None) + self.weeks_of_the_month = kwargs.get('weeks_of_the_month', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_format_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_format_py3.py new file mode 100644 index 000000000000..5c1349e58fa5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_format_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WeeklyRetentionFormat(Model): + """Weekly retention format. + + :param days_of_the_week: List of days of the week. + :type days_of_the_week: list[str or + ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :param weeks_of_the_month: List of weeks of month. + :type weeks_of_the_month: list[str or + ~azure.mgmt.recoveryservicesbackup.models.WeekOfMonth] + """ + + _attribute_map = { + 'days_of_the_week': {'key': 'daysOfTheWeek', 'type': '[DayOfWeek]'}, + 'weeks_of_the_month': {'key': 'weeksOfTheMonth', 'type': '[WeekOfMonth]'}, + } + + def __init__(self, *, days_of_the_week=None, weeks_of_the_month=None, **kwargs) -> None: + super(WeeklyRetentionFormat, self).__init__(**kwargs) + self.days_of_the_week = days_of_the_week + self.weeks_of_the_month = weeks_of_the_month diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_schedule.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_schedule.py index d255e1d365a4..895e178e6bf2 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_schedule.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_schedule.py @@ -16,13 +16,13 @@ class WeeklyRetentionSchedule(Model): """Weekly retention schedule. :param days_of_the_week: List of days of week for weekly retention policy. - :type days_of_the_week: list of str or :class:`DayOfWeek - ` + :type days_of_the_week: list[str or + ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] :param retention_times: Retention times of retention policy. - :type retention_times: list of datetime + :type retention_times: list[datetime] :param retention_duration: Retention duration of retention Policy. - :type retention_duration: :class:`RetentionDuration - ` + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _attribute_map = { @@ -31,7 +31,8 @@ class WeeklyRetentionSchedule(Model): 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, } - def __init__(self, days_of_the_week=None, retention_times=None, retention_duration=None): - self.days_of_the_week = days_of_the_week - self.retention_times = retention_times - self.retention_duration = retention_duration + def __init__(self, **kwargs): + super(WeeklyRetentionSchedule, self).__init__(**kwargs) + self.days_of_the_week = kwargs.get('days_of_the_week', None) + self.retention_times = kwargs.get('retention_times', None) + self.retention_duration = kwargs.get('retention_duration', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_schedule_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_schedule_py3.py new file mode 100644 index 000000000000..d8c8c677cc33 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_schedule_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WeeklyRetentionSchedule(Model): + """Weekly retention schedule. + + :param days_of_the_week: List of days of week for weekly retention policy. + :type days_of_the_week: list[str or + ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :param retention_times: Retention times of retention policy. + :type retention_times: list[datetime] + :param retention_duration: Retention duration of retention Policy. + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ + + _attribute_map = { + 'days_of_the_week': {'key': 'daysOfTheWeek', 'type': '[DayOfWeek]'}, + 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + def __init__(self, *, days_of_the_week=None, retention_times=None, retention_duration=None, **kwargs) -> None: + super(WeeklyRetentionSchedule, self).__init__(**kwargs) + self.days_of_the_week = days_of_the_week + self.retention_times = retention_times + self.retention_duration = retention_duration diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_inquiry_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_inquiry_details.py new file mode 100644 index 000000000000..904d4f928d74 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_inquiry_details.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkloadInquiryDetails(Model): + """Details of an inquired protectable item. + + :param type: Type of the Workload such as SQL, Oracle etc. + :type type: str + :param item_count: Contains the protectable item Count inside this + Container. + :type item_count: long + :param inquiry_validation: Inquiry validation such as permissions and + other backup validations. + :type inquiry_validation: + ~azure.mgmt.recoveryservicesbackup.models.InquiryValidation + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'item_count': {'key': 'itemCount', 'type': 'long'}, + 'inquiry_validation': {'key': 'inquiryValidation', 'type': 'InquiryValidation'}, + } + + def __init__(self, **kwargs): + super(WorkloadInquiryDetails, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.item_count = kwargs.get('item_count', None) + self.inquiry_validation = kwargs.get('inquiry_validation', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_inquiry_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_inquiry_details_py3.py new file mode 100644 index 000000000000..606ba73009c2 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_inquiry_details_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkloadInquiryDetails(Model): + """Details of an inquired protectable item. + + :param type: Type of the Workload such as SQL, Oracle etc. + :type type: str + :param item_count: Contains the protectable item Count inside this + Container. + :type item_count: long + :param inquiry_validation: Inquiry validation such as permissions and + other backup validations. + :type inquiry_validation: + ~azure.mgmt.recoveryservicesbackup.models.InquiryValidation + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'item_count': {'key': 'itemCount', 'type': 'long'}, + 'inquiry_validation': {'key': 'inquiryValidation', 'type': 'InquiryValidation'}, + } + + def __init__(self, *, type: str=None, item_count: int=None, inquiry_validation=None, **kwargs) -> None: + super(WorkloadInquiryDetails, self).__init__(**kwargs) + self.type = type + self.item_count = item_count + self.inquiry_validation = inquiry_validation diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item.py new file mode 100644 index 000000000000..0966118947b3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkloadItem(Model): + """Base class for backup item. Workload-specific backup items are derived from + this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param workload_item_type: Required. Constant filled by server. + :type workload_item_type: str + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + } + + _subtype_map = { + 'workload_item_type': {'AzureVmWorkloadItem': 'AzureVmWorkloadItem'} + } + + def __init__(self, **kwargs): + super(WorkloadItem, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.workload_type = kwargs.get('workload_type', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.protection_state = kwargs.get('protection_state', None) + self.workload_item_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_py3.py new file mode 100644 index 000000000000..9b626bb29da0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkloadItem(Model): + """Base class for backup item. Workload-specific backup items are derived from + this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param workload_item_type: Required. Constant filled by server. + :type workload_item_type: str + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + } + + _subtype_map = { + 'workload_item_type': {'AzureVmWorkloadItem': 'AzureVmWorkloadItem'} + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, **kwargs) -> None: + super(WorkloadItem, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.workload_type = workload_type + self.friendly_name = friendly_name + self.protection_state = protection_state + self.workload_item_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource.py new file mode 100644 index 000000000000..500a60c0793d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class WorkloadItemResource(Resource): + """Base class for backup item. Workload-specific backup items are derived from + this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: WorkloadItemResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.WorkloadItem + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'WorkloadItem'}, + } + + def __init__(self, **kwargs): + super(WorkloadItemResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource_paged.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource_paged.py new file mode 100644 index 000000000000..65ead95f1d13 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class WorkloadItemResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkloadItemResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkloadItemResource]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkloadItemResourcePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource_py3.py new file mode 100644 index 000000000000..d0c63881cded --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class WorkloadItemResource(Resource): + """Base class for backup item. Workload-specific backup items are derived from + this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: WorkloadItemResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.WorkloadItem + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'WorkloadItem'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(WorkloadItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item.py index e7c85c7a89a2..52d521fffb7a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item.py @@ -16,16 +16,25 @@ class WorkloadProtectableItem(Model): """Base class for backup item. Workload-specific backup items are derived from this class. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareProtectableItem, + AzureVmWorkloadProtectableItem, IaaSVMProtectableItem + + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent to backup an item. :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str :param friendly_name: Friendly name of the backup item. :type friendly_name: str :param protection_state: State of the back up item. Possible values - include: 'Invalid', 'NotProtected', 'Protecting', 'Protected' - :type protection_state: str or :class:`ProtectionStatus - ` - :param protectable_item_type: Polymorphic Discriminator + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. :type protectable_item_type: str """ @@ -35,17 +44,20 @@ class WorkloadProtectableItem(Model): _attribute_map = { 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, } _subtype_map = { - 'protectable_item_type': {'IaaSVMProtectableItem': 'IaaSVMProtectableItem'} + 'protectable_item_type': {'AzureFileShare': 'AzureFileShareProtectableItem', 'AzureVmWorkloadProtectableItem': 'AzureVmWorkloadProtectableItem', 'IaaSVMProtectableItem': 'IaaSVMProtectableItem'} } - def __init__(self, backup_management_type=None, friendly_name=None, protection_state=None): - self.backup_management_type = backup_management_type - self.friendly_name = friendly_name - self.protection_state = protection_state + def __init__(self, **kwargs): + super(WorkloadProtectableItem, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.workload_type = kwargs.get('workload_type', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.protection_state = kwargs.get('protection_state', None) self.protectable_item_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_py3.py new file mode 100644 index 000000000000..21634dde1967 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkloadProtectableItem(Model): + """Base class for backup item. Workload-specific backup items are derived from + this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareProtectableItem, + AzureVmWorkloadProtectableItem, IaaSVMProtectableItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + } + + _subtype_map = { + 'protectable_item_type': {'AzureFileShare': 'AzureFileShareProtectableItem', 'AzureVmWorkloadProtectableItem': 'AzureVmWorkloadProtectableItem', 'IaaSVMProtectableItem': 'IaaSVMProtectableItem'} + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, **kwargs) -> None: + super(WorkloadProtectableItem, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.workload_type = workload_type + self.friendly_name = friendly_name + self.protection_state = protection_state + self.protectable_item_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_resource.py index 3f2b25637389..f9c8157cb641 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_resource.py @@ -29,12 +29,12 @@ class WorkloadProtectableItemResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: WorkloadProtectableItemResource properties - :type properties: :class:`WorkloadProtectableItem - ` + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItem """ _validation = { @@ -53,6 +53,6 @@ class WorkloadProtectableItemResource(Resource): 'properties': {'key': 'properties', 'type': 'WorkloadProtectableItem'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(WorkloadProtectableItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(WorkloadProtectableItemResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_resource_py3.py new file mode 100644 index 000000000000..7e85377d3499 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_resource_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class WorkloadProtectableItemResource(Resource): + """Base class for backup item. Workload-specific backup items are derived from + this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: WorkloadProtectableItemResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItem + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'WorkloadProtectableItem'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(WorkloadProtectableItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/yearly_retention_schedule.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/yearly_retention_schedule.py index f2bcff19392f..c099a59effe0 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/yearly_retention_schedule.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/yearly_retention_schedule.py @@ -19,24 +19,23 @@ class YearlyRetentionSchedule(Model): yearly retention policy. Possible values include: 'Invalid', 'Daily', 'Weekly' :type retention_schedule_format_type: str or - :class:`RetentionScheduleFormat - ` + ~azure.mgmt.recoveryservicesbackup.models.RetentionScheduleFormat :param months_of_year: List of months of year of yearly retention policy. - :type months_of_year: list of str or :class:`MonthOfYear - ` + :type months_of_year: list[str or + ~azure.mgmt.recoveryservicesbackup.models.MonthOfYear] :param retention_schedule_daily: Daily retention format for yearly retention policy. - :type retention_schedule_daily: :class:`DailyRetentionFormat - ` + :type retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat :param retention_schedule_weekly: Weekly retention format for yearly retention policy. - :type retention_schedule_weekly: :class:`WeeklyRetentionFormat - ` + :type retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionFormat :param retention_times: Retention times of retention policy. - :type retention_times: list of datetime + :type retention_times: list[datetime] :param retention_duration: Retention duration of retention Policy. - :type retention_duration: :class:`RetentionDuration - ` + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _attribute_map = { @@ -48,10 +47,11 @@ class YearlyRetentionSchedule(Model): 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, } - def __init__(self, retention_schedule_format_type=None, months_of_year=None, retention_schedule_daily=None, retention_schedule_weekly=None, retention_times=None, retention_duration=None): - self.retention_schedule_format_type = retention_schedule_format_type - self.months_of_year = months_of_year - self.retention_schedule_daily = retention_schedule_daily - self.retention_schedule_weekly = retention_schedule_weekly - self.retention_times = retention_times - self.retention_duration = retention_duration + def __init__(self, **kwargs): + super(YearlyRetentionSchedule, self).__init__(**kwargs) + self.retention_schedule_format_type = kwargs.get('retention_schedule_format_type', None) + self.months_of_year = kwargs.get('months_of_year', None) + self.retention_schedule_daily = kwargs.get('retention_schedule_daily', None) + self.retention_schedule_weekly = kwargs.get('retention_schedule_weekly', None) + self.retention_times = kwargs.get('retention_times', None) + self.retention_duration = kwargs.get('retention_duration', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/yearly_retention_schedule_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/yearly_retention_schedule_py3.py new file mode 100644 index 000000000000..0e4d5e42b653 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/yearly_retention_schedule_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class YearlyRetentionSchedule(Model): + """Yearly retention schedule. + + :param retention_schedule_format_type: Retention schedule format for + yearly retention policy. Possible values include: 'Invalid', 'Daily', + 'Weekly' + :type retention_schedule_format_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RetentionScheduleFormat + :param months_of_year: List of months of year of yearly retention policy. + :type months_of_year: list[str or + ~azure.mgmt.recoveryservicesbackup.models.MonthOfYear] + :param retention_schedule_daily: Daily retention format for yearly + retention policy. + :type retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat + :param retention_schedule_weekly: Weekly retention format for yearly + retention policy. + :type retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionFormat + :param retention_times: Retention times of retention policy. + :type retention_times: list[datetime] + :param retention_duration: Retention duration of retention Policy. + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ + + _attribute_map = { + 'retention_schedule_format_type': {'key': 'retentionScheduleFormatType', 'type': 'str'}, + 'months_of_year': {'key': 'monthsOfYear', 'type': '[MonthOfYear]'}, + 'retention_schedule_daily': {'key': 'retentionScheduleDaily', 'type': 'DailyRetentionFormat'}, + 'retention_schedule_weekly': {'key': 'retentionScheduleWeekly', 'type': 'WeeklyRetentionFormat'}, + 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + def __init__(self, *, retention_schedule_format_type=None, months_of_year=None, retention_schedule_daily=None, retention_schedule_weekly=None, retention_times=None, retention_duration=None, **kwargs) -> None: + super(YearlyRetentionSchedule, self).__init__(**kwargs) + self.retention_schedule_format_type = retention_schedule_format_type + self.months_of_year = months_of_year + self.retention_schedule_daily = retention_schedule_daily + self.retention_schedule_weekly = retention_schedule_weekly + self.retention_times = retention_times + self.retention_duration = retention_duration diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py index 85001be77416..f7fa267b884d 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py @@ -9,12 +9,22 @@ # regenerated. # -------------------------------------------------------------------------- +from .protection_intent_operations import ProtectionIntentOperations +from .backup_status_operations import BackupStatusOperations +from .feature_support_operations import FeatureSupportOperations from .backup_jobs_operations import BackupJobsOperations from .job_details_operations import JobDetailsOperations +from .export_jobs_operation_results_operations import ExportJobsOperationResultsOperations +from .jobs_operations import JobsOperations +from .backup_policies_operations import BackupPoliciesOperations +from .backup_protected_items_operations import BackupProtectedItemsOperations +from .backup_usage_summaries_operations import BackupUsageSummariesOperations from .backup_resource_vault_configs_operations import BackupResourceVaultConfigsOperations from .backup_engines_operations import BackupEnginesOperations from .protection_container_refresh_operation_results_operations import ProtectionContainerRefreshOperationResultsOperations +from .protectable_containers_operations import ProtectableContainersOperations from .protection_containers_operations import ProtectionContainersOperations +from .backup_workload_items_operations import BackupWorkloadItemsOperations from .protection_container_operation_results_operations import ProtectionContainerOperationResultsOperations from .protected_items_operations import ProtectedItemsOperations from .backups_operations import BackupsOperations @@ -25,29 +35,34 @@ from .restores_operations import RestoresOperations from .job_cancellations_operations import JobCancellationsOperations from .job_operation_results_operations import JobOperationResultsOperations -from .export_jobs_operation_results_operations import ExportJobsOperationResultsOperations -from .jobs_operations import JobsOperations from .backup_operation_results_operations import BackupOperationResultsOperations from .backup_operation_statuses_operations import BackupOperationStatusesOperations -from .backup_policies_operations import BackupPoliciesOperations from .protection_policies_operations import ProtectionPoliciesOperations from .protection_policy_operation_results_operations import ProtectionPolicyOperationResultsOperations from .protection_policy_operation_statuses_operations import ProtectionPolicyOperationStatusesOperations from .backup_protectable_items_operations import BackupProtectableItemsOperations -from .backup_protected_items_operations import BackupProtectedItemsOperations from .backup_protection_containers_operations import BackupProtectionContainersOperations from .security_pi_ns_operations import SecurityPINsOperations from .backup_resource_storage_configs_operations import BackupResourceStorageConfigsOperations -from .backup_usage_summaries_operations import BackupUsageSummariesOperations from .operations import Operations __all__ = [ + 'ProtectionIntentOperations', + 'BackupStatusOperations', + 'FeatureSupportOperations', 'BackupJobsOperations', 'JobDetailsOperations', + 'ExportJobsOperationResultsOperations', + 'JobsOperations', + 'BackupPoliciesOperations', + 'BackupProtectedItemsOperations', + 'BackupUsageSummariesOperations', 'BackupResourceVaultConfigsOperations', 'BackupEnginesOperations', 'ProtectionContainerRefreshOperationResultsOperations', + 'ProtectableContainersOperations', 'ProtectionContainersOperations', + 'BackupWorkloadItemsOperations', 'ProtectionContainerOperationResultsOperations', 'ProtectedItemsOperations', 'BackupsOperations', @@ -58,19 +73,14 @@ 'RestoresOperations', 'JobCancellationsOperations', 'JobOperationResultsOperations', - 'ExportJobsOperationResultsOperations', - 'JobsOperations', 'BackupOperationResultsOperations', 'BackupOperationStatusesOperations', - 'BackupPoliciesOperations', 'ProtectionPoliciesOperations', 'ProtectionPolicyOperationResultsOperations', 'ProtectionPolicyOperationStatusesOperations', 'BackupProtectableItemsOperations', - 'BackupProtectedItemsOperations', 'BackupProtectionContainersOperations', 'SecurityPINsOperations', 'BackupResourceStorageConfigsOperations', - 'BackupUsageSummariesOperations', 'Operations', ] diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_engines_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_engines_operations.py index 0c4b0d7a24b9..a63a7f71b0d9 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_engines_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_engines_operations.py @@ -22,10 +22,12 @@ class BackupEnginesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -54,17 +56,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`BackupEngineBaseResource - ` - :rtype: :class:`BackupEngineBaseResourcePaged - ` + :return: An iterator like instance of BackupEngineBaseResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResourcePaged[~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines' + url = self.list.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -97,7 +98,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -115,6 +116,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines'} def get( self, vault_name, resource_group_name, backup_engine_name, filter=None, skip_token=None, custom_headers=None, raw=False, **operation_config): @@ -136,17 +138,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`BackupEngineBaseResource - ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`BackupEngineBaseResource - ` - or :class:`ClientRawResponse` + :return: BackupEngineBaseResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -175,7 +174,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -192,3 +191,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_jobs_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_jobs_operations.py index 4e210638f118..8becb59e8914 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_jobs_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_jobs_operations.py @@ -22,10 +22,12 @@ class BackupJobsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -53,17 +55,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`JobResource - ` - :rtype: :class:`JobResourcePaged - ` + :return: An iterator like instance of JobResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.JobResourcePaged[~azure.mgmt.recoveryservicesbackup.models.JobResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs' + url = self.list.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -96,7 +97,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -114,3 +115,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_operation_results_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_operation_results_operations.py index cd2acf2d1f18..65b149b11607 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_operation_results_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_operation_results_operations.py @@ -22,10 +22,12 @@ class BackupOperationResultsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -56,15 +58,12 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -89,7 +88,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: exp = CloudError(response) @@ -99,3 +98,4 @@ def get( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_operation_statuses_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_operation_statuses_operations.py index 84b722f29058..ee32c4fec0a6 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_operation_statuses_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_operation_statuses_operations.py @@ -22,10 +22,12 @@ class BackupOperationStatusesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -55,17 +57,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`OperationStatus - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`OperationStatus - ` or - :class:`ClientRawResponse` + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -90,7 +88,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -107,3 +105,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_policies_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_policies_operations.py index 24f7e7a1f7d6..4130b2e7ea80 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_policies_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_policies_operations.py @@ -22,16 +22,18 @@ class BackupPoliciesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-12-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-12-01" + self.api_version = "2017-07-01" self.config = config @@ -52,17 +54,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ProtectionPolicyResource - ` - :rtype: :class:`ProtectionPolicyResourcePaged - ` + :return: An iterator like instance of ProtectionPolicyResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResourcePaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies' + url = self.list.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +94,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,3 +112,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protectable_items_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protectable_items_operations.py index 9779a51bccc5..f0a4783a523e 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protectable_items_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protectable_items_operations.py @@ -22,10 +22,12 @@ class BackupProtectableItemsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -55,18 +57,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of - :class:`WorkloadProtectableItemResource - ` - :rtype: :class:`WorkloadProtectableItemResourcePaged - ` + :return: An iterator like instance of WorkloadProtectableItemResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItemResourcePaged[~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItemResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems' + url = self.list.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -99,7 +99,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -117,3 +117,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protected_items_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protected_items_operations.py index 795ea6e78e38..f2b06237a06a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protected_items_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protected_items_operations.py @@ -22,16 +22,18 @@ class BackupProtectedItemsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-12-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-12-01" + self.api_version = "2017-07-01" self.config = config @@ -54,17 +56,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ProtectedItemResource - ` - :rtype: :class:`ProtectedItemResourcePaged - ` + :return: An iterator like instance of ProtectedItemResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResourcePaged[~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems' + url = self.list.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -97,7 +98,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -115,3 +116,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protection_containers_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protection_containers_operations.py index 908304cbe2f1..dbc03196d434 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protection_containers_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protection_containers_operations.py @@ -22,10 +22,12 @@ class BackupProtectionContainersOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,18 +53,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of - :class:`ProtectionContainerResource - ` - :rtype: :class:`ProtectionContainerResourcePaged - ` + :return: An iterator like instance of ProtectionContainerResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResourcePaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers' + url = self.list.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +93,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,3 +111,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_resource_storage_configs_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_resource_storage_configs_operations.py index b4e252698b2a..435b7f4aec9d 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_resource_storage_configs_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_resource_storage_configs_operations.py @@ -22,10 +22,12 @@ class BackupResourceStorageConfigsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,17 +51,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`BackupResourceConfigResource - ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`BackupResourceConfigResource - ` - or :class:`ClientRawResponse` + :return: BackupResourceConfigResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -83,7 +82,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -100,9 +99,10 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} def update( - self, vault_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, vault_name, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): """Updates vault storage model type. :param vault_name: The name of the recovery services vault. @@ -110,20 +110,20 @@ def update( :param resource_group_name: The name of the resource group where the recovery services vault is present. :type resource_group_name: str + :param parameters: Vault storage config request + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig' + url = self.update.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -145,9 +145,13 @@ def update( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct body + body_content = self._serialize.body(parameters, 'BackupResourceConfigResource') + # Construct and send request request = self._client.patch(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -157,3 +161,4 @@ def update( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_resource_vault_configs_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_resource_vault_configs_operations.py index c6268b88622b..da652c2678d8 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_resource_vault_configs_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_resource_vault_configs_operations.py @@ -22,10 +22,12 @@ class BackupResourceVaultConfigsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,17 +51,15 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`BackupResourceVaultConfigResource - ` - or :class:`ClientRawResponse` if + :return: BackupResourceVaultConfigResource or ClientRawResponse if raw=true - :rtype: :class:`BackupResourceVaultConfigResource - ` - or :class:`ClientRawResponse` + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -83,7 +83,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -100,6 +100,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'} def update( self, vault_name, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -111,24 +112,22 @@ def update( recovery services vault is present. :type resource_group_name: str :param parameters: resource config request - :type parameters: :class:`BackupResourceVaultConfigResource - ` + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`BackupResourceVaultConfigResource - ` - or :class:`ClientRawResponse` if + :return: BackupResourceVaultConfigResource or ClientRawResponse if raw=true - :rtype: :class:`BackupResourceVaultConfigResource - ` - or :class:`ClientRawResponse` + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig' + url = self.update.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -156,7 +155,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -173,3 +172,4 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'} diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/name_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_status_operations.py similarity index 69% rename from azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/name_operations.py rename to azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_status_operations.py index cb14a1793726..21a5688cf429 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/name_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_status_operations.py @@ -9,56 +9,57 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models -class NameOperations(object): - """NameOperations operations. +class BackupStatusOperations(object): + """BackupStatusOperations operations. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-04-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-01" + self.api_version = "2017-07-01" self.config = config - def check_availability( - self, name, custom_headers=None, raw=False, **operation_config): - """Checks the availability of the given service namespace across all Azure - subscriptions. This is useful because the domain name is created based - on the service namespace name. + def get( + self, azure_region, parameters, custom_headers=None, raw=False, **operation_config): + """Get the container backup status. - :param name: Resource name - :type name: str + :param azure_region: Azure region to hit Api + :type azure_region: str + :param parameters: Container Backup Status Request + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.BackupStatusRequest :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`CheckNameAvailabilityResponse - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: BackupStatusResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupStatusResponse + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - parameters = models.CheckNameAvailabilityRequestParameters(name=name) - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNameAvailability' + url = self.get.metadata['url'] path_format_arguments = { + 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -78,12 +79,12 @@ def check_availability( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'CheckNameAvailabilityRequestParameters') + body_content = self._serialize.body(parameters, 'BackupStatusRequest') # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -93,10 +94,11 @@ def check_availability( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('CheckNameAvailabilityResponse', response) + deserialized = self._deserialize('BackupStatusResponse', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_usage_summaries_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_usage_summaries_operations.py index 75e05fe1eafe..d4425f3c9ade 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_usage_summaries_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_usage_summaries_operations.py @@ -22,16 +22,18 @@ class BackupUsageSummariesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-12-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-12-01" + self.api_version = "2017-07-01" self.config = config @@ -53,17 +55,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`BackupManagementUsage - ` - :rtype: :class:`BackupManagementUsagePaged - ` + :return: An iterator like instance of BackupManagementUsage + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsagePaged[~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsage] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries' + url = self.list.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -96,7 +97,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -114,3 +115,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_workload_items_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_workload_items_operations.py new file mode 100644 index 000000000000..1604739bf2f6 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_workload_items_operations.py @@ -0,0 +1,125 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class BackupWorkloadItemsOperations(object): + """BackupWorkloadItemsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-12-01" + + self.config = config + + def list( + self, vault_name, resource_group_name, fabric_name, container_name, filter=None, skip_token=None, custom_headers=None, raw=False, **operation_config): + """Provides a pageable list of workload item of a specific container + according to the query filter and the pagination parameters. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the + recovery services vault is present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the container. + :type fabric_name: str + :param container_name: Name of the container. + :type container_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkloadItemResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemResourcePaged[~azure.mgmt.recoveryservicesbackup.models.WorkloadItemResource] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.WorkloadItemResourcePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.WorkloadItemResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backups_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backups_operations.py index 9831450591f0..702c647b69e8 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backups_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backups_operations.py @@ -22,10 +22,12 @@ class BackupsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -54,22 +56,19 @@ def trigger( triggered. :type protected_item_name: str :param parameters: resource backup request - :type parameters: :class:`BackupRequestResource - ` + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.BackupRequestResource :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup' + url = self.trigger.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -100,7 +99,7 @@ def trigger( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -110,3 +109,4 @@ def trigger( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + trigger.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/export_jobs_operation_results_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/export_jobs_operation_results_operations.py index 1df9463a014a..2f1818e7f6ff 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/export_jobs_operation_results_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/export_jobs_operation_results_operations.py @@ -22,16 +22,18 @@ class ExportJobsOperationResultsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-12-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-12-01" + self.api_version = "2017-07-01" self.config = config @@ -54,17 +56,15 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`OperationResultInfoBaseResource - ` - or :class:`ClientRawResponse` if + :return: OperationResultInfoBaseResource or ClientRawResponse if raw=true - :rtype: :class:`OperationResultInfoBaseResource - ` - or :class:`ClientRawResponse` + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.OperationResultInfoBaseResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/operationResults/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -89,7 +89,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -100,9 +100,12 @@ def get( if response.status_code == 200: deserialized = self._deserialize('OperationResultInfoBaseResource', response) + if response.status_code == 202: + deserialized = self._deserialize('OperationResultInfoBaseResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/operationResults/{operationId}'} diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/hubs_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/feature_support_operations.py similarity index 65% rename from azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/hubs_operations.py rename to azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/feature_support_operations.py index 6653fd418b60..82dd110e4f5d 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/hubs_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/feature_support_operations.py @@ -9,60 +9,60 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models -class HubsOperations(object): - """HubsOperations operations. +class FeatureSupportOperations(object): + """FeatureSupportOperations operations. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-04-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-01" + self.api_version = "2017-07-01" self.config = config - def check_availability( - self, resource_group_name, namespace_name, name, custom_headers=None, raw=False, **operation_config): - """Checks the availability of the given notificationHub in a namespace. + def validate( + self, azure_region, parameters, custom_headers=None, raw=False, **operation_config): + """It will validate if given feature with resource properties is supported + in service. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param namespace_name: The namespace name. - :type namespace_name: str - :param name: Resource name - :type name: str + :param azure_region: Azure region to hit Api + :type azure_region: str + :param parameters: Feature support request object + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.FeatureSupportRequest :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`CheckNameAvailabilityResponse - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: AzureVMResourceFeatureSupportResponse or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.AzureVMResourceFeatureSupportResponse + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - parameters = models.CheckNameAvailabilityRequestParameters(name=name) - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/checkHubAvailability' + url = self.validate.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -82,12 +82,12 @@ def check_availability( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'CheckNameAvailabilityRequestParameters') + body_content = self._serialize.body(parameters, 'FeatureSupportRequest') # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -97,10 +97,11 @@ def check_availability( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('CheckNameAvailabilityResponse', response) + deserialized = self._deserialize('AzureVMResourceFeatureSupportResponse', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + validate.metadata = {'url': '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupValidateFeatures'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/item_level_recovery_connections_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/item_level_recovery_connections_operations.py index 3d705b6b76eb..f11ed4679319 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/item_level_recovery_connections_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/item_level_recovery_connections_operations.py @@ -22,10 +22,12 @@ class ItemLevelRecoveryConnectionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -60,22 +62,19 @@ def provision( data. iSCSI connection will be provisioned for this backed up data. :type recovery_point_id: str :param parameters: resource ILR request - :type parameters: :class:`ILRRequestResource - ` + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.ILRRequestResource :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery' + url = self.provision.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -107,7 +106,7 @@ def provision( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -117,6 +116,7 @@ def provision( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + provision.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery'} def revoke( self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers=None, raw=False, **operation_config): @@ -145,15 +145,12 @@ def revoke( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery' + url = self.revoke.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -181,7 +178,7 @@ def revoke( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -191,3 +188,4 @@ def revoke( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + revoke.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_cancellations_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_cancellations_operations.py index 9f40475cd5c4..1418a99a9d3b 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_cancellations_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_cancellations_operations.py @@ -22,10 +22,12 @@ class JobCancellationsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,15 +54,12 @@ def trigger( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel' + url = self.trigger.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -85,7 +84,7 @@ def trigger( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -95,3 +94,4 @@ def trigger( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + trigger.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_details_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_details_operations.py index 55ca9c37f2e1..bead01dde009 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_details_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_details_operations.py @@ -22,10 +22,12 @@ class JobDetailsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,17 +53,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`JobResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`JobResource - ` or - :class:`ClientRawResponse` + :return: JobResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservicesbackup.models.JobResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -86,7 +84,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -103,3 +101,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_operation_results_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_operation_results_operations.py index 46a912da1344..f330e26c026d 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_operation_results_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_operation_results_operations.py @@ -22,10 +22,12 @@ class JobOperationResultsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -55,15 +57,12 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/operationResults/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -89,7 +88,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: exp = CloudError(response) @@ -99,3 +98,4 @@ def get( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/operationResults/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/jobs_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/jobs_operations.py index 87df2e696607..d2d5d6487c42 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/jobs_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/jobs_operations.py @@ -22,16 +22,18 @@ class JobsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-12-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-12-01" + self.api_version = "2017-07-01" self.config = config @@ -52,15 +54,12 @@ def export( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport' + url = self.export.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -86,7 +85,7 @@ def export( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -96,3 +95,4 @@ def export( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + export.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/operations.py index d8fd6cf9eb87..a132e003a369 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/operations.py @@ -22,10 +22,12 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-08-10". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -44,18 +46,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of - :class:`ClientDiscoveryValueForSingleApi - ` - :rtype: :class:`ClientDiscoveryValueForSingleApiPaged - ` + :return: An iterator like instance of ClientDiscoveryValueForSingleApi + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryValueForSingleApiPaged[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryValueForSingleApi] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.RecoveryServices/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -78,7 +78,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -96,3 +96,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.RecoveryServices/operations'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protectable_containers_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protectable_containers_operations.py new file mode 100644 index 000000000000..4185ca6b12b8 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protectable_containers_operations.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ProtectableContainersOperations(object): + """ProtectableContainersOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-12-01" + + self.config = config + + def list( + self, vault_name, resource_group_name, fabric_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists the containers registered to Recovery Services Vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the + recovery services vault is present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the container. + :type fabric_name: str + :param filter: OData filter options. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProtectableContainerResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectableContainerResourcePaged[~azure.mgmt.recoveryservicesbackup.models.ProtectableContainerResource] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ProtectableContainerResourcePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ProtectableContainerResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_item_operation_results_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_item_operation_results_operations.py index 6fa733ad2977..e187c6afe2ab 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_item_operation_results_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_item_operation_results_operations.py @@ -22,10 +22,12 @@ class ProtectedItemOperationResultsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -59,17 +61,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProtectedItemResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProtectedItemResource - ` or - :class:`ClientRawResponse` + :return: ProtectedItemResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationResults/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -97,7 +96,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: exp = CloudError(response) @@ -114,3 +113,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationResults/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_item_operation_statuses_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_item_operation_statuses_operations.py index 1a2e57aa2492..41e3918f01d5 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_item_operation_statuses_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_item_operation_statuses_operations.py @@ -22,10 +22,12 @@ class ProtectedItemOperationStatusesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -63,17 +65,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`OperationStatus - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`OperationStatus - ` or - :class:`ClientRawResponse` + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -101,7 +99,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -118,3 +116,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_items_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_items_operations.py index 3d7ce846724c..8ca7cea2a7a1 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_items_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_items_operations.py @@ -22,10 +22,12 @@ class ProtectedItemsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -61,17 +63,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProtectedItemResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProtectedItemResource - ` or - :class:`ClientRawResponse` + :return: ProtectedItemResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -100,7 +99,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -117,6 +116,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} def create_or_update( self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -136,22 +136,19 @@ def create_or_update( :param protected_item_name: Item name to be backed up. :type protected_item_name: str :param parameters: resource backed up item - :type parameters: :class:`ProtectedItemResource - ` + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -182,7 +179,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -192,6 +189,7 @@ def create_or_update( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + create_or_update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} def delete( self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, custom_headers=None, raw=False, **operation_config): @@ -216,15 +214,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}' + url = self.delete.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -251,7 +246,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [202, 204]: exp = CloudError(response) @@ -261,3 +256,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_container_operation_results_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_container_operation_results_operations.py index dc1d310649cd..78fa589157fb 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_container_operation_results_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_container_operation_results_operations.py @@ -22,10 +22,12 @@ class ProtectionContainerOperationResultsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -57,17 +59,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProtectionContainerResource - ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProtectionContainerResource - ` - or :class:`ClientRawResponse` + :return: ProtectionContainerResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -94,7 +93,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: exp = CloudError(response) @@ -111,3 +110,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_container_refresh_operation_results_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_container_refresh_operation_results_operations.py index a6a4628e2387..bbb8db755f04 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_container_refresh_operation_results_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_container_refresh_operation_results_operations.py @@ -22,10 +22,12 @@ class ProtectionContainerRefreshOperationResultsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -55,15 +57,12 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -89,7 +88,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [202, 204]: exp = CloudError(response) @@ -99,3 +98,4 @@ def get( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_containers_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_containers_operations.py index fb54377347d6..f73edffebe68 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_containers_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_containers_operations.py @@ -22,10 +22,12 @@ class ProtectionContainersOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -55,17 +57,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProtectionContainerResource - ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProtectionContainerResource - ` - or :class:`ClientRawResponse` + :return: ProtectionContainerResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -91,7 +90,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -108,9 +107,220 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} + + def register( + self, vault_name, resource_group_name, fabric_name, container_name, parameters, custom_headers=None, raw=False, **operation_config): + """Registers the container with Recovery Services vault. + This is an asynchronous operation. To track the operation status, use + location header to call get latest status of the operation. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the + recovery services vault is present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the container. + :type fabric_name: str + :param container_name: Name of the container to be registered. + :type container_name: str + :param parameters: Request body for operation + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProtectionContainerResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.register.metadata['url'] + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ProtectionContainerResource') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ProtectionContainerResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + register.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} + + def unregister( + self, vault_name, resource_group_name, fabric_name, container_name, custom_headers=None, raw=False, **operation_config): + """Unregisters the given container from your Recovery Services Vault. + This is an asynchronous operation. To determine whether the backend + service has finished processing the request, call Get Container + Operation Result API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the + recovery services vault is present. + :type resource_group_name: str + :param fabric_name: Name of the fabric where the container belongs. + :type fabric_name: str + :param container_name: Name of the container which needs to be + unregistered from the Recovery Services Vault. + :type container_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.unregister.metadata['url'] + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + unregister.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} + + def inquire( + self, vault_name, resource_group_name, fabric_name, container_name, custom_headers=None, raw=False, **operation_config): + """Inquires all the protectable item in the given container that can be + protected. + + Inquires all the protectable items that are protectable under the given + container. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the + recovery services vault is present. + :type resource_group_name: str + :param fabric_name: Fabric Name associated with the container. + :type fabric_name: str + :param container_name: Name of the container in which inquiry needs to + be triggered. + :type container_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.inquire.metadata['url'] + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + inquire.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire'} def refresh( - self, vault_name, resource_group_name, fabric_name, custom_headers=None, raw=False, **operation_config): + self, vault_name, resource_group_name, fabric_name, filter=None, custom_headers=None, raw=False, **operation_config): """Discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. @@ -122,20 +332,19 @@ def refresh( :type resource_group_name: str :param fabric_name: Fabric name associated the container. :type fabric_name: str + :param filter: OData filter options. + :type filter: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers' + url = self.refresh.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -147,6 +356,8 @@ def refresh( # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') # Construct headers header_parameters = {} @@ -160,7 +371,7 @@ def refresh( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -170,3 +381,4 @@ def refresh( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + refresh.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_intent_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_intent_operations.py new file mode 100644 index 000000000000..bb2b67f38c8e --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_intent_operations.py @@ -0,0 +1,187 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ProtectionIntentOperations(object): + """ProtectionIntentOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-07-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-07-01" + + self.config = config + + def validate( + self, azure_region, parameters, custom_headers=None, raw=False, **operation_config): + """It will validate followings + 1. Vault capacity + 2. VM is already protected + 3. Any VM related configuration passed in properties. + + :param azure_region: Azure region to hit Api + :type azure_region: str + :param parameters: Enable backup validation request on Virtual Machine + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.PreValidateEnableBackupRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PreValidateEnableBackupResponse or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.PreValidateEnableBackupResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.validate.metadata['url'] + path_format_arguments = { + 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'PreValidateEnableBackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PreValidateEnableBackupResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate.metadata = {'url': '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection'} + + def create_or_update( + self, vault_name, resource_group_name, fabric_name, intent_object_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create Intent for Enabling backup of an item. This is a synchronous + operation. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the + recovery services vault is present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backup item. + :type fabric_name: str + :param intent_object_name: Intent object name. + :type intent_object_name: str + :param parameters: resource backed up item + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProtectionIntentResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), + 'intentObjectName': self._serialize.url("intent_object_name", intent_object_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ProtectionIntentResource') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ProtectionIntentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policies_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policies_operations.py index dc61b90e00a7..373374d563ea 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policies_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policies_operations.py @@ -22,10 +22,12 @@ class ProtectionPoliciesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -53,17 +55,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProtectionPolicyResource - ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProtectionPolicyResource - ` - or :class:`ClientRawResponse` + :return: ProtectionPolicyResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -88,7 +87,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -105,6 +104,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} def create_or_update( self, vault_name, resource_group_name, policy_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -120,24 +120,21 @@ def create_or_update( :param policy_name: Backup policy to be created. :type policy_name: str :param parameters: resource backup policy - :type parameters: :class:`ProtectionPolicyResource - ` + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProtectionPolicyResource - ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProtectionPolicyResource - ` - or :class:`ClientRawResponse` + :return: ProtectionPolicyResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -166,7 +163,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -183,6 +180,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} def delete( self, vault_name, resource_group_name, policy_name, custom_headers=None, raw=False, **operation_config): @@ -202,15 +200,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}' + url = self.delete.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -235,7 +230,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -245,3 +240,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policy_operation_results_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policy_operation_results_operations.py index fe1bb58370f7..1f4a02cdd591 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policy_operation_results_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policy_operation_results_operations.py @@ -22,10 +22,12 @@ class ProtectionPolicyOperationResultsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -55,17 +57,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProtectionPolicyResource - ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProtectionPolicyResource - ` - or :class:`ClientRawResponse` + :return: ProtectionPolicyResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operationResults/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -91,7 +90,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -108,3 +107,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operationResults/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policy_operation_statuses_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policy_operation_statuses_operations.py index 2fd99d246fe7..343cdce6fbf6 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policy_operation_statuses_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policy_operation_statuses_operations.py @@ -22,10 +22,12 @@ class ProtectionPolicyOperationStatusesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -59,17 +61,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`OperationStatus - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`OperationStatus - ` or - :class:`ClientRawResponse` + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -95,7 +93,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -112,3 +110,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/recovery_points_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/recovery_points_operations.py index 749264fc4c59..cd2043bc36d9 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/recovery_points_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/recovery_points_operations.py @@ -22,10 +22,12 @@ class RecoveryPointsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -59,17 +61,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`RecoveryPointResource - ` - :rtype: :class:`RecoveryPointResourcePaged - ` + :return: An iterator like instance of RecoveryPointResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResourcePaged[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints' + url = self.list.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -103,7 +104,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -121,6 +122,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints'} def get( self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers=None, raw=False, **operation_config): @@ -148,17 +150,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`RecoveryPointResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`RecoveryPointResource - ` or - :class:`ClientRawResponse` + :return: RecoveryPointResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -186,7 +185,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -203,3 +202,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/restores_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/restores_operations.py index f18eaca82514..c003b9bdf2f4 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/restores_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/restores_operations.py @@ -22,10 +22,12 @@ class RestoresOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -57,22 +59,19 @@ def trigger( backed up data to be restored. :type recovery_point_id: str :param parameters: resource restore request - :type parameters: :class:`RestoreRequestResource - ` + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestResource :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore' + url = self.trigger.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -104,7 +103,7 @@ def trigger( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -114,3 +113,4 @@ def trigger( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + trigger.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/security_pi_ns_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/security_pi_ns_operations.py index a619ae5c3e0d..e73066c76107 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/security_pi_ns_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/security_pi_ns_operations.py @@ -22,10 +22,12 @@ class SecurityPINsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,17 +51,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`TokenInformation - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`TokenInformation - ` or - :class:`ClientRawResponse` + :return: TokenInformation or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservicesbackup.models.TokenInformation or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -83,7 +81,7 @@ def get( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -100,3 +98,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/recovery_services_backup_client.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/recovery_services_backup_client.py index 1aaabce4718f..d2bcb730f586 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/recovery_services_backup_client.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/recovery_services_backup_client.py @@ -9,16 +9,26 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION +from .operations.protection_intent_operations import ProtectionIntentOperations +from .operations.backup_status_operations import BackupStatusOperations +from .operations.feature_support_operations import FeatureSupportOperations from .operations.backup_jobs_operations import BackupJobsOperations from .operations.job_details_operations import JobDetailsOperations +from .operations.export_jobs_operation_results_operations import ExportJobsOperationResultsOperations +from .operations.jobs_operations import JobsOperations +from .operations.backup_policies_operations import BackupPoliciesOperations +from .operations.backup_protected_items_operations import BackupProtectedItemsOperations +from .operations.backup_usage_summaries_operations import BackupUsageSummariesOperations from .operations.backup_resource_vault_configs_operations import BackupResourceVaultConfigsOperations from .operations.backup_engines_operations import BackupEnginesOperations from .operations.protection_container_refresh_operation_results_operations import ProtectionContainerRefreshOperationResultsOperations +from .operations.protectable_containers_operations import ProtectableContainersOperations from .operations.protection_containers_operations import ProtectionContainersOperations +from .operations.backup_workload_items_operations import BackupWorkloadItemsOperations from .operations.protection_container_operation_results_operations import ProtectionContainerOperationResultsOperations from .operations.protected_items_operations import ProtectedItemsOperations from .operations.backups_operations import BackupsOperations @@ -29,20 +39,15 @@ from .operations.restores_operations import RestoresOperations from .operations.job_cancellations_operations import JobCancellationsOperations from .operations.job_operation_results_operations import JobOperationResultsOperations -from .operations.export_jobs_operation_results_operations import ExportJobsOperationResultsOperations -from .operations.jobs_operations import JobsOperations from .operations.backup_operation_results_operations import BackupOperationResultsOperations from .operations.backup_operation_statuses_operations import BackupOperationStatusesOperations -from .operations.backup_policies_operations import BackupPoliciesOperations from .operations.protection_policies_operations import ProtectionPoliciesOperations from .operations.protection_policy_operation_results_operations import ProtectionPolicyOperationResultsOperations from .operations.protection_policy_operation_statuses_operations import ProtectionPolicyOperationStatusesOperations from .operations.backup_protectable_items_operations import BackupProtectableItemsOperations -from .operations.backup_protected_items_operations import BackupProtectedItemsOperations from .operations.backup_protection_containers_operations import BackupProtectionContainersOperations from .operations.security_pi_ns_operations import SecurityPINsOperations from .operations.backup_resource_storage_configs_operations import BackupResourceStorageConfigsOperations -from .operations.backup_usage_summaries_operations import BackupUsageSummariesOperations from .operations.operations import Operations from . import models @@ -67,38 +72,56 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(RecoveryServicesBackupClientConfiguration, self).__init__(base_url) - self.add_user_agent('recoveryservicesbackupclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-recoveryservicesbackup/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class RecoveryServicesBackupClient(object): +class RecoveryServicesBackupClient(SDKClient): """Open API 2.0 Specs for Azure RecoveryServices Backup service :ivar config: Configuration for client. :vartype config: RecoveryServicesBackupClientConfiguration + :ivar protection_intent: ProtectionIntent operations + :vartype protection_intent: azure.mgmt.recoveryservicesbackup.operations.ProtectionIntentOperations + :ivar backup_status: BackupStatus operations + :vartype backup_status: azure.mgmt.recoveryservicesbackup.operations.BackupStatusOperations + :ivar feature_support: FeatureSupport operations + :vartype feature_support: azure.mgmt.recoveryservicesbackup.operations.FeatureSupportOperations :ivar backup_jobs: BackupJobs operations :vartype backup_jobs: azure.mgmt.recoveryservicesbackup.operations.BackupJobsOperations :ivar job_details: JobDetails operations :vartype job_details: azure.mgmt.recoveryservicesbackup.operations.JobDetailsOperations + :ivar export_jobs_operation_results: ExportJobsOperationResults operations + :vartype export_jobs_operation_results: azure.mgmt.recoveryservicesbackup.operations.ExportJobsOperationResultsOperations + :ivar jobs: Jobs operations + :vartype jobs: azure.mgmt.recoveryservicesbackup.operations.JobsOperations + :ivar backup_policies: BackupPolicies operations + :vartype backup_policies: azure.mgmt.recoveryservicesbackup.operations.BackupPoliciesOperations + :ivar backup_protected_items: BackupProtectedItems operations + :vartype backup_protected_items: azure.mgmt.recoveryservicesbackup.operations.BackupProtectedItemsOperations + :ivar backup_usage_summaries: BackupUsageSummaries operations + :vartype backup_usage_summaries: azure.mgmt.recoveryservicesbackup.operations.BackupUsageSummariesOperations :ivar backup_resource_vault_configs: BackupResourceVaultConfigs operations :vartype backup_resource_vault_configs: azure.mgmt.recoveryservicesbackup.operations.BackupResourceVaultConfigsOperations :ivar backup_engines: BackupEngines operations :vartype backup_engines: azure.mgmt.recoveryservicesbackup.operations.BackupEnginesOperations :ivar protection_container_refresh_operation_results: ProtectionContainerRefreshOperationResults operations :vartype protection_container_refresh_operation_results: azure.mgmt.recoveryservicesbackup.operations.ProtectionContainerRefreshOperationResultsOperations + :ivar protectable_containers: ProtectableContainers operations + :vartype protectable_containers: azure.mgmt.recoveryservicesbackup.operations.ProtectableContainersOperations :ivar protection_containers: ProtectionContainers operations :vartype protection_containers: azure.mgmt.recoveryservicesbackup.operations.ProtectionContainersOperations + :ivar backup_workload_items: BackupWorkloadItems operations + :vartype backup_workload_items: azure.mgmt.recoveryservicesbackup.operations.BackupWorkloadItemsOperations :ivar protection_container_operation_results: ProtectionContainerOperationResults operations :vartype protection_container_operation_results: azure.mgmt.recoveryservicesbackup.operations.ProtectionContainerOperationResultsOperations :ivar protected_items: ProtectedItems operations @@ -119,16 +142,10 @@ class RecoveryServicesBackupClient(object): :vartype job_cancellations: azure.mgmt.recoveryservicesbackup.operations.JobCancellationsOperations :ivar job_operation_results: JobOperationResults operations :vartype job_operation_results: azure.mgmt.recoveryservicesbackup.operations.JobOperationResultsOperations - :ivar export_jobs_operation_results: ExportJobsOperationResults operations - :vartype export_jobs_operation_results: azure.mgmt.recoveryservicesbackup.operations.ExportJobsOperationResultsOperations - :ivar jobs: Jobs operations - :vartype jobs: azure.mgmt.recoveryservicesbackup.operations.JobsOperations :ivar backup_operation_results: BackupOperationResults operations :vartype backup_operation_results: azure.mgmt.recoveryservicesbackup.operations.BackupOperationResultsOperations :ivar backup_operation_statuses: BackupOperationStatuses operations :vartype backup_operation_statuses: azure.mgmt.recoveryservicesbackup.operations.BackupOperationStatusesOperations - :ivar backup_policies: BackupPolicies operations - :vartype backup_policies: azure.mgmt.recoveryservicesbackup.operations.BackupPoliciesOperations :ivar protection_policies: ProtectionPolicies operations :vartype protection_policies: azure.mgmt.recoveryservicesbackup.operations.ProtectionPoliciesOperations :ivar protection_policy_operation_results: ProtectionPolicyOperationResults operations @@ -137,16 +154,12 @@ class RecoveryServicesBackupClient(object): :vartype protection_policy_operation_statuses: azure.mgmt.recoveryservicesbackup.operations.ProtectionPolicyOperationStatusesOperations :ivar backup_protectable_items: BackupProtectableItems operations :vartype backup_protectable_items: azure.mgmt.recoveryservicesbackup.operations.BackupProtectableItemsOperations - :ivar backup_protected_items: BackupProtectedItems operations - :vartype backup_protected_items: azure.mgmt.recoveryservicesbackup.operations.BackupProtectedItemsOperations :ivar backup_protection_containers: BackupProtectionContainers operations :vartype backup_protection_containers: azure.mgmt.recoveryservicesbackup.operations.BackupProtectionContainersOperations :ivar security_pi_ns: SecurityPINs operations :vartype security_pi_ns: azure.mgmt.recoveryservicesbackup.operations.SecurityPINsOperations :ivar backup_resource_storage_configs: BackupResourceStorageConfigs operations :vartype backup_resource_storage_configs: azure.mgmt.recoveryservicesbackup.operations.BackupResourceStorageConfigsOperations - :ivar backup_usage_summaries: BackupUsageSummaries operations - :vartype backup_usage_summaries: azure.mgmt.recoveryservicesbackup.operations.BackupUsageSummariesOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.recoveryservicesbackup.operations.Operations @@ -162,24 +175,44 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = RecoveryServicesBackupClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(RecoveryServicesBackupClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) + self.protection_intent = ProtectionIntentOperations( + self._client, self.config, self._serialize, self._deserialize) + self.backup_status = BackupStatusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.feature_support = FeatureSupportOperations( + self._client, self.config, self._serialize, self._deserialize) self.backup_jobs = BackupJobsOperations( self._client, self.config, self._serialize, self._deserialize) self.job_details = JobDetailsOperations( self._client, self.config, self._serialize, self._deserialize) + self.export_jobs_operation_results = ExportJobsOperationResultsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.backup_policies = BackupPoliciesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.backup_protected_items = BackupProtectedItemsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.backup_usage_summaries = BackupUsageSummariesOperations( + self._client, self.config, self._serialize, self._deserialize) self.backup_resource_vault_configs = BackupResourceVaultConfigsOperations( self._client, self.config, self._serialize, self._deserialize) self.backup_engines = BackupEnginesOperations( self._client, self.config, self._serialize, self._deserialize) self.protection_container_refresh_operation_results = ProtectionContainerRefreshOperationResultsOperations( self._client, self.config, self._serialize, self._deserialize) + self.protectable_containers = ProtectableContainersOperations( + self._client, self.config, self._serialize, self._deserialize) self.protection_containers = ProtectionContainersOperations( self._client, self.config, self._serialize, self._deserialize) + self.backup_workload_items = BackupWorkloadItemsOperations( + self._client, self.config, self._serialize, self._deserialize) self.protection_container_operation_results = ProtectionContainerOperationResultsOperations( self._client, self.config, self._serialize, self._deserialize) self.protected_items = ProtectedItemsOperations( @@ -200,16 +233,10 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.job_operation_results = JobOperationResultsOperations( self._client, self.config, self._serialize, self._deserialize) - self.export_jobs_operation_results = ExportJobsOperationResultsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.jobs = JobsOperations( - self._client, self.config, self._serialize, self._deserialize) self.backup_operation_results = BackupOperationResultsOperations( self._client, self.config, self._serialize, self._deserialize) self.backup_operation_statuses = BackupOperationStatusesOperations( self._client, self.config, self._serialize, self._deserialize) - self.backup_policies = BackupPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) self.protection_policies = ProtectionPoliciesOperations( self._client, self.config, self._serialize, self._deserialize) self.protection_policy_operation_results = ProtectionPolicyOperationResultsOperations( @@ -218,15 +245,11 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.backup_protectable_items = BackupProtectableItemsOperations( self._client, self.config, self._serialize, self._deserialize) - self.backup_protected_items = BackupProtectedItemsOperations( - self._client, self.config, self._serialize, self._deserialize) self.backup_protection_containers = BackupProtectionContainersOperations( self._client, self.config, self._serialize, self._deserialize) self.security_pi_ns = SecurityPINsOperations( self._client, self.config, self._serialize, self._deserialize) self.backup_resource_storage_configs = BackupResourceStorageConfigsOperations( self._client, self.config, self._serialize, self._deserialize) - self.backup_usage_summaries = BackupUsageSummariesOperations( - self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/version.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/version.py index d6acfb896eb4..9bd1dfac7ecb 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/version.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/version.py @@ -9,4 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.1" +VERSION = "0.2.0" + diff --git a/azure-mgmt-recoveryservicesbackup/sdk_packaging.toml b/azure-mgmt-recoveryservicesbackup/sdk_packaging.toml new file mode 100644 index 000000000000..83158f227a95 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-recoveryservicesbackup" +package_pprint_name = "Recovery Services Backup Management" +package_doc_id = "recovery-services-backup" +is_stable = false diff --git a/azure-mgmt-recoveryservicesbackup/setup.py b/azure-mgmt-recoveryservicesbackup/setup.py index 4c0dc1d52ef7..e375e8a291f5 100644 --- a/azure-mgmt-recoveryservicesbackup/setup.py +++ b/azure-mgmt-recoveryservicesbackup/setup.py @@ -19,7 +19,7 @@ # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-recoveryservicesbackup" -PACKAGE_PPRINT_NAME = "Recovery Services Backup" +PACKAGE_PPRINT_NAME = "Recovery Services Backup Management" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') @@ -61,7 +61,7 @@ long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ 'Development Status :: 4 - Beta', @@ -69,16 +69,15 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(), + packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-recoveryservicesbackup/tests/recordings/test_mgmt_recoveryservices_backup.test_iaasvm_e2e.yaml b/azure-mgmt-recoveryservicesbackup/tests/recordings/test_mgmt_recoveryservices_backup.test_iaasvm_e2e.yaml index 0d9ecbedb10d..7a3599715d45 100644 --- a/azure-mgmt-recoveryservicesbackup/tests/recordings/test_mgmt_recoveryservices_backup.test_iaasvm_e2e.yaml +++ b/azure-mgmt-recoveryservicesbackup/tests/recordings/test_mgmt_recoveryservices_backup.test_iaasvm_e2e.yaml @@ -593,7 +593,7 @@ interactions: accept-language: [en-US] x-ms-client-request-id: [b5252323-b49c-11e7-9c14-f45c89acd723] method: GET - uri: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupProtectedItems?api-version=2016-12-01 + uri: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupProtectedItems?api-version=2017-07-01 response: body: {string: !!python/unicode '{"value":[{"id":"/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;swaggersdktestrg;swaggersdktest/protectedItems/VM;iaasvmcontainerv2;swaggersdktestrg;swaggersdktest","name":"VM;iaasvmcontainerv2;swaggersdktestrg;swaggersdktest","type":"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems","properties":{"friendlyName":"swaggersdktest","virtualMachineId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/swaggersdktestrg/providers/Microsoft.Compute/virtualMachines/swaggersdktest","protectionStatus":"Healthy","protectionState":"IRPending","healthStatus":"Passed","lastBackupStatus":"","lastBackupTime":"2001-01-01T00:00:00Z","protectedItemDataId":"123145452104371","protectedItemType":"Microsoft.Compute/virtualMachines","backupManagementType":"AzureIaasVM","workloadType":"VM","containerName":"iaasvmcontainerv2;swaggersdktestrg;swaggersdktest","sourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/swaggersdktestrg/providers/Microsoft.Compute/virtualMachines/swaggersdktest","policyId":"/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupPolicies/DefaultPolicy","policyName":"DefaultPolicy"}}]}'} headers: diff --git a/azure-mgmt-recoveryservicesbackup/tests/recordings/test_mgmt_recoveryservices_backup.test_operations_api.yaml b/azure-mgmt-recoveryservicesbackup/tests/recordings/test_mgmt_recoveryservices_backup.test_operations_api.yaml index 24f0ddb4e9ae..1fa0c1243e7f 100644 --- a/azure-mgmt-recoveryservicesbackup/tests/recordings/test_mgmt_recoveryservices_backup.test_operations_api.yaml +++ b/azure-mgmt-recoveryservicesbackup/tests/recordings/test_mgmt_recoveryservices_backup.test_operations_api.yaml @@ -6,293 +6,310 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.2 (Windows-10-10.0.15063-SP0) requests/2.14.2 msrest/0.4.8 - msrest_azure/0.4.7 recoveryservicesbackupclient/0.2.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.17134-SP0) requests/2.18.4 msrest/0.4.28 + msrest_azure/0.4.31 azure-mgmt-recoveryservicesbackup/0.2.0 Azure-SDK-For-Python] accept-language: [en-US] - x-ms-client-request-id: [e7d326cc-7778-11e7-af33-480fcf586696] method: GET uri: https://management.azure.com/providers/Microsoft.RecoveryServices/operations?api-version=2016-08-10 response: - body: {string: '{"Value":[{"Name":"Microsoft.RecoveryServices/Vaults/usages/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vault - Usage","Operation":"Recovery Services Vault usage details.","Description":"Returns - usage details for a Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupUsageSummaries/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Usages Summaries","Operation":"Recovery Services Protected Items and Protected - Servers usage summaries details.","Description":"Returns summaries for Protected - Items and Protected Servers for a Recovery Services ."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/storageConfig/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vault - Storage Config","Operation":"Get Resource Storage Config","Description":"Returns - Storage Configuration for Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/storageConfig/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vault - Storage Config","Operation":"Write Resource Storage Config","Description":"Updates - Storage Configuration for Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupconfig/vaultconfig/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vault - Config","Operation":"Get Resource Config","Description":"Returns Configuration - for Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupconfig/vaultconfig/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vault - Config","Operation":"Update Resource Config","Description":"Updates Configuration - for Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/tokenInfo/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Token - Info","Operation":"Get Vault Token Info","Description":"Returns token information - for Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupSecurityPIN/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"SecurityPINInfo","Operation":"Get - Security PIN Info","Description":"Returns Security PIN Information for Recovery - Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupManagementMetaData/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Management Metadata","Operation":"Get Backup Management Metadata","Description":"Returns - Backup Management Metadata for Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupOperationResults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Operation Results","Operation":"Get Backup Operation Result","Description":"Returns - Backup Operation Result for Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupOperations/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Operation Status","Operation":"Get Backup Operation Status","Description":"Returns - Backup Operation Status for Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupJobs/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Jobs","Operation":"Get Jobs","Description":"Returns all Job Objects"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupJobs/cancel/action","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Jobs","Operation":"Cancel Jobs","Description":"Cancel the Job"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupJobsExport/action","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Export - Backup Jobs","Operation":"Export Jobs","Description":"Export Jobs"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupJobs/operationResults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Jobs Operation Results","Operation":"Get Job Operation Result","Description":"Returns - the Result of Job Operation."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupJobsExport/operationResults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Export - Backup Jobs Operation Results","Operation":"Get Export Job Operation Result","Description":"Returns - the Result of Export Job Operation."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Recovery - Points","Operation":"Get Recovery Points","Description":"Get Recovery Points - for Protected Items."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/restore/action","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Recovery - Points","Operation":"Restore Recovery Points","Description":"Restore Recovery - Points for Protected Items."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/provisionInstantItemRecovery/action","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Recovery - Points","Operation":"Provision Instant Item Recovery for Protected Item","Description":"Provision - Instant Item Recovery for Protected Item"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/revokeInstantItemRecovery/action","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Recovery - Points","Operation":"Revoke Instant Item Recovery for Protected Item","Description":"Revoke - Instant Item Recovery for Protected Item"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupPolicies/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Policies","Operation":"Get Protection Policy","Description":"Returns all Protection - Policies"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupPolicies/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Policies","Operation":"Create Protection Policy","Description":"Creates Protection - Policy"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupPolicies/delete","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Policies","Operation":"Delete Protection Policy","Description":"Delete a Protection - Policy"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupPolicies/operationResults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Policy Operation Results","Operation":"Get Policy Operation Results","Description":"Get - Results of Policy Operation."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupPolicies/operationStatus/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Policy Operation Status","Operation":"Get Policy Operation Status","Description":"Get - Status of Policy Operation."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protected - Items","Operation":"Get Protected Item Details","Description":"Returns object - details of the Protected Item"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupProtectedItems/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protected - Items","Operation":"Get All Protected Items","Description":"Returns the list - of all Protected Items."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protected - Items","Operation":"Create Backup Protected Item","Description":"Create a - backup Protected Item"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/delete","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protected - Items","Operation":"Delete Protected Items","Description":"Deletes Protected - Item"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/operationResults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protected - Item Operation Results","Operation":"Get Protected Items Operation Results","Description":"Gets - Result of Operation Performed on Protected Items."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/operationStatus/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protected - Item Operation Status","Operation":"Get Protected Items operation status","Description":"Returns - the status of Operation performed on Protected Items."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/backup/action","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protected - Items","Operation":"Backup Protected Item","Description":"Performs Backup - for Protected Item."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupProtectableItems/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Protectable Items","Operation":"Get Protectable Items","Description":"Returns - list of all Protectable Items."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/refreshContainers/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Refresh - Containers","Operation":"Refresh container","Description":"Refreshes the container - list"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/operationResults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Refresh - Containers Operation Results","Operation":"Get Operation Results","Description":"Returns - status of the operation"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupProtectionContainers/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Protection Containers","Operation":"Get Containers In Subscription","Description":"Returns - all containers belonging to the subscription"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protection - Containers","Operation":"Get Registered Container","Description":"Returns - all registered containers"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/operationResults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protection - Containers Operation Results","Operation":"Get Container Operation Results","Description":"Gets - result of Operation performed on Protection Container."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupEngines","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Engines","Operation":"List of backup management servers.","Description":"Returns - all the backup management servers registered with vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupStatus","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Status","Operation":"Check Backup Status for Vault","Description":"Check Backup - Status for Recovery Services Vaults"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/vaults/replicationAlertSettings/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Alerts Settings","Operation":"Read Alerts Settings","Description":"Read - Any Alerts Settings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationAlertSettings/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Alerts Settings","Operation":"Create or Update - Alerts Settings","Description":"Create or Update Any Alerts Settings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationEvents/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Events","Operation":"Read Events","Description":"Read - Any Events"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Networks","Operation":"Read Networks","Description":"Read - Any Networks"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Network Mappings","Operation":"Read Network - Mappings","Description":"Read Any Network Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Network Mappings","Operation":"Create or Update - Network Mappings","Description":"Create or Update Any Network Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Network Mappings","Operation":"Delete Network - Mappings","Description":"Delete Any Network Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protectable Items","Operation":"Read Protectable - Items","Description":"Read Any Protectable Items"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Container Mappings","Operation":"Read - Protection Container Mappings","Description":"Read Any Protection Container - Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Container Mappings","Operation":"Create - or Update Protection Container Mappings","Description":"Create or Update Any - Protection Container Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/remove/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Container Mappings","Operation":"Remove - Protection Container Mapping","Description":"Remove Protection Container Mapping"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Container Mappings","Operation":"Delete - Protection Container Mappings","Description":"Delete Any Protection Container - Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Replication Recovery Points","Operation":"Read - Replication Recovery Points","Description":"Read Any Replication Recovery - Points"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Read Protected - Items","Description":"Read Any Protected Items"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Create or Update - Protected Items","Description":"Create or Update Any Protected Items"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Delete Protected - Items","Description":"Delete Any Protected Items"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/remove/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Remove Protected - Item","Description":"Remove Protected Item"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/plannedFailover/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Planned Failover","Description":"Planned - Failover"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/unplannedFailover/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Failover","Description":"Failover"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/testFailover/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Test Failover","Description":"Test - Failover"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/testFailoverCleanup/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Test Failover - Cleanup","Description":"Test Failover Cleanup"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/failoverCommit/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Failover Commit","Description":"Failover - Commit"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/reProtect/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"ReProtect Protected - Item","Description":"ReProtect Protected Item"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/updateMobilityService/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Update Mobility - Service","Description":"Update Mobility Service"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/repairReplication/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Repair replication","Description":"Repair - replication"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/applyRecoveryPoint/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Apply Recovery - Point","Description":"Apply Recovery Point"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationJobs/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Jobs","Operation":"Read Jobs","Description":"Read - Any Jobs"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationJobs/cancel/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Jobs","Operation":"Cancel Job","Description":"Cancel - Job"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationJobs/restart/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Jobs","Operation":"Restart job","Description":"Restart - job"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationJobs/resume/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Jobs","Operation":"Resume Job","Description":"Resume - Job"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Containers","Operation":"Read Protection - Containers","Description":"Read Any Protection Containers"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/discoverProtectableItem/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Containers","Operation":"Discover - Protectable Item","Description":"Discover Protectable Item"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Containers","Operation":"Create - or Update Protection Containers","Description":"Create or Update Any Protection - Containers"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/remove/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Containers","Operation":"Remove - Protection Container","Description":"Remove Protection Container"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/switchprotection/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Containers","Operation":"Switch - Protection Container","Description":"Switch Protection Container"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationPolicies/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Policies","Operation":"Read Policies","Description":"Read - Any Policies"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationPolicies/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Policies","Operation":"Create or Update Policies","Description":"Create - or Update Any Policies"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationPolicies/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Policies","Operation":"Delete Policies","Description":"Delete - Any Policies"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"Read Recovery - Plans","Description":"Read Any Recovery Plans"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"Create or Update - Recovery Plans","Description":"Create or Update Any Recovery Plans"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"Delete Recovery - Plans","Description":"Delete Any Recovery Plans"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/plannedFailover/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"Planned Failover - Recovery Plan","Description":"Planned Failover Recovery Plan"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/unplannedFailover/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"Failover Recovery - Plan","Description":"Failover Recovery Plan"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/testFailover/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"Test Failover - Recovery Plan","Description":"Test Failover Recovery Plan"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/testFailoverCleanup/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"Test Failover - Cleanup Recovery Plan","Description":"Test Failover Cleanup Recovery Plan"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/failoverCommit/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"Failover Commit - Recovery Plan","Description":"Failover Commit Recovery Plan"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/reProtect/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"ReProtect Recovery - Plan","Description":"ReProtect Recovery Plan"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Services Providers","Operation":"Read - Recovery Services Providers","Description":"Read Any Recovery Services Providers"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/remove/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Services Providers","Operation":"Remove - Recovery Services Provider","Description":"Remove Recovery Services Provider"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Services Providers","Operation":"Delete - Recovery Services Providers","Description":"Delete Any Recovery Services Providers"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/refreshProvider/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Services Providers","Operation":"Refresh - Provider","Description":"Refresh Provider"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Fabrics","Operation":"Read Fabrics","Description":"Read - Any Fabrics"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Fabrics","Operation":"Create or Update Fabrics","Description":"Create - or Update Any Fabrics"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/remove/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Fabrics","Operation":"Remove Fabric","Description":"Remove - Fabric"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/checkConsistency/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Fabrics","Operation":"Checks Consistency of - the Fabric","Description":"Checks Consistency of the Fabric"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Fabrics","Operation":"Delete Fabrics","Description":"Delete - Any Fabrics"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/renewcertificate/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Fabrics","Operation":"Renew Certificate for - Fabric","Description":"Renew Certificate for Fabric"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/deployProcessServerImage/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Fabrics","Operation":"Deploy Process Server - Image","Description":"Deploy Process Server Image"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/reassociateGateway/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Fabrics","Operation":"Reassociate Gateway","Description":"Reassociate - Gateway"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Storage Classifications","Operation":"Read - Storage Classifications","Description":"Read Any Storage Classifications"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/replicationStorageClassificationMappings/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Storage Classification Mappings","Operation":"Read - Storage Classification Mappings","Description":"Read Any Storage Classification - Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/replicationStorageClassificationMappings/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Storage Classification Mappings","Operation":"Create - or Update Storage Classification Mappings","Description":"Create or Update - Any Storage Classification Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/replicationStorageClassificationMappings/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Storage Classification Mappings","Operation":"Delete - Storage Classification Mappings","Description":"Delete Any Storage Classification - Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/usages/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Vault Usages","Operation":"Read Vault Usages","Description":"Read - Any Vault Usages"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationvCenters/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Jobs","Operation":"Read Jobs","Description":"Read - Any Jobs"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationvCenters/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Jobs","Operation":"Create or Update Jobs","Description":"Create - or Update Any Jobs"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationvCenters/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Jobs","Operation":"Delete Jobs","Description":"Delete - Any Jobs"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/Vaults/vaultTokens/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Vault - Token","Description":"The Vault Token operation can be used to get Vault Token - for vault level backend operations."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/registeredIdentities/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Register - Service Container","Description":"The Register Service Container operation - can be used to register a container with Recovery Service."},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/Vaults/registeredIdentities/operationResults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - Operation Results","Description":"The Get Operation Results operation can + body: {string: '{"value":[{"name":"Microsoft.RecoveryServices/Vaults/usages/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vault + Usage","operation":"Recovery Services Vault usage details.","description":"Returns + usage details for a Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupUsageSummaries/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Usages Summaries","operation":"Recovery Services Protected Items and Protected + Servers usage summaries details.","description":"Returns summaries for Protected + Items and Protected Servers for a Recovery Services ."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupstorageconfig/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vault + Storage Config","operation":"Get Resource Storage Config","description":"Returns + Storage Configuration for Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupstorageconfig/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vault + Storage Config","operation":"Write Resource Storage Config","description":"Updates + Storage Configuration for Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupconfig/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vault + Config","operation":"Get Resource Config","description":"Returns Configuration + for Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupconfig/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vault + Config","operation":"Update Resource Config","description":"Updates Configuration + for Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/tokenInfo/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Token + Info","operation":"Get Vault Token Info","description":"Returns token information + for Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupSecurityPIN/action","display":{"provider":"Microsoft.RecoveryServices","resource":"SecurityPINInfo","operation":"Get + Security PIN Info","description":"Returns Security PIN Information for Recovery + Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupManagementMetaData/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Management Metadata","operation":"Get Backup Management Metadata","description":"Returns + Backup Management Metadata for Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupOperationResults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Operation Results","operation":"Get Backup Operation Result","description":"Returns + Backup Operation Result for Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupOperations/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Operation Status","operation":"Get Backup Operation Status","description":"Returns + Backup Operation Status for Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupJobs/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Jobs","operation":"Get Jobs","description":"Returns all Job Objects"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupJobs/cancel/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Jobs","operation":"Cancel Jobs","description":"Cancel the Job"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupJobsExport/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Export + Backup Jobs","operation":"Export Jobs","description":"Export Jobs"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupJobs/operationResults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Jobs Operation Results","operation":"Get Job Operation Result","description":"Returns + the Result of Job Operation."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupJobsExport/operationResults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Export + Backup Jobs Operation Results","operation":"Get Export Job Operation Result","description":"Returns + the Result of Export Job Operation."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Recovery + Points","operation":"Get Recovery Points","description":"Get Recovery Points + for Protected Items."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/restore/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Recovery + Points","operation":"Restore Recovery Points","description":"Restore Recovery + Points for Protected Items."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/provisionInstantItemRecovery/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Recovery + Points","operation":"Provision Instant Item Recovery for Protected Item","description":"Provision + Instant Item Recovery for Protected Item"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/revokeInstantItemRecovery/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Recovery + Points","operation":"Revoke Instant Item Recovery for Protected Item","description":"Revoke + Instant Item Recovery for Protected Item"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupPolicies/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Policies","operation":"Get Protection Policy","description":"Returns all Protection + Policies"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupPolicies/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Policies","operation":"Create Protection Policy","description":"Creates Protection + Policy"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupPolicies/delete","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Policies","operation":"Delete Protection Policy","description":"Delete a Protection + Policy"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupPolicies/operationResults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Policy Operation Results","operation":"Get Policy Operation Results","description":"Get + Results of Policy Operation."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupPolicies/operations/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Policy Operation Status","operation":"Get Policy Operation Status","description":"Get + Status of Policy Operation."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected + Items","operation":"Get Protected Item Details","description":"Returns object + details of the Protected Item"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupProtectedItems/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected + Items","operation":"Get All Protected Items","description":"Returns the list + of all Protected Items."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected + Items","operation":"Create Backup Protected Item","description":"Create a + backup Protected Item"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/delete","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected + Items","operation":"Delete Protected Items","description":"Deletes Protected + Item"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/operationResults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected + Item Operation Results","operation":"Get Protected Items Operation Results","description":"Gets + Result of Operation Performed on Protected Items."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/operationsStatus/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected + Item Operation Status","operation":"Get Protected Items operation status","description":"Returns + the status of Operation performed on Protected Items."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/backup/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected + Items","operation":"Backup Protected Item","description":"Performs Backup + for Protected Item."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupProtectableItems/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Protectable Items","operation":"Get Protectable Items","description":"Returns + list of all Protectable Items."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/refreshContainers/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Refresh + Containers","operation":"Refresh container","description":"Refreshes the container + list"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/operationResults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Refresh + Containers Operation Results","operation":"Get Operation Results","description":"Returns + status of the operation"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupProtectionContainers/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Protection Containers","operation":"Get Containers In Subscription","description":"Returns + all containers belonging to the subscription"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Protection + Containers","operation":"Get Registered Container","description":"Returns + all registered containers"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Protection + Containers","operation":"Create Registered Container","description":"Creates + a registered container"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/delete","display":{"provider":"Microsoft.RecoveryServices","resource":"Protection + Containers","operation":"Delete Registered Container","description":"Deletes + the registered Container"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/operationResults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Protection + Containers Operation Results","operation":"Get Container Operation Results","description":"Gets + result of Operation performed on Protection Container."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupEngines/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Engines","operation":"List of backup management servers.","description":"Returns + all the backup management servers registered with vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/backupProtectionIntent/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Protection + Intent","operation":"Create backup Protection Intent","description":"Create + a backup Protection Intent"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectableContainers/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Protectable + Containers","operation":"Get all protectable containers","description":"Get + all protectable containers"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/items/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Workload + Items","operation":"Get all items in a container","description":"Get all items + in a container"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/inquire/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Protection + Containers Inquire","operation":"Do inquiry for workloads within a container","description":"Do + inquiry for workloads within a container"},"origin":"user"},{"name":"Microsoft.RecoveryServices/locations/backupStatus/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Status","operation":"Check Backup Status for Vault","description":"Check Backup + Status for Recovery Services Vaults"},"origin":"user"},{"name":"Microsoft.RecoveryServices/locations/backupPreValidateProtection/action","display":{"provider":"Microsoft.RecoveryServices","resource":"PreValidate + Protection","operation":"Pre Validate Enable Protection","description":""},"origin":"user"},{"name":"Microsoft.RecoveryServices/locations/backupValidateFeatures/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Validate + Features","operation":"Validate Features","description":"Validate Features"},"origin":"user"},{"name":"Microsoft.RecoveryServices/vaults/replicationAlertSettings/read","display":{"provider":"Microsoft + Recovery Services","resource":"Alerts Settings","operation":"Read Alerts Settings","description":"Read + Any Alerts Settings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationAlertSettings/write","display":{"provider":"Microsoft + Recovery Services","resource":"Alerts Settings","operation":"Create or Update + Alerts Settings","description":"Create or Update Any Alerts Settings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationEvents/read","display":{"provider":"Microsoft + Recovery Services","resource":"Events","operation":"Read Events","description":"Read + Any Events"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/read","display":{"provider":"Microsoft + Recovery Services","resource":"Networks","operation":"Read Networks","description":"Read + Any Networks"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings/read","display":{"provider":"Microsoft + Recovery Services","resource":"Network Mappings","operation":"Read Network + Mappings","description":"Read Any Network Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings/write","display":{"provider":"Microsoft + Recovery Services","resource":"Network Mappings","operation":"Create or Update + Network Mappings","description":"Create or Update Any Network Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Network Mappings","operation":"Delete Network + Mappings","description":"Delete Any Network Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems/read","display":{"provider":"Microsoft + Recovery Services","resource":"Protectable Items","operation":"Read Protectable + Items","description":"Read Any Protectable Items"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/read","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Container Mappings","operation":"Read + Protection Container Mappings","description":"Read Any Protection Container + Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/write","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Container Mappings","operation":"Create + or Update Protection Container Mappings","description":"Create or Update Any + Protection Container Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/remove/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Container Mappings","operation":"Remove + Protection Container Mapping","description":"Remove Protection Container Mapping"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Container Mappings","operation":"Delete + Protection Container Mappings","description":"Delete Any Protection Container + Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints/read","display":{"provider":"Microsoft + Recovery Services","resource":"Replication Recovery Points","operation":"Read + Replication Recovery Points","description":"Read Any Replication Recovery + Points"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/read","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Read Protected + Items","description":"Read Any Protected Items"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/write","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Create or Update + Protected Items","description":"Create or Update Any Protected Items"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Delete Protected + Items","description":"Delete Any Protected Items"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/remove/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Remove Protected + Item","description":"Remove Protected Item"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/plannedFailover/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Planned Failover","description":"Planned + Failover"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/unplannedFailover/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Failover","description":"Failover"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/testFailover/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Test Failover","description":"Test + Failover"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/testFailoverCleanup/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Test Failover + Cleanup","description":"Test Failover Cleanup"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/failoverCommit/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Failover Commit","description":"Failover + Commit"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/reProtect/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"ReProtect Protected + Item","description":"ReProtect Protected Item"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/updateMobilityService/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Update Mobility + Service","description":"Update Mobility Service"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/repairReplication/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Repair replication","description":"Repair + replication"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/applyRecoveryPoint/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Apply Recovery + Point","description":"Apply Recovery Point"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationJobs/read","display":{"provider":"Microsoft + Recovery Services","resource":"Jobs","operation":"Read Jobs","description":"Read + Any Jobs"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationJobs/cancel/action","display":{"provider":"Microsoft + Recovery Services","resource":"Jobs","operation":"Cancel Job","description":"Cancel + Job"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationJobs/restart/action","display":{"provider":"Microsoft + Recovery Services","resource":"Jobs","operation":"Restart job","description":"Restart + job"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationJobs/resume/action","display":{"provider":"Microsoft + Recovery Services","resource":"Jobs","operation":"Resume Job","description":"Resume + Job"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/read","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Containers","operation":"Read Protection + Containers","description":"Read Any Protection Containers"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/discoverProtectableItem/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Containers","operation":"Discover + Protectable Item","description":"Discover Protectable Item"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/write","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Containers","operation":"Create + or Update Protection Containers","description":"Create or Update Any Protection + Containers"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/remove/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Containers","operation":"Remove + Protection Container","description":"Remove Protection Container"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/switchprotection/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Containers","operation":"Switch + Protection Container","description":"Switch Protection Container"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationPolicies/read","display":{"provider":"Microsoft + Recovery Services","resource":"Policies","operation":"Read Policies","description":"Read + Any Policies"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationPolicies/write","display":{"provider":"Microsoft + Recovery Services","resource":"Policies","operation":"Create or Update Policies","description":"Create + or Update Any Policies"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationPolicies/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Policies","operation":"Delete Policies","description":"Delete + Any Policies"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/read","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"Read Recovery + Plans","description":"Read Any Recovery Plans"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/write","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"Create or Update + Recovery Plans","description":"Create or Update Any Recovery Plans"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"Delete Recovery + Plans","description":"Delete Any Recovery Plans"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/plannedFailover/action","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"Planned Failover + Recovery Plan","description":"Planned Failover Recovery Plan"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/unplannedFailover/action","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"Failover Recovery + Plan","description":"Failover Recovery Plan"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/testFailover/action","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"Test Failover + Recovery Plan","description":"Test Failover Recovery Plan"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/testFailoverCleanup/action","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"Test Failover + Cleanup Recovery Plan","description":"Test Failover Cleanup Recovery Plan"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/failoverCommit/action","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"Failover Commit + Recovery Plan","description":"Failover Commit Recovery Plan"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/reProtect/action","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"ReProtect Recovery + Plan","description":"ReProtect Recovery Plan"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/read","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Services Providers","operation":"Read + Recovery Services Providers","description":"Read Any Recovery Services Providers"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/write","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Services Providers","operation":"Create + or Update Recovery Services Providers","description":"Create or Update Any + Recovery Services Providers"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/remove/action","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Services Providers","operation":"Remove + Recovery Services Provider","description":"Remove Recovery Services Provider"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Services Providers","operation":"Delete + Recovery Services Providers","description":"Delete Any Recovery Services Providers"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/refreshProvider/action","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Services Providers","operation":"Refresh + Provider","description":"Refresh Provider"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/read","display":{"provider":"Microsoft + Recovery Services","resource":"Fabrics","operation":"Read Fabrics","description":"Read + Any Fabrics"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/write","display":{"provider":"Microsoft + Recovery Services","resource":"Fabrics","operation":"Create or Update Fabrics","description":"Create + or Update Any Fabrics"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/remove/action","display":{"provider":"Microsoft + Recovery Services","resource":"Fabrics","operation":"Remove Fabric","description":"Remove + Fabric"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/checkConsistency/action","display":{"provider":"Microsoft + Recovery Services","resource":"Fabrics","operation":"Checks Consistency of + the Fabric","description":"Checks Consistency of the Fabric"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Fabrics","operation":"Delete Fabrics","description":"Delete + Any Fabrics"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/renewcertificate/action","display":{"provider":"Microsoft + Recovery Services","resource":"Fabrics","operation":"Renew Certificate for + Fabric","description":"Renew Certificate for Fabric"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/deployProcessServerImage/action","display":{"provider":"Microsoft + Recovery Services","resource":"Fabrics","operation":"Deploy Process Server + Image","description":"Deploy Process Server Image"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/reassociateGateway/action","display":{"provider":"Microsoft + Recovery Services","resource":"Fabrics","operation":"Reassociate Gateway","description":"Reassociate + Gateway"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/read","display":{"provider":"Microsoft + Recovery Services","resource":"Storage Classifications","operation":"Read + Storage Classifications","description":"Read Any Storage Classifications"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/replicationStorageClassificationMappings/read","display":{"provider":"Microsoft + Recovery Services","resource":"Storage Classification Mappings","operation":"Read + Storage Classification Mappings","description":"Read Any Storage Classification + Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/replicationStorageClassificationMappings/write","display":{"provider":"Microsoft + Recovery Services","resource":"Storage Classification Mappings","operation":"Create + or Update Storage Classification Mappings","description":"Create or Update + Any Storage Classification Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/replicationStorageClassificationMappings/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Storage Classification Mappings","operation":"Delete + Storage Classification Mappings","description":"Delete Any Storage Classification + Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/usages/read","display":{"provider":"Microsoft + Recovery Services","resource":"Vault Usages","operation":"Read Vault Usages","description":"Read + Any Vault Usages"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationvCenters/read","display":{"provider":"Microsoft + Recovery Services","resource":"Jobs","operation":"Read Jobs","description":"Read + Any Jobs"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationvCenters/write","display":{"provider":"Microsoft + Recovery Services","resource":"Jobs","operation":"Create or Update Jobs","description":"Create + or Update Any Jobs"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationvCenters/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Jobs","operation":"Delete Jobs","description":"Delete + Any Jobs"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/Vaults/vaultTokens/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Vault + Token","description":"The Vault Token operation can be used to get Vault Token + for vault level backend operations."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/registeredIdentities/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Register + Service Container","description":"The Register Service Container operation + can be used to register a container with Recovery Service."},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/Vaults/registeredIdentities/operationResults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Get + Operation Results","description":"The Get Operation Results operation can be used get the operation status and result for the asynchronously submitted - operation"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/Vaults/registeredIdentities/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - Containers","Description":"The Get Containers operation can be used get the - containers registered for a resource."},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/Vaults/registeredIdentities/delete","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Unregister - Service Container","Description":"The UnRegister Container operation can be - used to unregister a container."},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/Vaults/certificates/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Update - Resource Certificate","Description":"The Update Resource Certificate operation - updates the resource/vault credential certificate."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/monitoringAlerts/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - alerts","Description":"Gets the alerts for the Recovery services vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/monitoringAlerts/{uniqueAlertId}/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - alert details","Description":"Gets the details of the alert."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/monitoringAlerts/{uniqueAlertId}/patch","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Resolve - alert","Description":"Resolves the alert."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/monitoringConfigurations/notificationConfiguration/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - configuration","Description":"Gets the Recovery services vault notification - configuration."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/monitoringConfigurations/notificationConfiguration/patch","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Configure - e-mail notification","Description":"Configures e-mail notifications to Recovery - services vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/providers/Microsoft.Insights/logDefinitions/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Azure - Backup Logs","Description":"Azure Backup Logs"},"Origin":"system","Properties":{"serviceSpecification":{"logSpecifications":[{"name":"AzureBackupReport","displayName":"Azure + operation"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/Vaults/registeredIdentities/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Get + Containers","description":"The Get Containers operation can be used get the + containers registered for a resource."},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/Vaults/registeredIdentities/delete","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Unregister + Service Container","description":"The UnRegister Container operation can be + used to unregister a container."},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/Vaults/certificates/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Update + Resource Certificate","description":"The Update Resource Certificate operation + updates the resource/vault credential certificate."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/monitoringAlerts/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Get + alerts","description":"Gets the alerts for the Recovery services vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/monitoringAlerts/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Resolve + alert","description":"Resolves the alert."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/monitoringConfigurations/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Get + configuration","description":"Gets the Recovery services vault notification + configuration."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/monitoringConfigurations/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Configure + e-mail notification","description":"Configures e-mail notifications to Recovery + services vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/providers/Microsoft.Insights/logDefinitions/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Azure + Backup Logs","description":"Azure Backup Logs"},"origin":"system","properties":{"serviceSpecification":{"logSpecifications":[{"name":"AzureBackupReport","displayName":"Azure Backup Reporting Data","blobDuration":"PT1H"},{"name":"AzureSiteRecoveryJobs","displayName":"Azure Site Recovery Jobs","blobDuration":"PT1H"},{"name":"AzureSiteRecoveryEvents","displayName":"Azure Site Recovery Events","blobDuration":"PT1H"},{"name":"AzureSiteRecoveryReplicatedItems","displayName":"Azure Site Recovery Replicated Items","blobDuration":"PT1H"},{"name":"AzureSiteRecoveryReplicationStats","displayName":"Azure Site Recovery Replication Stats","blobDuration":"PT1H"},{"name":"AzureSiteRecoveryRecoveryPoints","displayName":"Azure - Site Recovery Recovery Points","blobDuration":"PT1H"}]}}},{"Name":"Microsoft.RecoveryServices/Vaults/providers/Microsoft.Insights/metricDefinitions/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Azure - Backup Metrics","Description":"Azure Backup Metrics"},"Origin":"system"},{"Name":"Microsoft.RecoveryServices/Vaults/providers/Microsoft.Insights/diagnosticSettings/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Azure - Backup Diagnostics","Description":"Azure Backup Diagnostics"},"Origin":"system"},{"Name":"Microsoft.RecoveryServices/Vaults/providers/Microsoft.Insights/diagnosticSettings/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Azure - Backup Diagnostics","Description":"Azure Backup Diagnostics"},"Origin":"system"},{"Name":"Microsoft.RecoveryServices/Vaults/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Create - Vault","Description":"Create Vault operation creates an Azure resource of - type ''vault''"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - Vault","Description":"The Get Vault operation gets an object representing - the Azure resource of type ''vault''"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/delete","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Delete - Vault","Description":"The Delete Vault operation deletes the specified Azure - resource of type ''vault''"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/extendedInformation/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - Extended Info","Description":"The Get Extended Info operation gets an object''s - Extended Info representing the Azure resource of type ?vault?"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/extendedInformation/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - Extended Info","Description":"The Get Extended Info operation gets an object''s - Extended Info representing the Azure resource of type ?vault?"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/extendedInformation/delete","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - Extended Info","Description":"The Get Extended Info operation gets an object''s - Extended Info representing the Azure resource of type ?vault?"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/locations/allocatedStamp/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"locations/allocatedStamp","Operation":"Get - Allocated Stamp","Description":"GetAllocatedStamp is internal operation used - by service"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/locations/allocateStamp/action","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"locations/allocateStamp","Operation":"Allocated - Stamp Action","Description":"AllocateStamp is internal operation used by service"},"Origin":"user"}]}'} + Site Recovery Recovery Points","blobDuration":"PT1H"},{"name":"AzureSiteRecoveryReplicationDataUploadRate","displayName":"Azure + Site Recovery Replication Data Upload Rate","blobDuration":"PT1H"},{"name":"AzureSiteRecoveryProtectedDiskDataChurn","displayName":"Azure + Site Recovery Protected Disk Data Churn","blobDuration":"PT1H"}]}}},{"name":"Microsoft.RecoveryServices/Vaults/providers/Microsoft.Insights/metricDefinitions/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Azure + Backup Metrics","description":"Azure Backup Metrics"},"origin":"system"},{"name":"Microsoft.RecoveryServices/Vaults/providers/Microsoft.Insights/diagnosticSettings/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Azure + Backup Diagnostics","description":"Azure Backup Diagnostics"},"origin":"system"},{"name":"Microsoft.RecoveryServices/Vaults/providers/Microsoft.Insights/diagnosticSettings/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Azure + Backup Diagnostics","description":"Azure Backup Diagnostics"},"origin":"system"},{"name":"Microsoft.RecoveryServices/Vaults/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Create + Vault","description":"Create Vault operation creates an Azure resource of + type ''vault''"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Get + Vault","description":"The Get Vault operation gets an object representing + the Azure resource of type ''vault''"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/delete","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Delete + Vault","description":"The Delete Vault operation deletes the specified Azure + resource of type ''vault''"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/extendedInformation/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Get + Extended Info","description":"The Get Extended Info operation gets an object''s + Extended Info representing the Azure resource of type ?vault?"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/extendedInformation/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Get + Extended Info","description":"The Get Extended Info operation gets an object''s + Extended Info representing the Azure resource of type ?vault?"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/extendedInformation/delete","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Get + Extended Info","description":"The Get Extended Info operation gets an object''s + Extended Info representing the Azure resource of type ?vault?"},"origin":"user"},{"name":"Microsoft.RecoveryServices/locations/allocatedStamp/read","display":{"provider":"Microsoft.RecoveryServices","resource":"locations/allocatedStamp","operation":"Get + Allocated Stamp","description":"GetAllocatedStamp is internal operation used + by service"},"origin":"user"},{"name":"Microsoft.RecoveryServices/locations/allocateStamp/action","display":{"provider":"Microsoft.RecoveryServices","resource":"locations/allocateStamp","operation":"Allocated + Stamp Action","description":"AllocateStamp is internal operation used by service"},"origin":"user"},{"name":"Microsoft.RecoveryServices/register/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Microsoft.RecoveryServices","operation":"Register + Resource Provider","description":"Registers subscription for given Resource + Provider"},"origin":"user"},{"name":"Microsoft.RecoveryServices/operations/read","display":{"provider":"Microsoft.RecoveryServices","resource":"operations","operation":"List + of Operations","description":"Operation returns the list of Operations for + a Resource Provider"},"origin":"user,system"}]}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json] - Date: ['Wed, 02 Aug 2017 11:51:23 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['38423'] - x-ms-client-request-id: [e7d326cc-7778-11e7-af33-480fcf586696] - x-ms-correlation-request-id: [219317ba-bc16-423a-ac29-34a70907f291] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [219317ba-bc16-423a-ac29-34a70907f291] - x-ms-routing-request-id: ['CENTRALINDIA:20170802T115124Z:219317ba-bc16-423a-ac29-34a70907f291'] + cache-control: [no-cache] + content-length: ['41498'] + content-type: [application/json] + date: ['Fri, 25 May 2018 17:52:31 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] status: {code: 200, message: OK} version: 1 diff --git a/azure-mgmt-recoveryservicesbackup/tests/test_mgmt_recoveryservices_backup.py b/azure-mgmt-recoveryservicesbackup/tests/test_mgmt_recoveryservices_backup.py index fb7e1706304f..52e4063799d6 100644 --- a/azure-mgmt-recoveryservicesbackup/tests/test_mgmt_recoveryservices_backup.py +++ b/azure-mgmt-recoveryservicesbackup/tests/test_mgmt_recoveryservices_backup.py @@ -5,10 +5,10 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- +import time from contextlib import contextmanager import azure.mgmt.recoveryservicesbackup -from testutils.common_recordingtestcase import record from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer from recoveryservicesbackup_testcase import MgmtRecoveryServicesBackupTestDefinition, MgmtRecoveryServicesBackupTestHelper diff --git a/azure-mgmt-reservations/tests/__init__.py b/azure-mgmt-reservations/tests/__init__.py deleted file mode 100644 index 8b137891791f..000000000000 --- a/azure-mgmt-reservations/tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/azure-mgmt-resource/setup.py b/azure-mgmt-resource/setup.py index 39d280efb07e..39abbc5af67c 100644 --- a/azure-mgmt-resource/setup.py +++ b/azure-mgmt-resource/setup.py @@ -78,7 +78,7 @@ packages=find_packages(exclude=["tests"]), install_requires=[ 'msrestazure>=0.4.27,<2.0.0', - 'azure-common~=1.1', + 'azure-common~=1.1,>=1.1.9', ], cmdclass=cmdclass ) diff --git a/azure-mgmt-scheduler/HISTORY.rst b/azure-mgmt-scheduler/HISTORY.rst index 5ed55b5c8d8a..6f5fe1a79992 100644 --- a/azure-mgmt-scheduler/HISTORY.rst +++ b/azure-mgmt-scheduler/HISTORY.rst @@ -3,6 +3,43 @@ Release History =============== +2.0.0 (2018-05-23) +++++++++++++++++++ + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Features** + +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**Bugfixes** + +- Scheduler jobs with basic authentication cannot be created (https://github.com/Azure/azure-sdk-for-node/issues/2347 for details) +- Compatibility of the sdist with wheel 0.31.0 + 1.1.3 (2017-09-07) ++++++++++++++++++ diff --git a/azure-mgmt-scheduler/README.rst b/azure-mgmt-scheduler/README.rst index 0b376b091edd..af814a002139 100644 --- a/azure-mgmt-scheduler/README.rst +++ b/azure-mgmt-scheduler/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Scheduler Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -36,9 +36,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `Scheduler Resource Management -`__ -on readthedocs.org. +For code examples, see `Scheduler Management +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/__init__.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/__init__.py index 40ea60b62c55..8c1d83bea4f8 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/__init__.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/__init__.py @@ -9,35 +9,66 @@ # regenerated. # -------------------------------------------------------------------------- -from .sku import Sku -from .job_max_recurrence import JobMaxRecurrence -from .job_collection_quota import JobCollectionQuota -from .job_collection_properties import JobCollectionProperties -from .job_collection_definition import JobCollectionDefinition -from .http_authentication import HttpAuthentication -from .http_request import HttpRequest -from .storage_queue_message import StorageQueueMessage -from .service_bus_queue_message import ServiceBusQueueMessage -from .service_bus_topic_message import ServiceBusTopicMessage -from .retry_policy import RetryPolicy -from .job_error_action import JobErrorAction -from .job_action import JobAction -from .job_recurrence_schedule_monthly_occurrence import JobRecurrenceScheduleMonthlyOccurrence -from .job_recurrence_schedule import JobRecurrenceSchedule -from .job_recurrence import JobRecurrence -from .job_status import JobStatus -from .job_properties import JobProperties -from .job_definition import JobDefinition -from .job_history_definition_properties import JobHistoryDefinitionProperties -from .job_history_definition import JobHistoryDefinition -from .client_cert_authentication import ClientCertAuthentication -from .basic_authentication import BasicAuthentication -from .oauth_authentication import OAuthAuthentication -from .service_bus_authentication import ServiceBusAuthentication -from .service_bus_brokered_message_properties import ServiceBusBrokeredMessageProperties -from .service_bus_message import ServiceBusMessage -from .job_state_filter import JobStateFilter -from .job_history_filter import JobHistoryFilter +try: + from .sku_py3 import Sku + from .job_max_recurrence_py3 import JobMaxRecurrence + from .job_collection_quota_py3 import JobCollectionQuota + from .job_collection_properties_py3 import JobCollectionProperties + from .job_collection_definition_py3 import JobCollectionDefinition + from .http_authentication_py3 import HttpAuthentication + from .http_request_py3 import HttpRequest + from .storage_queue_message_py3 import StorageQueueMessage + from .service_bus_queue_message_py3 import ServiceBusQueueMessage + from .service_bus_topic_message_py3 import ServiceBusTopicMessage + from .retry_policy_py3 import RetryPolicy + from .job_error_action_py3 import JobErrorAction + from .job_action_py3 import JobAction + from .job_recurrence_schedule_monthly_occurrence_py3 import JobRecurrenceScheduleMonthlyOccurrence + from .job_recurrence_schedule_py3 import JobRecurrenceSchedule + from .job_recurrence_py3 import JobRecurrence + from .job_status_py3 import JobStatus + from .job_properties_py3 import JobProperties + from .job_definition_py3 import JobDefinition + from .job_history_definition_properties_py3 import JobHistoryDefinitionProperties + from .job_history_definition_py3 import JobHistoryDefinition + from .client_cert_authentication_py3 import ClientCertAuthentication + from .basic_authentication_py3 import BasicAuthentication + from .oauth_authentication_py3 import OAuthAuthentication + from .service_bus_authentication_py3 import ServiceBusAuthentication + from .service_bus_brokered_message_properties_py3 import ServiceBusBrokeredMessageProperties + from .service_bus_message_py3 import ServiceBusMessage + from .job_state_filter_py3 import JobStateFilter + from .job_history_filter_py3 import JobHistoryFilter +except (SyntaxError, ImportError): + from .sku import Sku + from .job_max_recurrence import JobMaxRecurrence + from .job_collection_quota import JobCollectionQuota + from .job_collection_properties import JobCollectionProperties + from .job_collection_definition import JobCollectionDefinition + from .http_authentication import HttpAuthentication + from .http_request import HttpRequest + from .storage_queue_message import StorageQueueMessage + from .service_bus_queue_message import ServiceBusQueueMessage + from .service_bus_topic_message import ServiceBusTopicMessage + from .retry_policy import RetryPolicy + from .job_error_action import JobErrorAction + from .job_action import JobAction + from .job_recurrence_schedule_monthly_occurrence import JobRecurrenceScheduleMonthlyOccurrence + from .job_recurrence_schedule import JobRecurrenceSchedule + from .job_recurrence import JobRecurrence + from .job_status import JobStatus + from .job_properties import JobProperties + from .job_definition import JobDefinition + from .job_history_definition_properties import JobHistoryDefinitionProperties + from .job_history_definition import JobHistoryDefinition + from .client_cert_authentication import ClientCertAuthentication + from .basic_authentication import BasicAuthentication + from .oauth_authentication import OAuthAuthentication + from .service_bus_authentication import ServiceBusAuthentication + from .service_bus_brokered_message_properties import ServiceBusBrokeredMessageProperties + from .service_bus_message import ServiceBusMessage + from .job_state_filter import JobStateFilter + from .job_history_filter import JobHistoryFilter from .job_collection_definition_paged import JobCollectionDefinitionPaged from .job_definition_paged import JobDefinitionPaged from .job_history_definition_paged import JobHistoryDefinitionPaged @@ -46,7 +77,6 @@ JobCollectionState, RecurrenceFrequency, JobActionType, - HttpAuthenticationType, RetryType, DayOfWeek, JobScheduleDay, @@ -94,7 +124,6 @@ 'JobCollectionState', 'RecurrenceFrequency', 'JobActionType', - 'HttpAuthenticationType', 'RetryType', 'DayOfWeek', 'JobScheduleDay', diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication.py index bac148cf4e57..942882fa03e0 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication.py @@ -15,11 +15,10 @@ class BasicAuthentication(HttpAuthentication): """BasicAuthentication. - :param type: Gets or sets the HTTP authentication type. Possible values - include: 'NotSpecified', 'ClientCertificate', 'ActiveDirectoryOAuth', - 'Basic' - :type type: str or :class:`HttpAuthenticationType - ` + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str :param username: Gets or sets the username. :type username: str :param password: Gets or sets the password, return value will always be @@ -27,13 +26,18 @@ class BasicAuthentication(HttpAuthentication): :type password: str """ + _validation = { + 'type': {'required': True}, + } + _attribute_map = { - 'type': {'key': 'type', 'type': 'HttpAuthenticationType'}, + 'type': {'key': 'type', 'type': 'str'}, 'username': {'key': 'username', 'type': 'str'}, 'password': {'key': 'password', 'type': 'str'}, } - def __init__(self, type=None, username=None, password=None): - super(BasicAuthentication, self).__init__(type=type) - self.username = username - self.password = password + def __init__(self, **kwargs): + super(BasicAuthentication, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.type = 'Basic' diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication_py3.py new file mode 100644 index 000000000000..92e8b5feee62 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .http_authentication_py3 import HttpAuthentication + + +class BasicAuthentication(HttpAuthentication): + """BasicAuthentication. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param username: Gets or sets the username. + :type username: str + :param password: Gets or sets the password, return value will always be + empty. + :type password: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, username: str=None, password: str=None, **kwargs) -> None: + super(BasicAuthentication, self).__init__(**kwargs) + self.username = username + self.password = password + self.type = 'Basic' diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication.py index a5e01d8d45cd..e4324d0a5293 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication.py @@ -15,11 +15,10 @@ class ClientCertAuthentication(HttpAuthentication): """ClientCertAuthentication. - :param type: Gets or sets the HTTP authentication type. Possible values - include: 'NotSpecified', 'ClientCertificate', 'ActiveDirectoryOAuth', - 'Basic' - :type type: str or :class:`HttpAuthenticationType - ` + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str :param password: Gets or sets the certificate password, return value will always be empty. :type password: str @@ -36,8 +35,12 @@ class ClientCertAuthentication(HttpAuthentication): :type certificate_subject_name: str """ + _validation = { + 'type': {'required': True}, + } + _attribute_map = { - 'type': {'key': 'type', 'type': 'HttpAuthenticationType'}, + 'type': {'key': 'type', 'type': 'str'}, 'password': {'key': 'password', 'type': 'str'}, 'pfx': {'key': 'pfx', 'type': 'str'}, 'certificate_thumbprint': {'key': 'certificateThumbprint', 'type': 'str'}, @@ -45,10 +48,11 @@ class ClientCertAuthentication(HttpAuthentication): 'certificate_subject_name': {'key': 'certificateSubjectName', 'type': 'str'}, } - def __init__(self, type=None, password=None, pfx=None, certificate_thumbprint=None, certificate_expiration_date=None, certificate_subject_name=None): - super(ClientCertAuthentication, self).__init__(type=type) - self.password = password - self.pfx = pfx - self.certificate_thumbprint = certificate_thumbprint - self.certificate_expiration_date = certificate_expiration_date - self.certificate_subject_name = certificate_subject_name + def __init__(self, **kwargs): + super(ClientCertAuthentication, self).__init__(**kwargs) + self.password = kwargs.get('password', None) + self.pfx = kwargs.get('pfx', None) + self.certificate_thumbprint = kwargs.get('certificate_thumbprint', None) + self.certificate_expiration_date = kwargs.get('certificate_expiration_date', None) + self.certificate_subject_name = kwargs.get('certificate_subject_name', None) + self.type = 'ClientCertificate' diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication_py3.py new file mode 100644 index 000000000000..17d2aad55eaf --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .http_authentication_py3 import HttpAuthentication + + +class ClientCertAuthentication(HttpAuthentication): + """ClientCertAuthentication. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param password: Gets or sets the certificate password, return value will + always be empty. + :type password: str + :param pfx: Gets or sets the pfx certificate. Accepts certification in + base64 encoding, return value will always be empty. + :type pfx: str + :param certificate_thumbprint: Gets or sets the certificate thumbprint. + :type certificate_thumbprint: str + :param certificate_expiration_date: Gets or sets the certificate + expiration date. + :type certificate_expiration_date: datetime + :param certificate_subject_name: Gets or sets the certificate subject + name. + :type certificate_subject_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'pfx': {'key': 'pfx', 'type': 'str'}, + 'certificate_thumbprint': {'key': 'certificateThumbprint', 'type': 'str'}, + 'certificate_expiration_date': {'key': 'certificateExpirationDate', 'type': 'iso-8601'}, + 'certificate_subject_name': {'key': 'certificateSubjectName', 'type': 'str'}, + } + + def __init__(self, *, password: str=None, pfx: str=None, certificate_thumbprint: str=None, certificate_expiration_date=None, certificate_subject_name: str=None, **kwargs) -> None: + super(ClientCertAuthentication, self).__init__(**kwargs) + self.password = password + self.pfx = pfx + self.certificate_thumbprint = certificate_thumbprint + self.certificate_expiration_date = certificate_expiration_date + self.certificate_subject_name = certificate_subject_name + self.type = 'ClientCertificate' diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication.py index a1a213b8b9cd..052f1f9bcf68 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication.py @@ -15,16 +15,28 @@ class HttpAuthentication(Model): """HttpAuthentication. - :param type: Gets or sets the HTTP authentication type. Possible values - include: 'NotSpecified', 'ClientCertificate', 'ActiveDirectoryOAuth', - 'Basic' - :type type: str or :class:`HttpAuthenticationType - ` + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ClientCertAuthentication, BasicAuthentication, + OAuthAuthentication + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str """ + _validation = { + 'type': {'required': True}, + } + _attribute_map = { - 'type': {'key': 'type', 'type': 'HttpAuthenticationType'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'ClientCertificate': 'ClientCertAuthentication', 'Basic': 'BasicAuthentication', 'ActiveDirectoryOAuth': 'OAuthAuthentication'} } - def __init__(self, type=None): - self.type = type + def __init__(self, **kwargs): + super(HttpAuthentication, self).__init__(**kwargs) + self.type = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication_py3.py new file mode 100644 index 000000000000..f3972592501f --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpAuthentication(Model): + """HttpAuthentication. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ClientCertAuthentication, BasicAuthentication, + OAuthAuthentication + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'ClientCertificate': 'ClientCertAuthentication', 'Basic': 'BasicAuthentication', 'ActiveDirectoryOAuth': 'OAuthAuthentication'} + } + + def __init__(self, **kwargs) -> None: + super(HttpAuthentication, self).__init__(**kwargs) + self.type = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request.py index a0e49a791ae5..700d582f2c1f 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request.py @@ -17,8 +17,7 @@ class HttpRequest(Model): :param authentication: Gets or sets the authentication method of the request. - :type authentication: :class:`HttpAuthentication - ` + :type authentication: ~azure.mgmt.scheduler.models.HttpAuthentication :param uri: Gets or sets the URI of the request. :type uri: str :param method: Gets or sets the method of the request. @@ -26,7 +25,7 @@ class HttpRequest(Model): :param body: Gets or sets the request body. :type body: str :param headers: Gets or sets the headers. - :type headers: dict + :type headers: dict[str, str] """ _attribute_map = { @@ -37,9 +36,10 @@ class HttpRequest(Model): 'headers': {'key': 'headers', 'type': '{str}'}, } - def __init__(self, authentication=None, uri=None, method=None, body=None, headers=None): - self.authentication = authentication - self.uri = uri - self.method = method - self.body = body - self.headers = headers + def __init__(self, **kwargs): + super(HttpRequest, self).__init__(**kwargs) + self.authentication = kwargs.get('authentication', None) + self.uri = kwargs.get('uri', None) + self.method = kwargs.get('method', None) + self.body = kwargs.get('body', None) + self.headers = kwargs.get('headers', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request_py3.py new file mode 100644 index 000000000000..482ca14b30e9 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpRequest(Model): + """HttpRequest. + + :param authentication: Gets or sets the authentication method of the + request. + :type authentication: ~azure.mgmt.scheduler.models.HttpAuthentication + :param uri: Gets or sets the URI of the request. + :type uri: str + :param method: Gets or sets the method of the request. + :type method: str + :param body: Gets or sets the request body. + :type body: str + :param headers: Gets or sets the headers. + :type headers: dict[str, str] + """ + + _attribute_map = { + 'authentication': {'key': 'authentication', 'type': 'HttpAuthentication'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'body': {'key': 'body', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{str}'}, + } + + def __init__(self, *, authentication=None, uri: str=None, method: str=None, body: str=None, headers=None, **kwargs) -> None: + super(HttpRequest, self).__init__(**kwargs) + self.authentication = authentication + self.uri = uri + self.method = method + self.body = body + self.headers = headers diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action.py index 6dcf9f3aaef2..0a50a73ab6b5 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action.py @@ -17,28 +17,23 @@ class JobAction(Model): :param type: Gets or sets the job action type. Possible values include: 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', 'ServiceBusTopic' - :type type: str or :class:`JobActionType - ` + :type type: str or ~azure.mgmt.scheduler.models.JobActionType :param request: Gets or sets the http requests. - :type request: :class:`HttpRequest - ` + :type request: ~azure.mgmt.scheduler.models.HttpRequest :param queue_message: Gets or sets the storage queue message. - :type queue_message: :class:`StorageQueueMessage - ` + :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage :param service_bus_queue_message: Gets or sets the service bus queue message. - :type service_bus_queue_message: :class:`ServiceBusQueueMessage - ` + :type service_bus_queue_message: + ~azure.mgmt.scheduler.models.ServiceBusQueueMessage :param service_bus_topic_message: Gets or sets the service bus topic message. - :type service_bus_topic_message: :class:`ServiceBusTopicMessage - ` + :type service_bus_topic_message: + ~azure.mgmt.scheduler.models.ServiceBusTopicMessage :param retry_policy: Gets or sets the retry policy. - :type retry_policy: :class:`RetryPolicy - ` + :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy :param error_action: Gets or sets the error action. - :type error_action: :class:`JobErrorAction - ` + :type error_action: ~azure.mgmt.scheduler.models.JobErrorAction """ _attribute_map = { @@ -51,11 +46,12 @@ class JobAction(Model): 'error_action': {'key': 'errorAction', 'type': 'JobErrorAction'}, } - def __init__(self, type=None, request=None, queue_message=None, service_bus_queue_message=None, service_bus_topic_message=None, retry_policy=None, error_action=None): - self.type = type - self.request = request - self.queue_message = queue_message - self.service_bus_queue_message = service_bus_queue_message - self.service_bus_topic_message = service_bus_topic_message - self.retry_policy = retry_policy - self.error_action = error_action + def __init__(self, **kwargs): + super(JobAction, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.request = kwargs.get('request', None) + self.queue_message = kwargs.get('queue_message', None) + self.service_bus_queue_message = kwargs.get('service_bus_queue_message', None) + self.service_bus_topic_message = kwargs.get('service_bus_topic_message', None) + self.retry_policy = kwargs.get('retry_policy', None) + self.error_action = kwargs.get('error_action', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action_py3.py new file mode 100644 index 000000000000..6f8f5c7ffb2c --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobAction(Model): + """JobAction. + + :param type: Gets or sets the job action type. Possible values include: + 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', 'ServiceBusTopic' + :type type: str or ~azure.mgmt.scheduler.models.JobActionType + :param request: Gets or sets the http requests. + :type request: ~azure.mgmt.scheduler.models.HttpRequest + :param queue_message: Gets or sets the storage queue message. + :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage + :param service_bus_queue_message: Gets or sets the service bus queue + message. + :type service_bus_queue_message: + ~azure.mgmt.scheduler.models.ServiceBusQueueMessage + :param service_bus_topic_message: Gets or sets the service bus topic + message. + :type service_bus_topic_message: + ~azure.mgmt.scheduler.models.ServiceBusTopicMessage + :param retry_policy: Gets or sets the retry policy. + :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy + :param error_action: Gets or sets the error action. + :type error_action: ~azure.mgmt.scheduler.models.JobErrorAction + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'JobActionType'}, + 'request': {'key': 'request', 'type': 'HttpRequest'}, + 'queue_message': {'key': 'queueMessage', 'type': 'StorageQueueMessage'}, + 'service_bus_queue_message': {'key': 'serviceBusQueueMessage', 'type': 'ServiceBusQueueMessage'}, + 'service_bus_topic_message': {'key': 'serviceBusTopicMessage', 'type': 'ServiceBusTopicMessage'}, + 'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'}, + 'error_action': {'key': 'errorAction', 'type': 'JobErrorAction'}, + } + + def __init__(self, *, type=None, request=None, queue_message=None, service_bus_queue_message=None, service_bus_topic_message=None, retry_policy=None, error_action=None, **kwargs) -> None: + super(JobAction, self).__init__(**kwargs) + self.type = type + self.request = request + self.queue_message = queue_message + self.service_bus_queue_message = service_bus_queue_message + self.service_bus_topic_message = service_bus_topic_message + self.retry_policy = retry_policy + self.error_action = error_action diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition.py index aef3eaffec85..be05e83bbab8 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition.py @@ -27,10 +27,9 @@ class JobCollectionDefinition(Model): :param location: Gets or sets the storage account location. :type location: str :param tags: Gets or sets the tags. - :type tags: dict + :type tags: dict[str, str] :param properties: Gets or sets the job collection properties. - :type properties: :class:`JobCollectionProperties - ` + :type properties: ~azure.mgmt.scheduler.models.JobCollectionProperties """ _validation = { @@ -47,10 +46,11 @@ class JobCollectionDefinition(Model): 'properties': {'key': 'properties', 'type': 'JobCollectionProperties'}, } - def __init__(self, name=None, location=None, tags=None, properties=None): + def __init__(self, **kwargs): + super(JobCollectionDefinition, self).__init__(**kwargs) self.id = None self.type = None - self.name = name - self.location = location - self.tags = tags - self.properties = properties + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_paged.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_paged.py index c14768483eb3..4830c059bb71 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_paged.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_paged.py @@ -14,7 +14,7 @@ class JobCollectionDefinitionPaged(Paged): """ - A paging container for iterating over a list of JobCollectionDefinition object + A paging container for iterating over a list of :class:`JobCollectionDefinition ` object """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_py3.py new file mode 100644 index 000000000000..583f7ed6679b --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobCollectionDefinition(Model): + """JobCollectionDefinition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the job collection resource identifier. + :vartype id: str + :ivar type: Gets the job collection resource type. + :vartype type: str + :param name: Gets or sets the job collection resource name. + :type name: str + :param location: Gets or sets the storage account location. + :type location: str + :param tags: Gets or sets the tags. + :type tags: dict[str, str] + :param properties: Gets or sets the job collection properties. + :type properties: ~azure.mgmt.scheduler.models.JobCollectionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'JobCollectionProperties'}, + } + + def __init__(self, *, name: str=None, location: str=None, tags=None, properties=None, **kwargs) -> None: + super(JobCollectionDefinition, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = name + self.location = location + self.tags = tags + self.properties = properties diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties.py index a8031e81b2aa..51be15d9547d 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties.py @@ -16,14 +16,12 @@ class JobCollectionProperties(Model): """JobCollectionProperties. :param sku: Gets or sets the SKU. - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.scheduler.models.Sku :param state: Gets or sets the state. Possible values include: 'Enabled', 'Disabled', 'Suspended', 'Deleted' - :type state: str or :class:`JobCollectionState - ` + :type state: str or ~azure.mgmt.scheduler.models.JobCollectionState :param quota: Gets or sets the job collection quota. - :type quota: :class:`JobCollectionQuota - ` + :type quota: ~azure.mgmt.scheduler.models.JobCollectionQuota """ _attribute_map = { @@ -32,7 +30,8 @@ class JobCollectionProperties(Model): 'quota': {'key': 'quota', 'type': 'JobCollectionQuota'}, } - def __init__(self, sku=None, state=None, quota=None): - self.sku = sku - self.state = state - self.quota = quota + def __init__(self, **kwargs): + super(JobCollectionProperties, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.state = kwargs.get('state', None) + self.quota = kwargs.get('quota', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties_py3.py new file mode 100644 index 000000000000..c38d012ac714 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobCollectionProperties(Model): + """JobCollectionProperties. + + :param sku: Gets or sets the SKU. + :type sku: ~azure.mgmt.scheduler.models.Sku + :param state: Gets or sets the state. Possible values include: 'Enabled', + 'Disabled', 'Suspended', 'Deleted' + :type state: str or ~azure.mgmt.scheduler.models.JobCollectionState + :param quota: Gets or sets the job collection quota. + :type quota: ~azure.mgmt.scheduler.models.JobCollectionQuota + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'state': {'key': 'state', 'type': 'JobCollectionState'}, + 'quota': {'key': 'quota', 'type': 'JobCollectionQuota'}, + } + + def __init__(self, *, sku=None, state=None, quota=None, **kwargs) -> None: + super(JobCollectionProperties, self).__init__(**kwargs) + self.sku = sku + self.state = state + self.quota = quota diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota.py index 9d1be6c1f489..468793f2066f 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota.py @@ -20,8 +20,7 @@ class JobCollectionQuota(Model): :param max_job_occurrence: Gets or sets the maximum job occurrence. :type max_job_occurrence: int :param max_recurrence: Gets or set the maximum recurrence. - :type max_recurrence: :class:`JobMaxRecurrence - ` + :type max_recurrence: ~azure.mgmt.scheduler.models.JobMaxRecurrence """ _attribute_map = { @@ -30,7 +29,8 @@ class JobCollectionQuota(Model): 'max_recurrence': {'key': 'maxRecurrence', 'type': 'JobMaxRecurrence'}, } - def __init__(self, max_job_count=None, max_job_occurrence=None, max_recurrence=None): - self.max_job_count = max_job_count - self.max_job_occurrence = max_job_occurrence - self.max_recurrence = max_recurrence + def __init__(self, **kwargs): + super(JobCollectionQuota, self).__init__(**kwargs) + self.max_job_count = kwargs.get('max_job_count', None) + self.max_job_occurrence = kwargs.get('max_job_occurrence', None) + self.max_recurrence = kwargs.get('max_recurrence', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota_py3.py new file mode 100644 index 000000000000..996d3c9cd72d --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobCollectionQuota(Model): + """JobCollectionQuota. + + :param max_job_count: Gets or set the maximum job count. + :type max_job_count: int + :param max_job_occurrence: Gets or sets the maximum job occurrence. + :type max_job_occurrence: int + :param max_recurrence: Gets or set the maximum recurrence. + :type max_recurrence: ~azure.mgmt.scheduler.models.JobMaxRecurrence + """ + + _attribute_map = { + 'max_job_count': {'key': 'maxJobCount', 'type': 'int'}, + 'max_job_occurrence': {'key': 'maxJobOccurrence', 'type': 'int'}, + 'max_recurrence': {'key': 'maxRecurrence', 'type': 'JobMaxRecurrence'}, + } + + def __init__(self, *, max_job_count: int=None, max_job_occurrence: int=None, max_recurrence=None, **kwargs) -> None: + super(JobCollectionQuota, self).__init__(**kwargs) + self.max_job_count = max_job_count + self.max_job_occurrence = max_job_occurrence + self.max_recurrence = max_recurrence diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition.py index 2a17177feabf..43aa06dd41a0 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition.py @@ -25,8 +25,7 @@ class JobDefinition(Model): :ivar name: Gets the job resource name. :vartype name: str :param properties: Gets or sets the job properties. - :type properties: :class:`JobProperties - ` + :type properties: ~azure.mgmt.scheduler.models.JobProperties """ _validation = { @@ -42,8 +41,9 @@ class JobDefinition(Model): 'properties': {'key': 'properties', 'type': 'JobProperties'}, } - def __init__(self, properties=None): + def __init__(self, **kwargs): + super(JobDefinition, self).__init__(**kwargs) self.id = None self.type = None self.name = None - self.properties = properties + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_paged.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_paged.py index 49be62a84990..e783c67a39dc 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_paged.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_paged.py @@ -14,7 +14,7 @@ class JobDefinitionPaged(Paged): """ - A paging container for iterating over a list of JobDefinition object + A paging container for iterating over a list of :class:`JobDefinition ` object """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_py3.py new file mode 100644 index 000000000000..615e8d334fd9 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobDefinition(Model): + """JobDefinition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the job resource identifier. + :vartype id: str + :ivar type: Gets the job resource type. + :vartype type: str + :ivar name: Gets the job resource name. + :vartype name: str + :param properties: Gets or sets the job properties. + :type properties: ~azure.mgmt.scheduler.models.JobProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'JobProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(JobDefinition, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.properties = properties diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action.py index fb17bac70aba..694d7f7dd1c6 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action.py @@ -18,25 +18,21 @@ class JobErrorAction(Model): :param type: Gets or sets the job error action type. Possible values include: 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', 'ServiceBusTopic' - :type type: str or :class:`JobActionType - ` + :type type: str or ~azure.mgmt.scheduler.models.JobActionType :param request: Gets or sets the http requests. - :type request: :class:`HttpRequest - ` + :type request: ~azure.mgmt.scheduler.models.HttpRequest :param queue_message: Gets or sets the storage queue message. - :type queue_message: :class:`StorageQueueMessage - ` + :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage :param service_bus_queue_message: Gets or sets the service bus queue message. - :type service_bus_queue_message: :class:`ServiceBusQueueMessage - ` + :type service_bus_queue_message: + ~azure.mgmt.scheduler.models.ServiceBusQueueMessage :param service_bus_topic_message: Gets or sets the service bus topic message. - :type service_bus_topic_message: :class:`ServiceBusTopicMessage - ` + :type service_bus_topic_message: + ~azure.mgmt.scheduler.models.ServiceBusTopicMessage :param retry_policy: Gets or sets the retry policy. - :type retry_policy: :class:`RetryPolicy - ` + :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy """ _attribute_map = { @@ -48,10 +44,11 @@ class JobErrorAction(Model): 'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'}, } - def __init__(self, type=None, request=None, queue_message=None, service_bus_queue_message=None, service_bus_topic_message=None, retry_policy=None): - self.type = type - self.request = request - self.queue_message = queue_message - self.service_bus_queue_message = service_bus_queue_message - self.service_bus_topic_message = service_bus_topic_message - self.retry_policy = retry_policy + def __init__(self, **kwargs): + super(JobErrorAction, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.request = kwargs.get('request', None) + self.queue_message = kwargs.get('queue_message', None) + self.service_bus_queue_message = kwargs.get('service_bus_queue_message', None) + self.service_bus_topic_message = kwargs.get('service_bus_topic_message', None) + self.retry_policy = kwargs.get('retry_policy', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action_py3.py new file mode 100644 index 000000000000..1366ceeda294 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobErrorAction(Model): + """JobErrorAction. + + :param type: Gets or sets the job error action type. Possible values + include: 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', + 'ServiceBusTopic' + :type type: str or ~azure.mgmt.scheduler.models.JobActionType + :param request: Gets or sets the http requests. + :type request: ~azure.mgmt.scheduler.models.HttpRequest + :param queue_message: Gets or sets the storage queue message. + :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage + :param service_bus_queue_message: Gets or sets the service bus queue + message. + :type service_bus_queue_message: + ~azure.mgmt.scheduler.models.ServiceBusQueueMessage + :param service_bus_topic_message: Gets or sets the service bus topic + message. + :type service_bus_topic_message: + ~azure.mgmt.scheduler.models.ServiceBusTopicMessage + :param retry_policy: Gets or sets the retry policy. + :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'JobActionType'}, + 'request': {'key': 'request', 'type': 'HttpRequest'}, + 'queue_message': {'key': 'queueMessage', 'type': 'StorageQueueMessage'}, + 'service_bus_queue_message': {'key': 'serviceBusQueueMessage', 'type': 'ServiceBusQueueMessage'}, + 'service_bus_topic_message': {'key': 'serviceBusTopicMessage', 'type': 'ServiceBusTopicMessage'}, + 'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'}, + } + + def __init__(self, *, type=None, request=None, queue_message=None, service_bus_queue_message=None, service_bus_topic_message=None, retry_policy=None, **kwargs) -> None: + super(JobErrorAction, self).__init__(**kwargs) + self.type = type + self.request = request + self.queue_message = queue_message + self.service_bus_queue_message = service_bus_queue_message + self.service_bus_topic_message = service_bus_topic_message + self.retry_policy = retry_policy diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition.py index cfb2438e619e..ddfbf24033fd 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition.py @@ -25,8 +25,8 @@ class JobHistoryDefinition(Model): :ivar name: Gets the job history name. :vartype name: str :ivar properties: Gets or sets the job history properties. - :vartype properties: :class:`JobHistoryDefinitionProperties - ` + :vartype properties: + ~azure.mgmt.scheduler.models.JobHistoryDefinitionProperties """ _validation = { @@ -43,7 +43,8 @@ class JobHistoryDefinition(Model): 'properties': {'key': 'properties', 'type': 'JobHistoryDefinitionProperties'}, } - def __init__(self): + def __init__(self, **kwargs): + super(JobHistoryDefinition, self).__init__(**kwargs) self.id = None self.type = None self.name = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_paged.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_paged.py index ef40ea946ce0..8b9ba23980bb 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_paged.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_paged.py @@ -14,7 +14,7 @@ class JobHistoryDefinitionPaged(Paged): """ - A paging container for iterating over a list of JobHistoryDefinition object + A paging container for iterating over a list of :class:`JobHistoryDefinition ` object """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties.py index 021b542d6ee8..2407b6ba4959 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties.py @@ -27,12 +27,11 @@ class JobHistoryDefinitionProperties(Model): :vartype expected_execution_time: datetime :ivar action_name: Gets the job history action name. Possible values include: 'MainAction', 'ErrorAction' - :vartype action_name: str or :class:`JobHistoryActionName - ` + :vartype action_name: str or + ~azure.mgmt.scheduler.models.JobHistoryActionName :ivar status: Gets the job history status. Possible values include: 'Completed', 'Failed', 'Postponed' - :vartype status: str or :class:`JobExecutionStatus - ` + :vartype status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus :ivar message: Gets the message for the job history. :vartype message: str :ivar retry_count: Gets the retry count for job. @@ -63,7 +62,8 @@ class JobHistoryDefinitionProperties(Model): 'repeat_count': {'key': 'repeatCount', 'type': 'int'}, } - def __init__(self): + def __init__(self, **kwargs): + super(JobHistoryDefinitionProperties, self).__init__(**kwargs) self.start_time = None self.end_time = None self.expected_execution_time = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties_py3.py new file mode 100644 index 000000000000..16bf8c9ab82f --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties_py3.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobHistoryDefinitionProperties(Model): + """JobHistoryDefinitionProperties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: Gets the start time for this job. + :vartype start_time: datetime + :ivar end_time: Gets the end time for this job. + :vartype end_time: datetime + :ivar expected_execution_time: Gets the expected execution time for this + job. + :vartype expected_execution_time: datetime + :ivar action_name: Gets the job history action name. Possible values + include: 'MainAction', 'ErrorAction' + :vartype action_name: str or + ~azure.mgmt.scheduler.models.JobHistoryActionName + :ivar status: Gets the job history status. Possible values include: + 'Completed', 'Failed', 'Postponed' + :vartype status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus + :ivar message: Gets the message for the job history. + :vartype message: str + :ivar retry_count: Gets the retry count for job. + :vartype retry_count: int + :ivar repeat_count: Gets the repeat count for the job. + :vartype repeat_count: int + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'expected_execution_time': {'readonly': True}, + 'action_name': {'readonly': True}, + 'status': {'readonly': True}, + 'message': {'readonly': True}, + 'retry_count': {'readonly': True}, + 'repeat_count': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'expected_execution_time': {'key': 'expectedExecutionTime', 'type': 'iso-8601'}, + 'action_name': {'key': 'actionName', 'type': 'JobHistoryActionName'}, + 'status': {'key': 'status', 'type': 'JobExecutionStatus'}, + 'message': {'key': 'message', 'type': 'str'}, + 'retry_count': {'key': 'retryCount', 'type': 'int'}, + 'repeat_count': {'key': 'repeatCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(JobHistoryDefinitionProperties, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.expected_execution_time = None + self.action_name = None + self.status = None + self.message = None + self.retry_count = None + self.repeat_count = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_py3.py new file mode 100644 index 000000000000..a817c1564d9f --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobHistoryDefinition(Model): + """JobHistoryDefinition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the job history identifier. + :vartype id: str + :ivar type: Gets the job history resource type. + :vartype type: str + :ivar name: Gets the job history name. + :vartype name: str + :ivar properties: Gets or sets the job history properties. + :vartype properties: + ~azure.mgmt.scheduler.models.JobHistoryDefinitionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'JobHistoryDefinitionProperties'}, + } + + def __init__(self, **kwargs) -> None: + super(JobHistoryDefinition, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.properties = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter.py index 82e1f8117b46..639744652f8b 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter.py @@ -17,13 +17,13 @@ class JobHistoryFilter(Model): :param status: Gets or sets the job execution status. Possible values include: 'Completed', 'Failed', 'Postponed' - :type status: str or :class:`JobExecutionStatus - ` + :type status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus """ _attribute_map = { 'status': {'key': 'status', 'type': 'JobExecutionStatus'}, } - def __init__(self, status=None): - self.status = status + def __init__(self, **kwargs): + super(JobHistoryFilter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter_py3.py new file mode 100644 index 000000000000..11405033790b --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobHistoryFilter(Model): + """JobHistoryFilter. + + :param status: Gets or sets the job execution status. Possible values + include: 'Completed', 'Failed', 'Postponed' + :type status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'JobExecutionStatus'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(JobHistoryFilter, self).__init__(**kwargs) + self.status = status diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence.py index de4df60d8070..6ef23f562526 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence.py @@ -18,8 +18,7 @@ class JobMaxRecurrence(Model): :param frequency: Gets or sets the frequency of recurrence (second, minute, hour, day, week, month). Possible values include: 'Minute', 'Hour', 'Day', 'Week', 'Month' - :type frequency: str or :class:`RecurrenceFrequency - ` + :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency :param interval: Gets or sets the interval between retries. :type interval: int """ @@ -29,6 +28,7 @@ class JobMaxRecurrence(Model): 'interval': {'key': 'interval', 'type': 'int'}, } - def __init__(self, frequency=None, interval=None): - self.frequency = frequency - self.interval = interval + def __init__(self, **kwargs): + super(JobMaxRecurrence, self).__init__(**kwargs) + self.frequency = kwargs.get('frequency', None) + self.interval = kwargs.get('interval', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence_py3.py new file mode 100644 index 000000000000..99610d36f731 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobMaxRecurrence(Model): + """JobMaxRecurrence. + + :param frequency: Gets or sets the frequency of recurrence (second, + minute, hour, day, week, month). Possible values include: 'Minute', + 'Hour', 'Day', 'Week', 'Month' + :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency + :param interval: Gets or sets the interval between retries. + :type interval: int + """ + + _attribute_map = { + 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, + 'interval': {'key': 'interval', 'type': 'int'}, + } + + def __init__(self, *, frequency=None, interval: int=None, **kwargs) -> None: + super(JobMaxRecurrence, self).__init__(**kwargs) + self.frequency = frequency + self.interval = interval diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties.py index 857d3bd1cc2d..e391027f2b83 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties.py @@ -21,17 +21,14 @@ class JobProperties(Model): :param start_time: Gets or sets the job start time. :type start_time: datetime :param action: Gets or sets the job action. - :type action: :class:`JobAction ` + :type action: ~azure.mgmt.scheduler.models.JobAction :param recurrence: Gets or sets the job recurrence. - :type recurrence: :class:`JobRecurrence - ` + :type recurrence: ~azure.mgmt.scheduler.models.JobRecurrence :param state: Gets or set the job state. Possible values include: 'Enabled', 'Disabled', 'Faulted', 'Completed' - :type state: str or :class:`JobState - ` + :type state: str or ~azure.mgmt.scheduler.models.JobState :ivar status: Gets the job status. - :vartype status: :class:`JobStatus - ` + :vartype status: ~azure.mgmt.scheduler.models.JobStatus """ _validation = { @@ -46,9 +43,10 @@ class JobProperties(Model): 'status': {'key': 'status', 'type': 'JobStatus'}, } - def __init__(self, start_time=None, action=None, recurrence=None, state=None): - self.start_time = start_time - self.action = action - self.recurrence = recurrence - self.state = state + def __init__(self, **kwargs): + super(JobProperties, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.action = kwargs.get('action', None) + self.recurrence = kwargs.get('recurrence', None) + self.state = kwargs.get('state', None) self.status = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties_py3.py new file mode 100644 index 000000000000..2ba86cf5e7e7 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobProperties(Model): + """JobProperties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param start_time: Gets or sets the job start time. + :type start_time: datetime + :param action: Gets or sets the job action. + :type action: ~azure.mgmt.scheduler.models.JobAction + :param recurrence: Gets or sets the job recurrence. + :type recurrence: ~azure.mgmt.scheduler.models.JobRecurrence + :param state: Gets or set the job state. Possible values include: + 'Enabled', 'Disabled', 'Faulted', 'Completed' + :type state: str or ~azure.mgmt.scheduler.models.JobState + :ivar status: Gets the job status. + :vartype status: ~azure.mgmt.scheduler.models.JobStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'JobAction'}, + 'recurrence': {'key': 'recurrence', 'type': 'JobRecurrence'}, + 'state': {'key': 'state', 'type': 'JobState'}, + 'status': {'key': 'status', 'type': 'JobStatus'}, + } + + def __init__(self, *, start_time=None, action=None, recurrence=None, state=None, **kwargs) -> None: + super(JobProperties, self).__init__(**kwargs) + self.start_time = start_time + self.action = action + self.recurrence = recurrence + self.state = state + self.status = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence.py index 0e86ef2cb99c..18ee514fd9db 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence.py @@ -18,8 +18,7 @@ class JobRecurrence(Model): :param frequency: Gets or sets the frequency of recurrence (second, minute, hour, day, week, month). Possible values include: 'Minute', 'Hour', 'Day', 'Week', 'Month' - :type frequency: str or :class:`RecurrenceFrequency - ` + :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency :param interval: Gets or sets the interval between retries. :type interval: int :param count: Gets or sets the maximum number of times that the job should @@ -28,8 +27,7 @@ class JobRecurrence(Model): :param end_time: Gets or sets the time at which the job will complete. :type end_time: datetime :param schedule: - :type schedule: :class:`JobRecurrenceSchedule - ` + :type schedule: ~azure.mgmt.scheduler.models.JobRecurrenceSchedule """ _attribute_map = { @@ -40,9 +38,10 @@ class JobRecurrence(Model): 'schedule': {'key': 'schedule', 'type': 'JobRecurrenceSchedule'}, } - def __init__(self, frequency=None, interval=None, count=None, end_time=None, schedule=None): - self.frequency = frequency - self.interval = interval - self.count = count - self.end_time = end_time - self.schedule = schedule + def __init__(self, **kwargs): + super(JobRecurrence, self).__init__(**kwargs) + self.frequency = kwargs.get('frequency', None) + self.interval = kwargs.get('interval', None) + self.count = kwargs.get('count', None) + self.end_time = kwargs.get('end_time', None) + self.schedule = kwargs.get('schedule', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_py3.py new file mode 100644 index 000000000000..3c31d7532d31 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobRecurrence(Model): + """JobRecurrence. + + :param frequency: Gets or sets the frequency of recurrence (second, + minute, hour, day, week, month). Possible values include: 'Minute', + 'Hour', 'Day', 'Week', 'Month' + :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency + :param interval: Gets or sets the interval between retries. + :type interval: int + :param count: Gets or sets the maximum number of times that the job should + run. + :type count: int + :param end_time: Gets or sets the time at which the job will complete. + :type end_time: datetime + :param schedule: + :type schedule: ~azure.mgmt.scheduler.models.JobRecurrenceSchedule + """ + + _attribute_map = { + 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, + 'interval': {'key': 'interval', 'type': 'int'}, + 'count': {'key': 'count', 'type': 'int'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'schedule': {'key': 'schedule', 'type': 'JobRecurrenceSchedule'}, + } + + def __init__(self, *, frequency=None, interval: int=None, count: int=None, end_time=None, schedule=None, **kwargs) -> None: + super(JobRecurrence, self).__init__(**kwargs) + self.frequency = frequency + self.interval = interval + self.count = count + self.end_time = end_time + self.schedule = schedule diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule.py index 7eca2cbdf7b8..65f649ba0ab7 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule.py @@ -17,22 +17,20 @@ class JobRecurrenceSchedule(Model): :param week_days: Gets or sets the days of the week that the job should execute on. - :type week_days: list of str or :class:`DayOfWeek - ` + :type week_days: list[str or ~azure.mgmt.scheduler.models.DayOfWeek] :param hours: Gets or sets the hours of the day that the job should execute at. - :type hours: list of int + :type hours: list[int] :param minutes: Gets or sets the minutes of the hour that the job should execute at. - :type minutes: list of int + :type minutes: list[int] :param month_days: Gets or sets the days of the month that the job should execute on. Must be between 1 and 31. - :type month_days: list of int + :type month_days: list[int] :param monthly_occurrences: Gets or sets the occurrences of days within a month. - :type monthly_occurrences: list of - :class:`JobRecurrenceScheduleMonthlyOccurrence - ` + :type monthly_occurrences: + list[~azure.mgmt.scheduler.models.JobRecurrenceScheduleMonthlyOccurrence] """ _attribute_map = { @@ -43,9 +41,10 @@ class JobRecurrenceSchedule(Model): 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[JobRecurrenceScheduleMonthlyOccurrence]'}, } - def __init__(self, week_days=None, hours=None, minutes=None, month_days=None, monthly_occurrences=None): - self.week_days = week_days - self.hours = hours - self.minutes = minutes - self.month_days = month_days - self.monthly_occurrences = monthly_occurrences + def __init__(self, **kwargs): + super(JobRecurrenceSchedule, self).__init__(**kwargs) + self.week_days = kwargs.get('week_days', None) + self.hours = kwargs.get('hours', None) + self.minutes = kwargs.get('minutes', None) + self.month_days = kwargs.get('month_days', None) + self.monthly_occurrences = kwargs.get('monthly_occurrences', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence.py index 7ae07cd7388f..83aff7b198fa 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence.py @@ -19,8 +19,7 @@ class JobRecurrenceScheduleMonthlyOccurrence(Model): wednesday, thursday, friday, saturday, sunday. Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' - :type day: str or :class:`JobScheduleDay - ` + :type day: str or ~azure.mgmt.scheduler.models.JobScheduleDay :param occurrence: Gets or sets the occurrence. Must be between -5 and 5. :type occurrence: int """ @@ -30,6 +29,7 @@ class JobRecurrenceScheduleMonthlyOccurrence(Model): 'occurrence': {'key': 'Occurrence', 'type': 'int'}, } - def __init__(self, day=None, occurrence=None): - self.day = day - self.occurrence = occurrence + def __init__(self, **kwargs): + super(JobRecurrenceScheduleMonthlyOccurrence, self).__init__(**kwargs) + self.day = kwargs.get('day', None) + self.occurrence = kwargs.get('occurrence', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence_py3.py new file mode 100644 index 000000000000..10d21464a9f5 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobRecurrenceScheduleMonthlyOccurrence(Model): + """JobRecurrenceScheduleMonthlyOccurrence. + + :param day: Gets or sets the day. Must be one of monday, tuesday, + wednesday, thursday, friday, saturday, sunday. Possible values include: + 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', + 'Sunday' + :type day: str or ~azure.mgmt.scheduler.models.JobScheduleDay + :param occurrence: Gets or sets the occurrence. Must be between -5 and 5. + :type occurrence: int + """ + + _attribute_map = { + 'day': {'key': 'day', 'type': 'JobScheduleDay'}, + 'occurrence': {'key': 'Occurrence', 'type': 'int'}, + } + + def __init__(self, *, day=None, occurrence: int=None, **kwargs) -> None: + super(JobRecurrenceScheduleMonthlyOccurrence, self).__init__(**kwargs) + self.day = day + self.occurrence = occurrence diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_py3.py new file mode 100644 index 000000000000..c8c5db61c26f --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobRecurrenceSchedule(Model): + """JobRecurrenceSchedule. + + :param week_days: Gets or sets the days of the week that the job should + execute on. + :type week_days: list[str or ~azure.mgmt.scheduler.models.DayOfWeek] + :param hours: Gets or sets the hours of the day that the job should + execute at. + :type hours: list[int] + :param minutes: Gets or sets the minutes of the hour that the job should + execute at. + :type minutes: list[int] + :param month_days: Gets or sets the days of the month that the job should + execute on. Must be between 1 and 31. + :type month_days: list[int] + :param monthly_occurrences: Gets or sets the occurrences of days within a + month. + :type monthly_occurrences: + list[~azure.mgmt.scheduler.models.JobRecurrenceScheduleMonthlyOccurrence] + """ + + _attribute_map = { + 'week_days': {'key': 'weekDays', 'type': '[DayOfWeek]'}, + 'hours': {'key': 'hours', 'type': '[int]'}, + 'minutes': {'key': 'minutes', 'type': '[int]'}, + 'month_days': {'key': 'monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[JobRecurrenceScheduleMonthlyOccurrence]'}, + } + + def __init__(self, *, week_days=None, hours=None, minutes=None, month_days=None, monthly_occurrences=None, **kwargs) -> None: + super(JobRecurrenceSchedule, self).__init__(**kwargs) + self.week_days = week_days + self.hours = hours + self.minutes = minutes + self.month_days = month_days + self.monthly_occurrences = monthly_occurrences diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter.py index 692c1d68bb11..bd8ef19f362a 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter.py @@ -17,13 +17,13 @@ class JobStateFilter(Model): :param state: Gets or sets the job state. Possible values include: 'Enabled', 'Disabled', 'Faulted', 'Completed' - :type state: str or :class:`JobState - ` + :type state: str or ~azure.mgmt.scheduler.models.JobState """ _attribute_map = { 'state': {'key': 'state', 'type': 'JobState'}, } - def __init__(self, state=None): - self.state = state + def __init__(self, **kwargs): + super(JobStateFilter, self).__init__(**kwargs) + self.state = kwargs.get('state', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter_py3.py new file mode 100644 index 000000000000..fb20c11bf6db --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobStateFilter(Model): + """JobStateFilter. + + :param state: Gets or sets the job state. Possible values include: + 'Enabled', 'Disabled', 'Faulted', 'Completed' + :type state: str or ~azure.mgmt.scheduler.models.JobState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'JobState'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(JobStateFilter, self).__init__(**kwargs) + self.state = state diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status.py index 7c0b8ab49f0e..a7fc4b64e49d 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status.py @@ -49,7 +49,8 @@ class JobStatus(Model): 'next_execution_time': {'key': 'nextExecutionTime', 'type': 'iso-8601'}, } - def __init__(self): + def __init__(self, **kwargs): + super(JobStatus, self).__init__(**kwargs) self.execution_count = None self.failure_count = None self.faulted_count = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status_py3.py new file mode 100644 index 000000000000..8b1711b8a203 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobStatus(Model): + """JobStatus. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar execution_count: Gets the number of times this job has executed. + :vartype execution_count: int + :ivar failure_count: Gets the number of times this job has failed. + :vartype failure_count: int + :ivar faulted_count: Gets the number of faulted occurrences (occurrences + that were retried and failed as many times as the retry policy states). + :vartype faulted_count: int + :ivar last_execution_time: Gets the time the last occurrence executed in + ISO-8601 format. Could be empty if job has not run yet. + :vartype last_execution_time: datetime + :ivar next_execution_time: Gets the time of the next occurrence in + ISO-8601 format. Could be empty if the job is completed. + :vartype next_execution_time: datetime + """ + + _validation = { + 'execution_count': {'readonly': True}, + 'failure_count': {'readonly': True}, + 'faulted_count': {'readonly': True}, + 'last_execution_time': {'readonly': True}, + 'next_execution_time': {'readonly': True}, + } + + _attribute_map = { + 'execution_count': {'key': 'executionCount', 'type': 'int'}, + 'failure_count': {'key': 'failureCount', 'type': 'int'}, + 'faulted_count': {'key': 'faultedCount', 'type': 'int'}, + 'last_execution_time': {'key': 'lastExecutionTime', 'type': 'iso-8601'}, + 'next_execution_time': {'key': 'nextExecutionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(JobStatus, self).__init__(**kwargs) + self.execution_count = None + self.failure_count = None + self.faulted_count = None + self.last_execution_time = None + self.next_execution_time = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication.py index 777ac4bdb310..3e7bda06cbb1 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication.py @@ -15,11 +15,10 @@ class OAuthAuthentication(HttpAuthentication): """OAuthAuthentication. - :param type: Gets or sets the HTTP authentication type. Possible values - include: 'NotSpecified', 'ClientCertificate', 'ActiveDirectoryOAuth', - 'Basic' - :type type: str or :class:`HttpAuthenticationType - ` + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str :param secret: Gets or sets the secret, return value will always be empty. :type secret: str :param tenant: Gets or sets the tenant. @@ -30,17 +29,22 @@ class OAuthAuthentication(HttpAuthentication): :type client_id: str """ + _validation = { + 'type': {'required': True}, + } + _attribute_map = { - 'type': {'key': 'type', 'type': 'HttpAuthenticationType'}, + 'type': {'key': 'type', 'type': 'str'}, 'secret': {'key': 'secret', 'type': 'str'}, 'tenant': {'key': 'tenant', 'type': 'str'}, 'audience': {'key': 'audience', 'type': 'str'}, 'client_id': {'key': 'clientId', 'type': 'str'}, } - def __init__(self, type=None, secret=None, tenant=None, audience=None, client_id=None): - super(OAuthAuthentication, self).__init__(type=type) - self.secret = secret - self.tenant = tenant - self.audience = audience - self.client_id = client_id + def __init__(self, **kwargs): + super(OAuthAuthentication, self).__init__(**kwargs) + self.secret = kwargs.get('secret', None) + self.tenant = kwargs.get('tenant', None) + self.audience = kwargs.get('audience', None) + self.client_id = kwargs.get('client_id', None) + self.type = 'ActiveDirectoryOAuth' diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication_py3.py new file mode 100644 index 000000000000..98780009a542 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .http_authentication_py3 import HttpAuthentication + + +class OAuthAuthentication(HttpAuthentication): + """OAuthAuthentication. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param secret: Gets or sets the secret, return value will always be empty. + :type secret: str + :param tenant: Gets or sets the tenant. + :type tenant: str + :param audience: Gets or sets the audience. + :type audience: str + :param client_id: Gets or sets the client identifier. + :type client_id: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + 'tenant': {'key': 'tenant', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, *, secret: str=None, tenant: str=None, audience: str=None, client_id: str=None, **kwargs) -> None: + super(OAuthAuthentication, self).__init__(**kwargs) + self.secret = secret + self.tenant = tenant + self.audience = audience + self.client_id = client_id + self.type = 'ActiveDirectoryOAuth' diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy.py index 1a9cd22db149..d3f82083878a 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy.py @@ -17,8 +17,7 @@ class RetryPolicy(Model): :param retry_type: Gets or sets the retry strategy to be used. Possible values include: 'None', 'Fixed' - :type retry_type: str or :class:`RetryType - ` + :type retry_type: str or ~azure.mgmt.scheduler.models.RetryType :param retry_interval: Gets or sets the retry interval between retries, specify duration in ISO 8601 format. :type retry_interval: timedelta @@ -33,7 +32,8 @@ class RetryPolicy(Model): 'retry_count': {'key': 'retryCount', 'type': 'int'}, } - def __init__(self, retry_type=None, retry_interval=None, retry_count=None): - self.retry_type = retry_type - self.retry_interval = retry_interval - self.retry_count = retry_count + def __init__(self, **kwargs): + super(RetryPolicy, self).__init__(**kwargs) + self.retry_type = kwargs.get('retry_type', None) + self.retry_interval = kwargs.get('retry_interval', None) + self.retry_count = kwargs.get('retry_count', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy_py3.py new file mode 100644 index 000000000000..a68534d382a6 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RetryPolicy(Model): + """RetryPolicy. + + :param retry_type: Gets or sets the retry strategy to be used. Possible + values include: 'None', 'Fixed' + :type retry_type: str or ~azure.mgmt.scheduler.models.RetryType + :param retry_interval: Gets or sets the retry interval between retries, + specify duration in ISO 8601 format. + :type retry_interval: timedelta + :param retry_count: Gets or sets the number of times a retry should be + attempted. + :type retry_count: int + """ + + _attribute_map = { + 'retry_type': {'key': 'retryType', 'type': 'RetryType'}, + 'retry_interval': {'key': 'retryInterval', 'type': 'duration'}, + 'retry_count': {'key': 'retryCount', 'type': 'int'}, + } + + def __init__(self, *, retry_type=None, retry_interval=None, retry_count: int=None, **kwargs) -> None: + super(RetryPolicy, self).__init__(**kwargs) + self.retry_type = retry_type + self.retry_interval = retry_interval + self.retry_count = retry_count diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/scheduler_management_client_enums.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/scheduler_management_client_enums.py index de93816e54cd..82ace50befd5 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/scheduler_management_client_enums.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/scheduler_management_client_enums.py @@ -12,7 +12,7 @@ from enum import Enum -class SkuDefinition(Enum): +class SkuDefinition(str, Enum): standard = "Standard" free = "Free" @@ -20,7 +20,7 @@ class SkuDefinition(Enum): p20_premium = "P20Premium" -class JobCollectionState(Enum): +class JobCollectionState(str, Enum): enabled = "Enabled" disabled = "Disabled" @@ -28,7 +28,7 @@ class JobCollectionState(Enum): deleted = "Deleted" -class RecurrenceFrequency(Enum): +class RecurrenceFrequency(str, Enum): minute = "Minute" hour = "Hour" @@ -37,7 +37,7 @@ class RecurrenceFrequency(Enum): month = "Month" -class JobActionType(Enum): +class JobActionType(str, Enum): http = "Http" https = "Https" @@ -46,21 +46,13 @@ class JobActionType(Enum): service_bus_topic = "ServiceBusTopic" -class HttpAuthenticationType(Enum): - - not_specified = "NotSpecified" - client_certificate = "ClientCertificate" - active_directory_oauth = "ActiveDirectoryOAuth" - basic = "Basic" - - -class RetryType(Enum): +class RetryType(str, Enum): none = "None" fixed = "Fixed" -class DayOfWeek(Enum): +class DayOfWeek(str, Enum): sunday = "Sunday" monday = "Monday" @@ -71,7 +63,7 @@ class DayOfWeek(Enum): saturday = "Saturday" -class JobScheduleDay(Enum): +class JobScheduleDay(str, Enum): monday = "Monday" tuesday = "Tuesday" @@ -82,7 +74,7 @@ class JobScheduleDay(Enum): sunday = "Sunday" -class JobState(Enum): +class JobState(str, Enum): enabled = "Enabled" disabled = "Disabled" @@ -90,26 +82,26 @@ class JobState(Enum): completed = "Completed" -class JobHistoryActionName(Enum): +class JobHistoryActionName(str, Enum): main_action = "MainAction" error_action = "ErrorAction" -class JobExecutionStatus(Enum): +class JobExecutionStatus(str, Enum): completed = "Completed" failed = "Failed" postponed = "Postponed" -class ServiceBusAuthenticationType(Enum): +class ServiceBusAuthenticationType(str, Enum): not_specified = "NotSpecified" shared_access_key = "SharedAccessKey" -class ServiceBusTransportType(Enum): +class ServiceBusTransportType(str, Enum): not_specified = "NotSpecified" net_messaging = "NetMessaging" diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication.py index 08a424a6565f..bb524a8c1114 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication.py @@ -21,8 +21,8 @@ class ServiceBusAuthentication(Model): :type sas_key_name: str :param type: Gets or sets the authentication type. Possible values include: 'NotSpecified', 'SharedAccessKey' - :type type: str or :class:`ServiceBusAuthenticationType - ` + :type type: str or + ~azure.mgmt.scheduler.models.ServiceBusAuthenticationType """ _attribute_map = { @@ -31,7 +31,8 @@ class ServiceBusAuthentication(Model): 'type': {'key': 'type', 'type': 'ServiceBusAuthenticationType'}, } - def __init__(self, sas_key=None, sas_key_name=None, type=None): - self.sas_key = sas_key - self.sas_key_name = sas_key_name - self.type = type + def __init__(self, **kwargs): + super(ServiceBusAuthentication, self).__init__(**kwargs) + self.sas_key = kwargs.get('sas_key', None) + self.sas_key_name = kwargs.get('sas_key_name', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication_py3.py new file mode 100644 index 000000000000..3cd3c85d3ed9 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceBusAuthentication(Model): + """ServiceBusAuthentication. + + :param sas_key: Gets or sets the SAS key. + :type sas_key: str + :param sas_key_name: Gets or sets the SAS key name. + :type sas_key_name: str + :param type: Gets or sets the authentication type. Possible values + include: 'NotSpecified', 'SharedAccessKey' + :type type: str or + ~azure.mgmt.scheduler.models.ServiceBusAuthenticationType + """ + + _attribute_map = { + 'sas_key': {'key': 'sasKey', 'type': 'str'}, + 'sas_key_name': {'key': 'sasKeyName', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ServiceBusAuthenticationType'}, + } + + def __init__(self, *, sas_key: str=None, sas_key_name: str=None, type=None, **kwargs) -> None: + super(ServiceBusAuthentication, self).__init__(**kwargs) + self.sas_key = sas_key + self.sas_key_name = sas_key_name + self.type = type diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties.py index 06eacf05b930..dc6b3f5eb539 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties.py @@ -60,17 +60,18 @@ class ServiceBusBrokeredMessageProperties(Model): 'via_partition_key': {'key': 'viaPartitionKey', 'type': 'str'}, } - def __init__(self, content_type=None, correlation_id=None, force_persistence=None, label=None, message_id=None, partition_key=None, reply_to=None, reply_to_session_id=None, scheduled_enqueue_time_utc=None, session_id=None, time_to_live=None, to=None, via_partition_key=None): - self.content_type = content_type - self.correlation_id = correlation_id - self.force_persistence = force_persistence - self.label = label - self.message_id = message_id - self.partition_key = partition_key - self.reply_to = reply_to - self.reply_to_session_id = reply_to_session_id - self.scheduled_enqueue_time_utc = scheduled_enqueue_time_utc - self.session_id = session_id - self.time_to_live = time_to_live - self.to = to - self.via_partition_key = via_partition_key + def __init__(self, **kwargs): + super(ServiceBusBrokeredMessageProperties, self).__init__(**kwargs) + self.content_type = kwargs.get('content_type', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.force_persistence = kwargs.get('force_persistence', None) + self.label = kwargs.get('label', None) + self.message_id = kwargs.get('message_id', None) + self.partition_key = kwargs.get('partition_key', None) + self.reply_to = kwargs.get('reply_to', None) + self.reply_to_session_id = kwargs.get('reply_to_session_id', None) + self.scheduled_enqueue_time_utc = kwargs.get('scheduled_enqueue_time_utc', None) + self.session_id = kwargs.get('session_id', None) + self.time_to_live = kwargs.get('time_to_live', None) + self.to = kwargs.get('to', None) + self.via_partition_key = kwargs.get('via_partition_key', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties_py3.py new file mode 100644 index 000000000000..70311750ff46 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties_py3.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceBusBrokeredMessageProperties(Model): + """ServiceBusBrokeredMessageProperties. + + :param content_type: Gets or sets the content type. + :type content_type: str + :param correlation_id: Gets or sets the correlation ID. + :type correlation_id: str + :param force_persistence: Gets or sets the force persistence. + :type force_persistence: bool + :param label: Gets or sets the label. + :type label: str + :param message_id: Gets or sets the message ID. + :type message_id: str + :param partition_key: Gets or sets the partition key. + :type partition_key: str + :param reply_to: Gets or sets the reply to. + :type reply_to: str + :param reply_to_session_id: Gets or sets the reply to session ID. + :type reply_to_session_id: str + :param scheduled_enqueue_time_utc: Gets or sets the scheduled enqueue time + UTC. + :type scheduled_enqueue_time_utc: datetime + :param session_id: Gets or sets the session ID. + :type session_id: str + :param time_to_live: Gets or sets the time to live. + :type time_to_live: timedelta + :param to: Gets or sets the to. + :type to: str + :param via_partition_key: Gets or sets the via partition key. + :type via_partition_key: str + """ + + _attribute_map = { + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'force_persistence': {'key': 'forcePersistence', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'partition_key': {'key': 'partitionKey', 'type': 'str'}, + 'reply_to': {'key': 'replyTo', 'type': 'str'}, + 'reply_to_session_id': {'key': 'replyToSessionId', 'type': 'str'}, + 'scheduled_enqueue_time_utc': {'key': 'scheduledEnqueueTimeUtc', 'type': 'iso-8601'}, + 'session_id': {'key': 'sessionId', 'type': 'str'}, + 'time_to_live': {'key': 'timeToLive', 'type': 'duration'}, + 'to': {'key': 'to', 'type': 'str'}, + 'via_partition_key': {'key': 'viaPartitionKey', 'type': 'str'}, + } + + def __init__(self, *, content_type: str=None, correlation_id: str=None, force_persistence: bool=None, label: str=None, message_id: str=None, partition_key: str=None, reply_to: str=None, reply_to_session_id: str=None, scheduled_enqueue_time_utc=None, session_id: str=None, time_to_live=None, to: str=None, via_partition_key: str=None, **kwargs) -> None: + super(ServiceBusBrokeredMessageProperties, self).__init__(**kwargs) + self.content_type = content_type + self.correlation_id = correlation_id + self.force_persistence = force_persistence + self.label = label + self.message_id = message_id + self.partition_key = partition_key + self.reply_to = reply_to + self.reply_to_session_id = reply_to_session_id + self.scheduled_enqueue_time_utc = scheduled_enqueue_time_utc + self.session_id = session_id + self.time_to_live = time_to_live + self.to = to + self.via_partition_key = via_partition_key diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message.py index b459c4db2c82..bb257dea5565 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message.py @@ -16,24 +16,23 @@ class ServiceBusMessage(Model): """ServiceBusMessage. :param authentication: Gets or sets the Service Bus authentication. - :type authentication: :class:`ServiceBusAuthentication - ` + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication :param brokered_message_properties: Gets or sets the brokered message properties. :type brokered_message_properties: - :class:`ServiceBusBrokeredMessageProperties - ` + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties :param custom_message_properties: Gets or sets the custom message properties. - :type custom_message_properties: dict + :type custom_message_properties: dict[str, str] :param message: Gets or sets the message. :type message: str :param namespace: Gets or sets the namespace. :type namespace: str :param transport_type: Gets or sets the transport type. Possible values include: 'NotSpecified', 'NetMessaging', 'AMQP' - :type transport_type: str or :class:`ServiceBusTransportType - ` + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType """ _attribute_map = { @@ -45,10 +44,11 @@ class ServiceBusMessage(Model): 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, } - def __init__(self, authentication=None, brokered_message_properties=None, custom_message_properties=None, message=None, namespace=None, transport_type=None): - self.authentication = authentication - self.brokered_message_properties = brokered_message_properties - self.custom_message_properties = custom_message_properties - self.message = message - self.namespace = namespace - self.transport_type = transport_type + def __init__(self, **kwargs): + super(ServiceBusMessage, self).__init__(**kwargs) + self.authentication = kwargs.get('authentication', None) + self.brokered_message_properties = kwargs.get('brokered_message_properties', None) + self.custom_message_properties = kwargs.get('custom_message_properties', None) + self.message = kwargs.get('message', None) + self.namespace = kwargs.get('namespace', None) + self.transport_type = kwargs.get('transport_type', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message_py3.py new file mode 100644 index 000000000000..09e8d477dd17 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceBusMessage(Model): + """ServiceBusMessage. + + :param authentication: Gets or sets the Service Bus authentication. + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication + :param brokered_message_properties: Gets or sets the brokered message + properties. + :type brokered_message_properties: + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties + :param custom_message_properties: Gets or sets the custom message + properties. + :type custom_message_properties: dict[str, str] + :param message: Gets or sets the message. + :type message: str + :param namespace: Gets or sets the namespace. + :type namespace: str + :param transport_type: Gets or sets the transport type. Possible values + include: 'NotSpecified', 'NetMessaging', 'AMQP' + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType + """ + + _attribute_map = { + 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, + 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, + 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, + } + + def __init__(self, *, authentication=None, brokered_message_properties=None, custom_message_properties=None, message: str=None, namespace: str=None, transport_type=None, **kwargs) -> None: + super(ServiceBusMessage, self).__init__(**kwargs) + self.authentication = authentication + self.brokered_message_properties = brokered_message_properties + self.custom_message_properties = custom_message_properties + self.message = message + self.namespace = namespace + self.transport_type = transport_type diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message.py index 3ad865a294e5..7650cffd2caa 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message.py @@ -16,24 +16,23 @@ class ServiceBusQueueMessage(ServiceBusMessage): """ServiceBusQueueMessage. :param authentication: Gets or sets the Service Bus authentication. - :type authentication: :class:`ServiceBusAuthentication - ` + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication :param brokered_message_properties: Gets or sets the brokered message properties. :type brokered_message_properties: - :class:`ServiceBusBrokeredMessageProperties - ` + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties :param custom_message_properties: Gets or sets the custom message properties. - :type custom_message_properties: dict + :type custom_message_properties: dict[str, str] :param message: Gets or sets the message. :type message: str :param namespace: Gets or sets the namespace. :type namespace: str :param transport_type: Gets or sets the transport type. Possible values include: 'NotSpecified', 'NetMessaging', 'AMQP' - :type transport_type: str or :class:`ServiceBusTransportType - ` + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType :param queue_name: Gets or sets the queue name. :type queue_name: str """ @@ -48,6 +47,6 @@ class ServiceBusQueueMessage(ServiceBusMessage): 'queue_name': {'key': 'queueName', 'type': 'str'}, } - def __init__(self, authentication=None, brokered_message_properties=None, custom_message_properties=None, message=None, namespace=None, transport_type=None, queue_name=None): - super(ServiceBusQueueMessage, self).__init__(authentication=authentication, brokered_message_properties=brokered_message_properties, custom_message_properties=custom_message_properties, message=message, namespace=namespace, transport_type=transport_type) - self.queue_name = queue_name + def __init__(self, **kwargs): + super(ServiceBusQueueMessage, self).__init__(**kwargs) + self.queue_name = kwargs.get('queue_name', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message_py3.py new file mode 100644 index 000000000000..1ecd14fb7d6a --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_bus_message_py3 import ServiceBusMessage + + +class ServiceBusQueueMessage(ServiceBusMessage): + """ServiceBusQueueMessage. + + :param authentication: Gets or sets the Service Bus authentication. + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication + :param brokered_message_properties: Gets or sets the brokered message + properties. + :type brokered_message_properties: + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties + :param custom_message_properties: Gets or sets the custom message + properties. + :type custom_message_properties: dict[str, str] + :param message: Gets or sets the message. + :type message: str + :param namespace: Gets or sets the namespace. + :type namespace: str + :param transport_type: Gets or sets the transport type. Possible values + include: 'NotSpecified', 'NetMessaging', 'AMQP' + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType + :param queue_name: Gets or sets the queue name. + :type queue_name: str + """ + + _attribute_map = { + 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, + 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, + 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + } + + def __init__(self, *, authentication=None, brokered_message_properties=None, custom_message_properties=None, message: str=None, namespace: str=None, transport_type=None, queue_name: str=None, **kwargs) -> None: + super(ServiceBusQueueMessage, self).__init__(authentication=authentication, brokered_message_properties=brokered_message_properties, custom_message_properties=custom_message_properties, message=message, namespace=namespace, transport_type=transport_type, **kwargs) + self.queue_name = queue_name diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message.py index 8c7509524414..429f98cc0bea 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message.py @@ -16,24 +16,23 @@ class ServiceBusTopicMessage(ServiceBusMessage): """ServiceBusTopicMessage. :param authentication: Gets or sets the Service Bus authentication. - :type authentication: :class:`ServiceBusAuthentication - ` + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication :param brokered_message_properties: Gets or sets the brokered message properties. :type brokered_message_properties: - :class:`ServiceBusBrokeredMessageProperties - ` + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties :param custom_message_properties: Gets or sets the custom message properties. - :type custom_message_properties: dict + :type custom_message_properties: dict[str, str] :param message: Gets or sets the message. :type message: str :param namespace: Gets or sets the namespace. :type namespace: str :param transport_type: Gets or sets the transport type. Possible values include: 'NotSpecified', 'NetMessaging', 'AMQP' - :type transport_type: str or :class:`ServiceBusTransportType - ` + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType :param topic_path: Gets or sets the topic path. :type topic_path: str """ @@ -48,6 +47,6 @@ class ServiceBusTopicMessage(ServiceBusMessage): 'topic_path': {'key': 'topicPath', 'type': 'str'}, } - def __init__(self, authentication=None, brokered_message_properties=None, custom_message_properties=None, message=None, namespace=None, transport_type=None, topic_path=None): - super(ServiceBusTopicMessage, self).__init__(authentication=authentication, brokered_message_properties=brokered_message_properties, custom_message_properties=custom_message_properties, message=message, namespace=namespace, transport_type=transport_type) - self.topic_path = topic_path + def __init__(self, **kwargs): + super(ServiceBusTopicMessage, self).__init__(**kwargs) + self.topic_path = kwargs.get('topic_path', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message_py3.py new file mode 100644 index 000000000000..16a3862cb8f5 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_bus_message_py3 import ServiceBusMessage + + +class ServiceBusTopicMessage(ServiceBusMessage): + """ServiceBusTopicMessage. + + :param authentication: Gets or sets the Service Bus authentication. + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication + :param brokered_message_properties: Gets or sets the brokered message + properties. + :type brokered_message_properties: + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties + :param custom_message_properties: Gets or sets the custom message + properties. + :type custom_message_properties: dict[str, str] + :param message: Gets or sets the message. + :type message: str + :param namespace: Gets or sets the namespace. + :type namespace: str + :param transport_type: Gets or sets the transport type. Possible values + include: 'NotSpecified', 'NetMessaging', 'AMQP' + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType + :param topic_path: Gets or sets the topic path. + :type topic_path: str + """ + + _attribute_map = { + 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, + 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, + 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, + 'topic_path': {'key': 'topicPath', 'type': 'str'}, + } + + def __init__(self, *, authentication=None, brokered_message_properties=None, custom_message_properties=None, message: str=None, namespace: str=None, transport_type=None, topic_path: str=None, **kwargs) -> None: + super(ServiceBusTopicMessage, self).__init__(authentication=authentication, brokered_message_properties=brokered_message_properties, custom_message_properties=custom_message_properties, message=message, namespace=namespace, transport_type=transport_type, **kwargs) + self.topic_path = topic_path diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku.py index 3adba9eb4478..a0f85333a6a3 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku.py @@ -17,13 +17,13 @@ class Sku(Model): :param name: Gets or set the SKU. Possible values include: 'Standard', 'Free', 'P10Premium', 'P20Premium' - :type name: str or :class:`SkuDefinition - ` + :type name: str or ~azure.mgmt.scheduler.models.SkuDefinition """ _attribute_map = { 'name': {'key': 'name', 'type': 'SkuDefinition'}, } - def __init__(self, name=None): - self.name = name + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku_py3.py new file mode 100644 index 000000000000..ad04e60dbaf5 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """Sku. + + :param name: Gets or set the SKU. Possible values include: 'Standard', + 'Free', 'P10Premium', 'P20Premium' + :type name: str or ~azure.mgmt.scheduler.models.SkuDefinition + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuDefinition'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message.py index 04d7b5c323f4..46e6906f48d1 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message.py @@ -32,8 +32,9 @@ class StorageQueueMessage(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, storage_account=None, queue_name=None, sas_token=None, message=None): - self.storage_account = storage_account - self.queue_name = queue_name - self.sas_token = sas_token - self.message = message + def __init__(self, **kwargs): + super(StorageQueueMessage, self).__init__(**kwargs) + self.storage_account = kwargs.get('storage_account', None) + self.queue_name = kwargs.get('queue_name', None) + self.sas_token = kwargs.get('sas_token', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message_py3.py new file mode 100644 index 000000000000..f88c7a0add57 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageQueueMessage(Model): + """StorageQueueMessage. + + :param storage_account: Gets or sets the storage account name. + :type storage_account: str + :param queue_name: Gets or sets the queue name. + :type queue_name: str + :param sas_token: Gets or sets the SAS key. + :type sas_token: str + :param message: Gets or sets the message. + :type message: str + """ + + _attribute_map = { + 'storage_account': {'key': 'storageAccount', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'sas_token': {'key': 'sasToken', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, storage_account: str=None, queue_name: str=None, sas_token: str=None, message: str=None, **kwargs) -> None: + super(StorageQueueMessage, self).__init__(**kwargs) + self.storage_account = storage_account + self.queue_name = queue_name + self.sas_token = sas_token + self.message = message diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/job_collections_operations.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/job_collections_operations.py index 3528d5090fc1..ae105960fdea 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/job_collections_operations.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/job_collections_operations.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -23,10 +24,12 @@ class JobCollectionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -45,15 +48,16 @@ def list_by_subscription( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobCollectionDefinitionPaged - ` + :return: An iterator like instance of JobCollectionDefinition + :rtype: + ~azure.mgmt.scheduler.models.JobCollectionDefinitionPaged[~azure.mgmt.scheduler.models.JobCollectionDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Scheduler/jobCollections' + url = self.list_by_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -80,7 +84,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -98,6 +102,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Scheduler/jobCollections'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -110,15 +115,16 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobCollectionDefinitionPaged - ` + :return: An iterator like instance of JobCollectionDefinition + :rtype: + ~azure.mgmt.scheduler.models.JobCollectionDefinitionPaged[~azure.mgmt.scheduler.models.JobCollectionDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -146,7 +152,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -164,6 +170,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections'} def get( self, resource_group_name, job_collection_name, custom_headers=None, raw=False, **operation_config): @@ -178,14 +185,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobCollectionDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobCollectionDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobCollectionDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -209,7 +215,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -226,6 +232,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}'} def create_or_update( self, resource_group_name, job_collection_name, job_collection, custom_headers=None, raw=False, **operation_config): @@ -236,21 +243,20 @@ def create_or_update( :param job_collection_name: The job collection name. :type job_collection_name: str :param job_collection: The job collection definition. - :type job_collection: :class:`JobCollectionDefinition - ` + :type job_collection: + ~azure.mgmt.scheduler.models.JobCollectionDefinition :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobCollectionDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobCollectionDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobCollectionDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -278,7 +284,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -297,6 +303,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}'} def patch( self, resource_group_name, job_collection_name, job_collection, custom_headers=None, raw=False, **operation_config): @@ -307,21 +314,20 @@ def patch( :param job_collection_name: The job collection name. :type job_collection_name: str :param job_collection: The job collection definition. - :type job_collection: :class:`JobCollectionDefinition - ` + :type job_collection: + ~azure.mgmt.scheduler.models.JobCollectionDefinition :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobCollectionDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobCollectionDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobCollectionDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}' + url = self.patch.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -349,7 +355,7 @@ def patch( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -366,27 +372,13 @@ def patch( return client_raw_response return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}'} - def delete( - self, resource_group_name, job_collection_name, custom_headers=None, raw=False, **operation_config): - """Deletes a job collection. - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param job_collection_name: The job collection name. - :type job_collection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ + def _delete_initial( + self, resource_group_name, job_collection_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -409,61 +401,64 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - def get_long_running_output(response): + def delete( + self, resource_group_name, job_collection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a job collection. - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param job_collection_name: The job collection name. + :type job_collection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + job_collection_name=job_collection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + def get_long_running_output(response): if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}'} - def enable( - self, resource_group_name, job_collection_name, custom_headers=None, raw=False, **operation_config): - """Enables all of the jobs in the job collection. - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param job_collection_name: The job collection name. - :type job_collection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ + def _enable_initial( + self, resource_group_name, job_collection_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/enable' + url = self.enable.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -486,61 +481,64 @@ def enable( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - def get_long_running_status(status_link, headers=None): + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - def get_long_running_output(response): + def enable( + self, resource_group_name, job_collection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Enables all of the jobs in the job collection. - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param job_collection_name: The job collection name. + :type job_collection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._enable_initial( + resource_group_name=resource_group_name, + job_collection_name=job_collection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + def get_long_running_output(response): if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + enable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/enable'} - def disable( - self, resource_group_name, job_collection_name, custom_headers=None, raw=False, **operation_config): - """Disables all of the jobs in the job collection. - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param job_collection_name: The job collection name. - :type job_collection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ + def _disable_initial( + self, resource_group_name, job_collection_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/disable' + url = self.disable.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -563,37 +561,55 @@ def disable( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - def get_long_running_status(status_link, headers=None): + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - def get_long_running_output(response): + def disable( + self, resource_group_name, job_collection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Disables all of the jobs in the job collection. - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param job_collection_name: The job collection name. + :type job_collection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._disable_initial( + resource_group_name=resource_group_name, + job_collection_name=job_collection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + def get_long_running_output(response): if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + disable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/disable'} diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/jobs_operations.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/jobs_operations.py index a8a6aae1ae4a..9a25fdbae7a2 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/jobs_operations.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/jobs_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class JobsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,14 +52,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -82,7 +83,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -99,6 +100,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}'} def create_or_update( self, resource_group_name, job_collection_name, job_name, properties=None, custom_headers=None, raw=False, **operation_config): @@ -111,23 +113,21 @@ def create_or_update( :param job_name: The job name. :type job_name: str :param properties: Gets or sets the job properties. - :type properties: :class:`JobProperties - ` + :type properties: ~azure.mgmt.scheduler.models.JobProperties :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ job = models.JobDefinition(properties=properties) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -156,7 +156,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -175,6 +175,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}'} def patch( self, resource_group_name, job_collection_name, job_name, properties=None, custom_headers=None, raw=False, **operation_config): @@ -187,23 +188,21 @@ def patch( :param job_name: The job name. :type job_name: str :param properties: Gets or sets the job properties. - :type properties: :class:`JobProperties - ` + :type properties: ~azure.mgmt.scheduler.models.JobProperties :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ job = models.JobDefinition(properties=properties) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}' + url = self.patch.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -232,7 +231,7 @@ def patch( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -249,6 +248,7 @@ def patch( return client_raw_response return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}'} def delete( self, resource_group_name, job_collection_name, job_name, custom_headers=None, raw=False, **operation_config): @@ -265,13 +265,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -296,7 +295,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -306,6 +305,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}'} def run( self, resource_group_name, job_collection_name, job_name, custom_headers=None, raw=False, **operation_config): @@ -322,13 +322,12 @@ def run( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/run' + url = self.run.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -353,7 +352,7 @@ def run( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -363,6 +362,7 @@ def run( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/run'} def list( self, resource_group_name, job_collection_name, top=None, skip=None, filter=None, custom_headers=None, raw=False, **operation_config): @@ -385,15 +385,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobDefinitionPaged - ` + :return: An iterator like instance of JobDefinition + :rtype: + ~azure.mgmt.scheduler.models.JobDefinitionPaged[~azure.mgmt.scheduler.models.JobDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -428,7 +429,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -446,6 +447,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs'} def list_job_history( self, resource_group_name, job_collection_name, job_name, top=None, skip=None, filter=None, custom_headers=None, raw=False, **operation_config): @@ -470,15 +472,16 @@ def list_job_history( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobHistoryDefinitionPaged - ` + :return: An iterator like instance of JobHistoryDefinition + :rtype: + ~azure.mgmt.scheduler.models.JobHistoryDefinitionPaged[~azure.mgmt.scheduler.models.JobHistoryDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/history' + url = self.list_job_history.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -514,7 +517,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -532,3 +535,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/history'} diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/scheduler_management_client.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/scheduler_management_client.py index e78a1c6cabea..d2b479f5e98b 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/scheduler_management_client.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/scheduler_management_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -39,30 +39,28 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(SchedulerManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('schedulermanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-scheduler/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class SchedulerManagementClient(object): +class SchedulerManagementClient(SDKClient): """SchedulerManagementClient :ivar config: Configuration for client. :vartype config: SchedulerManagementClientConfiguration :ivar job_collections: JobCollections operations - :vartype job_collections: .operations.JobCollectionsOperations + :vartype job_collections: azure.mgmt.scheduler.operations.JobCollectionsOperations :ivar jobs: Jobs operations - :vartype jobs: .operations.JobsOperations + :vartype jobs: azure.mgmt.scheduler.operations.JobsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -76,7 +74,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = SchedulerManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(SchedulerManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '2016-03-01' diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/version.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/version.py index ba555a9074f2..53c4c7ea05e8 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/version.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.1.3" +VERSION = "2.0.0" diff --git a/azure-mgmt-scheduler/sdk_packaging.toml b/azure-mgmt-scheduler/sdk_packaging.toml new file mode 100644 index 000000000000..67fca4a18ae9 --- /dev/null +++ b/azure-mgmt-scheduler/sdk_packaging.toml @@ -0,0 +1,6 @@ +[packaging] +package_name = "azure-mgmt-scheduler" +package_pprint_name = "Scheduler Management" +package_doc_id = "scheduler" +is_stable = true + diff --git a/azure-mgmt-scheduler/setup.py b/azure-mgmt-scheduler/setup.py index d4c39e3e7653..da4e8c3223d3 100644 --- a/azure-mgmt-scheduler/setup.py +++ b/azure-mgmt-scheduler/setup.py @@ -69,7 +69,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', @@ -78,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-search/HISTORY.rst b/azure-mgmt-search/HISTORY.rst index c89571fdc7ab..c143af0d63ad 100644 --- a/azure-mgmt-search/HISTORY.rst +++ b/azure-mgmt-search/HISTORY.rst @@ -3,6 +3,45 @@ Release History =============== +2.0.0 (2018-05-21) +++++++++++++++++++ + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Features** + +- Add "operations" operation group +- Add services.update +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**Bugfixes** + +- services.create_or_update is now correctly a Long Running Operation +- Compatibility of the sdist with wheel 0.31.0 + 1.0.0 (2016-06-23) ++++++++++++++++++ diff --git a/azure-mgmt-search/README.rst b/azure-mgmt-search/README.rst index 5bdab387294d..20f634c32590 100644 --- a/azure-mgmt-search/README.rst +++ b/azure-mgmt-search/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Search Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `Search Management -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-search/azure/mgmt/search/models/__init__.py b/azure-mgmt-search/azure/mgmt/search/models/__init__.py index 1340fcd9c62f..1fa43c85e74e 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/__init__.py +++ b/azure-mgmt-search/azure/mgmt/search/models/__init__.py @@ -9,14 +9,29 @@ # regenerated. # -------------------------------------------------------------------------- -from .check_name_availability_input import CheckNameAvailabilityInput -from .check_name_availability_output import CheckNameAvailabilityOutput -from .admin_key_result import AdminKeyResult -from .query_key import QueryKey -from .sku import Sku -from .search_service import SearchService -from .resource import Resource -from .search_management_request_options import SearchManagementRequestOptions +try: + from .check_name_availability_input_py3 import CheckNameAvailabilityInput + from .check_name_availability_output_py3 import CheckNameAvailabilityOutput + from .admin_key_result_py3 import AdminKeyResult + from .query_key_py3 import QueryKey + from .sku_py3 import Sku + from .search_service_py3 import SearchService + from .resource_py3 import Resource + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .search_management_request_options_py3 import SearchManagementRequestOptions +except (SyntaxError, ImportError): + from .check_name_availability_input import CheckNameAvailabilityInput + from .check_name_availability_output import CheckNameAvailabilityOutput + from .admin_key_result import AdminKeyResult + from .query_key import QueryKey + from .sku import Sku + from .search_service import SearchService + from .resource import Resource + from .operation_display import OperationDisplay + from .operation import Operation + from .search_management_request_options import SearchManagementRequestOptions +from .operation_paged import OperationPaged from .query_key_paged import QueryKeyPaged from .search_service_paged import SearchServicePaged from .search_management_client_enums import ( @@ -36,7 +51,10 @@ 'Sku', 'SearchService', 'Resource', + 'OperationDisplay', + 'Operation', 'SearchManagementRequestOptions', + 'OperationPaged', 'QueryKeyPaged', 'SearchServicePaged', 'UnavailableNameReason', diff --git a/azure-mgmt-search/azure/mgmt/search/models/admin_key_result.py b/azure-mgmt-search/azure/mgmt/search/models/admin_key_result.py index 95bb2f4fabae..bfeabe50e70e 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/admin_key_result.py +++ b/azure-mgmt-search/azure/mgmt/search/models/admin_key_result.py @@ -35,6 +35,7 @@ class AdminKeyResult(Model): 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, } - def __init__(self): + def __init__(self, **kwargs): + super(AdminKeyResult, self).__init__(**kwargs) self.primary_key = None self.secondary_key = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/admin_key_result_py3.py b/azure-mgmt-search/azure/mgmt/search/models/admin_key_result_py3.py new file mode 100644 index 000000000000..29217db297ce --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/admin_key_result_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AdminKeyResult(Model): + """Response containing the primary and secondary admin API keys for a given + Azure Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_key: The primary admin API key of the Search service. + :vartype primary_key: str + :ivar secondary_key: The secondary admin API key of the Search service. + :vartype secondary_key: str + """ + + _validation = { + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AdminKeyResult, self).__init__(**kwargs) + self.primary_key = None + self.secondary_key = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input.py b/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input.py index 71cfa509b513..053e06fd8f43 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input.py +++ b/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input.py @@ -18,13 +18,16 @@ class CheckNameAvailabilityInput(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The Search service name to validate. Search service names - must only contain lowercase letters, digits or dashes, cannot use dash as - the first two or last one characters, cannot contain consecutive dashes, - and must be between 2 and 60 characters in length. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The Search service name to validate. Search service + names must only contain lowercase letters, digits or dashes, cannot use + dash as the first two or last one characters, cannot contain consecutive + dashes, and must be between 2 and 60 characters in length. :type name: str - :ivar type: The type of the resource whose name is to be validated. This - value must always be 'searchServices'. Default value: "searchServices" . + :ivar type: Required. The type of the resource whose name is to be + validated. This value must always be 'searchServices'. Default value: + "searchServices" . :vartype type: str """ @@ -40,5 +43,6 @@ class CheckNameAvailabilityInput(Model): type = "searchServices" - def __init__(self, name): - self.name = name + def __init__(self, **kwargs): + super(CheckNameAvailabilityInput, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input_py3.py b/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input_py3.py new file mode 100644 index 000000000000..012969c50154 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityInput(Model): + """Input of check name availability API. + + 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 name: Required. The Search service name to validate. Search service + names must only contain lowercase letters, digits or dashes, cannot use + dash as the first two or last one characters, cannot contain consecutive + dashes, and must be between 2 and 60 characters in length. + :type name: str + :ivar type: Required. The type of the resource whose name is to be + validated. This value must always be 'searchServices'. Default value: + "searchServices" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "searchServices" + + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityInput, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output.py b/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output.py index 925a5790b122..12b592e51574 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output.py +++ b/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output.py @@ -25,8 +25,7 @@ class CheckNameAvailabilityOutput(Model): (incorrect length, unsupported characters, etc.). 'AlreadyExists' indicates that the name is already in use and is therefore unavailable. Possible values include: 'Invalid', 'AlreadyExists' - :vartype reason: str or :class:`UnavailableNameReason - ` + :vartype reason: str or ~azure.mgmt.search.models.UnavailableNameReason :ivar message: A message that explains why the name is invalid and provides resource naming requirements. Available only if 'Invalid' is returned in the 'reason' property. @@ -45,7 +44,8 @@ class CheckNameAvailabilityOutput(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): + def __init__(self, **kwargs): + super(CheckNameAvailabilityOutput, self).__init__(**kwargs) self.is_name_available = None self.reason = None self.message = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output_py3.py b/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output_py3.py new file mode 100644 index 000000000000..bbffe7f214e1 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityOutput(Model): + """Output of check name availability API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar is_name_available: A value indicating whether the name is available. + :vartype is_name_available: bool + :ivar reason: The reason why the name is not available. 'Invalid' + indicates the name provided does not match the naming requirements + (incorrect length, unsupported characters, etc.). 'AlreadyExists' + indicates that the name is already in use and is therefore unavailable. + Possible values include: 'Invalid', 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.search.models.UnavailableNameReason + :ivar message: A message that explains why the name is invalid and + provides resource naming requirements. Available only if 'Invalid' is + returned in the 'reason' property. + :vartype message: str + """ + + _validation = { + 'is_name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'is_name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityOutput, self).__init__(**kwargs) + self.is_name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/operation.py b/azure-mgmt-search/azure/mgmt/search/models/operation.py new file mode 100644 index 000000000000..7269ad98e425 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/operation.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Describes a REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation. This name is of the form + {provider}/{resource}/{operation}. + :vartype name: str + :ivar display: The object that describes the operation. + :vartype display: ~azure.mgmt.search.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/operation_display.py b/azure-mgmt-search/azure/mgmt/search/models/operation_display.py new file mode 100644 index 000000000000..0c4d5975dc8d --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/operation_display.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """The object that describes the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The friendly name of the resource provider. + :vartype provider: str + :ivar operation: The operation type: read, write, delete, listKeys/action, + etc. + :vartype operation: str + :ivar resource: The resource type on which the operation is performed. + :vartype resource: str + :ivar description: The friendly name of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.operation = None + self.resource = None + self.description = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/operation_display_py3.py b/azure-mgmt-search/azure/mgmt/search/models/operation_display_py3.py new file mode 100644 index 000000000000..a1e6e6bfc353 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/operation_display_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """The object that describes the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The friendly name of the resource provider. + :vartype provider: str + :ivar operation: The operation type: read, write, delete, listKeys/action, + etc. + :vartype operation: str + :ivar resource: The resource type on which the operation is performed. + :vartype resource: str + :ivar description: The friendly name of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.operation = None + self.resource = None + self.description = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/operation_paged.py b/azure-mgmt-search/azure/mgmt/search/models/operation_paged.py new file mode 100644 index 000000000000..6aaeff67cdb2 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/operation_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-search/azure/mgmt/search/models/operation_py3.py b/azure-mgmt-search/azure/mgmt/search/models/operation_py3.py new file mode 100644 index 000000000000..1b4dbae10d28 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/operation_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Describes a REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation. This name is of the form + {provider}/{resource}/{operation}. + :vartype name: str + :ivar display: The object that describes the operation. + :vartype display: ~azure.mgmt.search.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/query_key.py b/azure-mgmt-search/azure/mgmt/search/models/query_key.py index ff7ebbe082ec..4b4f282ed5eb 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/query_key.py +++ b/azure-mgmt-search/azure/mgmt/search/models/query_key.py @@ -35,6 +35,7 @@ class QueryKey(Model): 'key': {'key': 'key', 'type': 'str'}, } - def __init__(self): + def __init__(self, **kwargs): + super(QueryKey, self).__init__(**kwargs) self.name = None self.key = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/query_key_paged.py b/azure-mgmt-search/azure/mgmt/search/models/query_key_paged.py index fda4495f43ce..f1fc2d9aade8 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/query_key_paged.py +++ b/azure-mgmt-search/azure/mgmt/search/models/query_key_paged.py @@ -14,7 +14,7 @@ class QueryKeyPaged(Paged): """ - A paging container for iterating over a list of QueryKey object + A paging container for iterating over a list of :class:`QueryKey ` object """ _attribute_map = { diff --git a/azure-mgmt-search/azure/mgmt/search/models/query_key_py3.py b/azure-mgmt-search/azure/mgmt/search/models/query_key_py3.py new file mode 100644 index 000000000000..e02c33495eed --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/query_key_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class QueryKey(Model): + """Describes an API key for a given Azure Search service that has permissions + for query operations only. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the query API key; may be empty. + :vartype name: str + :ivar key: The value of the query API key. + :vartype key: str + """ + + _validation = { + 'name': {'readonly': True}, + 'key': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(QueryKey, self).__init__(**kwargs) + self.name = None + self.key = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/resource.py b/azure-mgmt-search/azure/mgmt/search/models/resource.py index e61399919a21..718a54f2e59b 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/resource.py +++ b/azure-mgmt-search/azure/mgmt/search/models/resource.py @@ -27,17 +27,17 @@ class Resource(Model): :vartype type: str :param location: The geographic location of the resource. This must be one of the supported and registered Azure Geo Regions (for example, West US, - East US, Southeast Asia, and so forth). + East US, Southeast Asia, and so forth). This property is required when + creating a new resource. :type location: str :param tags: Tags to help categorize the resource in the Azure portal. - :type tags: dict + :type tags: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, } _attribute_map = { @@ -48,9 +48,10 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, location, tags=None): + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = location - self.tags = tags + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py b/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py new file mode 100644 index 000000000000..0f2e04e0d9cc --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """Base type for all Azure resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. This can be used with the Azure Resource + Manager to link resources together. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: The geographic location of the resource. This must be one + of the supported and registered Azure Geo Regions (for example, West US, + East US, Southeast Asia, and so forth). This property is required when + creating a new resource. + :type location: str + :param tags: Tags to help categorize the resource in the Azure portal. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/azure-mgmt-search/azure/mgmt/search/models/search_management_client_enums.py b/azure-mgmt-search/azure/mgmt/search/models/search_management_client_enums.py index f313148ff012..8622b25c4ffb 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/search_management_client_enums.py +++ b/azure-mgmt-search/azure/mgmt/search/models/search_management_client_enums.py @@ -12,13 +12,13 @@ from enum import Enum -class UnavailableNameReason(Enum): +class UnavailableNameReason(str, Enum): invalid = "Invalid" already_exists = "AlreadyExists" -class SkuName(Enum): +class SkuName(str, Enum): free = "free" basic = "basic" @@ -27,13 +27,13 @@ class SkuName(Enum): standard3 = "standard3" -class HostingMode(Enum): +class HostingMode(str, Enum): default = "default" high_density = "highDensity" -class SearchServiceStatus(Enum): +class SearchServiceStatus(str, Enum): running = "running" provisioning = "provisioning" @@ -43,14 +43,14 @@ class SearchServiceStatus(Enum): error = "error" -class ProvisioningState(Enum): +class ProvisioningState(str, Enum): succeeded = "succeeded" provisioning = "provisioning" failed = "failed" -class AdminKeyKind(Enum): +class AdminKeyKind(str, Enum): primary = "primary" secondary = "secondary" diff --git a/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options.py b/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options.py index 2c7f3cc90871..96e0dc7df52e 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options.py +++ b/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options.py @@ -21,5 +21,10 @@ class SearchManagementRequestOptions(Model): :type client_request_id: str """ - def __init__(self, client_request_id=None): - self.client_request_id = client_request_id + _attribute_map = { + 'client_request_id': {'key': '', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SearchManagementRequestOptions, self).__init__(**kwargs) + self.client_request_id = kwargs.get('client_request_id', None) diff --git a/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options_py3.py b/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options_py3.py new file mode 100644 index 000000000000..3e36e9a15800 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SearchManagementRequestOptions(Model): + """Additional parameters for a set of operations. + + :param client_request_id: A client-generated GUID value that identifies + this request. If specified, this will be included in response information + as a way to track the request. + :type client_request_id: str + """ + + _attribute_map = { + 'client_request_id': {'key': '', 'type': 'str'}, + } + + def __init__(self, *, client_request_id: str=None, **kwargs) -> None: + super(SearchManagementRequestOptions, self).__init__(**kwargs) + self.client_request_id = client_request_id diff --git a/azure-mgmt-search/azure/mgmt/search/models/search_service.py b/azure-mgmt-search/azure/mgmt/search/models/search_service.py index eae4bf6192b7..077847e78c05 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/search_service.py +++ b/azure-mgmt-search/azure/mgmt/search/models/search_service.py @@ -27,10 +27,11 @@ class SearchService(Resource): :vartype type: str :param location: The geographic location of the resource. This must be one of the supported and registered Azure Geo Regions (for example, West US, - East US, Southeast Asia, and so forth). + East US, Southeast Asia, and so forth). This property is required when + creating a new resource. :type location: str :param tags: Tags to help categorize the resource in the Azure portal. - :type tags: dict + :type tags: dict[str, str] :param replica_count: The number of replicas in the Search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. Default value: 1 . @@ -46,8 +47,7 @@ class SearchService(Resource): any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. Possible values include: 'default', 'highDensity'. Default value: "default" . - :type hosting_mode: str or :class:`HostingMode - ` + :type hosting_mode: str or ~azure.mgmt.search.models.HostingMode :ivar status: The status of the Search service. Possible values include: 'running': The Search service is running and no provisioning operations are underway. 'provisioning': The Search service is being provisioned or @@ -62,8 +62,7 @@ class SearchService(Resource): underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. Possible values include: 'running', 'provisioning', 'deleting', 'degraded', 'disabled', 'error' - :vartype status: str or :class:`SearchServiceStatus - ` + :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus :ivar status_details: The details of the Search service status. :vartype status_details: str :ivar provisioning_state: The state of the last provisioning operation @@ -77,24 +76,23 @@ class SearchService(Resource): to Create Search service. This is because the free service uses capacity that is already set up. Possible values include: 'succeeded', 'provisioning', 'failed' - :vartype provisioning_state: str or :class:`ProvisioningState - ` + :vartype provisioning_state: str or + ~azure.mgmt.search.models.ProvisioningState :param sku: The SKU of the Search Service, which determines price tier and - capacity limits. - :type sku: :class:`Sku ` + capacity limits. This property is required when creating a new Search + Service. + :type sku: ~azure.mgmt.search.models.Sku """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, 'replica_count': {'maximum': 12, 'minimum': 1}, 'partition_count': {'maximum': 12, 'minimum': 1}, 'status': {'readonly': True}, 'status_details': {'readonly': True}, 'provisioning_state': {'readonly': True}, - 'sku': {'required': True}, } _attribute_map = { @@ -112,12 +110,12 @@ class SearchService(Resource): 'sku': {'key': 'sku', 'type': 'Sku'}, } - def __init__(self, location, sku, tags=None, replica_count=1, partition_count=1, hosting_mode="default"): - super(SearchService, self).__init__(location=location, tags=tags) - self.replica_count = replica_count - self.partition_count = partition_count - self.hosting_mode = hosting_mode + def __init__(self, **kwargs): + super(SearchService, self).__init__(**kwargs) + self.replica_count = kwargs.get('replica_count', 1) + self.partition_count = kwargs.get('partition_count', 1) + self.hosting_mode = kwargs.get('hosting_mode', "default") self.status = None self.status_details = None self.provisioning_state = None - self.sku = sku + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-search/azure/mgmt/search/models/search_service_paged.py b/azure-mgmt-search/azure/mgmt/search/models/search_service_paged.py index 140360c97f51..dbb3236affea 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/search_service_paged.py +++ b/azure-mgmt-search/azure/mgmt/search/models/search_service_paged.py @@ -14,7 +14,7 @@ class SearchServicePaged(Paged): """ - A paging container for iterating over a list of SearchService object + A paging container for iterating over a list of :class:`SearchService ` object """ _attribute_map = { diff --git a/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py b/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py new file mode 100644 index 000000000000..a0e3dd69d375 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py @@ -0,0 +1,121 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class SearchService(Resource): + """Describes an Azure Search service and its current state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. This can be used with the Azure Resource + Manager to link resources together. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: The geographic location of the resource. This must be one + of the supported and registered Azure Geo Regions (for example, West US, + East US, Southeast Asia, and so forth). This property is required when + creating a new resource. + :type location: str + :param tags: Tags to help categorize the resource in the Azure portal. + :type tags: dict[str, str] + :param replica_count: The number of replicas in the Search service. If + specified, it must be a value between 1 and 12 inclusive for standard SKUs + or between 1 and 3 inclusive for basic SKU. Default value: 1 . + :type replica_count: int + :param partition_count: The number of partitions in the Search service; if + specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only + valid for standard SKUs. For 'standard3' services with hostingMode set to + 'highDensity', the allowed values are between 1 and 3. Default value: 1 . + :type partition_count: int + :param hosting_mode: Applicable only for the standard3 SKU. You can set + this property to enable up to 3 high density partitions that allow up to + 1000 indexes, which is much higher than the maximum indexes allowed for + any other SKU. For the standard3 SKU, the value is either 'default' or + 'highDensity'. For all other SKUs, this value must be 'default'. Possible + values include: 'default', 'highDensity'. Default value: "default" . + :type hosting_mode: str or ~azure.mgmt.search.models.HostingMode + :ivar status: The status of the Search service. Possible values include: + 'running': The Search service is running and no provisioning operations + are underway. 'provisioning': The Search service is being provisioned or + scaled up or down. 'deleting': The Search service is being deleted. + 'degraded': The Search service is degraded. This can occur when the + underlying search units are not healthy. The Search service is most likely + operational, but performance might be slow and some requests might be + dropped. 'disabled': The Search service is disabled. In this state, the + service will reject all API requests. 'error': The Search service is in an + error state. If your service is in the degraded, disabled, or error + states, it means the Azure Search team is actively investigating the + underlying issue. Dedicated services in these states are still chargeable + based on the number of search units provisioned. Possible values include: + 'running', 'provisioning', 'deleting', 'degraded', 'disabled', 'error' + :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus + :ivar status_details: The details of the Search service status. + :vartype status_details: str + :ivar provisioning_state: The state of the last provisioning operation + performed on the Search service. Provisioning is an intermediate state + that occurs while service capacity is being established. After capacity is + set up, provisioningState changes to either 'succeeded' or 'failed'. + Client applications can poll provisioning status (the recommended polling + interval is from 30 seconds to one minute) by using the Get Search Service + operation to see when an operation is completed. If you are using the free + service, this value tends to come back as 'succeeded' directly in the call + to Create Search service. This is because the free service uses capacity + that is already set up. Possible values include: 'succeeded', + 'provisioning', 'failed' + :vartype provisioning_state: str or + ~azure.mgmt.search.models.ProvisioningState + :param sku: The SKU of the Search Service, which determines price tier and + capacity limits. This property is required when creating a new Search + Service. + :type sku: ~azure.mgmt.search.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'replica_count': {'maximum': 12, 'minimum': 1}, + 'partition_count': {'maximum': 12, 'minimum': 1}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'partition_count': {'key': 'properties.partitionCount', 'type': 'int'}, + 'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'}, + 'status': {'key': 'properties.status', 'type': 'SearchServiceStatus'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str=None, tags=None, replica_count: int=1, partition_count: int=1, hosting_mode="default", sku=None, **kwargs) -> None: + super(SearchService, self).__init__(location=location, tags=tags, **kwargs) + self.replica_count = replica_count + self.partition_count = partition_count + self.hosting_mode = hosting_mode + self.status = None + self.status_details = None + self.provisioning_state = None + self.sku = sku diff --git a/azure-mgmt-search/azure/mgmt/search/models/sku.py b/azure-mgmt-search/azure/mgmt/search/models/sku.py index 4ba0d067f2f4..66cdf99871d3 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/sku.py +++ b/azure-mgmt-search/azure/mgmt/search/models/sku.py @@ -24,12 +24,13 @@ class Sku(Model): partitions and 12 replicas (or up to 3 partitions with more indexes if you also set the hostingMode property to 'highDensity'). Possible values include: 'free', 'basic', 'standard', 'standard2', 'standard3' - :type name: str or :class:`SkuName ` + :type name: str or ~azure.mgmt.search.models.SkuName """ _attribute_map = { 'name': {'key': 'name', 'type': 'SkuName'}, } - def __init__(self, name=None): - self.name = name + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-search/azure/mgmt/search/models/sku_py3.py b/azure-mgmt-search/azure/mgmt/search/models/sku_py3.py new file mode 100644 index 000000000000..4701cb2ad17b --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/sku_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """Defines the SKU of an Azure Search Service, which determines price tier and + capacity limits. + + :param name: The SKU of the Search service. Valid values include: 'free': + Shared service. 'basic': Dedicated service with up to 3 replicas. + 'standard': Dedicated service with up to 12 partitions and 12 replicas. + 'standard2': Similar to standard, but with more capacity per search unit. + 'standard3': Offers maximum capacity per search unit with up to 12 + partitions and 12 replicas (or up to 3 partitions with more indexes if you + also set the hostingMode property to 'highDensity'). Possible values + include: 'free', 'basic', 'standard', 'standard2', 'standard3' + :type name: str or ~azure.mgmt.search.models.SkuName + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuName'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-search/azure/mgmt/search/operations/__init__.py b/azure-mgmt-search/azure/mgmt/search/operations/__init__.py index f8564e9cbfcb..4b49a00e8eb1 100644 --- a/azure-mgmt-search/azure/mgmt/search/operations/__init__.py +++ b/azure-mgmt-search/azure/mgmt/search/operations/__init__.py @@ -9,11 +9,13 @@ # regenerated. # -------------------------------------------------------------------------- +from .operations import Operations from .admin_keys_operations import AdminKeysOperations from .query_keys_operations import QueryKeysOperations from .services_operations import ServicesOperations __all__ = [ + 'Operations', 'AdminKeysOperations', 'QueryKeysOperations', 'ServicesOperations', diff --git a/azure-mgmt-search/azure/mgmt/search/operations/admin_keys_operations.py b/azure-mgmt-search/azure/mgmt/search/operations/admin_keys_operations.py index 239d66fd717d..da5e9acb21bc 100644 --- a/azure-mgmt-search/azure/mgmt/search/operations/admin_keys_operations.py +++ b/azure-mgmt-search/azure/mgmt/search/operations/admin_keys_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class AdminKeysOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for each request. The current version is 2015-08-19. Constant value: "2015-08-19". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,17 +52,15 @@ def get( :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`AdminKeyResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: AdminKeyResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.AdminKeyResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ client_request_id = None @@ -68,7 +68,7 @@ def get( client_request_id = search_management_request_options.client_request_id # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listAdminKeys' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), @@ -94,7 +94,7 @@ def get( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,6 +111,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listAdminKeys'} def regenerate( self, resource_group_name, search_service_name, key_kind, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): @@ -127,22 +128,19 @@ def regenerate( :param key_kind: Specifies which key to regenerate. Valid values include 'primary' and 'secondary'. Possible values include: 'primary', 'secondary' - :type key_kind: str or :class:`AdminKeyKind - ` + :type key_kind: str or ~azure.mgmt.search.models.AdminKeyKind :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`AdminKeyResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: AdminKeyResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.AdminKeyResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ client_request_id = None @@ -150,7 +148,7 @@ def regenerate( client_request_id = search_management_request_options.client_request_id # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/regenerateAdminKey/{keyKind}' + url = self.regenerate.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), @@ -177,7 +175,7 @@ def regenerate( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -194,3 +192,4 @@ def regenerate( return client_raw_response return deserialized + regenerate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/regenerateAdminKey/{keyKind}'} diff --git a/azure-mgmt-search/azure/mgmt/search/operations/operations.py b/azure-mgmt-search/azure/mgmt/search/operations/operations.py new file mode 100644 index 000000000000..5a35bf95f5d8 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/operations/operations.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for each request. The current version is 2015-08-19. Constant value: "2015-08-19". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-08-19" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available REST API operations of the Microsoft.Search + provider. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.search.models.OperationPaged[~azure.mgmt.search.models.Operation] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Search/operations'} diff --git a/azure-mgmt-search/azure/mgmt/search/operations/query_keys_operations.py b/azure-mgmt-search/azure/mgmt/search/operations/query_keys_operations.py index 4ca5330d65e1..e0ce209493e1 100644 --- a/azure-mgmt-search/azure/mgmt/search/operations/query_keys_operations.py +++ b/azure-mgmt-search/azure/mgmt/search/operations/query_keys_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class QueryKeysOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for each request. The current version is 2015-08-19. Constant value: "2015-08-19". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,16 +54,15 @@ def create( :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`QueryKey ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: QueryKey or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.QueryKey or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ client_request_id = None @@ -69,7 +70,7 @@ def create( client_request_id = search_management_request_options.client_request_id # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/createQueryKey/{name}' + url = self.create.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), @@ -96,7 +97,7 @@ def create( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -113,6 +114,7 @@ def create( return client_raw_response return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/createQueryKey/{name}'} def list_by_search_service( self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): @@ -128,15 +130,15 @@ def list_by_search_service( :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`QueryKeyPaged - ` + :return: An iterator like instance of QueryKey + :rtype: + ~azure.mgmt.search.models.QueryKeyPaged[~azure.mgmt.search.models.QueryKey] :raises: :class:`CloudError` """ client_request_id = None @@ -147,7 +149,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys' + url = self.list_by_search_service.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), @@ -178,7 +180,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -196,6 +198,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_search_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys'} def delete( self, resource_group_name, search_service_name, key, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): @@ -216,16 +219,14 @@ def delete( :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ client_request_id = None @@ -233,7 +234,7 @@ def delete( client_request_id = search_management_request_options.client_request_id # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/deleteQueryKey/{key}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), @@ -260,7 +261,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204, 404]: exp = CloudError(response) @@ -270,3 +271,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/deleteQueryKey/{key}'} diff --git a/azure-mgmt-search/azure/mgmt/search/operations/services_operations.py b/azure-mgmt-search/azure/mgmt/search/operations/services_operations.py index 2cfb420d99cb..9a372a7c9c16 100644 --- a/azure-mgmt-search/azure/mgmt/search/operations/services_operations.py +++ b/azure-mgmt-search/azure/mgmt/search/operations/services_operations.py @@ -9,9 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -22,10 +24,12 @@ class ServicesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for each request. The current version is 2015-08-19. Constant value: "2015-08-19". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -35,8 +39,66 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def create_or_update( + + def _create_or_update_initial( self, resource_group_name, search_service_name, service, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct body + body_content = self._serialize.body(service, 'SearchService') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SearchService', response) + if response.status_code == 201: + deserialized = self._deserialize('SearchService', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, search_service_name, service, search_management_request_options=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a Search service in the given resource group. If the Search service already exists, all properties will be updated with the given values. @@ -56,22 +118,77 @@ def create_or_update( :type search_service_name: str :param service: The definition of the Search service to create or update. - :type service: :class:`SearchService - ` + :type service: ~azure.mgmt.search.models.SearchService + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SearchService or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.search.models.SearchService] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.search.models.SearchService]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + search_service_name=search_service_name, + service=service, + search_management_request_options=search_management_request_options, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SearchService', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}'} + + def update( + self, resource_group_name, search_service_name, service, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + """Updates an existing Search service in the given resource group. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Search service to + update. + :type search_service_name: str + :param service: The definition of the Search service to update. + :type service: ~azure.mgmt.search.models.SearchService :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SearchService - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: SearchService or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.SearchService or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ client_request_id = None @@ -79,7 +196,7 @@ def create_or_update( client_request_id = search_management_request_options.client_request_id # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), @@ -107,11 +224,11 @@ def create_or_update( body_content = self._serialize.body(service, 'SearchService') # Construct and send request - request = self._client.put(url, query_parameters) + request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [200, 201]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -120,14 +237,13 @@ def create_or_update( if response.status_code == 200: deserialized = self._deserialize('SearchService', response) - if response.status_code == 201: - deserialized = self._deserialize('SearchService', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}'} def get( self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): @@ -144,17 +260,15 @@ def get( :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SearchService - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: SearchService or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.SearchService or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ client_request_id = None @@ -162,7 +276,7 @@ def get( client_request_id = search_management_request_options.client_request_id # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), @@ -188,7 +302,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -205,6 +319,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}'} def delete( self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): @@ -221,16 +336,14 @@ def delete( :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ client_request_id = None @@ -238,7 +351,7 @@ def delete( client_request_id = search_management_request_options.client_request_id # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), @@ -264,7 +377,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204, 404]: exp = CloudError(response) @@ -274,6 +387,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}'} def list_by_resource_group( self, resource_group_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): @@ -286,15 +400,15 @@ def list_by_resource_group( :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SearchServicePaged - ` + :return: An iterator like instance of SearchService + :rtype: + ~azure.mgmt.search.models.SearchServicePaged[~azure.mgmt.search.models.SearchService] :raises: :class:`CloudError` """ client_request_id = None @@ -305,7 +419,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -335,7 +449,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -353,6 +467,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices'} def check_name_availability( self, name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): @@ -368,17 +483,15 @@ def check_name_availability( :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`CheckNameAvailabilityOutput - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: CheckNameAvailabilityOutput or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.CheckNameAvailabilityOutput or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ client_request_id = None @@ -387,7 +500,7 @@ def check_name_availability( check_name_availability_input = models.CheckNameAvailabilityInput(name=name) # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Search/checkNameAvailability' + url = self.check_name_availability.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -415,7 +528,7 @@ def check_name_availability( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -432,3 +545,4 @@ def check_name_availability( return client_raw_response return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Search/checkNameAvailability'} diff --git a/azure-mgmt-search/azure/mgmt/search/search_management_client.py b/azure-mgmt-search/azure/mgmt/search/search_management_client.py index 8ac0fc5d16f5..9c86581dc538 100644 --- a/azure-mgmt-search/azure/mgmt/search/search_management_client.py +++ b/azure-mgmt-search/azure/mgmt/search/search_management_client.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION +from .operations.operations import Operations from .operations.admin_keys_operations import AdminKeysOperations from .operations.query_keys_operations import QueryKeysOperations from .operations.services_operations import ServicesOperations @@ -41,26 +42,26 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(SearchManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('searchmanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-search/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class SearchManagementClient(object): +class SearchManagementClient(SDKClient): """Client that can be used to manage Azure Search services and API keys. :ivar config: Configuration for client. :vartype config: SearchManagementClientConfiguration + :ivar operations: Operations operations + :vartype operations: azure.mgmt.search.operations.Operations :ivar admin_keys: AdminKeys operations :vartype admin_keys: azure.mgmt.search.operations.AdminKeysOperations :ivar query_keys: QueryKeys operations @@ -82,13 +83,15 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = SearchManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(SearchManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '2015-08-19' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) self.admin_keys = AdminKeysOperations( self._client, self.config, self._serialize, self._deserialize) self.query_keys = QueryKeysOperations( diff --git a/azure-mgmt-search/azure/mgmt/search/version.py b/azure-mgmt-search/azure/mgmt/search/version.py index a39916c162ce..53c4c7ea05e8 100644 --- a/azure-mgmt-search/azure/mgmt/search/version.py +++ b/azure-mgmt-search/azure/mgmt/search/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "2.0.0" diff --git a/azure-mgmt-search/build.json b/azure-mgmt-search/build.json index 6d32f4ae1ecd..881bbd415daa 100644 --- a/azure-mgmt-search/build.json +++ b/azure-mgmt-search/build.json @@ -1 +1,746 @@ -{"autorest": "1.1.0", "date": "2017-06-23T21:55:05Z", "version": ""} \ No newline at end of file +{ + "autorest": [ + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4228", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.53", + "@types/source-map": "^0.5.0", + "@types/yargs": "^8.0.2", + "@types/z-schema": "^3.16.31", + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "_shasum": "b3897b8615417aa07cf9113d4bd18862b32f82f8", + "_shrinkwrap": null, + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4228", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4229", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.53", + "@types/source-map": "^0.5.0", + "@types/yargs": "^8.0.2", + "@types/z-schema": "^3.16.31", + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core", + "_shasum": "c19c0ee74fe38c5197be2e965cd729a633166ae0", + "_shrinkwrap": null, + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4229", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4230", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.53", + "@types/source-map": "0.5.0", + "@types/yargs": "^8.0.2", + "@types/z-schema": "^3.16.31", + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "_shasum": "3c9b387fbe18ce3a54b68bc0c24ddb0a4c850f25", + "_shrinkwrap": null, + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4230", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4231", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.53", + "@types/source-map": "0.5.0", + "@types/yargs": "^8.0.2", + "@types/z-schema": "^3.16.31", + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "_shasum": "fa1b2b50cdd91bec9f04542420c3056eda202b87", + "_shrinkwrap": null, + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4231", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.0.21", + "dependencies": { + "dotnet-2.0.0": "^1.3.2" + }, + "optionalDependencies": {}, + "devDependencies": { + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.1.1", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.0.21", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.3.38", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/autorest.testserver": "2.3.1", + "autorest": "^2.0.4201", + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.4.4", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "903bb77932e4ed1b8bc3b25cc39b167143494f6c", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.3.38", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.python", + "version": "2.1.34", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/autorest.testserver": "^2.3.13", + "autorest": "^2.0.4203", + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.4.4", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "_shasum": "b58d7e0542e081cf410fdbcdf8c14acf9cee16a7", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.python@2.1.34", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/classic-openapi-validator", + "version": "1.0.9", + "dependencies": { + "dotnet-2.0.0": "^1.1.0" + }, + "optionalDependencies": {}, + "devDependencies": { + "dotnet-sdk-2.0.0": "^1.1.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_classic-openapi-validator@1.0.9/node_modules/@microsoft.azure/classic-openapi-validator", + "_shasum": "554be1db3e054b0a0e4e51c842ff5b7c6a60784c", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/classic-openapi-validator@1.0.9", + "_from": "file:/root/.autorest/@microsoft.azure_classic-openapi-validator@1.0.9/node_modules/@microsoft.azure/classic-openapi-validator", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_classic-openapi-validator@1.0.9/node_modules/@microsoft.azure/classic-openapi-validator", + "rawSpec": "/root/.autorest/@microsoft.azure_classic-openapi-validator@1.0.9/node_modules/@microsoft.azure/classic-openapi-validator", + "saveSpec": "file:/root/.autorest/@microsoft.azure_classic-openapi-validator@1.0.9/node_modules/@microsoft.azure/classic-openapi-validator", + "fetchSpec": "/root/.autorest/@microsoft.azure_classic-openapi-validator@1.0.9/node_modules/@microsoft.azure/classic-openapi-validator" + }, + "_spec": "/root/.autorest/@microsoft.azure_classic-openapi-validator@1.0.9/node_modules/@microsoft.azure/classic-openapi-validator", + "_where": "/root/.autorest/@microsoft.azure_classic-openapi-validator@1.0.9/node_modules/@microsoft.azure/classic-openapi-validator" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/openapi-validator", + "version": "1.0.2", + "dependencies": { + "fs": "^0.0.1-security", + "js-yaml": "^3.8.4", + "jsonpath": "^0.2.11", + "vscode-jsonrpc": "^3.2.0" + }, + "optionalDependencies": {}, + "devDependencies": { + "@types/js-yaml": "^3.5.30", + "@types/jsonpath": "^0.1.29", + "@types/node": "^7.0.18", + "gulp": "3.9.1", + "gulp-clean": "0.3.2", + "gulp-dotnet-cli": "0.4.0", + "gulp-mocha": "4.3.1", + "gulp-run": "1.7.1", + "mocha": "3.2.0", + "mocha-typescript": "1.0.22", + "typescript": "2.3.3" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_openapi-validator@1.0.2/node_modules/@microsoft.azure/openapi-validator", + "_shasum": "352190e6dbb4a1d16587b39e589b9615d6e4aaaf", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/openapi-validator@1.0.2", + "_from": "file:/root/.autorest/@microsoft.azure_openapi-validator@1.0.2/node_modules/@microsoft.azure/openapi-validator", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_openapi-validator@1.0.2/node_modules/@microsoft.azure/openapi-validator", + "rawSpec": "/root/.autorest/@microsoft.azure_openapi-validator@1.0.2/node_modules/@microsoft.azure/openapi-validator", + "saveSpec": "file:/root/.autorest/@microsoft.azure_openapi-validator@1.0.2/node_modules/@microsoft.azure/openapi-validator", + "fetchSpec": "/root/.autorest/@microsoft.azure_openapi-validator@1.0.2/node_modules/@microsoft.azure/openapi-validator" + }, + "_spec": "/root/.autorest/@microsoft.azure_openapi-validator@1.0.2/node_modules/@microsoft.azure/openapi-validator", + "_where": "/root/.autorest/@microsoft.azure_openapi-validator@1.0.2/node_modules/@microsoft.azure/openapi-validator" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + } + ], + "autorest_bootstrap": {} +} \ No newline at end of file diff --git a/azure-mgmt-search/setup.py b/azure-mgmt-search/setup.py index eae6a5683b05..d9147216639b 100644 --- a/azure-mgmt-search/setup.py +++ b/azure-mgmt-search/setup.py @@ -61,7 +61,7 @@ long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ 'Development Status :: 4 - Beta', @@ -69,17 +69,16 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(), + packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.8', - 'azure-common~=1.1.6', + 'msrestazure>=0.4.27,<2.0.0', + 'azure-common~=1.1', ], cmdclass=cmdclass ) diff --git a/azure-mgmt-search/tests/test_mgmt_search.py b/azure-mgmt-search/tests/test_mgmt_search.py index 3ccbc4a35f2f..f957df08dccf 100644 --- a/azure-mgmt-search/tests/test_mgmt_search.py +++ b/azure-mgmt-search/tests/test_mgmt_search.py @@ -38,7 +38,7 @@ def test_search_services(self, resource_group, location): 'name': 'free' } } - ) + ).result() availability = self.client.services.check_name_availability(account_name) self.assertFalse(availability.is_name_available) diff --git a/azure-mgmt-servermanager/HISTORY.rst b/azure-mgmt-servermanager/HISTORY.rst index 6ddd55f162ee..b765bbf0e0d7 100644 --- a/azure-mgmt-servermanager/HISTORY.rst +++ b/azure-mgmt-servermanager/HISTORY.rst @@ -3,6 +3,42 @@ Release History =============== +2.0.0 (2018-05-25) +++++++++++++++++++ + +**Features** + +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + 1.2.0 (2017-06-23) ++++++++++++++++++ diff --git a/azure-mgmt-servermanager/README.rst b/azure-mgmt-servermanager/README.rst index 440dd3917808..c898ad31f4da 100644 --- a/azure-mgmt-servermanager/README.rst +++ b/azure-mgmt-servermanager/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Server Manager Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `Server Manager Management -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/__init__.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/__init__.py index e6e542614005..87cbba9d6f0a 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/__init__.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/__init__.py @@ -9,28 +9,52 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource -from .encryption_jwk_resource import EncryptionJwkResource -from .gateway_status import GatewayStatus -from .gateway_resource import GatewayResource -from .gateway_profile import GatewayProfile -from .gateway_parameters import GatewayParameters -from .node_resource import NodeResource -from .node_parameters import NodeParameters -from .session_resource import SessionResource -from .session_parameters import SessionParameters -from .version import Version -from .power_shell_session_resource import PowerShellSessionResource -from .prompt_field_description import PromptFieldDescription -from .power_shell_command_result import PowerShellCommandResult -from .power_shell_command_results import PowerShellCommandResults -from .power_shell_command_status import PowerShellCommandStatus -from .power_shell_session_resources import PowerShellSessionResources -from .power_shell_command_parameters import PowerShellCommandParameters -from .prompt_message_response import PromptMessageResponse -from .power_shell_tab_completion_parameters import PowerShellTabCompletionParameters -from .power_shell_tab_completion_results import PowerShellTabCompletionResults -from .error import Error, ErrorException +try: + from .resource_py3 import Resource + from .encryption_jwk_resource_py3 import EncryptionJwkResource + from .gateway_status_py3 import GatewayStatus + from .gateway_resource_py3 import GatewayResource + from .gateway_profile_py3 import GatewayProfile + from .gateway_parameters_py3 import GatewayParameters + from .node_resource_py3 import NodeResource + from .node_parameters_py3 import NodeParameters + from .session_resource_py3 import SessionResource + from .session_parameters_py3 import SessionParameters + from .version_py3 import Version + from .power_shell_session_resource_py3 import PowerShellSessionResource + from .prompt_field_description_py3 import PromptFieldDescription + from .power_shell_command_result_py3 import PowerShellCommandResult + from .power_shell_command_results_py3 import PowerShellCommandResults + from .power_shell_command_status_py3 import PowerShellCommandStatus + from .power_shell_session_resources_py3 import PowerShellSessionResources + from .power_shell_command_parameters_py3 import PowerShellCommandParameters + from .prompt_message_response_py3 import PromptMessageResponse + from .power_shell_tab_completion_parameters_py3 import PowerShellTabCompletionParameters + from .power_shell_tab_completion_results_py3 import PowerShellTabCompletionResults + from .error_py3 import Error, ErrorException +except (SyntaxError, ImportError): + from .resource import Resource + from .encryption_jwk_resource import EncryptionJwkResource + from .gateway_status import GatewayStatus + from .gateway_resource import GatewayResource + from .gateway_profile import GatewayProfile + from .gateway_parameters import GatewayParameters + from .node_resource import NodeResource + from .node_parameters import NodeParameters + from .session_resource import SessionResource + from .session_parameters import SessionParameters + from .version import Version + from .power_shell_session_resource import PowerShellSessionResource + from .prompt_field_description import PromptFieldDescription + from .power_shell_command_result import PowerShellCommandResult + from .power_shell_command_results import PowerShellCommandResults + from .power_shell_command_status import PowerShellCommandStatus + from .power_shell_session_resources import PowerShellSessionResources + from .power_shell_command_parameters import PowerShellCommandParameters + from .prompt_message_response import PromptMessageResponse + from .power_shell_tab_completion_parameters import PowerShellTabCompletionParameters + from .power_shell_tab_completion_results import PowerShellTabCompletionResults + from .error import Error, ErrorException from .gateway_resource_paged import GatewayResourcePaged from .node_resource_paged import NodeResourcePaged from .server_management_enums import ( diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/encryption_jwk_resource.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/encryption_jwk_resource.py index c5bbe3cc1d54..a070ee7deb07 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/encryption_jwk_resource.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/encryption_jwk_resource.py @@ -32,8 +32,9 @@ class EncryptionJwkResource(Model): 'n': {'key': 'n', 'type': 'str'}, } - def __init__(self, kty=None, alg=None, e=None, n=None): - self.kty = kty - self.alg = alg - self.e = e - self.n = n + def __init__(self, **kwargs): + super(EncryptionJwkResource, self).__init__(**kwargs) + self.kty = kwargs.get('kty', None) + self.alg = kwargs.get('alg', None) + self.e = kwargs.get('e', None) + self.n = kwargs.get('n', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/encryption_jwk_resource_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/encryption_jwk_resource_py3.py new file mode 100644 index 000000000000..601b269f660c --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/encryption_jwk_resource_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EncryptionJwkResource(Model): + """The public key of the gateway. + + :param kty: + :type kty: str + :param alg: + :type alg: str + :param e: + :type e: str + :param n: + :type n: str + """ + + _attribute_map = { + 'kty': {'key': 'kty', 'type': 'str'}, + 'alg': {'key': 'alg', 'type': 'str'}, + 'e': {'key': 'e', 'type': 'str'}, + 'n': {'key': 'n', 'type': 'str'}, + } + + def __init__(self, *, kty: str=None, alg: str=None, e: str=None, n: str=None, **kwargs) -> None: + super(EncryptionJwkResource, self).__init__(**kwargs) + self.kty = kty + self.alg = alg + self.e = e + self.n = n diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/error.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/error.py index c7307c0f838c..a325ec8c2077 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/error.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/error.py @@ -30,10 +30,11 @@ class Error(Model): 'fields': {'key': 'fields', 'type': 'str'}, } - def __init__(self, code=None, message=None, fields=None): - self.code = code - self.message = message - self.fields = fields + def __init__(self, **kwargs): + super(Error, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.fields = kwargs.get('fields', None) class ErrorException(HttpOperationError): diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/error_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/error_py3.py new file mode 100644 index 000000000000..4b1acc5b414c --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/error_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Error(Model): + """Error message. + + :param code: + :type code: int + :param message: + :type message: str + :param fields: + :type fields: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'int'}, + 'message': {'key': 'message', 'type': 'str'}, + 'fields': {'key': 'fields', 'type': 'str'}, + } + + def __init__(self, *, code: int=None, message: str=None, fields: str=None, **kwargs) -> None: + super(Error, self).__init__(**kwargs) + self.code = code + self.message = message + self.fields = fields + + +class ErrorException(HttpOperationError): + """Server responsed with exception of type: 'Error'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorException, self).__init__(deserialize, response, 'Error', *args) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_parameters.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_parameters.py index 23f07a022a34..8d8b8e8a71d3 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_parameters.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_parameters.py @@ -23,8 +23,7 @@ class GatewayParameters(Model): gateway to auto upgrade itself. If properties value not specified, then we assume upgradeMode = Automatic. Possible values include: 'Manual', 'Automatic' - :type upgrade_mode: str or :class:`UpgradeMode - ` + :type upgrade_mode: str or ~azure.mgmt.servermanager.models.UpgradeMode """ _attribute_map = { @@ -33,7 +32,8 @@ class GatewayParameters(Model): 'upgrade_mode': {'key': 'properties.upgradeMode', 'type': 'UpgradeMode'}, } - def __init__(self, location=None, tags=None, upgrade_mode=None): - self.location = location - self.tags = tags - self.upgrade_mode = upgrade_mode + def __init__(self, **kwargs): + super(GatewayParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.upgrade_mode = kwargs.get('upgrade_mode', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_parameters_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_parameters_py3.py new file mode 100644 index 000000000000..17024c8924b4 --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_parameters_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GatewayParameters(Model): + """Collection of parameters for operations on a gateway resource. + + :param location: Location of the resource. + :type location: str + :param tags: Resource tags. + :type tags: object + :param upgrade_mode: The upgradeMode property gives the flexibility to + gateway to auto upgrade itself. If properties value not specified, then we + assume upgradeMode = Automatic. Possible values include: 'Manual', + 'Automatic' + :type upgrade_mode: str or ~azure.mgmt.servermanager.models.UpgradeMode + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'upgrade_mode': {'key': 'properties.upgradeMode', 'type': 'UpgradeMode'}, + } + + def __init__(self, *, location: str=None, tags=None, upgrade_mode=None, **kwargs) -> None: + super(GatewayParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.upgrade_mode = upgrade_mode diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_profile.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_profile.py index 326be2a4cc78..26a1720120b1 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_profile.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_profile.py @@ -52,14 +52,15 @@ class GatewayProfile(Model): 'status_blob_signature': {'key': 'statusBlobSignature', 'type': 'str'}, } - def __init__(self, data_plane_service_base_address=None, gateway_id=None, environment=None, upgrade_manifest_url=None, messaging_namespace=None, messaging_account=None, messaging_key=None, request_queue=None, response_topic=None, status_blob_signature=None): - self.data_plane_service_base_address = data_plane_service_base_address - self.gateway_id = gateway_id - self.environment = environment - self.upgrade_manifest_url = upgrade_manifest_url - self.messaging_namespace = messaging_namespace - self.messaging_account = messaging_account - self.messaging_key = messaging_key - self.request_queue = request_queue - self.response_topic = response_topic - self.status_blob_signature = status_blob_signature + def __init__(self, **kwargs): + super(GatewayProfile, self).__init__(**kwargs) + self.data_plane_service_base_address = kwargs.get('data_plane_service_base_address', None) + self.gateway_id = kwargs.get('gateway_id', None) + self.environment = kwargs.get('environment', None) + self.upgrade_manifest_url = kwargs.get('upgrade_manifest_url', None) + self.messaging_namespace = kwargs.get('messaging_namespace', None) + self.messaging_account = kwargs.get('messaging_account', None) + self.messaging_key = kwargs.get('messaging_key', None) + self.request_queue = kwargs.get('request_queue', None) + self.response_topic = kwargs.get('response_topic', None) + self.status_blob_signature = kwargs.get('status_blob_signature', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_profile_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_profile_py3.py new file mode 100644 index 000000000000..d72d4ab59a09 --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_profile_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GatewayProfile(Model): + """JSON properties that the gateway service uses know how to communicate with + the resource. + + :param data_plane_service_base_address: The Dataplane connection URL. + :type data_plane_service_base_address: str + :param gateway_id: The ID of the gateway. + :type gateway_id: str + :param environment: The environment for the gateway (DEV, DogFood, or + Production). + :type environment: str + :param upgrade_manifest_url: Gateway upgrade manifest URL. + :type upgrade_manifest_url: str + :param messaging_namespace: Messaging namespace. + :type messaging_namespace: str + :param messaging_account: Messaging Account. + :type messaging_account: str + :param messaging_key: Messaging Key. + :type messaging_key: str + :param request_queue: Request queue name. + :type request_queue: str + :param response_topic: Response topic name. + :type response_topic: str + :param status_blob_signature: The gateway status blob SAS URL. + :type status_blob_signature: str + """ + + _attribute_map = { + 'data_plane_service_base_address': {'key': 'dataPlaneServiceBaseAddress', 'type': 'str'}, + 'gateway_id': {'key': 'gatewayId', 'type': 'str'}, + 'environment': {'key': 'environment', 'type': 'str'}, + 'upgrade_manifest_url': {'key': 'upgradeManifestUrl', 'type': 'str'}, + 'messaging_namespace': {'key': 'messagingNamespace', 'type': 'str'}, + 'messaging_account': {'key': 'messagingAccount', 'type': 'str'}, + 'messaging_key': {'key': 'messagingKey', 'type': 'str'}, + 'request_queue': {'key': 'requestQueue', 'type': 'str'}, + 'response_topic': {'key': 'responseTopic', 'type': 'str'}, + 'status_blob_signature': {'key': 'statusBlobSignature', 'type': 'str'}, + } + + def __init__(self, *, data_plane_service_base_address: str=None, gateway_id: str=None, environment: str=None, upgrade_manifest_url: str=None, messaging_namespace: str=None, messaging_account: str=None, messaging_key: str=None, request_queue: str=None, response_topic: str=None, status_blob_signature: str=None, **kwargs) -> None: + super(GatewayProfile, self).__init__(**kwargs) + self.data_plane_service_base_address = data_plane_service_base_address + self.gateway_id = gateway_id + self.environment = environment + self.upgrade_manifest_url = upgrade_manifest_url + self.messaging_namespace = messaging_namespace + self.messaging_account = messaging_account + self.messaging_key = messaging_key + self.request_queue = request_queue + self.response_topic = response_topic + self.status_blob_signature = status_blob_signature diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_resource.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_resource.py index fe0fcb08a7ef..25d611b7c8f6 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_resource.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_resource.py @@ -27,7 +27,7 @@ class GatewayResource(Resource): :ivar location: Resource Manager Resource Location. :vartype location: str :param tags: Resource Manager Resource Tags. - :type tags: dict + :type tags: dict[str, str] :param etag: :type etag: str :param created: UTC date and time when gateway was first added to @@ -39,13 +39,11 @@ class GatewayResource(Resource): gateway to auto upgrade itself. If properties value not specified, then we assume upgradeMode = Automatic. Possible values include: 'Manual', 'Automatic' - :type upgrade_mode: str or :class:`UpgradeMode - ` + :type upgrade_mode: str or ~azure.mgmt.servermanager.models.UpgradeMode :param desired_version: Latest available MSI version. :type desired_version: str :param instances: Names of the nodes in the gateway. - :type instances: list of :class:`GatewayStatus - ` + :type instances: list[~azure.mgmt.servermanager.models.GatewayStatus] :param active_message_count: Number of active messages. :type active_message_count: int :param latest_published_msi_version: Last published MSI version. @@ -86,15 +84,15 @@ class GatewayResource(Resource): 'minimum_version': {'key': 'properties.minimumVersion', 'type': 'str'}, } - def __init__(self, tags=None, etag=None, created=None, updated=None, upgrade_mode=None, desired_version=None, instances=None, active_message_count=None, latest_published_msi_version=None, published_time_utc=None): - super(GatewayResource, self).__init__(tags=tags, etag=etag) - self.created = created - self.updated = updated - self.upgrade_mode = upgrade_mode - self.desired_version = desired_version - self.instances = instances - self.active_message_count = active_message_count - self.latest_published_msi_version = latest_published_msi_version - self.published_time_utc = published_time_utc + def __init__(self, **kwargs): + super(GatewayResource, self).__init__(**kwargs) + self.created = kwargs.get('created', None) + self.updated = kwargs.get('updated', None) + self.upgrade_mode = kwargs.get('upgrade_mode', None) + self.desired_version = kwargs.get('desired_version', None) + self.instances = kwargs.get('instances', None) + self.active_message_count = kwargs.get('active_message_count', None) + self.latest_published_msi_version = kwargs.get('latest_published_msi_version', None) + self.published_time_utc = kwargs.get('published_time_utc', None) self.installer_download = None self.minimum_version = None diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_resource_paged.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_resource_paged.py index ac6f6aca03aa..a5a18cbf7d99 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_resource_paged.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_resource_paged.py @@ -14,7 +14,7 @@ class GatewayResourcePaged(Paged): """ - A paging container for iterating over a list of GatewayResource object + A paging container for iterating over a list of :class:`GatewayResource ` object """ _attribute_map = { diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_resource_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_resource_py3.py new file mode 100644 index 000000000000..1fce174a02a0 --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_resource_py3.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class GatewayResource(Resource): + """Data model for an arm gateway resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Manager Resource ID. + :vartype id: str + :ivar type: Resource Manager Resource Type. + :vartype type: str + :ivar name: Resource Manager Resource Name. + :vartype name: str + :ivar location: Resource Manager Resource Location. + :vartype location: str + :param tags: Resource Manager Resource Tags. + :type tags: dict[str, str] + :param etag: + :type etag: str + :param created: UTC date and time when gateway was first added to + management service. + :type created: datetime + :param updated: UTC date and time when node was last updated. + :type updated: datetime + :param upgrade_mode: The upgradeMode property gives the flexibility to + gateway to auto upgrade itself. If properties value not specified, then we + assume upgradeMode = Automatic. Possible values include: 'Manual', + 'Automatic' + :type upgrade_mode: str or ~azure.mgmt.servermanager.models.UpgradeMode + :param desired_version: Latest available MSI version. + :type desired_version: str + :param instances: Names of the nodes in the gateway. + :type instances: list[~azure.mgmt.servermanager.models.GatewayStatus] + :param active_message_count: Number of active messages. + :type active_message_count: int + :param latest_published_msi_version: Last published MSI version. + :type latest_published_msi_version: str + :param published_time_utc: The date/time of the last published gateway. + :type published_time_utc: datetime + :ivar installer_download: Installer download uri. + :vartype installer_download: str + :ivar minimum_version: Minimum gateway version. + :vartype minimum_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'readonly': True}, + 'installer_download': {'readonly': True}, + 'minimum_version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'updated': {'key': 'properties.updated', 'type': 'iso-8601'}, + 'upgrade_mode': {'key': 'properties.upgradeMode', 'type': 'UpgradeMode'}, + 'desired_version': {'key': 'properties.desiredVersion', 'type': 'str'}, + 'instances': {'key': 'properties.instances', 'type': '[GatewayStatus]'}, + 'active_message_count': {'key': 'properties.activeMessageCount', 'type': 'int'}, + 'latest_published_msi_version': {'key': 'properties.latestPublishedMsiVersion', 'type': 'str'}, + 'published_time_utc': {'key': 'properties.publishedTimeUtc', 'type': 'iso-8601'}, + 'installer_download': {'key': 'properties.installerDownload', 'type': 'str'}, + 'minimum_version': {'key': 'properties.minimumVersion', 'type': 'str'}, + } + + def __init__(self, *, tags=None, etag: str=None, created=None, updated=None, upgrade_mode=None, desired_version: str=None, instances=None, active_message_count: int=None, latest_published_msi_version: str=None, published_time_utc=None, **kwargs) -> None: + super(GatewayResource, self).__init__(tags=tags, etag=etag, **kwargs) + self.created = created + self.updated = updated + self.upgrade_mode = upgrade_mode + self.desired_version = desired_version + self.instances = instances + self.active_message_count = active_message_count + self.latest_published_msi_version = latest_published_msi_version + self.published_time_utc = published_time_utc + self.installer_download = None + self.minimum_version = None diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_status.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_status.py index 9e6bcbebc7b9..b956ff40c635 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_status.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_status.py @@ -59,11 +59,11 @@ class GatewayStatus(Model): of the encryption certificate. :type secondary_encryption_certificate_thumbprint: str :param encryption_jwk: The encryption certificate key. - :type encryption_jwk: :class:`EncryptionJwkResource - ` + :type encryption_jwk: + ~azure.mgmt.servermanager.models.EncryptionJwkResource :param secondary_encryption_jwk: The secondary encryption certificate key. - :type secondary_encryption_jwk: :class:`EncryptionJwkResource - ` + :type secondary_encryption_jwk: + ~azure.mgmt.servermanager.models.EncryptionJwkResource :param active_message_count: Active message count. :type active_message_count: int :param latest_published_msi_version: Latest published version of the @@ -101,25 +101,26 @@ class GatewayStatus(Model): 'published_time_utc': {'key': 'publishedTimeUtc', 'type': 'iso-8601'}, } - def __init__(self, available_memory_mbyte=None, gateway_cpu_utilization_percent=None, total_cpu_utilization_percent=None, gateway_version=None, friendly_os_name=None, installed_date=None, logical_processor_count=None, name=None, gateway_id=None, gateway_working_set_mbyte=None, status_updated=None, group_policy_error=None, allow_gateway_group_policy_status=None, require_mfa_group_policy_status=None, encryption_certificate_thumbprint=None, secondary_encryption_certificate_thumbprint=None, encryption_jwk=None, secondary_encryption_jwk=None, active_message_count=None, latest_published_msi_version=None, published_time_utc=None): - self.available_memory_mbyte = available_memory_mbyte - self.gateway_cpu_utilization_percent = gateway_cpu_utilization_percent - self.total_cpu_utilization_percent = total_cpu_utilization_percent - self.gateway_version = gateway_version - self.friendly_os_name = friendly_os_name - self.installed_date = installed_date - self.logical_processor_count = logical_processor_count - self.name = name - self.gateway_id = gateway_id - self.gateway_working_set_mbyte = gateway_working_set_mbyte - self.status_updated = status_updated - self.group_policy_error = group_policy_error - self.allow_gateway_group_policy_status = allow_gateway_group_policy_status - self.require_mfa_group_policy_status = require_mfa_group_policy_status - self.encryption_certificate_thumbprint = encryption_certificate_thumbprint - self.secondary_encryption_certificate_thumbprint = secondary_encryption_certificate_thumbprint - self.encryption_jwk = encryption_jwk - self.secondary_encryption_jwk = secondary_encryption_jwk - self.active_message_count = active_message_count - self.latest_published_msi_version = latest_published_msi_version - self.published_time_utc = published_time_utc + def __init__(self, **kwargs): + super(GatewayStatus, self).__init__(**kwargs) + self.available_memory_mbyte = kwargs.get('available_memory_mbyte', None) + self.gateway_cpu_utilization_percent = kwargs.get('gateway_cpu_utilization_percent', None) + self.total_cpu_utilization_percent = kwargs.get('total_cpu_utilization_percent', None) + self.gateway_version = kwargs.get('gateway_version', None) + self.friendly_os_name = kwargs.get('friendly_os_name', None) + self.installed_date = kwargs.get('installed_date', None) + self.logical_processor_count = kwargs.get('logical_processor_count', None) + self.name = kwargs.get('name', None) + self.gateway_id = kwargs.get('gateway_id', None) + self.gateway_working_set_mbyte = kwargs.get('gateway_working_set_mbyte', None) + self.status_updated = kwargs.get('status_updated', None) + self.group_policy_error = kwargs.get('group_policy_error', None) + self.allow_gateway_group_policy_status = kwargs.get('allow_gateway_group_policy_status', None) + self.require_mfa_group_policy_status = kwargs.get('require_mfa_group_policy_status', None) + self.encryption_certificate_thumbprint = kwargs.get('encryption_certificate_thumbprint', None) + self.secondary_encryption_certificate_thumbprint = kwargs.get('secondary_encryption_certificate_thumbprint', None) + self.encryption_jwk = kwargs.get('encryption_jwk', None) + self.secondary_encryption_jwk = kwargs.get('secondary_encryption_jwk', None) + self.active_message_count = kwargs.get('active_message_count', None) + self.latest_published_msi_version = kwargs.get('latest_published_msi_version', None) + self.published_time_utc = kwargs.get('published_time_utc', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_status_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_status_py3.py new file mode 100644 index 000000000000..bc74c4eff456 --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/gateway_status_py3.py @@ -0,0 +1,126 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GatewayStatus(Model): + """Expanded gateway status information. + + :param available_memory_mbyte: The available memory on the gateway host + machine in megabytes. + :type available_memory_mbyte: float + :param gateway_cpu_utilization_percent: The CPU utilization of the gateway + process (numeric value between 0 and 100). + :type gateway_cpu_utilization_percent: float + :param total_cpu_utilization_percent: CPU Utilization of the whole system. + :type total_cpu_utilization_percent: float + :param gateway_version: The version of the gateway that is installed on + the system. + :type gateway_version: str + :param friendly_os_name: The Plaintext description of the OS on the + gateway. + :type friendly_os_name: str + :param installed_date: The date the gateway was installed. + :type installed_date: datetime + :param logical_processor_count: Number of logical processors in the + gateway system. + :type logical_processor_count: int + :param name: The computer name of the gateway system. + :type name: str + :param gateway_id: The gateway resource ID. + :type gateway_id: str + :param gateway_working_set_mbyte: The working set size of the gateway + process in megabytes. + :type gateway_working_set_mbyte: float + :param status_updated: UTC date and time when gateway status was last + updated. + :type status_updated: datetime + :param group_policy_error: The group policy error. + :type group_policy_error: str + :param allow_gateway_group_policy_status: Status of the + allowGatewayGroupPolicy setting. + :type allow_gateway_group_policy_status: bool + :param require_mfa_group_policy_status: Status of the + requireMfaGroupPolicy setting. + :type require_mfa_group_policy_status: bool + :param encryption_certificate_thumbprint: Thumbprint of the encryption + certificate. + :type encryption_certificate_thumbprint: str + :param secondary_encryption_certificate_thumbprint: Secondary thumbprint + of the encryption certificate. + :type secondary_encryption_certificate_thumbprint: str + :param encryption_jwk: The encryption certificate key. + :type encryption_jwk: + ~azure.mgmt.servermanager.models.EncryptionJwkResource + :param secondary_encryption_jwk: The secondary encryption certificate key. + :type secondary_encryption_jwk: + ~azure.mgmt.servermanager.models.EncryptionJwkResource + :param active_message_count: Active message count. + :type active_message_count: int + :param latest_published_msi_version: Latest published version of the + gateway install MSI. + :type latest_published_msi_version: str + :param published_time_utc: Gateway install MSI published time. + :type published_time_utc: datetime + """ + + _validation = { + 'gateway_cpu_utilization_percent': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'available_memory_mbyte': {'key': 'availableMemoryMByte', 'type': 'float'}, + 'gateway_cpu_utilization_percent': {'key': 'gatewayCpuUtilizationPercent', 'type': 'float'}, + 'total_cpu_utilization_percent': {'key': 'totalCpuUtilizationPercent', 'type': 'float'}, + 'gateway_version': {'key': 'gatewayVersion', 'type': 'str'}, + 'friendly_os_name': {'key': 'friendlyOsName', 'type': 'str'}, + 'installed_date': {'key': 'installedDate', 'type': 'iso-8601'}, + 'logical_processor_count': {'key': 'logicalProcessorCount', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'gateway_id': {'key': 'gatewayId', 'type': 'str'}, + 'gateway_working_set_mbyte': {'key': 'gatewayWorkingSetMByte', 'type': 'float'}, + 'status_updated': {'key': 'statusUpdated', 'type': 'iso-8601'}, + 'group_policy_error': {'key': 'groupPolicyError', 'type': 'str'}, + 'allow_gateway_group_policy_status': {'key': 'allowGatewayGroupPolicyStatus', 'type': 'bool'}, + 'require_mfa_group_policy_status': {'key': 'requireMfaGroupPolicyStatus', 'type': 'bool'}, + 'encryption_certificate_thumbprint': {'key': 'encryptionCertificateThumbprint', 'type': 'str'}, + 'secondary_encryption_certificate_thumbprint': {'key': 'secondaryEncryptionCertificateThumbprint', 'type': 'str'}, + 'encryption_jwk': {'key': 'encryptionJwk', 'type': 'EncryptionJwkResource'}, + 'secondary_encryption_jwk': {'key': 'secondaryEncryptionJwk', 'type': 'EncryptionJwkResource'}, + 'active_message_count': {'key': 'activeMessageCount', 'type': 'int'}, + 'latest_published_msi_version': {'key': 'latestPublishedMsiVersion', 'type': 'str'}, + 'published_time_utc': {'key': 'publishedTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, *, available_memory_mbyte: float=None, gateway_cpu_utilization_percent: float=None, total_cpu_utilization_percent: float=None, gateway_version: str=None, friendly_os_name: str=None, installed_date=None, logical_processor_count: int=None, name: str=None, gateway_id: str=None, gateway_working_set_mbyte: float=None, status_updated=None, group_policy_error: str=None, allow_gateway_group_policy_status: bool=None, require_mfa_group_policy_status: bool=None, encryption_certificate_thumbprint: str=None, secondary_encryption_certificate_thumbprint: str=None, encryption_jwk=None, secondary_encryption_jwk=None, active_message_count: int=None, latest_published_msi_version: str=None, published_time_utc=None, **kwargs) -> None: + super(GatewayStatus, self).__init__(**kwargs) + self.available_memory_mbyte = available_memory_mbyte + self.gateway_cpu_utilization_percent = gateway_cpu_utilization_percent + self.total_cpu_utilization_percent = total_cpu_utilization_percent + self.gateway_version = gateway_version + self.friendly_os_name = friendly_os_name + self.installed_date = installed_date + self.logical_processor_count = logical_processor_count + self.name = name + self.gateway_id = gateway_id + self.gateway_working_set_mbyte = gateway_working_set_mbyte + self.status_updated = status_updated + self.group_policy_error = group_policy_error + self.allow_gateway_group_policy_status = allow_gateway_group_policy_status + self.require_mfa_group_policy_status = require_mfa_group_policy_status + self.encryption_certificate_thumbprint = encryption_certificate_thumbprint + self.secondary_encryption_certificate_thumbprint = secondary_encryption_certificate_thumbprint + self.encryption_jwk = encryption_jwk + self.secondary_encryption_jwk = secondary_encryption_jwk + self.active_message_count = active_message_count + self.latest_published_msi_version = latest_published_msi_version + self.published_time_utc = published_time_utc diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_parameters.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_parameters.py index 4c0cb1658790..67bbe2b8c0a8 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_parameters.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_parameters.py @@ -38,10 +38,11 @@ class NodeParameters(Model): 'password': {'key': 'properties.password', 'type': 'str'}, } - def __init__(self, location=None, tags=None, gateway_id=None, connection_name=None, user_name=None, password=None): - self.location = location - self.tags = tags - self.gateway_id = gateway_id - self.connection_name = connection_name - self.user_name = user_name - self.password = password + def __init__(self, **kwargs): + super(NodeParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.gateway_id = kwargs.get('gateway_id', None) + self.connection_name = kwargs.get('connection_name', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_parameters_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_parameters_py3.py new file mode 100644 index 000000000000..9a5c67376dca --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_parameters_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeParameters(Model): + """Parameter collection for operations on arm node resource. + + :param location: Location of the resource. + :type location: str + :param tags: Resource tags. + :type tags: object + :param gateway_id: Gateway ID which will manage this node. + :type gateway_id: str + :param connection_name: myhost.domain.com + :type connection_name: str + :param user_name: User name to be used to connect to node. + :type user_name: str + :param password: Password associated with user name. + :type password: str + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'gateway_id': {'key': 'properties.gatewayId', 'type': 'str'}, + 'connection_name': {'key': 'properties.connectionName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, gateway_id: str=None, connection_name: str=None, user_name: str=None, password: str=None, **kwargs) -> None: + super(NodeParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.gateway_id = gateway_id + self.connection_name = connection_name + self.user_name = user_name + self.password = password diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_resource.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_resource.py index 182a4ad23a6a..ac2051a80222 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_resource.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_resource.py @@ -27,7 +27,7 @@ class NodeResource(Resource): :ivar location: Resource Manager Resource Location. :vartype location: str :param tags: Resource Manager Resource Tags. - :type tags: dict + :type tags: dict[str, str] :param etag: :type etag: str :param gateway_id: ID of the gateway. @@ -61,9 +61,9 @@ class NodeResource(Resource): 'updated': {'key': 'properties.updated', 'type': 'iso-8601'}, } - def __init__(self, tags=None, etag=None, gateway_id=None, connection_name=None, created=None, updated=None): - super(NodeResource, self).__init__(tags=tags, etag=etag) - self.gateway_id = gateway_id - self.connection_name = connection_name - self.created = created - self.updated = updated + def __init__(self, **kwargs): + super(NodeResource, self).__init__(**kwargs) + self.gateway_id = kwargs.get('gateway_id', None) + self.connection_name = kwargs.get('connection_name', None) + self.created = kwargs.get('created', None) + self.updated = kwargs.get('updated', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_resource_paged.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_resource_paged.py index 41fcf74d4120..9e32455d9bfd 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_resource_paged.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_resource_paged.py @@ -14,7 +14,7 @@ class NodeResourcePaged(Paged): """ - A paging container for iterating over a list of NodeResource object + A paging container for iterating over a list of :class:`NodeResource ` object """ _attribute_map = { diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_resource_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_resource_py3.py new file mode 100644 index 000000000000..99934a08adee --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_resource_py3.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class NodeResource(Resource): + """A Node Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Manager Resource ID. + :vartype id: str + :ivar type: Resource Manager Resource Type. + :vartype type: str + :ivar name: Resource Manager Resource Name. + :vartype name: str + :ivar location: Resource Manager Resource Location. + :vartype location: str + :param tags: Resource Manager Resource Tags. + :type tags: dict[str, str] + :param etag: + :type etag: str + :param gateway_id: ID of the gateway. + :type gateway_id: str + :param connection_name: myhost.domain.com + :type connection_name: str + :param created: UTC date and time when node was first added to management + service. + :type created: datetime + :param updated: UTC date and time when node was last updated. + :type updated: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'gateway_id': {'key': 'properties.gatewayId', 'type': 'str'}, + 'connection_name': {'key': 'properties.connectionName', 'type': 'str'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'updated': {'key': 'properties.updated', 'type': 'iso-8601'}, + } + + def __init__(self, *, tags=None, etag: str=None, gateway_id: str=None, connection_name: str=None, created=None, updated=None, **kwargs) -> None: + super(NodeResource, self).__init__(tags=tags, etag=etag, **kwargs) + self.gateway_id = gateway_id + self.connection_name = connection_name + self.created = created + self.updated = updated diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_parameters.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_parameters.py index fa73e110fa0e..5eaca9f78758 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_parameters.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_parameters.py @@ -23,5 +23,6 @@ class PowerShellCommandParameters(Model): 'command': {'key': 'properties.command', 'type': 'str'}, } - def __init__(self, command=None): - self.command = command + def __init__(self, **kwargs): + super(PowerShellCommandParameters, self).__init__(**kwargs) + self.command = kwargs.get('command', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_parameters_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_parameters_py3.py new file mode 100644 index 000000000000..eb21026682ff --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_parameters_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PowerShellCommandParameters(Model): + """The parameters to a PowerShell script execution command. + + :param command: Script to execute. + :type command: str + """ + + _attribute_map = { + 'command': {'key': 'properties.command', 'type': 'str'}, + } + + def __init__(self, *, command: str=None, **kwargs) -> None: + super(PowerShellCommandParameters, self).__init__(**kwargs) + self.command = command diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_result.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_result.py index bf8be2422d6b..9fa6757654cc 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_result.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_result.py @@ -38,8 +38,8 @@ class PowerShellCommandResult(Model): :type message: str :param descriptions: Collection of PromptFieldDescription objects that contains the user input. - :type descriptions: list of :class:`PromptFieldDescription - ` + :type descriptions: + list[~azure.mgmt.servermanager.models.PromptFieldDescription] """ _attribute_map = { @@ -55,14 +55,15 @@ class PowerShellCommandResult(Model): 'descriptions': {'key': 'descriptions', 'type': '[PromptFieldDescription]'}, } - def __init__(self, message_type=None, foreground_color=None, background_color=None, value=None, prompt=None, exit_code=None, id=None, caption=None, message=None, descriptions=None): - self.message_type = message_type - self.foreground_color = foreground_color - self.background_color = background_color - self.value = value - self.prompt = prompt - self.exit_code = exit_code - self.id = id - self.caption = caption - self.message = message - self.descriptions = descriptions + def __init__(self, **kwargs): + super(PowerShellCommandResult, self).__init__(**kwargs) + self.message_type = kwargs.get('message_type', None) + self.foreground_color = kwargs.get('foreground_color', None) + self.background_color = kwargs.get('background_color', None) + self.value = kwargs.get('value', None) + self.prompt = kwargs.get('prompt', None) + self.exit_code = kwargs.get('exit_code', None) + self.id = kwargs.get('id', None) + self.caption = kwargs.get('caption', None) + self.message = kwargs.get('message', None) + self.descriptions = kwargs.get('descriptions', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_result_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_result_py3.py new file mode 100644 index 000000000000..bd6aed4d0407 --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_result_py3.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PowerShellCommandResult(Model): + """Results from invoking a PowerShell command. + + :param message_type: The type of message. + :type message_type: int + :param foreground_color: The HTML color string representing the foreground + color. + :type foreground_color: str + :param background_color: The HTML color string representing the background + color. + :type background_color: str + :param value: Actual result text from the PowerShell Command. + :type value: str + :param prompt: The interactive prompt message. + :type prompt: str + :param exit_code: The exit code from a executable that was called from + PowerShell. + :type exit_code: int + :param id: ID of the prompt message. + :type id: int + :param caption: Text that precedes the prompt. + :type caption: str + :param message: Text of the prompt. + :type message: str + :param descriptions: Collection of PromptFieldDescription objects that + contains the user input. + :type descriptions: + list[~azure.mgmt.servermanager.models.PromptFieldDescription] + """ + + _attribute_map = { + 'message_type': {'key': 'messageType', 'type': 'int'}, + 'foreground_color': {'key': 'foregroundColor', 'type': 'str'}, + 'background_color': {'key': 'backgroundColor', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'prompt': {'key': 'prompt', 'type': 'str'}, + 'exit_code': {'key': 'exitCode', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'int'}, + 'caption': {'key': 'caption', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'descriptions': {'key': 'descriptions', 'type': '[PromptFieldDescription]'}, + } + + def __init__(self, *, message_type: int=None, foreground_color: str=None, background_color: str=None, value: str=None, prompt: str=None, exit_code: int=None, id: int=None, caption: str=None, message: str=None, descriptions=None, **kwargs) -> None: + super(PowerShellCommandResult, self).__init__(**kwargs) + self.message_type = message_type + self.foreground_color = foreground_color + self.background_color = background_color + self.value = value + self.prompt = prompt + self.exit_code = exit_code + self.id = id + self.caption = caption + self.message = message + self.descriptions = descriptions diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_results.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_results.py index 053e2607d5ce..c3f92d25ed00 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_results.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_results.py @@ -16,8 +16,8 @@ class PowerShellCommandResults(Model): """A collection of results from a PowerShell command. :param results: - :type results: list of :class:`PowerShellCommandResult - ` + :type results: + list[~azure.mgmt.servermanager.models.PowerShellCommandResult] :param pssession: :type pssession: str :param command: @@ -33,8 +33,9 @@ class PowerShellCommandResults(Model): 'completed': {'key': 'completed', 'type': 'bool'}, } - def __init__(self, results=None, pssession=None, command=None, completed=None): - self.results = results - self.pssession = pssession - self.command = command - self.completed = completed + def __init__(self, **kwargs): + super(PowerShellCommandResults, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + self.pssession = kwargs.get('pssession', None) + self.command = kwargs.get('command', None) + self.completed = kwargs.get('completed', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_results_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_results_py3.py new file mode 100644 index 000000000000..f47002227fb7 --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_results_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PowerShellCommandResults(Model): + """A collection of results from a PowerShell command. + + :param results: + :type results: + list[~azure.mgmt.servermanager.models.PowerShellCommandResult] + :param pssession: + :type pssession: str + :param command: + :type command: str + :param completed: + :type completed: bool + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[PowerShellCommandResult]'}, + 'pssession': {'key': 'pssession', 'type': 'str'}, + 'command': {'key': 'command', 'type': 'str'}, + 'completed': {'key': 'completed', 'type': 'bool'}, + } + + def __init__(self, *, results=None, pssession: str=None, command: str=None, completed: bool=None, **kwargs) -> None: + super(PowerShellCommandResults, self).__init__(**kwargs) + self.results = results + self.pssession = pssession + self.command = command + self.completed = completed diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_status.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_status.py index a3c0b8ed6c28..02b4a9ab7590 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_status.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_status.py @@ -27,12 +27,12 @@ class PowerShellCommandStatus(Resource): :ivar location: Resource Manager Resource Location. :vartype location: str :param tags: Resource Manager Resource Tags. - :type tags: dict + :type tags: dict[str, str] :param etag: :type etag: str :param results: - :type results: list of :class:`PowerShellCommandResult - ` + :type results: + list[~azure.mgmt.servermanager.models.PowerShellCommandResult] :param pssession: :type pssession: str :param command: @@ -61,9 +61,9 @@ class PowerShellCommandStatus(Resource): 'completed': {'key': 'properties.completed', 'type': 'bool'}, } - def __init__(self, tags=None, etag=None, results=None, pssession=None, command=None, completed=None): - super(PowerShellCommandStatus, self).__init__(tags=tags, etag=etag) - self.results = results - self.pssession = pssession - self.command = command - self.completed = completed + def __init__(self, **kwargs): + super(PowerShellCommandStatus, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + self.pssession = kwargs.get('pssession', None) + self.command = kwargs.get('command', None) + self.completed = kwargs.get('completed', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_status_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_status_py3.py new file mode 100644 index 000000000000..582a68a08f5c --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_command_status_py3.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class PowerShellCommandStatus(Resource): + """Result status from invoking a PowerShell command. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Manager Resource ID. + :vartype id: str + :ivar type: Resource Manager Resource Type. + :vartype type: str + :ivar name: Resource Manager Resource Name. + :vartype name: str + :ivar location: Resource Manager Resource Location. + :vartype location: str + :param tags: Resource Manager Resource Tags. + :type tags: dict[str, str] + :param etag: + :type etag: str + :param results: + :type results: + list[~azure.mgmt.servermanager.models.PowerShellCommandResult] + :param pssession: + :type pssession: str + :param command: + :type command: str + :param completed: + :type completed: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'results': {'key': 'properties.results', 'type': '[PowerShellCommandResult]'}, + 'pssession': {'key': 'properties.pssession', 'type': 'str'}, + 'command': {'key': 'properties.command', 'type': 'str'}, + 'completed': {'key': 'properties.completed', 'type': 'bool'}, + } + + def __init__(self, *, tags=None, etag: str=None, results=None, pssession: str=None, command: str=None, completed: bool=None, **kwargs) -> None: + super(PowerShellCommandStatus, self).__init__(tags=tags, etag=etag, **kwargs) + self.results = results + self.pssession = pssession + self.command = command + self.completed = completed diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_session_resource.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_session_resource.py index 95cd08d2d822..410470c0b870 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_session_resource.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_session_resource.py @@ -28,7 +28,7 @@ class PowerShellSessionResource(Resource): :ivar location: Resource Manager Resource Location. :vartype location: str :param tags: Resource Manager Resource Tags. - :type tags: dict + :type tags: dict[str, str] :param etag: :type etag: str :param session_id: The PowerShell Session ID. @@ -43,7 +43,7 @@ class PowerShellSessionResource(Resource): :param expires_on: Timestamp when the runspace expires. :type expires_on: datetime :param version: - :type version: :class:`Version ` + :type version: ~azure.mgmt.servermanager.models.Version :param power_shell_session_resource_name: Name of the runspace. :type power_shell_session_resource_name: str """ @@ -71,12 +71,12 @@ class PowerShellSessionResource(Resource): 'power_shell_session_resource_name': {'key': 'properties.name', 'type': 'str'}, } - def __init__(self, tags=None, etag=None, session_id=None, state=None, runspace_availability=None, disconnected_on=None, expires_on=None, version=None, power_shell_session_resource_name=None): - super(PowerShellSessionResource, self).__init__(tags=tags, etag=etag) - self.session_id = session_id - self.state = state - self.runspace_availability = runspace_availability - self.disconnected_on = disconnected_on - self.expires_on = expires_on - self.version = version - self.power_shell_session_resource_name = power_shell_session_resource_name + def __init__(self, **kwargs): + super(PowerShellSessionResource, self).__init__(**kwargs) + self.session_id = kwargs.get('session_id', None) + self.state = kwargs.get('state', None) + self.runspace_availability = kwargs.get('runspace_availability', None) + self.disconnected_on = kwargs.get('disconnected_on', None) + self.expires_on = kwargs.get('expires_on', None) + self.version = kwargs.get('version', None) + self.power_shell_session_resource_name = kwargs.get('power_shell_session_resource_name', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_session_resource_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_session_resource_py3.py new file mode 100644 index 000000000000..3694d8a48835 --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_session_resource_py3.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class PowerShellSessionResource(Resource): + """A PowerShell session resource (practically equivalent to a runspace + instance). + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Manager Resource ID. + :vartype id: str + :ivar type: Resource Manager Resource Type. + :vartype type: str + :ivar name: Resource Manager Resource Name. + :vartype name: str + :ivar location: Resource Manager Resource Location. + :vartype location: str + :param tags: Resource Manager Resource Tags. + :type tags: dict[str, str] + :param etag: + :type etag: str + :param session_id: The PowerShell Session ID. + :type session_id: str + :param state: The runspace state. + :type state: str + :param runspace_availability: The availability of the runspace. + :type runspace_availability: str + :param disconnected_on: Timestamp of last time the service disconnected + from the runspace. + :type disconnected_on: datetime + :param expires_on: Timestamp when the runspace expires. + :type expires_on: datetime + :param version: + :type version: ~azure.mgmt.servermanager.models.Version + :param power_shell_session_resource_name: Name of the runspace. + :type power_shell_session_resource_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'session_id': {'key': 'properties.sessionId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'runspace_availability': {'key': 'properties.runspaceAvailability', 'type': 'str'}, + 'disconnected_on': {'key': 'properties.disconnectedOn', 'type': 'iso-8601'}, + 'expires_on': {'key': 'properties.expiresOn', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'Version'}, + 'power_shell_session_resource_name': {'key': 'properties.name', 'type': 'str'}, + } + + def __init__(self, *, tags=None, etag: str=None, session_id: str=None, state: str=None, runspace_availability: str=None, disconnected_on=None, expires_on=None, version=None, power_shell_session_resource_name: str=None, **kwargs) -> None: + super(PowerShellSessionResource, self).__init__(tags=tags, etag=etag, **kwargs) + self.session_id = session_id + self.state = state + self.runspace_availability = runspace_availability + self.disconnected_on = disconnected_on + self.expires_on = expires_on + self.version = version + self.power_shell_session_resource_name = power_shell_session_resource_name diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_session_resources.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_session_resources.py index 13c8e096d1b9..c6738ae0bbd8 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_session_resources.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_session_resources.py @@ -16,8 +16,8 @@ class PowerShellSessionResources(Model): """A collection of PowerShell session resources. :param value: Collection of PowerShell session resources. - :type value: list of :class:`PowerShellSessionResource - ` + :type value: + list[~azure.mgmt.servermanager.models.PowerShellSessionResource] :param next_link: The URL to the next set of resources. :type next_link: str """ @@ -27,6 +27,7 @@ class PowerShellSessionResources(Model): 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, value=None, next_link=None): - self.value = value - self.next_link = next_link + def __init__(self, **kwargs): + super(PowerShellSessionResources, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_session_resources_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_session_resources_py3.py new file mode 100644 index 000000000000..95d15f4b8849 --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_session_resources_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PowerShellSessionResources(Model): + """A collection of PowerShell session resources. + + :param value: Collection of PowerShell session resources. + :type value: + list[~azure.mgmt.servermanager.models.PowerShellSessionResource] + :param next_link: The URL to the next set of resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PowerShellSessionResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(PowerShellSessionResources, self).__init__(**kwargs) + self.value = value + self.next_link = next_link diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_tab_completion_parameters.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_tab_completion_parameters.py index c7ebb3148dd9..3174fed15f18 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_tab_completion_parameters.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_tab_completion_parameters.py @@ -23,5 +23,6 @@ class PowerShellTabCompletionParameters(Model): 'command': {'key': 'command', 'type': 'str'}, } - def __init__(self, command=None): - self.command = command + def __init__(self, **kwargs): + super(PowerShellTabCompletionParameters, self).__init__(**kwargs) + self.command = kwargs.get('command', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_tab_completion_parameters_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_tab_completion_parameters_py3.py new file mode 100644 index 000000000000..aea7a99ecb8e --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_tab_completion_parameters_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PowerShellTabCompletionParameters(Model): + """Collection of parameters for PowerShell tab completion. + + :param command: Command to get tab completion for. + :type command: str + """ + + _attribute_map = { + 'command': {'key': 'command', 'type': 'str'}, + } + + def __init__(self, *, command: str=None, **kwargs) -> None: + super(PowerShellTabCompletionParameters, self).__init__(**kwargs) + self.command = command diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_tab_completion_results.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_tab_completion_results.py index 4a8d3fbca3a4..65ff03f2dfb9 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_tab_completion_results.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_tab_completion_results.py @@ -17,12 +17,13 @@ class PowerShellTabCompletionResults(Model): through. :param results: - :type results: list of str + :type results: list[str] """ _attribute_map = { 'results': {'key': 'results', 'type': '[str]'}, } - def __init__(self, results=None): - self.results = results + def __init__(self, **kwargs): + super(PowerShellTabCompletionResults, self).__init__(**kwargs) + self.results = kwargs.get('results', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_tab_completion_results_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_tab_completion_results_py3.py new file mode 100644 index 000000000000..e0c7c8c3cb55 --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/power_shell_tab_completion_results_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PowerShellTabCompletionResults(Model): + """An array of strings representing the different values that can be selected + through. + + :param results: + :type results: list[str] + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[str]'}, + } + + def __init__(self, *, results=None, **kwargs) -> None: + super(PowerShellTabCompletionResults, self).__init__(**kwargs) + self.results = results diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/prompt_field_description.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/prompt_field_description.py index b0cd9f71a079..92d30dfef4e1 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/prompt_field_description.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/prompt_field_description.py @@ -26,8 +26,8 @@ class PromptFieldDescription(Model): :type prompt_field_type_is_list: bool :param prompt_field_type: Possible values include: 'String', 'SecureString', 'Credential' - :type prompt_field_type: str or :class:`PromptFieldType - ` + :type prompt_field_type: str or + ~azure.mgmt.servermanager.models.PromptFieldType """ _attribute_map = { @@ -38,9 +38,10 @@ class PromptFieldDescription(Model): 'prompt_field_type': {'key': 'promptFieldType', 'type': 'PromptFieldType'}, } - def __init__(self, name=None, label=None, help_message=None, prompt_field_type_is_list=None, prompt_field_type=None): - self.name = name - self.label = label - self.help_message = help_message - self.prompt_field_type_is_list = prompt_field_type_is_list - self.prompt_field_type = prompt_field_type + def __init__(self, **kwargs): + super(PromptFieldDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.label = kwargs.get('label', None) + self.help_message = kwargs.get('help_message', None) + self.prompt_field_type_is_list = kwargs.get('prompt_field_type_is_list', None) + self.prompt_field_type = kwargs.get('prompt_field_type', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/prompt_field_description_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/prompt_field_description_py3.py new file mode 100644 index 000000000000..91362ebd7bfe --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/prompt_field_description_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PromptFieldDescription(Model): + """Field description for the implementation of PSHostUserInterface.Prompt. + + :param name: The name of the prompt. + :type name: str + :param label: The label text of the prompt. + :type label: str + :param help_message: The help message of the prompt. + :type help_message: str + :param prompt_field_type_is_list: When set to 'true' the prompt field type + is a list of values. + :type prompt_field_type_is_list: bool + :param prompt_field_type: Possible values include: 'String', + 'SecureString', 'Credential' + :type prompt_field_type: str or + ~azure.mgmt.servermanager.models.PromptFieldType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'help_message': {'key': 'helpMessage', 'type': 'str'}, + 'prompt_field_type_is_list': {'key': 'promptFieldTypeIsList', 'type': 'bool'}, + 'prompt_field_type': {'key': 'promptFieldType', 'type': 'PromptFieldType'}, + } + + def __init__(self, *, name: str=None, label: str=None, help_message: str=None, prompt_field_type_is_list: bool=None, prompt_field_type=None, **kwargs) -> None: + super(PromptFieldDescription, self).__init__(**kwargs) + self.name = name + self.label = label + self.help_message = help_message + self.prompt_field_type_is_list = prompt_field_type_is_list + self.prompt_field_type = prompt_field_type diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/prompt_message_response.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/prompt_message_response.py index 45c397d9bea5..815987451724 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/prompt_message_response.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/prompt_message_response.py @@ -16,12 +16,13 @@ class PromptMessageResponse(Model): """The response to a prompt message. :param response: The list of responses a cmdlet expects. - :type response: list of str + :type response: list[str] """ _attribute_map = { 'response': {'key': 'response', 'type': '[str]'}, } - def __init__(self, response=None): - self.response = response + def __init__(self, **kwargs): + super(PromptMessageResponse, self).__init__(**kwargs) + self.response = kwargs.get('response', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/prompt_message_response_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/prompt_message_response_py3.py new file mode 100644 index 000000000000..928188579c43 --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/prompt_message_response_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PromptMessageResponse(Model): + """The response to a prompt message. + + :param response: The list of responses a cmdlet expects. + :type response: list[str] + """ + + _attribute_map = { + 'response': {'key': 'response', 'type': '[str]'}, + } + + def __init__(self, *, response=None, **kwargs) -> None: + super(PromptMessageResponse, self).__init__(**kwargs) + self.response = response diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/resource.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/resource.py index cbadc3ea7dea..ba1f26517966 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/resource.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/resource.py @@ -27,7 +27,7 @@ class Resource(Model): :ivar location: Resource Manager Resource Location. :vartype location: str :param tags: Resource Manager Resource Tags. - :type tags: dict + :type tags: dict[str, str] :param etag: :type etag: str """ @@ -48,10 +48,11 @@ class Resource(Model): 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, tags=None, etag=None): + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.type = None self.name = None self.location = None - self.tags = tags - self.etag = etag + self.tags = kwargs.get('tags', None) + self.etag = kwargs.get('etag', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/resource_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/resource_py3.py new file mode 100644 index 000000000000..582be923ec2c --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/resource_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """Resource Manager Resource Information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Manager Resource ID. + :vartype id: str + :ivar type: Resource Manager Resource Type. + :vartype type: str + :ivar name: Resource Manager Resource Name. + :vartype name: str + :ivar location: Resource Manager Resource Location. + :vartype location: str + :param tags: Resource Manager Resource Tags. + :type tags: dict[str, str] + :param etag: + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, tags=None, etag: str=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.location = None + self.tags = tags + self.etag = etag diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/server_management_enums.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/server_management_enums.py index 625d99532693..919d0713b223 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/server_management_enums.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/server_management_enums.py @@ -12,36 +12,36 @@ from enum import Enum -class UpgradeMode(Enum): +class UpgradeMode(str, Enum): manual = "Manual" automatic = "Automatic" -class RetentionPeriod(Enum): +class RetentionPeriod(str, Enum): session = "Session" persistent = "Persistent" -class CredentialDataFormat(Enum): +class CredentialDataFormat(str, Enum): rsa_encrypted = "RsaEncrypted" -class PromptFieldType(Enum): +class PromptFieldType(str, Enum): string = "String" secure_string = "SecureString" credential = "Credential" -class GatewayExpandOption(Enum): +class GatewayExpandOption(str, Enum): status = "status" download = "download" -class PowerShellExpandOption(Enum): +class PowerShellExpandOption(str, Enum): output = "output" diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/session_parameters.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/session_parameters.py index 47e2256020fd..ac0d7f429405 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/session_parameters.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/session_parameters.py @@ -21,12 +21,12 @@ class SessionParameters(Model): :type password: str :param retention_period: Session retention period. Possible values include: 'Session', 'Persistent' - :type retention_period: str or :class:`RetentionPeriod - ` + :type retention_period: str or + ~azure.mgmt.servermanager.models.RetentionPeriod :param credential_data_format: Credential data format. Possible values include: 'RsaEncrypted' - :type credential_data_format: str or :class:`CredentialDataFormat - ` + :type credential_data_format: str or + ~azure.mgmt.servermanager.models.CredentialDataFormat :param encryption_certificate_thumbprint: Encryption certificate thumbprint. :type encryption_certificate_thumbprint: str @@ -40,9 +40,10 @@ class SessionParameters(Model): 'encryption_certificate_thumbprint': {'key': 'properties.EncryptionCertificateThumbprint', 'type': 'str'}, } - def __init__(self, user_name=None, password=None, retention_period=None, credential_data_format=None, encryption_certificate_thumbprint=None): - self.user_name = user_name - self.password = password - self.retention_period = retention_period - self.credential_data_format = credential_data_format - self.encryption_certificate_thumbprint = encryption_certificate_thumbprint + def __init__(self, **kwargs): + super(SessionParameters, self).__init__(**kwargs) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.retention_period = kwargs.get('retention_period', None) + self.credential_data_format = kwargs.get('credential_data_format', None) + self.encryption_certificate_thumbprint = kwargs.get('encryption_certificate_thumbprint', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/session_parameters_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/session_parameters_py3.py new file mode 100644 index 000000000000..a01c84a6bfb7 --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/session_parameters_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SessionParameters(Model): + """Parameter collection for creation and other operations on sessions. + + :param user_name: Encrypted User name to be used to connect to node. + :type user_name: str + :param password: Encrypted Password associated with user name. + :type password: str + :param retention_period: Session retention period. Possible values + include: 'Session', 'Persistent' + :type retention_period: str or + ~azure.mgmt.servermanager.models.RetentionPeriod + :param credential_data_format: Credential data format. Possible values + include: 'RsaEncrypted' + :type credential_data_format: str or + ~azure.mgmt.servermanager.models.CredentialDataFormat + :param encryption_certificate_thumbprint: Encryption certificate + thumbprint. + :type encryption_certificate_thumbprint: str + """ + + _attribute_map = { + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'retention_period': {'key': 'properties.retentionPeriod', 'type': 'RetentionPeriod'}, + 'credential_data_format': {'key': 'properties.credentialDataFormat', 'type': 'CredentialDataFormat'}, + 'encryption_certificate_thumbprint': {'key': 'properties.EncryptionCertificateThumbprint', 'type': 'str'}, + } + + def __init__(self, *, user_name: str=None, password: str=None, retention_period=None, credential_data_format=None, encryption_certificate_thumbprint: str=None, **kwargs) -> None: + super(SessionParameters, self).__init__(**kwargs) + self.user_name = user_name + self.password = password + self.retention_period = retention_period + self.credential_data_format = credential_data_format + self.encryption_certificate_thumbprint = encryption_certificate_thumbprint diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/session_resource.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/session_resource.py index cc3ab92414b2..2023d8cf54d1 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/session_resource.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/session_resource.py @@ -27,7 +27,7 @@ class SessionResource(Resource): :ivar location: Resource Manager Resource Location. :vartype location: str :param tags: Resource Manager Resource Tags. - :type tags: dict + :type tags: dict[str, str] :param etag: :type etag: str :param user_name: The username connecting to the session. @@ -58,8 +58,8 @@ class SessionResource(Resource): 'updated': {'key': 'properties.updated', 'type': 'iso-8601'}, } - def __init__(self, tags=None, etag=None, user_name=None, created=None, updated=None): - super(SessionResource, self).__init__(tags=tags, etag=etag) - self.user_name = user_name - self.created = created - self.updated = updated + def __init__(self, **kwargs): + super(SessionResource, self).__init__(**kwargs) + self.user_name = kwargs.get('user_name', None) + self.created = kwargs.get('created', None) + self.updated = kwargs.get('updated', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/session_resource_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/session_resource_py3.py new file mode 100644 index 000000000000..7bb8f4b7341f --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/session_resource_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class SessionResource(Resource): + """The session object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Manager Resource ID. + :vartype id: str + :ivar type: Resource Manager Resource Type. + :vartype type: str + :ivar name: Resource Manager Resource Name. + :vartype name: str + :ivar location: Resource Manager Resource Location. + :vartype location: str + :param tags: Resource Manager Resource Tags. + :type tags: dict[str, str] + :param etag: + :type etag: str + :param user_name: The username connecting to the session. + :type user_name: str + :param created: UTC date and time when node was first added to management + service. + :type created: datetime + :param updated: UTC date and time when node was last updated. + :type updated: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'updated': {'key': 'properties.updated', 'type': 'iso-8601'}, + } + + def __init__(self, *, tags=None, etag: str=None, user_name: str=None, created=None, updated=None, **kwargs) -> None: + super(SessionResource, self).__init__(tags=tags, etag=etag, **kwargs) + self.user_name = user_name + self.created = created + self.updated = updated diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/version.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/version.py index c01bf6916d3a..ad73ac50205a 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/version.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/version.py @@ -38,10 +38,11 @@ class Version(Model): 'minor_revision': {'key': 'minorRevision', 'type': 'int'}, } - def __init__(self, major=None, minor=None, build=None, revision=None, major_revision=None, minor_revision=None): - self.major = major - self.minor = minor - self.build = build - self.revision = revision - self.major_revision = major_revision - self.minor_revision = minor_revision + def __init__(self, **kwargs): + super(Version, self).__init__(**kwargs) + self.major = kwargs.get('major', None) + self.minor = kwargs.get('minor', None) + self.build = kwargs.get('build', None) + self.revision = kwargs.get('revision', None) + self.major_revision = kwargs.get('major_revision', None) + self.minor_revision = kwargs.get('minor_revision', None) diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/models/version_py3.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/version_py3.py new file mode 100644 index 000000000000..81a59f657708 --- /dev/null +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/models/version_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Version(Model): + """A multipart-numeric version number. + + :param major: The leftmost number of the version. + :type major: int + :param minor: The second leftmost number of the version. + :type minor: int + :param build: The third number of the version. + :type build: int + :param revision: The fourth number of the version. + :type revision: int + :param major_revision: The MSW of the fourth part. + :type major_revision: int + :param minor_revision: The LSW of the fourth part. + :type minor_revision: int + """ + + _attribute_map = { + 'major': {'key': 'major', 'type': 'int'}, + 'minor': {'key': 'minor', 'type': 'int'}, + 'build': {'key': 'build', 'type': 'int'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'major_revision': {'key': 'majorRevision', 'type': 'int'}, + 'minor_revision': {'key': 'minorRevision', 'type': 'int'}, + } + + def __init__(self, *, major: int=None, minor: int=None, build: int=None, revision: int=None, major_revision: int=None, minor_revision: int=None, **kwargs) -> None: + super(Version, self).__init__(**kwargs) + self.major = major + self.minor = minor + self.build = build + self.revision = revision + self.major_revision = major_revision + self.minor_revision = minor_revision diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/operations/gateway_operations.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/operations/gateway_operations.py index 0fcad9d9965c..4414ce6c8ee8 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/operations/gateway_operations.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/operations/gateway_operations.py @@ -9,9 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_operation import AzureOperationPoller import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -22,10 +23,12 @@ class GatewayOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client API Version. Constant value: "2016-07-01-preview". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -35,45 +38,17 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def create( - self, resource_group_name, gateway_name, location=None, tags=None, upgrade_mode=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates a ManagementService gateway. - :param resource_group_name: The resource group name uniquely - identifies the resource group within the user subscriptionId. - :type resource_group_name: str - :param gateway_name: The gateway name (256 characters maximum). - :type gateway_name: str - :param location: Location of the resource. - :type location: str - :param tags: Resource tags. - :type tags: object - :param upgrade_mode: The upgradeMode property gives the flexibility to - gateway to auto upgrade itself. If properties value not specified, - then we assume upgradeMode = Automatic. Possible values include: - 'Manual', 'Automatic' - :type upgrade_mode: str or :class:`UpgradeMode - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`GatewayResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: - :class:`ErrorException` - """ + def _create_initial( + self, resource_group_name, gateway_name, location=None, tags=None, upgrade_mode=None, custom_headers=None, raw=False, **operation_config): gateway_parameters = models.GatewayParameters(location=location, tags=tags, upgrade_mode=upgrade_mode) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}' + url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -95,52 +70,29 @@ def create( body_content = self._serialize.body(gateway_parameters, 'GatewayParameters') # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 201]: - raise models.ErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('GatewayResource', response) - if response.status_code == 201: - deserialized = self._deserialize('GatewayResource', response) + if response.status_code not in [200, 201]: + raise models.ErrorException(self._deserialize, response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + deserialized = None - return deserialized + if response.status_code == 200: + deserialized = self._deserialize('GatewayResource', response) + if response.status_code == 201: + deserialized = self._deserialize('GatewayResource', response) if raw: - response = long_running_send() - return get_long_running_output(response) + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + return deserialized - def update( - self, resource_group_name, gateway_name, location=None, tags=None, upgrade_mode=None, custom_headers=None, raw=False, **operation_config): - """Updates a gateway belonging to a resource group. + def create( + self, resource_group_name, gateway_name, location=None, tags=None, upgrade_mode=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a ManagementService gateway. :param resource_group_name: The resource group name uniquely identifies the resource group within the user subscriptionId. @@ -155,28 +107,62 @@ def update( gateway to auto upgrade itself. If properties value not specified, then we assume upgradeMode = Automatic. Possible values include: 'Manual', 'Automatic' - :type upgrade_mode: str or :class:`UpgradeMode - ` + :type upgrade_mode: str or + ~azure.mgmt.servermanager.models.UpgradeMode :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns GatewayResource or + ClientRawResponse if raw==True :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`GatewayResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servermanager.models.GatewayResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servermanager.models.GatewayResource]] :raises: :class:`ErrorException` """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + location=location, + tags=tags, + upgrade_mode=upgrade_mode, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('GatewayResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}'} + + + def _update_initial( + self, resource_group_name, gateway_name, location=None, tags=None, upgrade_mode=None, custom_headers=None, raw=False, **operation_config): gateway_parameters = models.GatewayParameters(location=location, tags=tags, upgrade_mode=upgrade_mode) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -198,29 +184,70 @@ def update( body_content = self._serialize.body(gateway_parameters, 'GatewayParameters') # Construct and send request - def long_running_send(): + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 202]: + raise models.ErrorException(self._deserialize, response) - def get_long_running_status(status_link, headers=None): + deserialized = None - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if response.status_code == 200: + deserialized = self._deserialize('GatewayResource', response) - def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - if response.status_code not in [200, 202]: - raise models.ErrorException(self._deserialize, response) + return deserialized - deserialized = None + def update( + self, resource_group_name, gateway_name, location=None, tags=None, upgrade_mode=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a gateway belonging to a resource group. - if response.status_code == 200: - deserialized = self._deserialize('GatewayResource', response) + :param resource_group_name: The resource group name uniquely + identifies the resource group within the user subscriptionId. + :type resource_group_name: str + :param gateway_name: The gateway name (256 characters maximum). + :type gateway_name: str + :param location: Location of the resource. + :type location: str + :param tags: Resource tags. + :type tags: object + :param upgrade_mode: The upgradeMode property gives the flexibility to + gateway to auto upgrade itself. If properties value not specified, + then we assume upgradeMode = Automatic. Possible values include: + 'Manual', 'Automatic' + :type upgrade_mode: str or + ~azure.mgmt.servermanager.models.UpgradeMode + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns GatewayResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servermanager.models.GatewayResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servermanager.models.GatewayResource]] + :raises: + :class:`ErrorException` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + location=location, + tags=tags, + upgrade_mode=upgrade_mode, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('GatewayResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -228,16 +255,14 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}'} def delete( self, resource_group_name, gateway_name, custom_headers=None, raw=False, **operation_config): @@ -253,18 +278,17 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -284,7 +308,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.ErrorException(self._deserialize, response) @@ -292,6 +316,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}'} def get( self, resource_group_name, gateway_name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -306,26 +331,25 @@ def get( Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Possible values include: 'status', 'download' - :type expand: str or :class:`GatewayExpandOption - ` + :type expand: str or + ~azure.mgmt.servermanager.models.GatewayExpandOption :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`GatewayResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: GatewayResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.servermanager.models.GatewayResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -347,7 +371,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -362,6 +386,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}'} def list( self, custom_headers=None, raw=False, **operation_config): @@ -372,8 +397,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`GatewayResourcePaged - ` + :return: An iterator like instance of GatewayResource + :rtype: + ~azure.mgmt.servermanager.models.GatewayResourcePaged[~azure.mgmt.servermanager.models.GatewayResource] :raises: :class:`ErrorException` """ @@ -381,7 +407,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.ServerManagement/gateways' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -408,7 +434,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -424,6 +450,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServerManagement/gateways'} def list_for_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -437,8 +464,9 @@ def list_for_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`GatewayResourcePaged - ` + :return: An iterator like instance of GatewayResource + :rtype: + ~azure.mgmt.servermanager.models.GatewayResourcePaged[~azure.mgmt.servermanager.models.GatewayResource] :raises: :class:`ErrorException` """ @@ -446,10 +474,10 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways' + url = self.list_for_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+') } url = self._client.format_url(url, **path_format_arguments) @@ -474,7 +502,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -490,33 +518,17 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_for_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways'} - def upgrade( - self, resource_group_name, gateway_name, custom_headers=None, raw=False, **operation_config): - """Upgrades a gateway. - :param resource_group_name: The resource group name uniquely - identifies the resource group within the user subscriptionId. - :type resource_group_name: str - :param gateway_name: The gateway name (256 characters maximum). - :type gateway_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: - :class:`ErrorException` - """ + def _upgrade_initial( + self, resource_group_name, gateway_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}/upgradetolatest' + url = self.upgrade.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -535,42 +547,19 @@ def upgrade( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - request = self._client.post(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + if response.status_code not in [200, 202]: + raise models.ErrorException(self._deserialize, response) if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - def regenerate_profile( - self, resource_group_name, gateway_name, custom_headers=None, raw=False, **operation_config): - """Regenerate a gateway's profile. + def upgrade( + self, resource_group_name, gateway_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Upgrades a gateway. :param resource_group_name: The resource group name uniquely identifies the resource group within the user subscriptionId. @@ -578,22 +567,48 @@ def regenerate_profile( :param gateway_name: The gateway name (256 characters maximum). :type gateway_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`ErrorException` """ + raw_result = self._upgrade_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}/upgradetolatest'} + + + def _regenerate_profile_initial( + self, resource_group_name, gateway_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}/regenerateprofile' + url = self.regenerate_profile.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -612,42 +627,19 @@ def regenerate_profile( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - request = self._client.post(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + if response.status_code not in [200, 202]: + raise models.ErrorException(self._deserialize, response) if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - def get_profile( - self, resource_group_name, gateway_name, custom_headers=None, raw=False, **operation_config): - """Gets a gateway profile. + def regenerate_profile( + self, resource_group_name, gateway_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Regenerate a gateway's profile. :param resource_group_name: The resource group name uniquely identifies the resource group within the user subscriptionId. @@ -655,23 +647,48 @@ def get_profile( :param gateway_name: The gateway name (256 characters maximum). :type gateway_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`GatewayProfile - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`ErrorException` """ + raw_result = self._regenerate_profile_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + regenerate_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}/regenerateprofile'} + + + def _get_profile_initial( + self, resource_group_name, gateway_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}/profile' + url = self.get_profile.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -690,28 +707,56 @@ def get_profile( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - request = self._client.post(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + if response.status_code not in [200, 202]: + raise models.ErrorException(self._deserialize, response) - def get_long_running_status(status_link, headers=None): + deserialized = None - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if response.status_code == 200: + deserialized = self._deserialize('GatewayProfile', response) - def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - if response.status_code not in [200, 202]: - raise models.ErrorException(self._deserialize, response) + return deserialized - deserialized = None + def get_profile( + self, resource_group_name, gateway_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Gets a gateway profile. - if response.status_code == 200: - deserialized = self._deserialize('GatewayProfile', response) + :param resource_group_name: The resource group name uniquely + identifies the resource group within the user subscriptionId. + :type resource_group_name: str + :param gateway_name: The gateway name (256 characters maximum). + :type gateway_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns GatewayProfile or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servermanager.models.GatewayProfile] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servermanager.models.GatewayProfile]] + :raises: + :class:`ErrorException` + """ + raw_result = self._get_profile_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('GatewayProfile', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -719,13 +764,11 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + get_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}/profile'} diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/operations/node_operations.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/operations/node_operations.py index 0ee828543dd8..5d7662eb0933 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/operations/node_operations.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/operations/node_operations.py @@ -9,9 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_operation import AzureOperationPoller import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -22,10 +23,12 @@ class NodeOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client API Version. Constant value: "2016-07-01-preview". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -35,47 +38,17 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def create( - self, resource_group_name, node_name, location=None, tags=None, gateway_id=None, connection_name=None, user_name=None, password=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates a management node. - :param resource_group_name: The resource group name uniquely - identifies the resource group within the user subscriptionId. - :type resource_group_name: str - :param node_name: The node name (256 characters maximum). - :type node_name: str - :param location: Location of the resource. - :type location: str - :param tags: Resource tags. - :type tags: object - :param gateway_id: Gateway ID which will manage this node. - :type gateway_id: str - :param connection_name: myhost.domain.com - :type connection_name: str - :param user_name: User name to be used to connect to node. - :type user_name: str - :param password: Password associated with user name. - :type password: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`NodeResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: - :class:`ErrorException` - """ + def _create_initial( + self, resource_group_name, node_name, location=None, tags=None, gateway_id=None, connection_name=None, user_name=None, password=None, custom_headers=None, raw=False, **operation_config): gateway_parameters = models.NodeParameters(location=location, tags=tags, gateway_id=gateway_id, connection_name=connection_name, user_name=user_name, password=password) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}' + url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -97,52 +70,29 @@ def create( body_content = self._serialize.body(gateway_parameters, 'NodeParameters') # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 201, 202]: - raise models.ErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('NodeResource', response) - if response.status_code == 201: - deserialized = self._deserialize('NodeResource', response) + if response.status_code not in [200, 201, 202]: + raise models.ErrorException(self._deserialize, response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + deserialized = None - return deserialized + if response.status_code == 200: + deserialized = self._deserialize('NodeResource', response) + if response.status_code == 201: + deserialized = self._deserialize('NodeResource', response) if raw: - response = long_running_send() - return get_long_running_output(response) + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + return deserialized - def update( - self, resource_group_name, node_name, location=None, tags=None, gateway_id=None, connection_name=None, user_name=None, password=None, custom_headers=None, raw=False, **operation_config): - """Updates a management node. + def create( + self, resource_group_name, node_name, location=None, tags=None, gateway_id=None, connection_name=None, user_name=None, password=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a management node. :param resource_group_name: The resource group name uniquely identifies the resource group within the user subscriptionId. @@ -162,25 +112,62 @@ def update( :param password: Password associated with user name. :type password: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns NodeResource or + ClientRawResponse if raw==True :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`NodeResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servermanager.models.NodeResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servermanager.models.NodeResource]] :raises: :class:`ErrorException` """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + node_name=node_name, + location=location, + tags=tags, + gateway_id=gateway_id, + connection_name=connection_name, + user_name=user_name, + password=password, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('NodeResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}'} + + + def _update_initial( + self, resource_group_name, node_name, location=None, tags=None, gateway_id=None, connection_name=None, user_name=None, password=None, custom_headers=None, raw=False, **operation_config): node_parameters = models.NodeParameters(location=location, tags=tags, gateway_id=gateway_id, connection_name=connection_name, user_name=user_name, password=password) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -202,29 +189,75 @@ def update( body_content = self._serialize.body(node_parameters, 'NodeParameters') # Construct and send request - def long_running_send(): + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 202]: + raise models.ErrorException(self._deserialize, response) - def get_long_running_status(status_link, headers=None): + deserialized = None - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if response.status_code == 200: + deserialized = self._deserialize('NodeResource', response) - def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - if response.status_code not in [200, 202]: - raise models.ErrorException(self._deserialize, response) + return deserialized + + def update( + self, resource_group_name, node_name, location=None, tags=None, gateway_id=None, connection_name=None, user_name=None, password=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a management node. - deserialized = None + :param resource_group_name: The resource group name uniquely + identifies the resource group within the user subscriptionId. + :type resource_group_name: str + :param node_name: The node name (256 characters maximum). + :type node_name: str + :param location: Location of the resource. + :type location: str + :param tags: Resource tags. + :type tags: object + :param gateway_id: Gateway ID which will manage this node. + :type gateway_id: str + :param connection_name: myhost.domain.com + :type connection_name: str + :param user_name: User name to be used to connect to node. + :type user_name: str + :param password: Password associated with user name. + :type password: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns NodeResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servermanager.models.NodeResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servermanager.models.NodeResource]] + :raises: + :class:`ErrorException` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + node_name=node_name, + location=location, + tags=tags, + gateway_id=gateway_id, + connection_name=connection_name, + user_name=user_name, + password=password, + custom_headers=custom_headers, + raw=True, + **operation_config + ) - if response.status_code == 200: - deserialized = self._deserialize('NodeResource', response) + def get_long_running_output(response): + deserialized = self._deserialize('NodeResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -232,16 +265,14 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}'} def delete( self, resource_group_name, node_name, custom_headers=None, raw=False, **operation_config): @@ -257,18 +288,17 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -288,7 +318,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.ErrorException(self._deserialize, response) @@ -296,6 +326,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}'} def get( self, resource_group_name, node_name, custom_headers=None, raw=False, **operation_config): @@ -311,19 +342,18 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`NodeResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: NodeResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.servermanager.models.NodeResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -343,7 +373,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -358,6 +388,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}'} def list( self, custom_headers=None, raw=False, **operation_config): @@ -368,8 +399,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`NodeResourcePaged - ` + :return: An iterator like instance of NodeResource + :rtype: + ~azure.mgmt.servermanager.models.NodeResourcePaged[~azure.mgmt.servermanager.models.NodeResource] :raises: :class:`ErrorException` """ @@ -377,7 +409,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.ServerManagement/nodes' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -404,7 +436,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -420,6 +452,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServerManagement/nodes'} def list_for_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -433,8 +466,9 @@ def list_for_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`NodeResourcePaged - ` + :return: An iterator like instance of NodeResource + :rtype: + ~azure.mgmt.servermanager.models.NodeResourcePaged[~azure.mgmt.servermanager.models.NodeResource] :raises: :class:`ErrorException` """ @@ -442,10 +476,10 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes' + url = self.list_for_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+') } url = self._client.format_url(url, **path_format_arguments) @@ -470,7 +504,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -486,3 +520,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_for_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes'} diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/operations/power_shell_operations.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/operations/power_shell_operations.py index bbada7d8d07b..b265c0be713e 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/operations/power_shell_operations.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/operations/power_shell_operations.py @@ -9,9 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_operation import AzureOperationPoller import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -22,10 +23,12 @@ class PowerShellOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client API Version. Constant value: "2016-07-01-preview". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,19 +54,18 @@ def list_session( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`PowerShellSessionResources - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: PowerShellSessionResources or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.servermanager.models.PowerShellSessionResources or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions' + url = self.list_session.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'session': self._serialize.url("session", session, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -84,7 +86,7 @@ def list_session( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -99,38 +101,17 @@ def list_session( return client_raw_response return deserialized + list_session.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions'} - def create_session( - self, resource_group_name, node_name, session, pssession, custom_headers=None, raw=False, **operation_config): - """Creates a PowerShell session. - :param resource_group_name: The resource group name uniquely - identifies the resource group within the user subscriptionId. - :type resource_group_name: str - :param node_name: The node name (256 characters maximum). - :type node_name: str - :param session: The sessionId from the user. - :type session: str - :param pssession: The PowerShell sessionId from the user. - :type pssession: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`PowerShellSessionResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: - :class:`ErrorException` - """ + def _create_session_initial( + self, resource_group_name, node_name, session, pssession, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}' + url = self.create_session.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'session': self._serialize.url("session", session, 'str'), 'pssession': self._serialize.url("pssession", pssession, 'str') } @@ -151,28 +132,63 @@ def create_session( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + if response.status_code not in [200, 202]: + raise models.ErrorException(self._deserialize, response) - def get_long_running_status(status_link, headers=None): + deserialized = None - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if response.status_code == 200: + deserialized = self._deserialize('PowerShellSessionResource', response) - def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - if response.status_code not in [200, 202]: - raise models.ErrorException(self._deserialize, response) + return deserialized + + def create_session( + self, resource_group_name, node_name, session, pssession, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a PowerShell session. - deserialized = None + :param resource_group_name: The resource group name uniquely + identifies the resource group within the user subscriptionId. + :type resource_group_name: str + :param node_name: The node name (256 characters maximum). + :type node_name: str + :param session: The sessionId from the user. + :type session: str + :param pssession: The PowerShell sessionId from the user. + :type pssession: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + PowerShellSessionResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servermanager.models.PowerShellSessionResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servermanager.models.PowerShellSessionResource]] + :raises: + :class:`ErrorException` + """ + raw_result = self._create_session_initial( + resource_group_name=resource_group_name, + node_name=node_name, + session=session, + pssession=pssession, + custom_headers=custom_headers, + raw=True, + **operation_config + ) - if response.status_code == 200: - deserialized = self._deserialize('PowerShellSessionResource', response) + def get_long_running_output(response): + deserialized = self._deserialize('PowerShellSessionResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -180,16 +196,14 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_session.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}'} def get_command_status( self, resource_group_name, node_name, session, pssession, expand=None, custom_headers=None, raw=False, **operation_config): @@ -206,26 +220,25 @@ def get_command_status( :type pssession: str :param expand: Gets current output from an ongoing call. Possible values include: 'output' - :type expand: str or :class:`PowerShellExpandOption - ` + :type expand: str or + ~azure.mgmt.servermanager.models.PowerShellExpandOption :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`PowerShellCommandStatus - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: PowerShellCommandStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.servermanager.models.PowerShellCommandStatus or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}' + url = self.get_command_status.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'session': self._serialize.url("session", session, 'str'), 'pssession': self._serialize.url("pssession", pssession, 'str') } @@ -249,7 +262,7 @@ def get_command_status( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -264,38 +277,17 @@ def get_command_status( return client_raw_response return deserialized + get_command_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}'} - def update_command( - self, resource_group_name, node_name, session, pssession, custom_headers=None, raw=False, **operation_config): - """Updates a running PowerShell command with more data. - :param resource_group_name: The resource group name uniquely - identifies the resource group within the user subscriptionId. - :type resource_group_name: str - :param node_name: The node name (256 characters maximum). - :type node_name: str - :param session: The sessionId from the user. - :type session: str - :param pssession: The PowerShell sessionId from the user. - :type pssession: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`PowerShellCommandResults - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: - :class:`ErrorException` - """ + def _update_command_initial( + self, resource_group_name, node_name, session, pssession, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}' + url = self.update_command.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'session': self._serialize.url("session", session, 'str'), 'pssession': self._serialize.url("pssession", pssession, 'str') } @@ -316,49 +308,26 @@ def update_command( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + request = self._client.patch(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - request = self._client.patch(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PowerShellCommandResults', response) + if response.status_code not in [200, 202]: + raise models.ErrorException(self._deserialize, response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + deserialized = None - return deserialized + if response.status_code == 200: + deserialized = self._deserialize('PowerShellCommandResults', response) if raw: - response = long_running_send() - return get_long_running_output(response) + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + return deserialized - def invoke_command( - self, resource_group_name, node_name, session, pssession, command=None, custom_headers=None, raw=False, **operation_config): - """Creates a PowerShell script and invokes it. + def update_command( + self, resource_group_name, node_name, session, pssession, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a running PowerShell command with more data. :param resource_group_name: The resource group name uniquely identifies the resource group within the user subscriptionId. @@ -369,28 +338,60 @@ def invoke_command( :type session: str :param pssession: The PowerShell sessionId from the user. :type pssession: str - :param command: Script to execute. - :type command: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + PowerShellCommandResults or + ClientRawResponse if raw==True :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`PowerShellCommandResults - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servermanager.models.PowerShellCommandResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servermanager.models.PowerShellCommandResults]] :raises: :class:`ErrorException` """ + raw_result = self._update_command_initial( + resource_group_name=resource_group_name, + node_name=node_name, + session=session, + pssession=pssession, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('PowerShellCommandResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}'} + + + def _invoke_command_initial( + self, resource_group_name, node_name, session, pssession, command=None, custom_headers=None, raw=False, **operation_config): power_shell_command_parameters = models.PowerShellCommandParameters(command=command) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}/invokeCommand' + url = self.invoke_command.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'session': self._serialize.url("session", session, 'str'), 'pssession': self._serialize.url("pssession", pssession, 'str') } @@ -414,50 +415,27 @@ def invoke_command( body_content = self._serialize.body(power_shell_command_parameters, 'PowerShellCommandParameters') # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorException(self._deserialize, response) - - deserialized = None + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code == 200: - deserialized = self._deserialize('PowerShellCommandResults', response) + if response.status_code not in [200, 202]: + raise models.ErrorException(self._deserialize, response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + deserialized = None - return deserialized + if response.status_code == 200: + deserialized = self._deserialize('PowerShellCommandResults', response) if raw: - response = long_running_send() - return get_long_running_output(response) + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + return deserialized - def cancel_command( - self, resource_group_name, node_name, session, pssession, custom_headers=None, raw=False, **operation_config): - """Cancels a PowerShell command. + def invoke_command( + self, resource_group_name, node_name, session, pssession, command=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a PowerShell script and invokes it. :param resource_group_name: The resource group name uniquely identifies the resource group within the user subscriptionId. @@ -468,24 +446,61 @@ def cancel_command( :type session: str :param pssession: The PowerShell sessionId from the user. :type pssession: str + :param command: Script to execute. + :type command: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + PowerShellCommandResults or + ClientRawResponse if raw==True :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`PowerShellCommandResults - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servermanager.models.PowerShellCommandResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servermanager.models.PowerShellCommandResults]] :raises: :class:`ErrorException` """ + raw_result = self._invoke_command_initial( + resource_group_name=resource_group_name, + node_name=node_name, + session=session, + pssession=pssession, + command=command, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('PowerShellCommandResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + invoke_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}/invokeCommand'} + + + def _cancel_command_initial( + self, resource_group_name, node_name, session, pssession, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}/cancel' + url = self.cancel_command.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'session': self._serialize.url("session", session, 'str'), 'pssession': self._serialize.url("pssession", pssession, 'str') } @@ -506,28 +521,63 @@ def cancel_command( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - request = self._client.post(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + if response.status_code not in [200, 202]: + raise models.ErrorException(self._deserialize, response) - def get_long_running_status(status_link, headers=None): + deserialized = None - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if response.status_code == 200: + deserialized = self._deserialize('PowerShellCommandResults', response) - def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - if response.status_code not in [200, 202]: - raise models.ErrorException(self._deserialize, response) + return deserialized - deserialized = None + def cancel_command( + self, resource_group_name, node_name, session, pssession, custom_headers=None, raw=False, polling=True, **operation_config): + """Cancels a PowerShell command. - if response.status_code == 200: - deserialized = self._deserialize('PowerShellCommandResults', response) + :param resource_group_name: The resource group name uniquely + identifies the resource group within the user subscriptionId. + :type resource_group_name: str + :param node_name: The node name (256 characters maximum). + :type node_name: str + :param session: The sessionId from the user. + :type session: str + :param pssession: The PowerShell sessionId from the user. + :type pssession: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + PowerShellCommandResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servermanager.models.PowerShellCommandResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servermanager.models.PowerShellCommandResults]] + :raises: + :class:`ErrorException` + """ + raw_result = self._cancel_command_initial( + resource_group_name=resource_group_name, + node_name=node_name, + session=session, + pssession=pssession, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('PowerShellCommandResults', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -535,16 +585,14 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + cancel_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}/cancel'} def tab_completion( self, resource_group_name, node_name, session, pssession, command=None, custom_headers=None, raw=False, **operation_config): @@ -566,21 +614,22 @@ def tab_completion( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`PowerShellTabCompletionResults - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: PowerShellTabCompletionResults or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.servermanager.models.PowerShellTabCompletionResults or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ power_shell_tab_completion_paramters = models.PowerShellTabCompletionParameters(command=command) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}/tab' + url = self.tab_completion.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'session': self._serialize.url("session", session, 'str'), 'pssession': self._serialize.url("pssession", pssession, 'str') } @@ -606,7 +655,7 @@ def tab_completion( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -621,3 +670,4 @@ def tab_completion( return client_raw_response return deserialized + tab_completion.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}/features/powerShellConsole/pssessions/{pssession}/tab'} diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/operations/session_operations.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/operations/session_operations.py index 6bc9e14da657..42961e268593 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/operations/session_operations.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/operations/session_operations.py @@ -9,9 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_operation import AzureOperationPoller import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -22,10 +23,12 @@ class SessionOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client API Version. Constant value: "2016-07-01-preview". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -35,52 +38,17 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def create( - self, resource_group_name, node_name, session, user_name=None, password=None, retention_period=None, credential_data_format=None, encryption_certificate_thumbprint=None, custom_headers=None, raw=False, **operation_config): - """Creates a session for a node. - :param resource_group_name: The resource group name uniquely - identifies the resource group within the user subscriptionId. - :type resource_group_name: str - :param node_name: The node name (256 characters maximum). - :type node_name: str - :param session: The sessionId from the user. - :type session: str - :param user_name: Encrypted User name to be used to connect to node. - :type user_name: str - :param password: Encrypted Password associated with user name. - :type password: str - :param retention_period: Session retention period. Possible values - include: 'Session', 'Persistent' - :type retention_period: str or :class:`RetentionPeriod - ` - :param credential_data_format: Credential data format. Possible values - include: 'RsaEncrypted' - :type credential_data_format: str or :class:`CredentialDataFormat - ` - :param encryption_certificate_thumbprint: Encryption certificate - thumbprint. - :type encryption_certificate_thumbprint: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`SessionResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: - :class:`ErrorException` - """ + def _create_initial( + self, resource_group_name, node_name, session, user_name=None, password=None, retention_period=None, credential_data_format=None, encryption_certificate_thumbprint=None, custom_headers=None, raw=False, **operation_config): session_parameters = models.SessionParameters(user_name=user_name, password=password, retention_period=retention_period, credential_data_format=credential_data_format, encryption_certificate_thumbprint=encryption_certificate_thumbprint) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}' + url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'session': self._serialize.url("session", session, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -103,31 +71,82 @@ def create( body_content = self._serialize.body(session_parameters, 'SessionParameters') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 201, 202]: + raise models.ErrorException(self._deserialize, response) + + deserialized = None - def get_long_running_status(status_link, headers=None): + if response.status_code == 200: + deserialized = self._deserialize('SessionResource', response) + if response.status_code == 201: + deserialized = self._deserialize('SessionResource', response) - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - def get_long_running_output(response): + return deserialized - if response.status_code not in [200, 201, 202]: - raise models.ErrorException(self._deserialize, response) + def create( + self, resource_group_name, node_name, session, user_name=None, password=None, retention_period=None, credential_data_format=None, encryption_certificate_thumbprint=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a session for a node. - deserialized = None + :param resource_group_name: The resource group name uniquely + identifies the resource group within the user subscriptionId. + :type resource_group_name: str + :param node_name: The node name (256 characters maximum). + :type node_name: str + :param session: The sessionId from the user. + :type session: str + :param user_name: Encrypted User name to be used to connect to node. + :type user_name: str + :param password: Encrypted Password associated with user name. + :type password: str + :param retention_period: Session retention period. Possible values + include: 'Session', 'Persistent' + :type retention_period: str or + ~azure.mgmt.servermanager.models.RetentionPeriod + :param credential_data_format: Credential data format. Possible values + include: 'RsaEncrypted' + :type credential_data_format: str or + ~azure.mgmt.servermanager.models.CredentialDataFormat + :param encryption_certificate_thumbprint: Encryption certificate + thumbprint. + :type encryption_certificate_thumbprint: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SessionResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servermanager.models.SessionResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servermanager.models.SessionResource]] + :raises: + :class:`ErrorException` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + node_name=node_name, + session=session, + user_name=user_name, + password=password, + retention_period=retention_period, + credential_data_format=credential_data_format, + encryption_certificate_thumbprint=encryption_certificate_thumbprint, + custom_headers=custom_headers, + raw=True, + **operation_config + ) - if response.status_code == 200: - deserialized = self._deserialize('SessionResource', response) - if response.status_code == 201: - deserialized = self._deserialize('SessionResource', response) + def get_long_running_output(response): + deserialized = self._deserialize('SessionResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -135,16 +154,14 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}'} def delete( self, resource_group_name, node_name, session, custom_headers=None, raw=False, **operation_config): @@ -162,18 +179,17 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'session': self._serialize.url("session", session, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -194,7 +210,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.ErrorException(self._deserialize, response) @@ -202,6 +218,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}'} def get( self, resource_group_name, node_name, session, custom_headers=None, raw=False, **operation_config): @@ -219,19 +236,18 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SessionResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: SessionResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.servermanager.models.SessionResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern='[a-zA-Z0-9]+'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern='^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=3, pattern=r'[a-zA-Z0-9]+'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=256, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'session': self._serialize.url("session", session, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -252,7 +268,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -267,3 +283,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}/sessions/{session}'} diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/server_management.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/server_management.py index 0dfeecb3b090..ca198267e9f8 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/server_management.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/server_management.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -42,21 +42,19 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(ServerManagementConfiguration, self).__init__(base_url) - self.add_user_agent('servermanagement/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-servermanager/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class ServerManagement(object): +class ServerManagement(SDKClient): """REST API for Azure Server Management Service. :ivar config: Configuration for client. @@ -85,7 +83,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = ServerManagementConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(ServerManagement, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '2016-07-01-preview' diff --git a/azure-mgmt-servermanager/azure/mgmt/servermanager/version.py b/azure-mgmt-servermanager/azure/mgmt/servermanager/version.py index 9c644827672b..53c4c7ea05e8 100644 --- a/azure-mgmt-servermanager/azure/mgmt/servermanager/version.py +++ b/azure-mgmt-servermanager/azure/mgmt/servermanager/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.2.0" +VERSION = "2.0.0" diff --git a/azure-mgmt-servermanager/sdk_packaging.toml b/azure-mgmt-servermanager/sdk_packaging.toml new file mode 100644 index 000000000000..402f04cd8321 --- /dev/null +++ b/azure-mgmt-servermanager/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-servermanager" +package_pprint_name = "Server Manager Management" +package_doc_id = "server-manager" +is_stable = true diff --git a/azure-mgmt-servermanager/setup.py b/azure-mgmt-servermanager/setup.py index 141cc76fb251..0e4332d6a2b1 100644 --- a/azure-mgmt-servermanager/setup.py +++ b/azure-mgmt-servermanager/setup.py @@ -61,25 +61,24 @@ long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(), + packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.8', - 'azure-common~=1.1.6', + 'msrestazure>=0.4.27,<2.0.0', + 'azure-common~=1.1', ], cmdclass=cmdclass ) diff --git a/azure-mgmt-sql/HISTORY.rst b/azure-mgmt-sql/HISTORY.rst index c23c06ff4b8a..c29eec3d663b 100644 --- a/azure-mgmt-sql/HISTORY.rst +++ b/azure-mgmt-sql/HISTORY.rst @@ -3,6 +3,16 @@ Release History =============== +0.9.1 (2018-05-24) +++++++++++++++++++ + +**Features** + +- Managed instances, databases, and failover groups +- Vulnerability assessments +- Backup short term retention policies +- Elastic Jobs + 0.9.0 (2018-04-25) ++++++++++++++++++ @@ -24,7 +34,7 @@ This version uses a next-generation code generator that *might* introduce breaki - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. - - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, the response of the initial call will be returned without polling. @@ -40,7 +50,7 @@ This version uses a next-generation code generator that *might* introduce breaki * ElasticPool.sku has replaced ElasticPool.dtu. Elastic pool scale can be set by setting Sku.name to the requested sku name (e.g. StandardPool, PremiumPool, or GP_Gen4) and setting Sku.capacity to the scale measured in DTU or vCores. * ElasticPool.per_database_settings has replaced ElasticPool.database_dtu_min and ElasticPool.database_dtu_max. - Database.max_size_bytes is now an integer instead of string. -- LocationCapabilities tree has been changed in order to support capabilities of new vCore-based database and elastic pool editions. +- LocationCapabilities tree has been changed in order to support capabilities of new vCore-based database and elastic pool editions. **Features** @@ -49,7 +59,7 @@ This version uses a next-generation code generator that *might* introduce breaki * Removed support for managing Vaults used for Long Term Retention V1 * Changed BackupLongTermRetentionPolicy class, removing the Long Term Retention V1 properties and adding the Long Term Retention V2 properties - * Removed BackupLongTermRetentionPolicyState + * Removed BackupLongTermRetentionPolicyState 0.8.6 (2018-03-22) ++++++++++++++++++ @@ -103,16 +113,16 @@ This version uses a next-generation code generator that *might* introduce breaki **Disclaimer** -We were using a slightly unorthodox convention for some operation ids. -Some resource operations were "nested" inside others, e.g. blob auditing policies was nested inside databases as in client.databases.get_blob_auditing_policies(..) +We were using a slightly unorthodox convention for some operation ids. +Some resource operations were "nested" inside others, e.g. blob auditing policies was nested inside databases as in client.databases.get_blob_auditing_policies(..) instead of the flattened ARM standard client.database_blob_auditing_policies.get(...). -This convention has lead to some inconsistencies, makes some APIs difficult to find, and is at odds with future APIs. -For example if we wanted to implement listing db audit policies by server, continuing the current convention would be +This convention has lead to some inconsistencies, makes some APIs difficult to find, and is at odds with future APIs. +For example if we wanted to implement listing db audit policies by server, continuing the current convention would be client.databases.list_blob_auditing_policies_by_server(..) which makes much less sense than the ARM standard which would beclient.database_blob_auditing_policies.list_by_server(...)`. -In order to resolve this and provide a good path moving forward, -we have renamed the inconsistent operations to follow the ARM standard. +In order to resolve this and provide a good path moving forward, +we have renamed the inconsistent operations to follow the ARM standard. This is an unfortunate breaking change, but it's best to do now while the SDK is still in preview and since most of these operations were only recently added. **Breaking changes** diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py b/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py index 5423a4320c1c..fb3533b20adf 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py @@ -10,11 +10,11 @@ # -------------------------------------------------------------------------- try: - from .resource_py3 import Resource - from .tracked_resource_py3 import TrackedResource - from .proxy_resource_py3 import ProxyResource from .recoverable_database_py3 import RecoverableDatabase from .restorable_dropped_database_py3 import RestorableDroppedDatabase + from .tracked_resource_py3 import TrackedResource + from .resource_py3 import Resource + from .proxy_resource_py3 import ProxyResource from .check_name_availability_request_py3 import CheckNameAvailabilityRequest from .check_name_availability_response_py3 import CheckNameAvailabilityResponse from .server_connection_policy_py3 import ServerConnectionPolicy @@ -57,10 +57,13 @@ from .partner_info_py3 import PartnerInfo from .failover_group_py3 import FailoverGroup from .failover_group_update_py3 import FailoverGroupUpdate + from .resource_identity_py3 import ResourceIdentity + from .sku_py3 import Sku + from .managed_instance_py3 import ManagedInstance + from .managed_instance_update_py3 import ManagedInstanceUpdate from .operation_display_py3 import OperationDisplay from .operation_py3 import Operation from .server_key_py3 import ServerKey - from .resource_identity_py3 import ResourceIdentity from .server_py3 import Server from .server_update_py3 import ServerUpdate from .sync_agent_py3 import SyncAgent @@ -78,8 +81,29 @@ from .sync_member_py3 import SyncMember from .subscription_usage_py3 import SubscriptionUsage from .virtual_network_rule_py3 import VirtualNetworkRule + from .database_vulnerability_assessment_rule_baseline_item_py3 import DatabaseVulnerabilityAssessmentRuleBaselineItem + from .database_vulnerability_assessment_rule_baseline_py3 import DatabaseVulnerabilityAssessmentRuleBaseline + from .vulnerability_assessment_recurring_scans_properties_py3 import VulnerabilityAssessmentRecurringScansProperties + from .database_vulnerability_assessment_py3 import DatabaseVulnerabilityAssessment + from .job_agent_py3 import JobAgent + from .job_agent_update_py3 import JobAgentUpdate + from .job_credential_py3 import JobCredential + from .job_execution_target_py3 import JobExecutionTarget + from .job_execution_py3 import JobExecution + from .job_schedule_py3 import JobSchedule + from .job_py3 import Job + from .job_step_action_py3 import JobStepAction + from .job_step_output_py3 import JobStepOutput + from .job_step_execution_options_py3 import JobStepExecutionOptions + from .job_step_py3 import JobStep + from .job_target_py3 import JobTarget + from .job_target_group_py3 import JobTargetGroup + from .job_version_py3 import JobVersion from .long_term_retention_backup_py3 import LongTermRetentionBackup from .backup_long_term_retention_policy_py3 import BackupLongTermRetentionPolicy + from .complete_database_restore_definition_py3 import CompleteDatabaseRestoreDefinition + from .managed_database_py3 import ManagedDatabase + from .managed_database_update_py3 import ManagedDatabaseUpdate from .automatic_tuning_server_options_py3 import AutomaticTuningServerOptions from .server_automatic_tuning_py3 import ServerAutomaticTuning from .server_dns_alias_py3 import ServerDnsAlias @@ -92,7 +116,6 @@ from .log_size_capability_py3 import LogSizeCapability from .max_size_range_capability_py3 import MaxSizeRangeCapability from .performance_level_capability_py3 import PerformanceLevelCapability - from .sku_py3 import Sku from .license_type_capability_py3 import LicenseTypeCapability from .service_objective_capability_py3 import ServiceObjectiveCapability from .edition_capability_py3 import EditionCapability @@ -112,12 +135,21 @@ from .elastic_pool_per_database_settings_py3 import ElasticPoolPerDatabaseSettings from .elastic_pool_py3 import ElasticPool from .elastic_pool_update_py3 import ElasticPoolUpdate + from .vulnerability_assessment_scan_error_py3 import VulnerabilityAssessmentScanError + from .vulnerability_assessment_scan_record_py3 import VulnerabilityAssessmentScanRecord + from .database_vulnerability_assessment_scans_export_py3 import DatabaseVulnerabilityAssessmentScansExport + from .instance_failover_group_read_write_endpoint_py3 import InstanceFailoverGroupReadWriteEndpoint + from .instance_failover_group_read_only_endpoint_py3 import InstanceFailoverGroupReadOnlyEndpoint + from .partner_region_info_py3 import PartnerRegionInfo + from .managed_instance_pair_info_py3 import ManagedInstancePairInfo + from .instance_failover_group_py3 import InstanceFailoverGroup + from .backup_short_term_retention_policy_py3 import BackupShortTermRetentionPolicy except (SyntaxError, ImportError): - from .resource import Resource - from .tracked_resource import TrackedResource - from .proxy_resource import ProxyResource from .recoverable_database import RecoverableDatabase from .restorable_dropped_database import RestorableDroppedDatabase + from .tracked_resource import TrackedResource + from .resource import Resource + from .proxy_resource import ProxyResource from .check_name_availability_request import CheckNameAvailabilityRequest from .check_name_availability_response import CheckNameAvailabilityResponse from .server_connection_policy import ServerConnectionPolicy @@ -160,10 +192,13 @@ from .partner_info import PartnerInfo from .failover_group import FailoverGroup from .failover_group_update import FailoverGroupUpdate + from .resource_identity import ResourceIdentity + from .sku import Sku + from .managed_instance import ManagedInstance + from .managed_instance_update import ManagedInstanceUpdate from .operation_display import OperationDisplay from .operation import Operation from .server_key import ServerKey - from .resource_identity import ResourceIdentity from .server import Server from .server_update import ServerUpdate from .sync_agent import SyncAgent @@ -181,8 +216,29 @@ from .sync_member import SyncMember from .subscription_usage import SubscriptionUsage from .virtual_network_rule import VirtualNetworkRule + from .database_vulnerability_assessment_rule_baseline_item import DatabaseVulnerabilityAssessmentRuleBaselineItem + from .database_vulnerability_assessment_rule_baseline import DatabaseVulnerabilityAssessmentRuleBaseline + from .vulnerability_assessment_recurring_scans_properties import VulnerabilityAssessmentRecurringScansProperties + from .database_vulnerability_assessment import DatabaseVulnerabilityAssessment + from .job_agent import JobAgent + from .job_agent_update import JobAgentUpdate + from .job_credential import JobCredential + from .job_execution_target import JobExecutionTarget + from .job_execution import JobExecution + from .job_schedule import JobSchedule + from .job import Job + from .job_step_action import JobStepAction + from .job_step_output import JobStepOutput + from .job_step_execution_options import JobStepExecutionOptions + from .job_step import JobStep + from .job_target import JobTarget + from .job_target_group import JobTargetGroup + from .job_version import JobVersion from .long_term_retention_backup import LongTermRetentionBackup from .backup_long_term_retention_policy import BackupLongTermRetentionPolicy + from .complete_database_restore_definition import CompleteDatabaseRestoreDefinition + from .managed_database import ManagedDatabase + from .managed_database_update import ManagedDatabaseUpdate from .automatic_tuning_server_options import AutomaticTuningServerOptions from .server_automatic_tuning import ServerAutomaticTuning from .server_dns_alias import ServerDnsAlias @@ -195,7 +251,6 @@ from .log_size_capability import LogSizeCapability from .max_size_range_capability import MaxSizeRangeCapability from .performance_level_capability import PerformanceLevelCapability - from .sku import Sku from .license_type_capability import LicenseTypeCapability from .service_objective_capability import ServiceObjectiveCapability from .edition_capability import EditionCapability @@ -215,6 +270,15 @@ from .elastic_pool_per_database_settings import ElasticPoolPerDatabaseSettings from .elastic_pool import ElasticPool from .elastic_pool_update import ElasticPoolUpdate + from .vulnerability_assessment_scan_error import VulnerabilityAssessmentScanError + from .vulnerability_assessment_scan_record import VulnerabilityAssessmentScanRecord + from .database_vulnerability_assessment_scans_export import DatabaseVulnerabilityAssessmentScansExport + from .instance_failover_group_read_write_endpoint import InstanceFailoverGroupReadWriteEndpoint + from .instance_failover_group_read_only_endpoint import InstanceFailoverGroupReadOnlyEndpoint + from .partner_region_info import PartnerRegionInfo + from .managed_instance_pair_info import ManagedInstancePairInfo + from .instance_failover_group import InstanceFailoverGroup + from .backup_short_term_retention_policy import BackupShortTermRetentionPolicy from .recoverable_database_paged import RecoverableDatabasePaged from .restorable_dropped_database_paged import RestorableDroppedDatabasePaged from .server_paged import ServerPaged @@ -239,6 +303,7 @@ from .database_usage_paged import DatabaseUsagePaged from .encryption_protector_paged import EncryptionProtectorPaged from .failover_group_paged import FailoverGroupPaged +from .managed_instance_paged import ManagedInstancePaged from .operation_paged import OperationPaged from .server_key_paged import ServerKeyPaged from .sync_agent_paged import SyncAgentPaged @@ -250,11 +315,21 @@ from .sync_member_paged import SyncMemberPaged from .subscription_usage_paged import SubscriptionUsagePaged from .virtual_network_rule_paged import VirtualNetworkRulePaged +from .job_agent_paged import JobAgentPaged +from .job_credential_paged import JobCredentialPaged +from .job_execution_paged import JobExecutionPaged +from .job_paged import JobPaged +from .job_step_paged import JobStepPaged +from .job_target_group_paged import JobTargetGroupPaged +from .job_version_paged import JobVersionPaged from .long_term_retention_backup_paged import LongTermRetentionBackupPaged +from .managed_database_paged import ManagedDatabasePaged from .server_dns_alias_paged import ServerDnsAliasPaged from .restore_point_paged import RestorePointPaged from .database_operation_paged import DatabaseOperationPaged from .elastic_pool_operation_paged import ElasticPoolOperationPaged +from .vulnerability_assessment_scan_record_paged import VulnerabilityAssessmentScanRecordPaged +from .instance_failover_group_paged import InstanceFailoverGroupPaged from .sql_management_client_enums import ( CheckNameAvailabilityReason, ServerConnectionType, @@ -289,8 +364,8 @@ ReadWriteEndpointFailoverPolicy, ReadOnlyEndpointFailoverPolicy, FailoverGroupReplicationRole, - OperationOrigin, IdentityType, + OperationOrigin, SyncAgentState, SyncMemberDbType, SyncGroupLogType, @@ -299,6 +374,18 @@ SyncDirection, SyncMemberState, VirtualNetworkRuleState, + JobAgentState, + JobExecutionLifecycle, + ProvisioningState, + JobTargetType, + JobScheduleType, + JobStepActionType, + JobStepActionSource, + JobStepOutputType, + JobTargetGroupMembershipType, + ManagedDatabaseStatus, + CatalogCollationType, + ManagedDatabaseCreateMode, AutomaticTuningServerMode, AutomaticTuningServerReason, RestorePointType, @@ -310,21 +397,23 @@ CreateMode, SampleName, DatabaseStatus, - CatalogCollationType, DatabaseLicenseType, DatabaseReadScale, ElasticPoolState, ElasticPoolLicenseType, + VulnerabilityAssessmentScanTriggerType, + VulnerabilityAssessmentScanState, + InstanceFailoverGroupReplicationRole, LongTermRetentionDatabaseState, CapabilityGroup, ) __all__ = [ - 'Resource', - 'TrackedResource', - 'ProxyResource', 'RecoverableDatabase', 'RestorableDroppedDatabase', + 'TrackedResource', + 'Resource', + 'ProxyResource', 'CheckNameAvailabilityRequest', 'CheckNameAvailabilityResponse', 'ServerConnectionPolicy', @@ -367,10 +456,13 @@ 'PartnerInfo', 'FailoverGroup', 'FailoverGroupUpdate', + 'ResourceIdentity', + 'Sku', + 'ManagedInstance', + 'ManagedInstanceUpdate', 'OperationDisplay', 'Operation', 'ServerKey', - 'ResourceIdentity', 'Server', 'ServerUpdate', 'SyncAgent', @@ -388,8 +480,29 @@ 'SyncMember', 'SubscriptionUsage', 'VirtualNetworkRule', + 'DatabaseVulnerabilityAssessmentRuleBaselineItem', + 'DatabaseVulnerabilityAssessmentRuleBaseline', + 'VulnerabilityAssessmentRecurringScansProperties', + 'DatabaseVulnerabilityAssessment', + 'JobAgent', + 'JobAgentUpdate', + 'JobCredential', + 'JobExecutionTarget', + 'JobExecution', + 'JobSchedule', + 'Job', + 'JobStepAction', + 'JobStepOutput', + 'JobStepExecutionOptions', + 'JobStep', + 'JobTarget', + 'JobTargetGroup', + 'JobVersion', 'LongTermRetentionBackup', 'BackupLongTermRetentionPolicy', + 'CompleteDatabaseRestoreDefinition', + 'ManagedDatabase', + 'ManagedDatabaseUpdate', 'AutomaticTuningServerOptions', 'ServerAutomaticTuning', 'ServerDnsAlias', @@ -402,7 +515,6 @@ 'LogSizeCapability', 'MaxSizeRangeCapability', 'PerformanceLevelCapability', - 'Sku', 'LicenseTypeCapability', 'ServiceObjectiveCapability', 'EditionCapability', @@ -422,6 +534,15 @@ 'ElasticPoolPerDatabaseSettings', 'ElasticPool', 'ElasticPoolUpdate', + 'VulnerabilityAssessmentScanError', + 'VulnerabilityAssessmentScanRecord', + 'DatabaseVulnerabilityAssessmentScansExport', + 'InstanceFailoverGroupReadWriteEndpoint', + 'InstanceFailoverGroupReadOnlyEndpoint', + 'PartnerRegionInfo', + 'ManagedInstancePairInfo', + 'InstanceFailoverGroup', + 'BackupShortTermRetentionPolicy', 'RecoverableDatabasePaged', 'RestorableDroppedDatabasePaged', 'ServerPaged', @@ -446,6 +567,7 @@ 'DatabaseUsagePaged', 'EncryptionProtectorPaged', 'FailoverGroupPaged', + 'ManagedInstancePaged', 'OperationPaged', 'ServerKeyPaged', 'SyncAgentPaged', @@ -457,11 +579,21 @@ 'SyncMemberPaged', 'SubscriptionUsagePaged', 'VirtualNetworkRulePaged', + 'JobAgentPaged', + 'JobCredentialPaged', + 'JobExecutionPaged', + 'JobPaged', + 'JobStepPaged', + 'JobTargetGroupPaged', + 'JobVersionPaged', 'LongTermRetentionBackupPaged', + 'ManagedDatabasePaged', 'ServerDnsAliasPaged', 'RestorePointPaged', 'DatabaseOperationPaged', 'ElasticPoolOperationPaged', + 'VulnerabilityAssessmentScanRecordPaged', + 'InstanceFailoverGroupPaged', 'CheckNameAvailabilityReason', 'ServerConnectionType', 'SecurityAlertPolicyState', @@ -495,8 +627,8 @@ 'ReadWriteEndpointFailoverPolicy', 'ReadOnlyEndpointFailoverPolicy', 'FailoverGroupReplicationRole', - 'OperationOrigin', 'IdentityType', + 'OperationOrigin', 'SyncAgentState', 'SyncMemberDbType', 'SyncGroupLogType', @@ -505,6 +637,18 @@ 'SyncDirection', 'SyncMemberState', 'VirtualNetworkRuleState', + 'JobAgentState', + 'JobExecutionLifecycle', + 'ProvisioningState', + 'JobTargetType', + 'JobScheduleType', + 'JobStepActionType', + 'JobStepActionSource', + 'JobStepOutputType', + 'JobTargetGroupMembershipType', + 'ManagedDatabaseStatus', + 'CatalogCollationType', + 'ManagedDatabaseCreateMode', 'AutomaticTuningServerMode', 'AutomaticTuningServerReason', 'RestorePointType', @@ -516,11 +660,13 @@ 'CreateMode', 'SampleName', 'DatabaseStatus', - 'CatalogCollationType', 'DatabaseLicenseType', 'DatabaseReadScale', 'ElasticPoolState', 'ElasticPoolLicenseType', + 'VulnerabilityAssessmentScanTriggerType', + 'VulnerabilityAssessmentScanState', + 'InstanceFailoverGroupReplicationRole', 'LongTermRetentionDatabaseState', 'CapabilityGroup', ] diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py index 1e740145e464..b075dac8562d 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class BackupLongTermRetentionPolicy(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py b/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py new file mode 100644 index 000000000000..1d4fba2cfff4 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class BackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = kwargs.get('retention_days', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py new file mode 100644 index 000000000000..9df25577baf3 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class BackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, *, retention_days: int=None, **kwargs) -> None: + super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = retention_days diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py b/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py new file mode 100644 index 000000000000..926012a21f09 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CompleteDatabaseRestoreDefinition(Model): + """Contains the information necessary to perform a complete database restore + operation. + + All required parameters must be populated in order to send to Azure. + + :param last_backup_name: Required. The last backup name to apply + :type last_backup_name: str + """ + + _validation = { + 'last_backup_name': {'required': True}, + } + + _attribute_map = { + 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) + self.last_backup_name = kwargs.get('last_backup_name', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py new file mode 100644 index 000000000000..8b3c7f3da1f8 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CompleteDatabaseRestoreDefinition(Model): + """Contains the information necessary to perform a complete database restore + operation. + + All required parameters must be populated in order to send to Azure. + + :param last_backup_name: Required. The last backup name to apply + :type last_backup_name: str + """ + + _validation = { + 'last_backup_name': {'required': True}, + } + + _attribute_map = { + 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, + } + + def __init__(self, *, last_backup_name: str, **kwargs) -> None: + super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) + self.last_backup_name = last_backup_name diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py index 6c601254aa8b..c2227aeb60da 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class DataMaskingPolicy(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py index e576d5643c02..775fd78a2d6b 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class DataMaskingRule(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database.py b/azure-mgmt-sql/azure/mgmt/sql/models/database.py index 01a91639b523..f3f66d024a7a 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/database.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database.py @@ -26,10 +26,10 @@ class Database(TrackedResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] :param location: Required. Resource location. :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] :param sku: The name and tier of the SKU. :type sku: ~azure.mgmt.sql.models.Sku :ivar kind: Kind of database. This is metadata used for the Azure portal @@ -171,8 +171,8 @@ class Database(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'managed_by': {'key': 'managedBy', 'type': 'str'}, diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py index ff274ebc8969..86bb068ce54f 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class DatabaseAutomaticTuning(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py index d2dccefb38d9..bfc95370f0fc 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class DatabaseBlobAuditingPolicy(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py index 51f5690a2308..66fb0bb0c602 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class DatabaseOperation(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py index 29a2f6613d41..9cfb4d07a7e6 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .tracked_resource import TrackedResource +from .tracked_resource_py3 import TrackedResource class Database(TrackedResource): @@ -26,10 +26,10 @@ class Database(TrackedResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] :param location: Required. Resource location. :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] :param sku: The name and tier of the SKU. :type sku: ~azure.mgmt.sql.models.Sku :ivar kind: Kind of database. This is metadata used for the Azure portal @@ -171,8 +171,8 @@ class Database(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'managed_by': {'key': 'managedBy', 'type': 'str'}, @@ -205,7 +205,7 @@ class Database(TrackedResource): } def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, **kwargs) -> None: - super(Database, self).__init__(tags=tags, location=location, **kwargs) + super(Database, self).__init__(location=location, tags=tags, **kwargs) self.sku = sku self.kind = None self.managed_by = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py index 85b31a408282..8967d6a6e0f1 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class DatabaseSecurityAlertPolicy(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py new file mode 100644 index 000000000000..a7e5921902ad --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class DatabaseVulnerabilityAssessment(ProxyResource): + """A database vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: Required. A shared access signature (SAS + Key) that has write access to the blob container specified in + 'storageContainerPath' parameter. + :type storage_container_sas_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + 'storage_container_sas_key': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py new file mode 100644 index 000000000000..2dff8336ef3f --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class DatabaseVulnerabilityAssessment(ProxyResource): + """A database vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: Required. A shared access signature (SAS + Key) that has write access to the blob container specified in + 'storageContainerPath' parameter. + :type storage_container_sas_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + 'storage_container_sas_key': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, *, storage_container_path: str, storage_container_sas_key: str, recurring_scans=None, **kwargs) -> None: + super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.recurring_scans = recurring_scans diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py new file mode 100644 index 000000000000..66881dfb9b5c --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): + """A database vulnerability assessment rule baseline. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param baseline_results: Required. The rule baseline result + :type baseline_results: + list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'baseline_results': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) + self.baseline_results = kwargs.get('baseline_results', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py new file mode 100644 index 000000000000..4bd7d0e16f52 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): + """Properties for an Azure SQL Database Vulnerability Assessment rule + baseline's result. + + All required parameters must be populated in order to send to Azure. + + :param result: Required. The rule baseline result + :type result: list[str] + """ + + _validation = { + 'result': {'required': True}, + } + + _attribute_map = { + 'result': {'key': 'result', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) + self.result = kwargs.get('result', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py new file mode 100644 index 000000000000..9378a89cc0f0 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): + """Properties for an Azure SQL Database Vulnerability Assessment rule + baseline's result. + + All required parameters must be populated in order to send to Azure. + + :param result: Required. The rule baseline result + :type result: list[str] + """ + + _validation = { + 'result': {'required': True}, + } + + _attribute_map = { + 'result': {'key': 'result', 'type': '[str]'}, + } + + def __init__(self, *, result, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) + self.result = result diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py new file mode 100644 index 000000000000..4997c258c475 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): + """A database vulnerability assessment rule baseline. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param baseline_results: Required. The rule baseline result + :type baseline_results: + list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'baseline_results': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, + } + + def __init__(self, *, baseline_results, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) + self.baseline_results = baseline_results diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py new file mode 100644 index 000000000000..4d088fd265c0 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): + """A database Vulnerability Assessment scan export resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar exported_report_location: Location of the exported report (e.g. + https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + :vartype exported_report_location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'exported_report_location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) + self.exported_report_location = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py new file mode 100644 index 000000000000..7e925fb428ce --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): + """A database Vulnerability Assessment scan export resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar exported_report_location: Location of the exported report (e.g. + https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + :vartype exported_report_location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'exported_report_location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) + self.exported_report_location = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py index fa076856c7de..10a28ea0f6e3 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py @@ -26,10 +26,10 @@ class ElasticPool(TrackedResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] :param location: Required. Resource location. :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] :param sku: :type sku: ~azure.mgmt.sql.models.Sku :ivar kind: Kind of elastic pool. This is metadata used for the Azure @@ -71,8 +71,8 @@ class ElasticPool(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'str'}, diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py index 71f4b850d657..5d8d4f61727a 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ElasticPoolActivity(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py index d650605d6e4c..2e2818eee69a 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ElasticPoolDatabaseActivity(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py index 13add58062c7..c214b66532a5 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ElasticPoolOperation(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py index 48fb5ad5412c..eb092529ac3b 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .tracked_resource import TrackedResource +from .tracked_resource_py3 import TrackedResource class ElasticPool(TrackedResource): @@ -26,10 +26,10 @@ class ElasticPool(TrackedResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] :param location: Required. Resource location. :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] :param sku: :type sku: ~azure.mgmt.sql.models.Sku :ivar kind: Kind of elastic pool. This is metadata used for the Azure @@ -71,8 +71,8 @@ class ElasticPool(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'str'}, @@ -84,7 +84,7 @@ class ElasticPool(TrackedResource): } def __init__(self, *, location: str, tags=None, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, **kwargs) -> None: - super(ElasticPool, self).__init__(tags=tags, location=location, **kwargs) + super(ElasticPool, self).__init__(location=location, tags=tags, **kwargs) self.sku = sku self.kind = None self.state = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py index 33e6c18db636..6dd4bad3cfbe 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class EncryptionProtector(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py index fdc42b2246c3..4b179cf5b45f 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class FailoverGroup(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py index c218f1eaebae..c292730d9653 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class FirewallRule(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py index 12c801a92091..23941df5ee47 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class GeoBackupPolicy(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py index 8603208ee044..a344fc99266b 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ImportExportResponse(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py index 55f29f4735d0..68b97ae814a3 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .export_request import ExportRequest +from .export_request_py3 import ExportRequest class ImportRequest(ExportRequest): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py new file mode 100644 index 000000000000..f360ffbfed57 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class InstanceFailoverGroup(ProxyResource): + """An instance failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_regions: Required. Partner region information for the + failover group. + :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] + :param managed_instance_pairs: Required. List of managed instance pairs in + the failover group. + :type managed_instance_pairs: + list[~azure.mgmt.sql.models.ManagedInstancePairInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_regions': {'required': True}, + 'managed_instance_pairs': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, + 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroup, self).__init__(**kwargs) + self.read_write_endpoint = kwargs.get('read_write_endpoint', None) + self.read_only_endpoint = kwargs.get('read_only_endpoint', None) + self.replication_role = None + self.replication_state = None + self.partner_regions = kwargs.get('partner_regions', None) + self.managed_instance_pairs = kwargs.get('managed_instance_pairs', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py new file mode 100644 index 000000000000..c67eaf2ef670 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class InstanceFailoverGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`InstanceFailoverGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InstanceFailoverGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(InstanceFailoverGroupPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py new file mode 100644 index 000000000000..8959f26c9f69 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class InstanceFailoverGroup(ProxyResource): + """An instance failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_regions: Required. Partner region information for the + failover group. + :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] + :param managed_instance_pairs: Required. List of managed instance pairs in + the failover group. + :type managed_instance_pairs: + list[~azure.mgmt.sql.models.ManagedInstancePairInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_regions': {'required': True}, + 'managed_instance_pairs': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, + 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, + } + + def __init__(self, *, read_write_endpoint, partner_regions, managed_instance_pairs, read_only_endpoint=None, **kwargs) -> None: + super(InstanceFailoverGroup, self).__init__(**kwargs) + self.read_write_endpoint = read_write_endpoint + self.read_only_endpoint = read_only_endpoint + self.replication_role = None + self.replication_state = None + self.partner_regions = partner_regions + self.managed_instance_pairs = managed_instance_pairs diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py new file mode 100644 index 000000000000..2a9857817ae4 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class InstanceFailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py new file mode 100644 index 000000000000..71c9f180cdf7 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class InstanceFailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, *, failover_policy=None, **kwargs) -> None: + super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py new file mode 100644 index 000000000000..89a86899e503 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class InstanceFailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py new file mode 100644 index 000000000000..7fdc047ba37c --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class InstanceFailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: + super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job.py b/azure-mgmt-sql/azure/mgmt/sql/models/job.py new file mode 100644 index 000000000000..6b2c60fd1d4b --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class Job(ProxyResource): + """A job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param description: User-defined description of the job. Default value: "" + . + :type description: str + :ivar version: The job version number. + :vartype version: int + :param schedule: Schedule properties of the job. + :type schedule: ~azure.mgmt.sql.models.JobSchedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'int'}, + 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, + } + + def __init__(self, **kwargs): + super(Job, self).__init__(**kwargs) + self.description = kwargs.get('description', "") + self.version = None + self.schedule = kwargs.get('schedule', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py new file mode 100644 index 000000000000..48d42c28260c --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource import TrackedResource + + +class JobAgent(TrackedResource): + """An Azure SQL job agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param database_id: Required. Resource ID of the database to store job + metadata in. + :type database_id: str + :ivar state: The state of the job agent. Possible values include: + 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.JobAgentState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobAgent, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.database_id = kwargs.get('database_id', None) + self.state = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py new file mode 100644 index 000000000000..25dd750b9d1f --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class JobAgentPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobAgent ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobAgent]'} + } + + def __init__(self, *args, **kwargs): + + super(JobAgentPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py new file mode 100644 index 000000000000..936d87932ebc --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource_py3 import TrackedResource + + +class JobAgent(TrackedResource): + """An Azure SQL job agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param database_id: Required. Resource ID of the database to store job + metadata in. + :type database_id: str + :ivar state: The state of the job agent. Possible values include: + 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.JobAgentState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, location: str, database_id: str, tags=None, sku=None, **kwargs) -> None: + super(JobAgent, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.database_id = database_id + self.state = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py new file mode 100644 index 000000000000..af781de91cbf --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobAgentUpdate(Model): + """An update to an Azure SQL job agent. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(JobAgentUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py new file mode 100644 index 000000000000..ab5e71f7b1d1 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobAgentUpdate(Model): + """An update to an Azure SQL job agent. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(JobAgentUpdate, self).__init__(**kwargs) + self.tags = tags diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py new file mode 100644 index 000000000000..807d34975114 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class JobCredential(ProxyResource): + """A stored credential that can be used by a job to connect to target + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param username: Required. The credential user name. + :type username: str + :param password: Required. The credential password. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'properties.username', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobCredential, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py new file mode 100644 index 000000000000..550108e41c93 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class JobCredentialPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobCredential ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobCredential]'} + } + + def __init__(self, *args, **kwargs): + + super(JobCredentialPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py new file mode 100644 index 000000000000..5158010b9c74 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class JobCredential(ProxyResource): + """A stored credential that can be used by a job to connect to target + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param username: Required. The credential user name. + :type username: str + :param password: Required. The credential password. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'properties.username', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, *, username: str, password: str, **kwargs) -> None: + super(JobCredential, self).__init__(**kwargs) + self.username = username + self.password = password diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py new file mode 100644 index 000000000000..92744fb7c75b --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py @@ -0,0 +1,113 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class JobExecution(ProxyResource): + """An execution of a job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar job_version: The job version number. + :vartype job_version: int + :ivar step_name: The job step name. + :vartype step_name: str + :ivar step_id: The job step id. + :vartype step_id: int + :ivar job_execution_id: The unique identifier of the job execution. + :vartype job_execution_id: str + :ivar lifecycle: The detailed state of the job execution. Possible values + include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', + 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', + 'TimedOut', 'Canceled', 'Skipped' + :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle + :ivar provisioning_state: The ARM provisioning state of the job execution. + Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', + 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.sql.models.ProvisioningState + :ivar create_time: The time that the job execution was created. + :vartype create_time: datetime + :ivar start_time: The time that the job execution started. + :vartype start_time: datetime + :ivar end_time: The time that the job execution completed. + :vartype end_time: datetime + :param current_attempts: Number of times the job execution has been + attempted. + :type current_attempts: int + :ivar current_attempt_start_time: Start time of the current attempt. + :vartype current_attempt_start_time: datetime + :ivar last_message: The last status or error message. + :vartype last_message: str + :ivar target: The target that this execution is executed on. + :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'job_version': {'readonly': True}, + 'step_name': {'readonly': True}, + 'step_id': {'readonly': True}, + 'job_execution_id': {'readonly': True}, + 'lifecycle': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'create_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'current_attempt_start_time': {'readonly': True}, + 'last_message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, + 'step_name': {'key': 'properties.stepName', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, + 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, + 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, + 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, + } + + def __init__(self, **kwargs): + super(JobExecution, self).__init__(**kwargs) + self.job_version = None + self.step_name = None + self.step_id = None + self.job_execution_id = None + self.lifecycle = None + self.provisioning_state = None + self.create_time = None + self.start_time = None + self.end_time = None + self.current_attempts = kwargs.get('current_attempts', None) + self.current_attempt_start_time = None + self.last_message = None + self.target = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py new file mode 100644 index 000000000000..bfcdb03ea9aa --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class JobExecutionPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobExecution ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobExecution]'} + } + + def __init__(self, *args, **kwargs): + + super(JobExecutionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py new file mode 100644 index 000000000000..b7fdaba7c147 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py @@ -0,0 +1,113 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class JobExecution(ProxyResource): + """An execution of a job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar job_version: The job version number. + :vartype job_version: int + :ivar step_name: The job step name. + :vartype step_name: str + :ivar step_id: The job step id. + :vartype step_id: int + :ivar job_execution_id: The unique identifier of the job execution. + :vartype job_execution_id: str + :ivar lifecycle: The detailed state of the job execution. Possible values + include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', + 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', + 'TimedOut', 'Canceled', 'Skipped' + :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle + :ivar provisioning_state: The ARM provisioning state of the job execution. + Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', + 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.sql.models.ProvisioningState + :ivar create_time: The time that the job execution was created. + :vartype create_time: datetime + :ivar start_time: The time that the job execution started. + :vartype start_time: datetime + :ivar end_time: The time that the job execution completed. + :vartype end_time: datetime + :param current_attempts: Number of times the job execution has been + attempted. + :type current_attempts: int + :ivar current_attempt_start_time: Start time of the current attempt. + :vartype current_attempt_start_time: datetime + :ivar last_message: The last status or error message. + :vartype last_message: str + :ivar target: The target that this execution is executed on. + :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'job_version': {'readonly': True}, + 'step_name': {'readonly': True}, + 'step_id': {'readonly': True}, + 'job_execution_id': {'readonly': True}, + 'lifecycle': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'create_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'current_attempt_start_time': {'readonly': True}, + 'last_message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, + 'step_name': {'key': 'properties.stepName', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, + 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, + 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, + 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, + } + + def __init__(self, *, current_attempts: int=None, **kwargs) -> None: + super(JobExecution, self).__init__(**kwargs) + self.job_version = None + self.step_name = None + self.step_id = None + self.job_execution_id = None + self.lifecycle = None + self.provisioning_state = None + self.create_time = None + self.start_time = None + self.end_time = None + self.current_attempts = current_attempts + self.current_attempt_start_time = None + self.last_message = None + self.target = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py new file mode 100644 index 000000000000..50557aaf96d0 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobExecutionTarget(Model): + """The target that a job execution is executed on. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of the target. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :vartype type: str or ~azure.mgmt.sql.models.JobTargetType + :ivar server_name: The server name. + :vartype server_name: str + :ivar database_name: The database name. + :vartype database_name: str + """ + + _validation = { + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobExecutionTarget, self).__init__(**kwargs) + self.type = None + self.server_name = None + self.database_name = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py new file mode 100644 index 000000000000..551716c3cd31 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobExecutionTarget(Model): + """The target that a job execution is executed on. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of the target. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :vartype type: str or ~azure.mgmt.sql.models.JobTargetType + :ivar server_name: The server name. + :vartype server_name: str + :ivar database_name: The database name. + :vartype database_name: str + """ + + _validation = { + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobExecutionTarget, self).__init__(**kwargs) + self.type = None + self.server_name = None + self.database_name = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py new file mode 100644 index 000000000000..3b85770570f2 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class JobPaged(Paged): + """ + A paging container for iterating over a list of :class:`Job ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Job]'} + } + + def __init__(self, *args, **kwargs): + + super(JobPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py new file mode 100644 index 000000000000..5bfb9b53f03f --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class Job(ProxyResource): + """A job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param description: User-defined description of the job. Default value: "" + . + :type description: str + :ivar version: The job version number. + :vartype version: int + :param schedule: Schedule properties of the job. + :type schedule: ~azure.mgmt.sql.models.JobSchedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'int'}, + 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, + } + + def __init__(self, *, description: str="", schedule=None, **kwargs) -> None: + super(Job, self).__init__(**kwargs) + self.description = description + self.version = None + self.schedule = schedule diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py new file mode 100644 index 000000000000..7fab31ef7b8c --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobSchedule(Model): + """Scheduling properties of a job. + + :param start_time: Schedule start time. Default value: + "0001-01-01T00:00:00Z" . + :type start_time: datetime + :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" + . + :type end_time: datetime + :param type: Schedule interval type. Possible values include: 'Once', + 'Recurring'. Default value: "Once" . + :type type: str or ~azure.mgmt.sql.models.JobScheduleType + :param enabled: Whether or not the schedule is enabled. + :type enabled: bool + :param interval: Value of the schedule's recurring interval, if the + scheduletype is recurring. ISO8601 duration format. + :type interval: str + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'JobScheduleType'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'interval': {'key': 'interval', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobSchedule, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', "0001-01-01T00:00:00Z") + self.end_time = kwargs.get('end_time', "9999-12-31T11:59:59Z") + self.type = kwargs.get('type', "Once") + self.enabled = kwargs.get('enabled', None) + self.interval = kwargs.get('interval', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py new file mode 100644 index 000000000000..8c0cd37ebefe --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobSchedule(Model): + """Scheduling properties of a job. + + :param start_time: Schedule start time. Default value: + "0001-01-01T00:00:00Z" . + :type start_time: datetime + :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" + . + :type end_time: datetime + :param type: Schedule interval type. Possible values include: 'Once', + 'Recurring'. Default value: "Once" . + :type type: str or ~azure.mgmt.sql.models.JobScheduleType + :param enabled: Whether or not the schedule is enabled. + :type enabled: bool + :param interval: Value of the schedule's recurring interval, if the + scheduletype is recurring. ISO8601 duration format. + :type interval: str + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'JobScheduleType'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'interval': {'key': 'interval', 'type': 'str'}, + } + + def __init__(self, *, start_time="0001-01-01T00:00:00Z", end_time="9999-12-31T11:59:59Z", type="Once", enabled: bool=None, interval: str=None, **kwargs) -> None: + super(JobSchedule, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.type = type + self.enabled = enabled + self.interval = interval diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py new file mode 100644 index 000000000000..f032375dec32 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class JobStep(ProxyResource): + """A job step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param step_id: The job step's index within the job. If not specified when + creating the job step, it will be created as the last step. If not + specified when updating the job step, the step id is not modified. + :type step_id: int + :param target_group: Required. The resource ID of the target group that + the job step will be executed on. + :type target_group: str + :param credential: Required. The resource ID of the job credential that + will be used to connect to the targets. + :type credential: str + :param action: Required. The action payload of the job step. + :type action: ~azure.mgmt.sql.models.JobStepAction + :param output: Output destination properties of the job step. + :type output: ~azure.mgmt.sql.models.JobStepOutput + :param execution_options: Execution options for the job step. + :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'target_group': {'required': True}, + 'credential': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, + 'credential': {'key': 'properties.credential', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, + 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, + 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, + } + + def __init__(self, **kwargs): + super(JobStep, self).__init__(**kwargs) + self.step_id = kwargs.get('step_id', None) + self.target_group = kwargs.get('target_group', None) + self.credential = kwargs.get('credential', None) + self.action = kwargs.get('action', None) + self.output = kwargs.get('output', None) + self.execution_options = kwargs.get('execution_options', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py new file mode 100644 index 000000000000..68e55b1fa38f --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobStepAction(Model): + """The action to be executed by a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: Type of action being executed by the job step. Possible + values include: 'TSql'. Default value: "TSql" . + :type type: str or ~azure.mgmt.sql.models.JobStepActionType + :param source: The source of the action to execute. Possible values + include: 'Inline'. Default value: "Inline" . + :type source: str or ~azure.mgmt.sql.models.JobStepActionSource + :param value: Required. The action value, for example the text of the + T-SQL script to execute. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobStepAction, self).__init__(**kwargs) + self.type = kwargs.get('type', "TSql") + self.source = kwargs.get('source', "Inline") + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py new file mode 100644 index 000000000000..4d8848c8eaef --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobStepAction(Model): + """The action to be executed by a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: Type of action being executed by the job step. Possible + values include: 'TSql'. Default value: "TSql" . + :type type: str or ~azure.mgmt.sql.models.JobStepActionType + :param source: The source of the action to execute. Possible values + include: 'Inline'. Default value: "Inline" . + :type source: str or ~azure.mgmt.sql.models.JobStepActionSource + :param value: Required. The action value, for example the text of the + T-SQL script to execute. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str, type="TSql", source="Inline", **kwargs) -> None: + super(JobStepAction, self).__init__(**kwargs) + self.type = type + self.source = source + self.value = value diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py new file mode 100644 index 000000000000..6a49f1d10f25 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobStepExecutionOptions(Model): + """The execution options of a job step. + + :param timeout_seconds: Execution timeout for the job step. Default value: + 43200 . + :type timeout_seconds: int + :param retry_attempts: Maximum number of times the job step will be + reattempted if the first attempt fails. Default value: 10 . + :type retry_attempts: int + :param initial_retry_interval_seconds: Initial delay between retries for + job step execution. Default value: 1 . + :type initial_retry_interval_seconds: int + :param maximum_retry_interval_seconds: The maximum amount of time to wait + between retries for job step execution. Default value: 120 . + :type maximum_retry_interval_seconds: int + :param retry_interval_backoff_multiplier: The backoff multiplier for the + time between retries. Default value: 2 . + :type retry_interval_backoff_multiplier: float + """ + + _attribute_map = { + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, + 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, + 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, + 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(JobStepExecutionOptions, self).__init__(**kwargs) + self.timeout_seconds = kwargs.get('timeout_seconds', 43200) + self.retry_attempts = kwargs.get('retry_attempts', 10) + self.initial_retry_interval_seconds = kwargs.get('initial_retry_interval_seconds', 1) + self.maximum_retry_interval_seconds = kwargs.get('maximum_retry_interval_seconds', 120) + self.retry_interval_backoff_multiplier = kwargs.get('retry_interval_backoff_multiplier', 2) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py new file mode 100644 index 000000000000..712f0e947436 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobStepExecutionOptions(Model): + """The execution options of a job step. + + :param timeout_seconds: Execution timeout for the job step. Default value: + 43200 . + :type timeout_seconds: int + :param retry_attempts: Maximum number of times the job step will be + reattempted if the first attempt fails. Default value: 10 . + :type retry_attempts: int + :param initial_retry_interval_seconds: Initial delay between retries for + job step execution. Default value: 1 . + :type initial_retry_interval_seconds: int + :param maximum_retry_interval_seconds: The maximum amount of time to wait + between retries for job step execution. Default value: 120 . + :type maximum_retry_interval_seconds: int + :param retry_interval_backoff_multiplier: The backoff multiplier for the + time between retries. Default value: 2 . + :type retry_interval_backoff_multiplier: float + """ + + _attribute_map = { + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, + 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, + 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, + 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, + } + + def __init__(self, *, timeout_seconds: int=43200, retry_attempts: int=10, initial_retry_interval_seconds: int=1, maximum_retry_interval_seconds: int=120, retry_interval_backoff_multiplier: float=2, **kwargs) -> None: + super(JobStepExecutionOptions, self).__init__(**kwargs) + self.timeout_seconds = timeout_seconds + self.retry_attempts = retry_attempts + self.initial_retry_interval_seconds = initial_retry_interval_seconds + self.maximum_retry_interval_seconds = maximum_retry_interval_seconds + self.retry_interval_backoff_multiplier = retry_interval_backoff_multiplier diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py new file mode 100644 index 000000000000..8a015a7505bd --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobStepOutput(Model): + """The output configuration of a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: The output destination type. Possible values include: + 'SqlDatabase'. Default value: "SqlDatabase" . + :type type: str or ~azure.mgmt.sql.models.JobStepOutputType + :param subscription_id: The output destination subscription id. + :type subscription_id: str + :param resource_group_name: The output destination resource group. + :type resource_group_name: str + :param server_name: Required. The output destination server name. + :type server_name: str + :param database_name: Required. The output destination database. + :type database_name: str + :param schema_name: The output destination schema. Default value: "dbo" . + :type schema_name: str + :param table_name: Required. The output destination table. + :type table_name: str + :param credential: Required. The resource ID of the credential to use to + connect to the output destination. + :type credential: str + """ + + _validation = { + 'server_name': {'required': True}, + 'database_name': {'required': True}, + 'table_name': {'required': True}, + 'credential': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobStepOutput, self).__init__(**kwargs) + self.type = kwargs.get('type', "SqlDatabase") + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.schema_name = kwargs.get('schema_name', "dbo") + self.table_name = kwargs.get('table_name', None) + self.credential = kwargs.get('credential', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py new file mode 100644 index 000000000000..d10ecbbd6f8c --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobStepOutput(Model): + """The output configuration of a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: The output destination type. Possible values include: + 'SqlDatabase'. Default value: "SqlDatabase" . + :type type: str or ~azure.mgmt.sql.models.JobStepOutputType + :param subscription_id: The output destination subscription id. + :type subscription_id: str + :param resource_group_name: The output destination resource group. + :type resource_group_name: str + :param server_name: Required. The output destination server name. + :type server_name: str + :param database_name: Required. The output destination database. + :type database_name: str + :param schema_name: The output destination schema. Default value: "dbo" . + :type schema_name: str + :param table_name: Required. The output destination table. + :type table_name: str + :param credential: Required. The resource ID of the credential to use to + connect to the output destination. + :type credential: str + """ + + _validation = { + 'server_name': {'required': True}, + 'database_name': {'required': True}, + 'table_name': {'required': True}, + 'credential': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'str'}, + } + + def __init__(self, *, server_name: str, database_name: str, table_name: str, credential: str, type="SqlDatabase", subscription_id: str=None, resource_group_name: str=None, schema_name: str="dbo", **kwargs) -> None: + super(JobStepOutput, self).__init__(**kwargs) + self.type = type + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.server_name = server_name + self.database_name = database_name + self.schema_name = schema_name + self.table_name = table_name + self.credential = credential diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py new file mode 100644 index 000000000000..1bda4f5adf6e --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class JobStepPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobStep ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobStep]'} + } + + def __init__(self, *args, **kwargs): + + super(JobStepPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py new file mode 100644 index 000000000000..bd267f9fd9a6 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class JobStep(ProxyResource): + """A job step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param step_id: The job step's index within the job. If not specified when + creating the job step, it will be created as the last step. If not + specified when updating the job step, the step id is not modified. + :type step_id: int + :param target_group: Required. The resource ID of the target group that + the job step will be executed on. + :type target_group: str + :param credential: Required. The resource ID of the job credential that + will be used to connect to the targets. + :type credential: str + :param action: Required. The action payload of the job step. + :type action: ~azure.mgmt.sql.models.JobStepAction + :param output: Output destination properties of the job step. + :type output: ~azure.mgmt.sql.models.JobStepOutput + :param execution_options: Execution options for the job step. + :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'target_group': {'required': True}, + 'credential': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, + 'credential': {'key': 'properties.credential', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, + 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, + 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, + } + + def __init__(self, *, target_group: str, credential: str, action, step_id: int=None, output=None, execution_options=None, **kwargs) -> None: + super(JobStep, self).__init__(**kwargs) + self.step_id = step_id + self.target_group = target_group + self.credential = credential + self.action = action + self.output = output + self.execution_options = execution_options diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py new file mode 100644 index 000000000000..a608d87c1af1 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobTarget(Model): + """A job target, for example a specific database or a container of databases + that is evaluated during job execution. + + All required parameters must be populated in order to send to Azure. + + :param membership_type: Whether the target is included or excluded from + the group. Possible values include: 'Include', 'Exclude'. Default value: + "Include" . + :type membership_type: str or + ~azure.mgmt.sql.models.JobTargetGroupMembershipType + :param type: Required. The target type. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :type type: str or ~azure.mgmt.sql.models.JobTargetType + :param server_name: The target server name. + :type server_name: str + :param database_name: The target database name. + :type database_name: str + :param elastic_pool_name: The target elastic pool name. + :type elastic_pool_name: str + :param shard_map_name: The target shard map. + :type shard_map_name: str + :param refresh_credential: The resource ID of the credential that is used + during job execution to connect to the target and determine the list of + databases inside the target. + :type refresh_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, + 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, + 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobTarget, self).__init__(**kwargs) + self.membership_type = kwargs.get('membership_type', "Include") + self.type = kwargs.get('type', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.elastic_pool_name = kwargs.get('elastic_pool_name', None) + self.shard_map_name = kwargs.get('shard_map_name', None) + self.refresh_credential = kwargs.get('refresh_credential', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py similarity index 51% rename from azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error.py rename to azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py index a6d243ab35f9..38148fb244c4 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py @@ -9,38 +9,41 @@ # regenerated. # -------------------------------------------------------------------------- -from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput +from .proxy_resource import ProxyResource -class MigrateSqlServerSqlMITaskOutputError(MigrateSqlServerSqlMITaskOutput): - """MigrateSqlServerSqlMITaskOutputError. +class JobTargetGroup(ProxyResource): + """A group of job targets. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Result identifier + :ivar id: Resource ID. :vartype id: str - :param result_type: Required. Constant filled by server. - :type result_type: str - :ivar error: Migration error - :vartype error: ~azure.mgmt.datamigration.models.ReportableException + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param members: Required. Members of the target group. + :type members: list[~azure.mgmt.sql.models.JobTarget] """ _validation = { 'id': {'readonly': True}, - 'result_type': {'required': True}, - 'error': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'members': {'required': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'result_type': {'key': 'resultType', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ReportableException'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, } def __init__(self, **kwargs): - super(MigrateSqlServerSqlMITaskOutputError, self).__init__(**kwargs) - self.error = None - self.result_type = 'ErrorOutput' + super(JobTargetGroup, self).__init__(**kwargs) + self.members = kwargs.get('members', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py new file mode 100644 index 000000000000..cd466e5afa84 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class JobTargetGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobTargetGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobTargetGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(JobTargetGroupPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py new file mode 100644 index 000000000000..a9582212ff82 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class JobTargetGroup(ProxyResource): + """A group of job targets. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param members: Required. Members of the target group. + :type members: list[~azure.mgmt.sql.models.JobTarget] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'members': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, + } + + def __init__(self, *, members, **kwargs) -> None: + super(JobTargetGroup, self).__init__(**kwargs) + self.members = members diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py new file mode 100644 index 000000000000..281eb7598f18 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobTarget(Model): + """A job target, for example a specific database or a container of databases + that is evaluated during job execution. + + All required parameters must be populated in order to send to Azure. + + :param membership_type: Whether the target is included or excluded from + the group. Possible values include: 'Include', 'Exclude'. Default value: + "Include" . + :type membership_type: str or + ~azure.mgmt.sql.models.JobTargetGroupMembershipType + :param type: Required. The target type. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :type type: str or ~azure.mgmt.sql.models.JobTargetType + :param server_name: The target server name. + :type server_name: str + :param database_name: The target database name. + :type database_name: str + :param elastic_pool_name: The target elastic pool name. + :type elastic_pool_name: str + :param shard_map_name: The target shard map. + :type shard_map_name: str + :param refresh_credential: The resource ID of the credential that is used + during job execution to connect to the target and determine the list of + databases inside the target. + :type refresh_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, + 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, + 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, + } + + def __init__(self, *, type, membership_type="Include", server_name: str=None, database_name: str=None, elastic_pool_name: str=None, shard_map_name: str=None, refresh_credential: str=None, **kwargs) -> None: + super(JobTarget, self).__init__(**kwargs) + self.membership_type = membership_type + self.type = type + self.server_name = server_name + self.database_name = database_name + self.elastic_pool_name = elastic_pool_name + self.shard_map_name = shard_map_name + self.refresh_credential = refresh_credential diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py new file mode 100644 index 000000000000..3c480e739607 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class JobVersion(ProxyResource): + """A job version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobVersion, self).__init__(**kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py new file mode 100644 index 000000000000..162e4d8cfb5e --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class JobVersionPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobVersion ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobVersion]'} + } + + def __init__(self, *args, **kwargs): + + super(JobVersionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py new file mode 100644 index 000000000000..16a8798c5949 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class JobVersion(ProxyResource): + """A job version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobVersion, self).__init__(**kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py index a7d128063b24..eb1372180fb0 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class LongTermRetentionBackup(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py new file mode 100644 index 000000000000..92d1c06510f0 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource import TrackedResource + + +class ManagedDatabase(TrackedResource): + """A managed database 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 id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status for the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Possible values include: + 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabase, self).__init__(**kwargs) + self.collation = kwargs.get('collation', None) + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.default_secondary_location = None + self.catalog_collation = kwargs.get('catalog_collation', None) + self.create_mode = kwargs.get('create_mode', None) + self.storage_container_uri = kwargs.get('storage_container_uri', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) + self.failover_group_id = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py new file mode 100644 index 000000000000..e15d9d532b5a --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ManagedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py new file mode 100644 index 000000000000..4470afe5bb7e --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource_py3 import TrackedResource + + +class ManagedDatabase(TrackedResource): + """A managed database 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 id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status for the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Possible values include: + 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, storage_container_sas_token: str=None, **kwargs) -> None: + super(ManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) + self.collation = collation + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = restore_point_in_time + self.default_secondary_location = None + self.catalog_collation = catalog_collation + self.create_mode = create_mode + self.storage_container_uri = storage_container_uri + self.source_database_id = source_database_id + self.storage_container_sas_token = storage_container_sas_token + self.failover_group_id = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py new file mode 100644 index 000000000000..4335e9b19dfa --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedDatabaseUpdate(Model): + """An managed database update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status for the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Possible values include: + 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabaseUpdate, self).__init__(**kwargs) + self.collation = kwargs.get('collation', None) + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.default_secondary_location = None + self.catalog_collation = kwargs.get('catalog_collation', None) + self.create_mode = kwargs.get('create_mode', None) + self.storage_container_uri = kwargs.get('storage_container_uri', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) + self.failover_group_id = None + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py new file mode 100644 index 000000000000..668eec38f38b --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedDatabaseUpdate(Model): + """An managed database update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status for the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Possible values include: + 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, storage_container_sas_token: str=None, tags=None, **kwargs) -> None: + super(ManagedDatabaseUpdate, self).__init__(**kwargs) + self.collation = collation + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = restore_point_in_time + self.default_secondary_location = None + self.catalog_collation = catalog_collation + self.create_mode = create_mode + self.storage_container_uri = storage_container_uri + self.source_database_id = source_database_id + self.storage_container_sas_token = storage_container_sas_token + self.failover_group_id = None + self.tags = tags diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py new file mode 100644 index 000000000000..9239f4aa347d --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource import TrackedResource + + +class ManagedInstance(TrackedResource): + """An Azure SQL managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the managed + instance. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' and 'BasePrice'. + :type license_type: str + :param v_cores: The number of VCores. + :type v_cores: int + :param storage_size_in_gb: The maximum storage size in GB. + :type storage_size_in_gb: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ManagedInstance, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.sku = kwargs.get('sku', None) + self.fully_qualified_domain_name = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.state = None + self.license_type = kwargs.get('license_type', None) + self.v_cores = kwargs.get('v_cores', None) + self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py new file mode 100644 index 000000000000..c39881da9f3b --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ManagedInstancePaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstance ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstance]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstancePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py new file mode 100644 index 000000000000..ee49c1db0c62 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedInstancePairInfo(Model): + """Pairs of Managed Instances in the failover group. + + :param primary_managed_instance_id: Id of Primary Managed Instance in + pair. + :type primary_managed_instance_id: str + :param partner_managed_instance_id: Id of Partner Managed Instance in + pair. + :type partner_managed_instance_id: str + """ + + _attribute_map = { + 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, + 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstancePairInfo, self).__init__(**kwargs) + self.primary_managed_instance_id = kwargs.get('primary_managed_instance_id', None) + self.partner_managed_instance_id = kwargs.get('partner_managed_instance_id', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py new file mode 100644 index 000000000000..49f52752b439 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedInstancePairInfo(Model): + """Pairs of Managed Instances in the failover group. + + :param primary_managed_instance_id: Id of Primary Managed Instance in + pair. + :type primary_managed_instance_id: str + :param partner_managed_instance_id: Id of Partner Managed Instance in + pair. + :type partner_managed_instance_id: str + """ + + _attribute_map = { + 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, + 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, + } + + def __init__(self, *, primary_managed_instance_id: str=None, partner_managed_instance_id: str=None, **kwargs) -> None: + super(ManagedInstancePairInfo, self).__init__(**kwargs) + self.primary_managed_instance_id = primary_managed_instance_id + self.partner_managed_instance_id = partner_managed_instance_id diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py new file mode 100644 index 000000000000..1cf2899bbfee --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource_py3 import TrackedResource + + +class ManagedInstance(TrackedResource): + """An Azure SQL managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the managed + instance. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' and 'BasePrice'. + :type license_type: str + :param v_cores: The number of VCores. + :type v_cores: int + :param storage_size_in_gb: The maximum storage size in GB. + :type storage_size_in_gb: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, sku=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type: str=None, v_cores: int=None, storage_size_in_gb: int=None, **kwargs) -> None: + super(ManagedInstance, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.sku = sku + self.fully_qualified_domain_name = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.subnet_id = subnet_id + self.state = None + self.license_type = license_type + self.v_cores = v_cores + self.storage_size_in_gb = storage_size_in_gb diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py new file mode 100644 index 000000000000..7ea51f29ddff --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedInstanceUpdate(Model): + """An update request for an Azure SQL Database managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' and 'BasePrice'. + :type license_type: str + :param v_cores: The number of VCores. + :type v_cores: int + :param storage_size_in_gb: The maximum storage size in GB. + :type storage_size_in_gb: int + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.fully_qualified_domain_name = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.state = None + self.license_type = kwargs.get('license_type', None) + self.v_cores = kwargs.get('v_cores', None) + self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py new file mode 100644 index 000000000000..0adbe5f439f8 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedInstanceUpdate(Model): + """An update request for an Azure SQL Database managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' and 'BasePrice'. + :type license_type: str + :param v_cores: The number of VCores. + :type v_cores: int + :param storage_size_in_gb: The maximum storage size in GB. + :type storage_size_in_gb: int + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type: str=None, v_cores: int=None, storage_size_in_gb: int=None, tags=None, **kwargs) -> None: + super(ManagedInstanceUpdate, self).__init__(**kwargs) + self.sku = sku + self.fully_qualified_domain_name = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.subnet_id = subnet_id + self.state = None + self.license_type = license_type + self.v_cores = v_cores + self.storage_size_in_gb = storage_size_in_gb + self.tags = tags diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py b/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py new file mode 100644 index 000000000000..4d8e2688acb1 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartnerRegionInfo(Model): + """Partner region information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param location: Geo location of the partner managed instances. + :type location: str + :ivar replication_role: Replication role of the partner managed instances. + Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + """ + + _validation = { + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartnerRegionInfo, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.replication_role = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py new file mode 100644 index 000000000000..76c52b49c0ba --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartnerRegionInfo(Model): + """Partner region information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param location: Geo location of the partner managed instances. + :type location: str + :ivar replication_role: Replication role of the partner managed instances. + Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + """ + + _validation = { + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(PartnerRegionInfo, self).__init__(**kwargs) + self.location = location + self.replication_role = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py index 322fccf81120..707323dfc134 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class ProxyResource(Resource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py index f11b8a1bc507..ee13abf5d237 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class RecommendedElasticPool(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py index 446e1fafd8e0..5aea5620371e 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class RecommendedIndex(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py index 5b753144dc76..8eb9d5510689 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class RecoverableDatabase(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py index 98ca741b476a..740748f154b2 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ReplicationLink(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py index 80b7d9c9b02b..0e4a5f45ec89 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class RestorableDroppedDatabase(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py index f86ba3ed37b2..886f576a4575 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class RestorePoint(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server.py b/azure-mgmt-sql/azure/mgmt/sql/models/server.py index dada32666e04..1c399fadb353 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server.py @@ -26,10 +26,10 @@ class Server(TrackedResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] :param location: Required. Resource location. :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] :param identity: The Azure Active Directory identity of the server. :type identity: ~azure.mgmt.sql.models.ResourceIdentity :ivar kind: Kind of sql server. This is metadata used for the Azure portal @@ -64,8 +64,8 @@ class Server(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, 'kind': {'key': 'kind', 'type': 'str'}, 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py index 4c31615adcb9..fb8fb4804610 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ServerAutomaticTuning(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py index fb5d93d90546..3dfeb71123c3 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ServerAzureADAdministrator(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py index 58795afad14e..6a32069ca067 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ServerCommunicationLink(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py index 60164406821b..10bd81052301 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ServerConnectionPolicy(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py index 1a49b635ca8a..c57df1a85f06 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ServerDnsAlias(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py index 5b8569a81ea3..41ef40ab165a 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ServerKey(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py index f68696704197..625c4d0aea4c 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .tracked_resource import TrackedResource +from .tracked_resource_py3 import TrackedResource class Server(TrackedResource): @@ -26,10 +26,10 @@ class Server(TrackedResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] :param location: Required. Resource location. :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] :param identity: The Azure Active Directory identity of the server. :type identity: ~azure.mgmt.sql.models.ResourceIdentity :ivar kind: Kind of sql server. This is metadata used for the Azure portal @@ -64,8 +64,8 @@ class Server(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, 'kind': {'key': 'kind', 'type': 'str'}, 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, @@ -76,7 +76,7 @@ class Server(TrackedResource): } def __init__(self, *, location: str, tags=None, identity=None, administrator_login: str=None, administrator_login_password: str=None, version: str=None, **kwargs) -> None: - super(Server, self).__init__(tags=tags, location=location, **kwargs) + super(Server, self).__init__(location=location, tags=tags, **kwargs) self.identity = identity self.kind = None self.administrator_login = administrator_login diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py index e4e590716ec4..2fc00134e6ec 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ServiceObjective(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py index 0cc77ab82872..04f5dceca1c0 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ServiceTierAdvisor(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sku.py b/azure-mgmt-sql/azure/mgmt/sql/models/sku.py index 6605594386e7..e37091dc4e2f 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sku.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sku.py @@ -13,21 +13,26 @@ class Sku(Model): - """An ARM Resource SKU. + """The resource model definition representing SKU. All required parameters must be populated in order to send to Azure. - :param name: Required. The name of the SKU, typically, a letter + Number - code, e.g. P3. + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code :type name: str - :param tier: The tier of the particular SKU, e.g. Basic, Premium. + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. :type tier: str - :param size: Size of the particular SKU + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. :type size: str :param family: If the service has different generations of hardware, for the same SKU, then that can be captured here. :type family: str - :param capacity: Capacity of the particular SKU. + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. :type capacity: int """ diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py index d998a023ec22..a6f04765e87c 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py @@ -13,21 +13,26 @@ class Sku(Model): - """An ARM Resource SKU. + """The resource model definition representing SKU. All required parameters must be populated in order to send to Azure. - :param name: Required. The name of the SKU, typically, a letter + Number - code, e.g. P3. + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code :type name: str - :param tier: The tier of the particular SKU, e.g. Basic, Premium. + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. :type tier: str - :param size: Size of the particular SKU + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. :type size: str :param family: If the service has different generations of hardware, for the same SKU, then that can be captured here. :type family: str - :param capacity: Capacity of the particular SKU. + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. :type capacity: int """ diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py b/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py index 62713566786f..e4a76e0f84e5 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py @@ -326,15 +326,15 @@ class FailoverGroupReplicationRole(str, Enum): secondary = "Secondary" -class OperationOrigin(str, Enum): +class IdentityType(str, Enum): - user = "user" - system = "system" + system_assigned = "SystemAssigned" -class IdentityType(str, Enum): +class OperationOrigin(str, Enum): - system_assigned = "SystemAssigned" + user = "user" + system = "system" class SyncAgentState(str, Enum): @@ -411,6 +411,96 @@ class VirtualNetworkRuleState(str, Enum): unknown = "Unknown" +class JobAgentState(str, Enum): + + creating = "Creating" + ready = "Ready" + updating = "Updating" + deleting = "Deleting" + disabled = "Disabled" + + +class JobExecutionLifecycle(str, Enum): + + created = "Created" + in_progress = "InProgress" + waiting_for_child_job_executions = "WaitingForChildJobExecutions" + waiting_for_retry = "WaitingForRetry" + succeeded = "Succeeded" + succeeded_with_skipped = "SucceededWithSkipped" + failed = "Failed" + timed_out = "TimedOut" + canceled = "Canceled" + skipped = "Skipped" + + +class ProvisioningState(str, Enum): + + created = "Created" + in_progress = "InProgress" + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + + +class JobTargetType(str, Enum): + + target_group = "TargetGroup" + sql_database = "SqlDatabase" + sql_elastic_pool = "SqlElasticPool" + sql_shard_map = "SqlShardMap" + sql_server = "SqlServer" + + +class JobScheduleType(str, Enum): + + once = "Once" + recurring = "Recurring" + + +class JobStepActionType(str, Enum): + + tsql = "TSql" + + +class JobStepActionSource(str, Enum): + + inline = "Inline" + + +class JobStepOutputType(str, Enum): + + sql_database = "SqlDatabase" + + +class JobTargetGroupMembershipType(str, Enum): + + include = "Include" + exclude = "Exclude" + + +class ManagedDatabaseStatus(str, Enum): + + online = "Online" + offline = "Offline" + shutdown = "Shutdown" + creating = "Creating" + inaccessible = "Inaccessible" + + +class CatalogCollationType(str, Enum): + + database_default = "DATABASE_DEFAULT" + sql_latin1_general_cp1_ci_as = "SQL_Latin1_General_CP1_CI_AS" + + +class ManagedDatabaseCreateMode(str, Enum): + + default = "Default" + restore_external_backup = "RestoreExternalBackup" + point_in_time_restore = "PointInTimeRestore" + + class AutomaticTuningServerMode(str, Enum): custom = "Custom" @@ -515,12 +605,6 @@ class DatabaseStatus(str, Enum): scaling = "Scaling" -class CatalogCollationType(str, Enum): - - database_default = "DATABASE_DEFAULT" - sql_latin1_general_cp1_ci_as = "SQL_Latin1_General_CP1_CI_AS" - - class DatabaseLicenseType(str, Enum): license_included = "LicenseIncluded" @@ -546,6 +630,26 @@ class ElasticPoolLicenseType(str, Enum): base_price = "BasePrice" +class VulnerabilityAssessmentScanTriggerType(str, Enum): + + on_demand = "OnDemand" + recurring = "Recurring" + + +class VulnerabilityAssessmentScanState(str, Enum): + + passed = "Passed" + failed = "Failed" + failed_to_run = "FailedToRun" + in_progress = "InProgress" + + +class InstanceFailoverGroupReplicationRole(str, Enum): + + primary = "Primary" + secondary = "Secondary" + + class LongTermRetentionDatabaseState(str, Enum): all = "All" diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py index a4ba7cd8c102..d55e3275a74b 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class SubscriptionUsage(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py index 30a633cda9a1..7d92287e1a37 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class SyncAgentLinkedDatabase(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py index 06fa4a8f1100..f07649750457 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class SyncAgent(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py index 8d1a557ef6ca..1654af79245f 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class SyncGroup(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py index 74b903a63b0f..50cf8fe2d65c 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class SyncMember(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py b/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py index 71fc851de040..dc99e096cf18 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py @@ -26,10 +26,10 @@ class TrackedResource(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] :param location: Required. Resource location. :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] """ _validation = { @@ -43,11 +43,11 @@ class TrackedResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, } def __init__(self, **kwargs): super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py index 4d8ec200976a..5edf04ac0a73 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class TrackedResource(Resource): @@ -26,10 +26,10 @@ class TrackedResource(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] :param location: Required. Resource location. :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] """ _validation = { @@ -43,11 +43,11 @@ class TrackedResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, } def __init__(self, *, location: str, tags=None, **kwargs) -> None: super(TrackedResource, self).__init__(**kwargs) - self.tags = tags self.location = location + self.tags = tags diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py index f8d509c9a56e..9bf146137c20 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class TransparentDataEncryptionActivity(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py index bc38ca655789..db2b2096f798 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class TransparentDataEncryption(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py index 4fd7a128505a..19e6bd30ff5e 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class VirtualNetworkRule(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py new file mode 100644 index 000000000000..e7d424543f2b --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VulnerabilityAssessmentRecurringScansProperties(Model): + """Properties of a Vulnerability Assessment recurring scans. + + :param is_enabled: Recurring scans state. + :type is_enabled: bool + :param email_subscription_admins: Specifies that the schedule scan + notification will be is sent to the subscription administrators. Default + value: True . + :type email_subscription_admins: bool + :param emails: Specifies an array of e-mail addresses to which the scan + notification is sent. + :type emails: list[str] + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) + self.is_enabled = kwargs.get('is_enabled', None) + self.email_subscription_admins = kwargs.get('email_subscription_admins', True) + self.emails = kwargs.get('emails', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py new file mode 100644 index 000000000000..3a55afaa0a5e --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VulnerabilityAssessmentRecurringScansProperties(Model): + """Properties of a Vulnerability Assessment recurring scans. + + :param is_enabled: Recurring scans state. + :type is_enabled: bool + :param email_subscription_admins: Specifies that the schedule scan + notification will be is sent to the subscription administrators. Default + value: True . + :type email_subscription_admins: bool + :param emails: Specifies an array of e-mail addresses to which the scan + notification is sent. + :type emails: list[str] + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, *, is_enabled: bool=None, email_subscription_admins: bool=True, emails=None, **kwargs) -> None: + super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) + self.is_enabled = is_enabled + self.email_subscription_admins = email_subscription_admins + self.emails = emails diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py new file mode 100644 index 000000000000..1d465691ba60 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VulnerabilityAssessmentScanError(Model): + """Properties of a vulnerability assessment scan error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) + self.code = None + self.message = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py new file mode 100644 index 000000000000..93c13998eb25 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VulnerabilityAssessmentScanError(Model): + """Properties of a vulnerability assessment scan error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) + self.code = None + self.message = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py new file mode 100644 index 000000000000..67a6d163f90c --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class VulnerabilityAssessmentScanRecord(ProxyResource): + """A vulnerability assessment scan record. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar scan_id: The scan ID. + :vartype scan_id: str + :ivar trigger_type: The scan trigger type. Possible values include: + 'OnDemand', 'Recurring' + :vartype trigger_type: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType + :ivar state: The scan status. Possible values include: 'Passed', 'Failed', + 'FailedToRun', 'InProgress' + :vartype state: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState + :ivar start_time: The scan start time (UTC). + :vartype start_time: datetime + :ivar end_time: The scan end time (UTC). + :vartype end_time: datetime + :ivar errors: The scan errors. + :vartype errors: + list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] + :ivar storage_container_path: The scan results storage container path. + :vartype storage_container_path: str + :ivar number_of_failed_security_checks: The number of failed security + checks. + :vartype number_of_failed_security_checks: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'scan_id': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'storage_container_path': {'readonly': True}, + 'number_of_failed_security_checks': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) + self.scan_id = None + self.trigger_type = None + self.state = None + self.start_time = None + self.end_time = None + self.errors = None + self.storage_container_path = None + self.number_of_failed_security_checks = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py new file mode 100644 index 000000000000..7076acc9290f --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class VulnerabilityAssessmentScanRecordPaged(Paged): + """ + A paging container for iterating over a list of :class:`VulnerabilityAssessmentScanRecord ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VulnerabilityAssessmentScanRecord]'} + } + + def __init__(self, *args, **kwargs): + + super(VulnerabilityAssessmentScanRecordPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py new file mode 100644 index 000000000000..e31d141065af --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class VulnerabilityAssessmentScanRecord(ProxyResource): + """A vulnerability assessment scan record. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar scan_id: The scan ID. + :vartype scan_id: str + :ivar trigger_type: The scan trigger type. Possible values include: + 'OnDemand', 'Recurring' + :vartype trigger_type: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType + :ivar state: The scan status. Possible values include: 'Passed', 'Failed', + 'FailedToRun', 'InProgress' + :vartype state: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState + :ivar start_time: The scan start time (UTC). + :vartype start_time: datetime + :ivar end_time: The scan end time (UTC). + :vartype end_time: datetime + :ivar errors: The scan errors. + :vartype errors: + list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] + :ivar storage_container_path: The scan results storage container path. + :vartype storage_container_path: str + :ivar number_of_failed_security_checks: The number of failed security + checks. + :vartype number_of_failed_security_checks: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'scan_id': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'storage_container_path': {'readonly': True}, + 'number_of_failed_security_checks': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) + self.scan_id = None + self.trigger_type = None + self.state = None + self.start_time = None + self.end_time = None + self.errors = None + self.storage_container_path = None + self.number_of_failed_security_checks = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py b/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py index fdda72bc17ff..953bb00775df 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py @@ -36,6 +36,7 @@ from .database_automatic_tuning_operations import DatabaseAutomaticTuningOperations from .encryption_protectors_operations import EncryptionProtectorsOperations from .failover_groups_operations import FailoverGroupsOperations +from .managed_instances_operations import ManagedInstancesOperations from .operations import Operations from .server_keys_operations import ServerKeysOperations from .sync_agents_operations import SyncAgentsOperations @@ -43,14 +44,29 @@ from .sync_members_operations import SyncMembersOperations from .subscription_usages_operations import SubscriptionUsagesOperations from .virtual_network_rules_operations import VirtualNetworkRulesOperations +from .database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations +from .database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations +from .job_agents_operations import JobAgentsOperations +from .job_credentials_operations import JobCredentialsOperations +from .job_executions_operations import JobExecutionsOperations +from .jobs_operations import JobsOperations +from .job_step_executions_operations import JobStepExecutionsOperations +from .job_steps_operations import JobStepsOperations +from .job_target_executions_operations import JobTargetExecutionsOperations +from .job_target_groups_operations import JobTargetGroupsOperations +from .job_versions_operations import JobVersionsOperations from .long_term_retention_backups_operations import LongTermRetentionBackupsOperations from .backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations +from .managed_databases_operations import ManagedDatabasesOperations from .server_automatic_tuning_operations import ServerAutomaticTuningOperations from .server_dns_aliases_operations import ServerDnsAliasesOperations from .restore_points_operations import RestorePointsOperations from .database_operations import DatabaseOperations from .elastic_pool_operations import ElasticPoolOperations from .capabilities_operations import CapabilitiesOperations +from .database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations +from .instance_failover_groups_operations import InstanceFailoverGroupsOperations +from .backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations __all__ = [ 'RecoverableDatabasesOperations', @@ -80,6 +96,7 @@ 'DatabaseAutomaticTuningOperations', 'EncryptionProtectorsOperations', 'FailoverGroupsOperations', + 'ManagedInstancesOperations', 'Operations', 'ServerKeysOperations', 'SyncAgentsOperations', @@ -87,12 +104,27 @@ 'SyncMembersOperations', 'SubscriptionUsagesOperations', 'VirtualNetworkRulesOperations', + 'DatabaseVulnerabilityAssessmentRuleBaselinesOperations', + 'DatabaseVulnerabilityAssessmentsOperations', + 'JobAgentsOperations', + 'JobCredentialsOperations', + 'JobExecutionsOperations', + 'JobsOperations', + 'JobStepExecutionsOperations', + 'JobStepsOperations', + 'JobTargetExecutionsOperations', + 'JobTargetGroupsOperations', + 'JobVersionsOperations', 'LongTermRetentionBackupsOperations', 'BackupLongTermRetentionPoliciesOperations', + 'ManagedDatabasesOperations', 'ServerAutomaticTuningOperations', 'ServerDnsAliasesOperations', 'RestorePointsOperations', 'DatabaseOperations', 'ElasticPoolOperations', 'CapabilitiesOperations', + 'DatabaseVulnerabilityAssessmentScansOperations', + 'InstanceFailoverGroupsOperations', + 'BackupShortTermRetentionPoliciesOperations', ] diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py new file mode 100644 index 000000000000..e50f15c2a997 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py @@ -0,0 +1,333 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class BackupShortTermRetentionPoliciesOperations(object): + """BackupShortTermRetentionPoliciesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar policy_name: The policy name. Should always be "default". Constant value: "default". + :ivar api_version: The API version to use for the request. Constant value: "2017-10-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.policy_name = "default" + self.api_version = "2017-10-01-preview" + + self.config = config + + def get( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + """Gets a database's short term retention policy. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupShortTermRetentionPolicy or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.sql.models.BackupShortTermRetentionPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'policyName': self._serialize.url("self.policy_name", self.policy_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BackupShortTermRetentionPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}'} + + + def _create_or_update_initial( + self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, **operation_config): + parameters = models.BackupShortTermRetentionPolicy(retention_days=retention_days) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'policyName': self._serialize.url("self.policy_name", self.policy_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'BackupShortTermRetentionPolicy') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BackupShortTermRetentionPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a database's short term retention policy. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param retention_days: The backup retention period in days. This is + how many days Point-in-Time Restore will be supported. + :type retention_days: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + BackupShortTermRetentionPolicy or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_name, + retention_days=retention_days, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('BackupShortTermRetentionPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}'} + + + def _update_initial( + self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, **operation_config): + parameters = models.BackupShortTermRetentionPolicy(retention_days=retention_days) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'policyName': self._serialize.url("self.policy_name", self.policy_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'BackupShortTermRetentionPolicy') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BackupShortTermRetentionPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a database's short term retention policy. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param retention_days: The backup retention period in days. This is + how many days Point-in-Time Restore will be supported. + :type retention_days: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + BackupShortTermRetentionPolicy or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_name, + retention_days=retention_days, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('BackupShortTermRetentionPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py new file mode 100644 index 000000000000..16a909e27a1a --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py @@ -0,0 +1,266 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DatabaseVulnerabilityAssessmentRuleBaselinesOperations(object): + """DatabaseVulnerabilityAssessmentRuleBaselinesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar vulnerability_assessment_name: The name of the vulnerability assessment. Constant value: "default". + :ivar baseline_name: The name of the vulnerability assessment rule baseline. Constant value: "default". + :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.vulnerability_assessment_name = "default" + self.baseline_name = "default" + self.api_version = "2017-03-01-preview" + + self.config = config + + def get( + self, resource_group_name, server_name, database_name, rule_id, custom_headers=None, raw=False, **operation_config): + """Gets a database's vulnerability assessment rule baseline. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database for which the + vulnerability assessment rule baseline is defined. + :type database_name: str + :param rule_id: The vulnerability assessment rule ID. + :type rule_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DatabaseVulnerabilityAssessmentRuleBaseline or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaseline or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'ruleId': self._serialize.url("rule_id", rule_id, 'str'), + 'baselineName': self._serialize.url("self.baseline_name", self.baseline_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}'} + + def create_or_update( + self, resource_group_name, server_name, database_name, rule_id, baseline_results, custom_headers=None, raw=False, **operation_config): + """Creates or updates a database's vulnerability assessment rule baseline. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database for which the + vulnerability assessment rule baseline is defined. + :type database_name: str + :param rule_id: The vulnerability assessment rule ID. + :type rule_id: str + :param baseline_results: The rule baseline result + :type baseline_results: + list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DatabaseVulnerabilityAssessmentRuleBaseline or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaseline or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.DatabaseVulnerabilityAssessmentRuleBaseline(baseline_results=baseline_results) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'ruleId': self._serialize.url("rule_id", rule_id, 'str'), + 'baselineName': self._serialize.url("self.baseline_name", self.baseline_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DatabaseVulnerabilityAssessmentRuleBaseline') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}'} + + def delete( + self, resource_group_name, server_name, database_name, rule_id, custom_headers=None, raw=False, **operation_config): + """Removes the database's vulnerability assessment rule baseline. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database for which the + vulnerability assessment rule baseline is defined. + :type database_name: str + :param rule_id: The vulnerability assessment rule ID. + :type rule_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'ruleId': self._serialize.url("rule_id", rule_id, 'str'), + 'baselineName': self._serialize.url("self.baseline_name", self.baseline_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py new file mode 100644 index 000000000000..e1d379ff4529 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py @@ -0,0 +1,361 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DatabaseVulnerabilityAssessmentScansOperations(object): + """DatabaseVulnerabilityAssessmentScansOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar vulnerability_assessment_name: The name of the vulnerability assessment. Constant value: "default". + :ivar api_version: The API version to use for the request. Constant value: "2017-10-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.vulnerability_assessment_name = "default" + self.api_version = "2017-10-01-preview" + + self.config = config + + def get( + self, resource_group_name, server_name, database_name, scan_id, custom_headers=None, raw=False, **operation_config): + """Gets a vulnerability assessment scan record of a database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param scan_id: The vulnerability assessment scan Id of the scan to + retrieve. + :type scan_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VulnerabilityAssessmentScanRecord or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'scanId': self._serialize.url("scan_id", scan_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VulnerabilityAssessmentScanRecord', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}'} + + + def _initiate_scan_initial( + self, resource_group_name, server_name, database_name, scan_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.initiate_scan.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'scanId': self._serialize.url("scan_id", scan_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def initiate_scan( + self, resource_group_name, server_name, database_name, scan_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Executes a Vulnerability Assessment database scan. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param scan_id: The vulnerability assessment scan Id of the scan to + retrieve. + :type scan_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._initiate_scan_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_name, + scan_id=scan_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + initiate_scan.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan'} + + def list_by_database( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + """Lists the vulnerability assessment scans of a database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + VulnerabilityAssessmentScanRecord + :rtype: + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecordPaged[~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_database.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans'} + + def export( + self, resource_group_name, server_name, database_name, scan_id, custom_headers=None, raw=False, **operation_config): + """Convert an existing scan result to a human readable format. If already + exists nothing happens. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the scanned database. + :type database_name: str + :param scan_id: The vulnerability assessment scan Id. + :type scan_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DatabaseVulnerabilityAssessmentScansExport or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentScansExport or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.export.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'scanId': self._serialize.url("scan_id", scan_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DatabaseVulnerabilityAssessmentScansExport', response) + if response.status_code == 201: + deserialized = self._deserialize('DatabaseVulnerabilityAssessmentScansExport', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + export.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py new file mode 100644 index 000000000000..5f923f69d777 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py @@ -0,0 +1,250 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DatabaseVulnerabilityAssessmentsOperations(object): + """DatabaseVulnerabilityAssessmentsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar vulnerability_assessment_name: The name of the vulnerability assessment. Constant value: "default". + :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.vulnerability_assessment_name = "default" + self.api_version = "2017-03-01-preview" + + self.config = config + + def get( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + """Gets the database's vulnerability assessment. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database for which the + vulnerability assessment is defined. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DatabaseVulnerabilityAssessment or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'} + + def create_or_update( + self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates the database's vulnerability assessment. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database for which the + vulnerability assessment is defined. + :type database_name: str + :param parameters: The requested resource. + :type parameters: + ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DatabaseVulnerabilityAssessment or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DatabaseVulnerabilityAssessment') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) + if response.status_code == 201: + deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'} + + def delete( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + """Removes the database's vulnerability assessment. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database for which the + vulnerability assessment is defined. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py new file mode 100644 index 000000000000..8e9e2c566109 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py @@ -0,0 +1,580 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class InstanceFailoverGroupsOperations(object): + """InstanceFailoverGroupsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-10-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-10-01-preview" + + self.config = config + + def get( + self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a failover group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param location_name: The name of the region where the resource is + located. + :type location_name: str + :param failover_group_name: The name of the failover group. + :type failover_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: InstanceFailoverGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.InstanceFailoverGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('InstanceFailoverGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}'} + + + def _create_or_update_initial( + self, resource_group_name, location_name, failover_group_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'InstanceFailoverGroup') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('InstanceFailoverGroup', response) + if response.status_code == 201: + deserialized = self._deserialize('InstanceFailoverGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, location_name, failover_group_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a failover group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param location_name: The name of the region where the resource is + located. + :type location_name: str + :param failover_group_name: The name of the failover group. + :type failover_group_name: str + :param parameters: The failover group parameters. + :type parameters: ~azure.mgmt.sql.models.InstanceFailoverGroup + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns InstanceFailoverGroup + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstanceFailoverGroup] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstanceFailoverGroup]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + location_name=location_name, + failover_group_name=failover_group_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('InstanceFailoverGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}'} + + + def _delete_initial( + self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a failover group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param location_name: The name of the region where the resource is + located. + :type location_name: str + :param failover_group_name: The name of the failover group. + :type failover_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + location_name=location_name, + failover_group_name=failover_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}'} + + def list_by_location( + self, resource_group_name, location_name, custom_headers=None, raw=False, **operation_config): + """Lists the failover groups in a location. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param location_name: The name of the region where the resource is + located. + :type location_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of InstanceFailoverGroup + :rtype: + ~azure.mgmt.sql.models.InstanceFailoverGroupPaged[~azure.mgmt.sql.models.InstanceFailoverGroup] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups'} + + + def _failover_initial( + self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.failover.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('InstanceFailoverGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def failover( + self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Fails over from the current primary managed instance to this managed + instance. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param location_name: The name of the region where the resource is + located. + :type location_name: str + :param failover_group_name: The name of the failover group. + :type failover_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns InstanceFailoverGroup + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstanceFailoverGroup] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstanceFailoverGroup]] + :raises: :class:`CloudError` + """ + raw_result = self._failover_initial( + resource_group_name=resource_group_name, + location_name=location_name, + failover_group_name=failover_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('InstanceFailoverGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/failover'} + + + def _force_failover_allow_data_loss_initial( + self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.force_failover_allow_data_loss.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('InstanceFailoverGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def force_failover_allow_data_loss( + self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Fails over from the current primary managed instance to this managed + instance. This operation might result in data loss. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param location_name: The name of the region where the resource is + located. + :type location_name: str + :param failover_group_name: The name of the failover group. + :type failover_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns InstanceFailoverGroup + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstanceFailoverGroup] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstanceFailoverGroup]] + :raises: :class:`CloudError` + """ + raw_result = self._force_failover_allow_data_loss_initial( + resource_group_name=resource_group_name, + location_name=location_name, + failover_group_name=failover_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('InstanceFailoverGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + force_failover_allow_data_loss.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py new file mode 100644 index 000000000000..774fa59314ce --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py @@ -0,0 +1,483 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class JobAgentsOperations(object): + """JobAgentsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of job agents in a server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobAgent + :rtype: + ~azure.mgmt.sql.models.JobAgentPaged[~azure.mgmt.sql.models.JobAgent] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.JobAgentPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents'} + + def get( + self, resource_group_name, server_name, job_agent_name, custom_headers=None, raw=False, **operation_config): + """Gets a job agent. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent to be retrieved. + :type job_agent_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobAgent or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobAgent or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobAgent', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}'} + + + def _create_or_update_initial( + self, resource_group_name, server_name, job_agent_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'JobAgent') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobAgent', response) + if response.status_code == 201: + deserialized = self._deserialize('JobAgent', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, job_agent_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a job agent. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent to be created or + updated. + :type job_agent_name: str + :param parameters: The requested job agent resource state. + :type parameters: ~azure.mgmt.sql.models.JobAgent + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns JobAgent or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.JobAgent] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.JobAgent]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + job_agent_name=job_agent_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('JobAgent', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}'} + + + def _delete_initial( + self, resource_group_name, server_name, job_agent_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, server_name, job_agent_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a job agent. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent to be deleted. + :type job_agent_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + server_name=server_name, + job_agent_name=job_agent_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}'} + + + def _update_initial( + self, resource_group_name, server_name, job_agent_name, tags=None, custom_headers=None, raw=False, **operation_config): + parameters = models.JobAgentUpdate(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'JobAgentUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobAgent', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, server_name, job_agent_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a job agent. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent to be updated. + :type job_agent_name: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns JobAgent or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.JobAgent] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.JobAgent]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + job_agent_name=job_agent_name, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('JobAgent', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py new file mode 100644 index 000000000000..c4bf415fe5e4 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py @@ -0,0 +1,328 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class JobCredentialsOperations(object): + """JobCredentialsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_agent( + self, resource_group_name, server_name, job_agent_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of jobs credentials. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobCredential + :rtype: + ~azure.mgmt.sql.models.JobCredentialPaged[~azure.mgmt.sql.models.JobCredential] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_agent.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials'} + + def get( + self, resource_group_name, server_name, job_agent_name, credential_name, custom_headers=None, raw=False, **operation_config): + """Gets a jobs credential. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param credential_name: The name of the credential. + :type credential_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobCredential or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobCredential or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'credentialName': self._serialize.url("credential_name", credential_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobCredential', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}'} + + def create_or_update( + self, resource_group_name, server_name, job_agent_name, credential_name, username, password, custom_headers=None, raw=False, **operation_config): + """Creates or updates a job credential. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param credential_name: The name of the credential. + :type credential_name: str + :param username: The credential user name. + :type username: str + :param password: The credential password. + :type password: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobCredential or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobCredential or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.JobCredential(username=username, password=password) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'credentialName': self._serialize.url("credential_name", credential_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'JobCredential') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobCredential', response) + if response.status_code == 201: + deserialized = self._deserialize('JobCredential', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}'} + + def delete( + self, resource_group_name, server_name, job_agent_name, credential_name, custom_headers=None, raw=False, **operation_config): + """Deletes a job credential. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param credential_name: The name of the credential. + :type credential_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'credentialName': self._serialize.url("credential_name", credential_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py new file mode 100644 index 000000000000..3a9c7cd1c597 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py @@ -0,0 +1,612 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class JobExecutionsOperations(object): + """JobExecutionsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_agent( + self, resource_group_name, server_name, job_agent_name, create_time_min=None, create_time_max=None, end_time_min=None, end_time_max=None, is_active=None, skip=None, top=None, custom_headers=None, raw=False, **operation_config): + """Lists all executions in a job agent. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param create_time_min: If specified, only job executions created at + or after the specified time are included. + :type create_time_min: datetime + :param create_time_max: If specified, only job executions created + before the specified time are included. + :type create_time_max: datetime + :param end_time_min: If specified, only job executions completed at or + after the specified time are included. + :type end_time_min: datetime + :param end_time_max: If specified, only job executions completed + before the specified time are included. + :type end_time_max: datetime + :param is_active: If specified, only active or only completed job + executions are included. + :type is_active: bool + :param skip: The number of elements in the collection to skip. + :type skip: int + :param top: The number of elements to return from the collection. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobExecution + :rtype: + ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_agent.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if create_time_min is not None: + query_parameters['createTimeMin'] = self._serialize.query("create_time_min", create_time_min, 'iso-8601') + if create_time_max is not None: + query_parameters['createTimeMax'] = self._serialize.query("create_time_max", create_time_max, 'iso-8601') + if end_time_min is not None: + query_parameters['endTimeMin'] = self._serialize.query("end_time_min", end_time_min, 'iso-8601') + if end_time_max is not None: + query_parameters['endTimeMax'] = self._serialize.query("end_time_max", end_time_max, 'iso-8601') + if is_active is not None: + query_parameters['isActive'] = self._serialize.query("is_active", is_active, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions'} + + def cancel( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers=None, raw=False, **operation_config): + """Requests cancellation of a job execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job. + :type job_name: str + :param job_execution_id: The id of the job execution to cancel. + :type job_execution_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.cancel.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel'} + + + def _create_initial( + self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobExecution', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts an elastic job execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns JobExecution or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.JobExecution] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.JobExecution]] + :raises: :class:`CloudError` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + server_name=server_name, + job_agent_name=job_agent_name, + job_name=job_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('JobExecution', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/start'} + + def list_by_job( + self, resource_group_name, server_name, job_agent_name, job_name, create_time_min=None, create_time_max=None, end_time_min=None, end_time_max=None, is_active=None, skip=None, top=None, custom_headers=None, raw=False, **operation_config): + """Lists a job's executions. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param create_time_min: If specified, only job executions created at + or after the specified time are included. + :type create_time_min: datetime + :param create_time_max: If specified, only job executions created + before the specified time are included. + :type create_time_max: datetime + :param end_time_min: If specified, only job executions completed at or + after the specified time are included. + :type end_time_min: datetime + :param end_time_max: If specified, only job executions completed + before the specified time are included. + :type end_time_max: datetime + :param is_active: If specified, only active or only completed job + executions are included. + :type is_active: bool + :param skip: The number of elements in the collection to skip. + :type skip: int + :param top: The number of elements to return from the collection. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobExecution + :rtype: + ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if create_time_min is not None: + query_parameters['createTimeMin'] = self._serialize.query("create_time_min", create_time_min, 'iso-8601') + if create_time_max is not None: + query_parameters['createTimeMax'] = self._serialize.query("create_time_max", create_time_max, 'iso-8601') + if end_time_min is not None: + query_parameters['endTimeMin'] = self._serialize.query("end_time_min", end_time_min, 'iso-8601') + if end_time_max is not None: + query_parameters['endTimeMax'] = self._serialize.query("end_time_max", end_time_max, 'iso-8601') + if is_active is not None: + query_parameters['isActive'] = self._serialize.query("is_active", is_active, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions'} + + def get( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers=None, raw=False, **operation_config): + """Gets a job execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job. + :type job_name: str + :param job_execution_id: The id of the job execution + :type job_execution_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobExecution or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobExecution or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobExecution', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}'} + + + def _create_or_update_initial( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobExecution', response) + if response.status_code == 201: + deserialized = self._deserialize('JobExecution', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updatess a job execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param job_execution_id: The job execution id to create the job + execution under. + :type job_execution_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns JobExecution or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.JobExecution] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.JobExecution]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + job_agent_name=job_agent_name, + job_name=job_name, + job_execution_id=job_execution_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('JobExecution', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py new file mode 100644 index 000000000000..3a2c37310f40 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py @@ -0,0 +1,229 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class JobStepExecutionsOperations(object): + """JobStepExecutionsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_job_execution( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min=None, create_time_max=None, end_time_min=None, end_time_max=None, is_active=None, skip=None, top=None, custom_headers=None, raw=False, **operation_config): + """Lists the step executions of a job execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param job_execution_id: The id of the job execution + :type job_execution_id: str + :param create_time_min: If specified, only job executions created at + or after the specified time are included. + :type create_time_min: datetime + :param create_time_max: If specified, only job executions created + before the specified time are included. + :type create_time_max: datetime + :param end_time_min: If specified, only job executions completed at or + after the specified time are included. + :type end_time_min: datetime + :param end_time_max: If specified, only job executions completed + before the specified time are included. + :type end_time_max: datetime + :param is_active: If specified, only active or only completed job + executions are included. + :type is_active: bool + :param skip: The number of elements in the collection to skip. + :type skip: int + :param top: The number of elements to return from the collection. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobExecution + :rtype: + ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_job_execution.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if create_time_min is not None: + query_parameters['createTimeMin'] = self._serialize.query("create_time_min", create_time_min, 'iso-8601') + if create_time_max is not None: + query_parameters['createTimeMax'] = self._serialize.query("create_time_max", create_time_max, 'iso-8601') + if end_time_min is not None: + query_parameters['endTimeMin'] = self._serialize.query("end_time_min", end_time_min, 'iso-8601') + if end_time_max is not None: + query_parameters['endTimeMax'] = self._serialize.query("end_time_max", end_time_max, 'iso-8601') + if is_active is not None: + query_parameters['isActive'] = self._serialize.query("is_active", is_active, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_job_execution.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps'} + + def get( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, custom_headers=None, raw=False, **operation_config): + """Gets a step execution of a job execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param job_execution_id: The unique id of the job execution + :type job_execution_id: str + :param step_name: The name of the step. + :type step_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobExecution or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobExecution or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, 'str'), + 'stepName': self._serialize.url("step_name", step_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobExecution', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py new file mode 100644 index 000000000000..0cd2ba4bc13d --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py @@ -0,0 +1,495 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class JobStepsOperations(object): + """JobStepsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_version( + self, resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers=None, raw=False, **operation_config): + """Gets all job steps in the specified job version. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param job_version: The version of the job to get. + :type job_version: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobStep + :rtype: + ~azure.mgmt.sql.models.JobStepPaged[~azure.mgmt.sql.models.JobStep] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_version.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobVersion': self._serialize.url("job_version", job_version, 'int'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps'} + + def get_by_version( + self, resource_group_name, server_name, job_agent_name, job_name, job_version, step_name, custom_headers=None, raw=False, **operation_config): + """Gets the specified version of a job step. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job. + :type job_name: str + :param job_version: The version of the job to get. + :type job_version: int + :param step_name: The name of the job step. + :type step_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobStep or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobStep or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_by_version.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobVersion': self._serialize.url("job_version", job_version, 'int'), + 'stepName': self._serialize.url("step_name", step_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobStep', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}'} + + def list_by_job( + self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, **operation_config): + """Gets all job steps for a job's current version. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobStep + :rtype: + ~azure.mgmt.sql.models.JobStepPaged[~azure.mgmt.sql.models.JobStep] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps'} + + def get( + self, resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers=None, raw=False, **operation_config): + """Gets a job step in a job's current version. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job. + :type job_name: str + :param step_name: The name of the job step. + :type step_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobStep or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobStep or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'stepName': self._serialize.url("step_name", step_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobStep', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}'} + + def create_or_update( + self, resource_group_name, server_name, job_agent_name, job_name, step_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates a job step. This will implicitly create a new job + version. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job. + :type job_name: str + :param step_name: The name of the job step. + :type step_name: str + :param parameters: The requested state of the job step. + :type parameters: ~azure.mgmt.sql.models.JobStep + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobStep or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobStep or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'stepName': self._serialize.url("step_name", step_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'JobStep') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobStep', response) + if response.status_code == 201: + deserialized = self._deserialize('JobStep', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}'} + + def delete( + self, resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers=None, raw=False, **operation_config): + """Deletes a job step. This will implicitly create a new job version. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job. + :type job_name: str + :param step_name: The name of the job step to delete. + :type step_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'stepName': self._serialize.url("step_name", step_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py new file mode 100644 index 000000000000..3224d6ec2d87 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py @@ -0,0 +1,350 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class JobTargetExecutionsOperations(object): + """JobTargetExecutionsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_job_execution( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min=None, create_time_max=None, end_time_min=None, end_time_max=None, is_active=None, skip=None, top=None, custom_headers=None, raw=False, **operation_config): + """Lists target executions for all steps of a job execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param job_execution_id: The id of the job execution + :type job_execution_id: str + :param create_time_min: If specified, only job executions created at + or after the specified time are included. + :type create_time_min: datetime + :param create_time_max: If specified, only job executions created + before the specified time are included. + :type create_time_max: datetime + :param end_time_min: If specified, only job executions completed at or + after the specified time are included. + :type end_time_min: datetime + :param end_time_max: If specified, only job executions completed + before the specified time are included. + :type end_time_max: datetime + :param is_active: If specified, only active or only completed job + executions are included. + :type is_active: bool + :param skip: The number of elements in the collection to skip. + :type skip: int + :param top: The number of elements to return from the collection. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobExecution + :rtype: + ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_job_execution.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if create_time_min is not None: + query_parameters['createTimeMin'] = self._serialize.query("create_time_min", create_time_min, 'iso-8601') + if create_time_max is not None: + query_parameters['createTimeMax'] = self._serialize.query("create_time_max", create_time_max, 'iso-8601') + if end_time_min is not None: + query_parameters['endTimeMin'] = self._serialize.query("end_time_min", end_time_min, 'iso-8601') + if end_time_max is not None: + query_parameters['endTimeMax'] = self._serialize.query("end_time_max", end_time_max, 'iso-8601') + if is_active is not None: + query_parameters['isActive'] = self._serialize.query("is_active", is_active, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_job_execution.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets'} + + def list_by_step( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, create_time_min=None, create_time_max=None, end_time_min=None, end_time_max=None, is_active=None, skip=None, top=None, custom_headers=None, raw=False, **operation_config): + """Lists the target executions of a job step execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param job_execution_id: The id of the job execution + :type job_execution_id: str + :param step_name: The name of the step. + :type step_name: str + :param create_time_min: If specified, only job executions created at + or after the specified time are included. + :type create_time_min: datetime + :param create_time_max: If specified, only job executions created + before the specified time are included. + :type create_time_max: datetime + :param end_time_min: If specified, only job executions completed at or + after the specified time are included. + :type end_time_min: datetime + :param end_time_max: If specified, only job executions completed + before the specified time are included. + :type end_time_max: datetime + :param is_active: If specified, only active or only completed job + executions are included. + :type is_active: bool + :param skip: The number of elements in the collection to skip. + :type skip: int + :param top: The number of elements to return from the collection. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobExecution + :rtype: + ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_step.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, 'str'), + 'stepName': self._serialize.url("step_name", step_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if create_time_min is not None: + query_parameters['createTimeMin'] = self._serialize.query("create_time_min", create_time_min, 'iso-8601') + if create_time_max is not None: + query_parameters['createTimeMax'] = self._serialize.query("create_time_max", create_time_max, 'iso-8601') + if end_time_min is not None: + query_parameters['endTimeMin'] = self._serialize.query("end_time_min", end_time_min, 'iso-8601') + if end_time_max is not None: + query_parameters['endTimeMax'] = self._serialize.query("end_time_max", end_time_max, 'iso-8601') + if is_active is not None: + query_parameters['isActive'] = self._serialize.query("is_active", is_active, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_step.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets'} + + def get( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, target_id, custom_headers=None, raw=False, **operation_config): + """Gets a target execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param job_execution_id: The unique id of the job execution + :type job_execution_id: str + :param step_name: The name of the step. + :type step_name: str + :param target_id: The target id. + :type target_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobExecution or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobExecution or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, 'str'), + 'stepName': self._serialize.url("step_name", step_name, 'str'), + 'targetId': self._serialize.url("target_id", target_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobExecution', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets/{targetId}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py new file mode 100644 index 000000000000..0bf98a502cb8 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py @@ -0,0 +1,326 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class JobTargetGroupsOperations(object): + """JobTargetGroupsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_agent( + self, resource_group_name, server_name, job_agent_name, custom_headers=None, raw=False, **operation_config): + """Gets all target groups in an agent. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobTargetGroup + :rtype: + ~azure.mgmt.sql.models.JobTargetGroupPaged[~azure.mgmt.sql.models.JobTargetGroup] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_agent.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups'} + + def get( + self, resource_group_name, server_name, job_agent_name, target_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a target group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param target_group_name: The name of the target group. + :type target_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobTargetGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobTargetGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'targetGroupName': self._serialize.url("target_group_name", target_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobTargetGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}'} + + def create_or_update( + self, resource_group_name, server_name, job_agent_name, target_group_name, members, custom_headers=None, raw=False, **operation_config): + """Creates or updates a target group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param target_group_name: The name of the target group. + :type target_group_name: str + :param members: Members of the target group. + :type members: list[~azure.mgmt.sql.models.JobTarget] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobTargetGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobTargetGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.JobTargetGroup(members=members) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'targetGroupName': self._serialize.url("target_group_name", target_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'JobTargetGroup') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobTargetGroup', response) + if response.status_code == 201: + deserialized = self._deserialize('JobTargetGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}'} + + def delete( + self, resource_group_name, server_name, job_agent_name, target_group_name, custom_headers=None, raw=False, **operation_config): + """Deletes a target group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param target_group_name: The name of the target group. + :type target_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'targetGroupName': self._serialize.url("target_group_name", target_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py new file mode 100644 index 000000000000..ec9e2ff23061 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py @@ -0,0 +1,190 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class JobVersionsOperations(object): + """JobVersionsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_job( + self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, **operation_config): + """Gets all versions of a job. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobVersion + :rtype: + ~azure.mgmt.sql.models.JobVersionPaged[~azure.mgmt.sql.models.JobVersion] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.JobVersionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions'} + + def get( + self, resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers=None, raw=False, **operation_config): + """Gets a job version. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job. + :type job_name: str + :param job_version: The version of the job to get. + :type job_version: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobVersion or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobVersion or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobVersion': self._serialize.url("job_version", job_version, 'int'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobVersion', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py new file mode 100644 index 000000000000..042336e20941 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py @@ -0,0 +1,327 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class JobsOperations(object): + """JobsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_agent( + self, resource_group_name, server_name, job_agent_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of jobs. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Job + :rtype: ~azure.mgmt.sql.models.JobPaged[~azure.mgmt.sql.models.Job] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_agent.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.JobPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs'} + + def get( + self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, **operation_config): + """Gets a job. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Job or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.Job or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Job', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}'} + + def create_or_update( + self, resource_group_name, server_name, job_agent_name, job_name, description="", schedule=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a job. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param description: User-defined description of the job. + :type description: str + :param schedule: Schedule properties of the job. + :type schedule: ~azure.mgmt.sql.models.JobSchedule + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Job or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.Job or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.Job(description=description, schedule=schedule) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Job') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Job', response) + if response.status_code == 201: + deserialized = self._deserialize('Job', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}'} + + def delete( + self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, **operation_config): + """Deletes a job. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to delete. + :type job_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py new file mode 100644 index 000000000000..d4d2bb29f2b5 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py @@ -0,0 +1,571 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ManagedDatabasesOperations(object): + """ManagedDatabasesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + + def _complete_restore_initial( + self, location_name, operation_id, last_backup_name, custom_headers=None, raw=False, **operation_config): + parameters = models.CompleteDatabaseRestoreDefinition(last_backup_name=last_backup_name) + + # Construct URL + url = self.complete_restore.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'CompleteDatabaseRestoreDefinition') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def complete_restore( + self, location_name, operation_id, last_backup_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Completes the restore operation on a managed database. + + :param location_name: The name of the region where the resource is + located. + :type location_name: str + :param operation_id: Management operation id that this request tries + to complete. + :type operation_id: str + :param last_backup_name: The last backup name to apply + :type last_backup_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._complete_restore_initial( + location_name=location_name, + operation_id=operation_id, + last_backup_name=last_backup_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + complete_restore.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/managedDatabaseRestoreAzureAsyncOperation/{operationId}/completeRestore'} + + def list_by_instance( + self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of managed databases. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ManagedDatabase + :rtype: + ~azure.mgmt.sql.models.ManagedDatabasePaged[~azure.mgmt.sql.models.ManagedDatabase] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_instance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases'} + + def get( + self, resource_group_name, managed_instance_name, database_name, custom_headers=None, raw=False, **operation_config): + """Gets a managed database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ManagedDatabase or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.ManagedDatabase or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ManagedDatabase', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}'} + + + def _create_or_update_initial( + self, resource_group_name, managed_instance_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ManagedDatabase') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ManagedDatabase', response) + if response.status_code == 201: + deserialized = self._deserialize('ManagedDatabase', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, managed_instance_name, database_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new database or updates an existing database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_name: str + :param parameters: The requested database resource state. + :type parameters: ~azure.mgmt.sql.models.ManagedDatabase + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ManagedDatabase or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedDatabase] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedDatabase]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + database_name=database_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ManagedDatabase', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}'} + + + def _delete_initial( + self, resource_group_name, managed_instance_name, database_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, managed_instance_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the managed database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + database_name=database_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}'} + + + def _update_initial( + self, resource_group_name, managed_instance_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ManagedDatabaseUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ManagedDatabase', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, managed_instance_name, database_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates an existing database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_name: str + :param parameters: The requested database resource state. + :type parameters: ~azure.mgmt.sql.models.ManagedDatabaseUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ManagedDatabase or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedDatabase] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedDatabase]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + database_name=database_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ManagedDatabase', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py new file mode 100644 index 000000000000..1bd0b6a0d60c --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py @@ -0,0 +1,527 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ManagedInstancesOperations(object): + """ManagedInstancesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2015-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of all managed instances in the subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ManagedInstance + :rtype: + ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of managed instances in a resource group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ManagedInstance + :rtype: + ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances'} + + def get( + self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config): + """Gets a managed instance. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ManagedInstance or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.ManagedInstance or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ManagedInstance', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}'} + + + def _create_or_update_initial( + self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ManagedInstance') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ManagedInstance', response) + if response.status_code == 201: + deserialized = self._deserialize('ManagedInstance', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a managed instance. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param parameters: The requested managed instance resource state. + :type parameters: ~azure.mgmt.sql.models.ManagedInstance + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ManagedInstance or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedInstance] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedInstance]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ManagedInstance', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}'} + + + def _delete_initial( + self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a managed instance. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}'} + + + def _update_initial( + self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ManagedInstanceUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ManagedInstance', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a managed instance. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param parameters: The requested managed instance resource state. + :type parameters: ~azure.mgmt.sql.models.ManagedInstanceUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ManagedInstance or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedInstance] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedInstance]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ManagedInstance', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py b/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py index 3d71bd1986b7..39a53dad15fb 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py +++ b/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py @@ -40,6 +40,7 @@ from .operations.database_automatic_tuning_operations import DatabaseAutomaticTuningOperations from .operations.encryption_protectors_operations import EncryptionProtectorsOperations from .operations.failover_groups_operations import FailoverGroupsOperations +from .operations.managed_instances_operations import ManagedInstancesOperations from .operations.operations import Operations from .operations.server_keys_operations import ServerKeysOperations from .operations.sync_agents_operations import SyncAgentsOperations @@ -47,14 +48,29 @@ from .operations.sync_members_operations import SyncMembersOperations from .operations.subscription_usages_operations import SubscriptionUsagesOperations from .operations.virtual_network_rules_operations import VirtualNetworkRulesOperations +from .operations.database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations +from .operations.database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations +from .operations.job_agents_operations import JobAgentsOperations +from .operations.job_credentials_operations import JobCredentialsOperations +from .operations.job_executions_operations import JobExecutionsOperations +from .operations.jobs_operations import JobsOperations +from .operations.job_step_executions_operations import JobStepExecutionsOperations +from .operations.job_steps_operations import JobStepsOperations +from .operations.job_target_executions_operations import JobTargetExecutionsOperations +from .operations.job_target_groups_operations import JobTargetGroupsOperations +from .operations.job_versions_operations import JobVersionsOperations from .operations.long_term_retention_backups_operations import LongTermRetentionBackupsOperations from .operations.backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations +from .operations.managed_databases_operations import ManagedDatabasesOperations from .operations.server_automatic_tuning_operations import ServerAutomaticTuningOperations from .operations.server_dns_aliases_operations import ServerDnsAliasesOperations from .operations.restore_points_operations import RestorePointsOperations from .operations.database_operations import DatabaseOperations from .operations.elastic_pool_operations import ElasticPoolOperations from .operations.capabilities_operations import CapabilitiesOperations +from .operations.database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations +from .operations.instance_failover_groups_operations import InstanceFailoverGroupsOperations +from .operations.backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations from . import models @@ -151,6 +167,8 @@ class SqlManagementClient(SDKClient): :vartype encryption_protectors: azure.mgmt.sql.operations.EncryptionProtectorsOperations :ivar failover_groups: FailoverGroups operations :vartype failover_groups: azure.mgmt.sql.operations.FailoverGroupsOperations + :ivar managed_instances: ManagedInstances operations + :vartype managed_instances: azure.mgmt.sql.operations.ManagedInstancesOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.sql.operations.Operations :ivar server_keys: ServerKeys operations @@ -165,10 +183,34 @@ class SqlManagementClient(SDKClient): :vartype subscription_usages: azure.mgmt.sql.operations.SubscriptionUsagesOperations :ivar virtual_network_rules: VirtualNetworkRules operations :vartype virtual_network_rules: azure.mgmt.sql.operations.VirtualNetworkRulesOperations + :ivar database_vulnerability_assessment_rule_baselines: DatabaseVulnerabilityAssessmentRuleBaselines operations + :vartype database_vulnerability_assessment_rule_baselines: azure.mgmt.sql.operations.DatabaseVulnerabilityAssessmentRuleBaselinesOperations + :ivar database_vulnerability_assessments: DatabaseVulnerabilityAssessments operations + :vartype database_vulnerability_assessments: azure.mgmt.sql.operations.DatabaseVulnerabilityAssessmentsOperations + :ivar job_agents: JobAgents operations + :vartype job_agents: azure.mgmt.sql.operations.JobAgentsOperations + :ivar job_credentials: JobCredentials operations + :vartype job_credentials: azure.mgmt.sql.operations.JobCredentialsOperations + :ivar job_executions: JobExecutions operations + :vartype job_executions: azure.mgmt.sql.operations.JobExecutionsOperations + :ivar jobs: Jobs operations + :vartype jobs: azure.mgmt.sql.operations.JobsOperations + :ivar job_step_executions: JobStepExecutions operations + :vartype job_step_executions: azure.mgmt.sql.operations.JobStepExecutionsOperations + :ivar job_steps: JobSteps operations + :vartype job_steps: azure.mgmt.sql.operations.JobStepsOperations + :ivar job_target_executions: JobTargetExecutions operations + :vartype job_target_executions: azure.mgmt.sql.operations.JobTargetExecutionsOperations + :ivar job_target_groups: JobTargetGroups operations + :vartype job_target_groups: azure.mgmt.sql.operations.JobTargetGroupsOperations + :ivar job_versions: JobVersions operations + :vartype job_versions: azure.mgmt.sql.operations.JobVersionsOperations :ivar long_term_retention_backups: LongTermRetentionBackups operations :vartype long_term_retention_backups: azure.mgmt.sql.operations.LongTermRetentionBackupsOperations :ivar backup_long_term_retention_policies: BackupLongTermRetentionPolicies operations :vartype backup_long_term_retention_policies: azure.mgmt.sql.operations.BackupLongTermRetentionPoliciesOperations + :ivar managed_databases: ManagedDatabases operations + :vartype managed_databases: azure.mgmt.sql.operations.ManagedDatabasesOperations :ivar server_automatic_tuning: ServerAutomaticTuning operations :vartype server_automatic_tuning: azure.mgmt.sql.operations.ServerAutomaticTuningOperations :ivar server_dns_aliases: ServerDnsAliases operations @@ -181,6 +223,12 @@ class SqlManagementClient(SDKClient): :vartype elastic_pool_operations: azure.mgmt.sql.operations.ElasticPoolOperations :ivar capabilities: Capabilities operations :vartype capabilities: azure.mgmt.sql.operations.CapabilitiesOperations + :ivar database_vulnerability_assessment_scans: DatabaseVulnerabilityAssessmentScans operations + :vartype database_vulnerability_assessment_scans: azure.mgmt.sql.operations.DatabaseVulnerabilityAssessmentScansOperations + :ivar instance_failover_groups: InstanceFailoverGroups operations + :vartype instance_failover_groups: azure.mgmt.sql.operations.InstanceFailoverGroupsOperations + :ivar backup_short_term_retention_policies: BackupShortTermRetentionPolicies operations + :vartype backup_short_term_retention_policies: azure.mgmt.sql.operations.BackupShortTermRetentionPoliciesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -255,6 +303,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.failover_groups = FailoverGroupsOperations( self._client, self.config, self._serialize, self._deserialize) + self.managed_instances = ManagedInstancesOperations( + self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) self.server_keys = ServerKeysOperations( @@ -269,10 +319,34 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.virtual_network_rules = VirtualNetworkRulesOperations( self._client, self.config, self._serialize, self._deserialize) + self.database_vulnerability_assessment_rule_baselines = DatabaseVulnerabilityAssessmentRuleBaselinesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.database_vulnerability_assessments = DatabaseVulnerabilityAssessmentsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.job_agents = JobAgentsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.job_credentials = JobCredentialsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.job_executions = JobExecutionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.job_step_executions = JobStepExecutionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.job_steps = JobStepsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.job_target_executions = JobTargetExecutionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.job_target_groups = JobTargetGroupsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.job_versions = JobVersionsOperations( + self._client, self.config, self._serialize, self._deserialize) self.long_term_retention_backups = LongTermRetentionBackupsOperations( self._client, self.config, self._serialize, self._deserialize) self.backup_long_term_retention_policies = BackupLongTermRetentionPoliciesOperations( self._client, self.config, self._serialize, self._deserialize) + self.managed_databases = ManagedDatabasesOperations( + self._client, self.config, self._serialize, self._deserialize) self.server_automatic_tuning = ServerAutomaticTuningOperations( self._client, self.config, self._serialize, self._deserialize) self.server_dns_aliases = ServerDnsAliasesOperations( @@ -285,3 +359,9 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.capabilities = CapabilitiesOperations( self._client, self.config, self._serialize, self._deserialize) + self.database_vulnerability_assessment_scans = DatabaseVulnerabilityAssessmentScansOperations( + self._client, self.config, self._serialize, self._deserialize) + self.instance_failover_groups = InstanceFailoverGroupsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.backup_short_term_retention_policies = BackupShortTermRetentionPoliciesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-sql/azure/mgmt/sql/version.py b/azure-mgmt-sql/azure/mgmt/sql/version.py index 3697d9b71739..413a68a462da 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/version.py +++ b/azure-mgmt-sql/azure/mgmt/sql/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.9.0" +VERSION = "0.9.1" diff --git a/azure-mgmt-sql/build.json b/azure-mgmt-sql/build.json deleted file mode 100644 index d2ddfa00c96b..000000000000 --- a/azure-mgmt-sql/build.json +++ /dev/null @@ -1,424 +0,0 @@ -{ - "autorest": [ - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest-core", - "version": "2.0.4216", - "engines": { - "node": ">=7.10.0" - }, - "dependencies": {}, - "optionalDependencies": {}, - "devDependencies": { - "@types/commonmark": "^0.27.0", - "@types/js-yaml": "^3.10.0", - "@types/jsonpath": "^0.1.29", - "@types/node": "^8.0.53", - "@types/source-map": "^0.5.0", - "@types/yargs": "^8.0.2", - "dts-generator": "^2.1.0", - "mocha": "^4.0.1", - "mocha-typescript": "^1.1.7", - "shx": "0.2.2", - "static-link": "^0.2.3", - "vscode-jsonrpc": "^3.3.1" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "_shasum": "f6b97454df552dfa54bd0df23f8309665be5fd4c", - "_shrinkwrap": null, - "bin": { - "autorest-core": "./dist/app.js", - "autorest-language-service": "dist/language-service/language-service.js" - }, - "_id": "@microsoft.azure/autorest-core@2.0.4216", - "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.8491.947977755912.personal-lock", - "options": { - "port": 47761, - "host": "2130719825", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.8491.947977755912.personal-lock:47761" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest-core", - "version": "2.0.4227", - "engines": { - "node": ">=7.10.0" - }, - "dependencies": {}, - "optionalDependencies": {}, - "devDependencies": { - "@types/commonmark": "^0.27.0", - "@types/js-yaml": "^3.10.0", - "@types/jsonpath": "^0.1.29", - "@types/node": "^8.0.53", - "@types/source-map": "^0.5.0", - "@types/yargs": "^8.0.2", - "@types/z-schema": "^3.16.31", - "dts-generator": "^2.1.0", - "mocha": "^4.0.1", - "mocha-typescript": "^1.1.7", - "shx": "0.2.2", - "static-link": "^0.2.3", - "vscode-jsonrpc": "^3.3.1" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "_shasum": "d29217f10a534571f15f28ad2556c308726c5e0e", - "_shrinkwrap": null, - "bin": { - "autorest-core": "./dist/app.js", - "autorest-language-service": "dist/language-service/language-service.js" - }, - "_id": "@microsoft.azure/autorest-core@2.0.4227", - "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.8491.947977755912.personal-lock", - "options": { - "port": 47761, - "host": "2130719825", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.8491.947977755912.personal-lock:47761" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.0.21", - "dependencies": { - "dotnet-2.0.0": "^1.3.2" - }, - "optionalDependencies": {}, - "devDependencies": { - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.1.1", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.0.21", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.8491.947977755912.personal-lock", - "options": { - "port": 47761, - "host": "2130719825", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.8491.947977755912.personal-lock:47761" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.3.38", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/autorest.testserver": "2.3.1", - "autorest": "^2.0.4201", - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "903bb77932e4ed1b8bc3b25cc39b167143494f6c", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.3.38", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.8491.947977755912.personal-lock", - "options": { - "port": 47761, - "host": "2130719825", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.8491.947977755912.personal-lock:47761" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.python", - "version": "2.1.28", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/autorest.testserver": "^2.3.13", - "autorest": "^2.0.4203", - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "_shasum": "864acf40daff5c5e073f0e7da55597c3a7994469", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.python@2.1.28", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.8491.947977755912.personal-lock", - "options": { - "port": 47761, - "host": "2130719825", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.8491.947977755912.personal-lock:47761" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - } - ], - "autorest_bootstrap": {} -} \ No newline at end of file diff --git a/azure-mgmt-sql/sdk_packaging.toml b/azure-mgmt-sql/sdk_packaging.toml new file mode 100644 index 000000000000..e96df6059b96 --- /dev/null +++ b/azure-mgmt-sql/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-sql" +package_pprint_name = "SQL Management" +package_doc_id = "sql" +is_stable = false diff --git a/azure-mgmt-storage/HISTORY.rst b/azure-mgmt-storage/HISTORY.rst index 04d1ffb6a25a..d8b9d616f953 100644 --- a/azure-mgmt-storage/HISTORY.rst +++ b/azure-mgmt-storage/HISTORY.rst @@ -3,6 +3,18 @@ Release History =============== +2.0.0rc3 (2018-05-30) ++++++++++++++++++++++ + +**Features** + +- Add preview version of management policy (API 2018-03-01-preview only). This is considered preview and breaking changes might happen + if you opt in for that Api Version. + +**Bugfixes** + +- Correct azure-common dependency + 2.0.0rc2 (2018-05-16) +++++++++++++++++++++ @@ -38,7 +50,7 @@ This version uses a next-generation code generator that *might* introduce breaki - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. - - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, the response of the initial call will be returned without polling. diff --git a/azure-mgmt-storage/azure/mgmt/storage/storage_management_client.py b/azure-mgmt-storage/azure/mgmt/storage/storage_management_client.py index f276d8582eac..40b0c51a3aca 100644 --- a/azure-mgmt-storage/azure/mgmt/storage/storage_management_client.py +++ b/azure-mgmt-storage/azure/mgmt/storage/storage_management_client.py @@ -114,6 +114,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2017-06-01: :mod:`v2017_06_01.models` * 2017-10-01: :mod:`v2017_10_01.models` * 2018-02-01: :mod:`v2018_02_01.models` + * 2018-03-01-preview: :mod:`v2018_03_01_preview.models` """ if api_version == '2015-06-15': from .v2015_06_15 import models @@ -133,6 +134,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2018-02-01': from .v2018_02_01 import models return models + elif api_version == '2018-03-01-preview': + from .v2018_03_01_preview import models + return models raise NotImplementedError("APIVersion {} is not available".format(api_version)) @property @@ -140,10 +144,13 @@ def blob_containers(self): """Instance depends on the API version: * 2018-02-01: :class:`BlobContainersOperations` + * 2018-03-01-preview: :class:`BlobContainersOperations` """ api_version = self._get_api_version('blob_containers') if api_version == '2018-02-01': from .v2018_02_01.operations import BlobContainersOperations as OperationClass + elif api_version == '2018-03-01-preview': + from .v2018_03_01_preview.operations import BlobContainersOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -155,6 +162,7 @@ def operations(self): * 2017-06-01: :class:`Operations` * 2017-10-01: :class:`Operations` * 2018-02-01: :class:`Operations` + * 2018-03-01-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2017-06-01': @@ -163,6 +171,8 @@ def operations(self): from .v2017_10_01.operations import Operations as OperationClass elif api_version == '2018-02-01': from .v2018_02_01.operations import Operations as OperationClass + elif api_version == '2018-03-01-preview': + from .v2018_03_01_preview.operations import Operations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -174,6 +184,7 @@ def skus(self): * 2017-06-01: :class:`SkusOperations` * 2017-10-01: :class:`SkusOperations` * 2018-02-01: :class:`SkusOperations` + * 2018-03-01-preview: :class:`SkusOperations` """ api_version = self._get_api_version('skus') if api_version == '2017-06-01': @@ -182,6 +193,8 @@ def skus(self): from .v2017_10_01.operations import SkusOperations as OperationClass elif api_version == '2018-02-01': from .v2018_02_01.operations import SkusOperations as OperationClass + elif api_version == '2018-03-01-preview': + from .v2018_03_01_preview.operations import SkusOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -196,6 +209,7 @@ def storage_accounts(self): * 2017-06-01: :class:`StorageAccountsOperations` * 2017-10-01: :class:`StorageAccountsOperations` * 2018-02-01: :class:`StorageAccountsOperations` + * 2018-03-01-preview: :class:`StorageAccountsOperations` """ api_version = self._get_api_version('storage_accounts') if api_version == '2015-06-15': @@ -210,6 +224,8 @@ def storage_accounts(self): from .v2017_10_01.operations import StorageAccountsOperations as OperationClass elif api_version == '2018-02-01': from .v2018_02_01.operations import StorageAccountsOperations as OperationClass + elif api_version == '2018-03-01-preview': + from .v2018_03_01_preview.operations import StorageAccountsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -241,3 +257,16 @@ def usage(self): else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def usages(self): + """Instance depends on the API version: + + * 2018-03-01-preview: :class:`UsagesOperations` + """ + api_version = self._get_api_version('usages') + if api_version == '2018-03-01-preview': + from .v2018_03_01_preview.operations import UsagesOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/__init__.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/__init__.py new file mode 100644 index 000000000000..0854715e0c10 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .storage_management_client import StorageManagementClient +from .version import VERSION + +__all__ = ['StorageManagementClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/__init__.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/__init__.py new file mode 100644 index 000000000000..d5121718507f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/__init__.py @@ -0,0 +1,219 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from .operation_display_py3 import OperationDisplay + from .dimension_py3 import Dimension + from .metric_specification_py3 import MetricSpecification + from .service_specification_py3 import ServiceSpecification + from .operation_py3 import Operation + from .storage_account_check_name_availability_parameters_py3 import StorageAccountCheckNameAvailabilityParameters + from .sku_capability_py3 import SKUCapability + from .restriction_py3 import Restriction + from .sku_py3 import Sku + from .check_name_availability_result_py3 import CheckNameAvailabilityResult + from .custom_domain_py3 import CustomDomain + from .encryption_service_py3 import EncryptionService + from .encryption_services_py3 import EncryptionServices + from .key_vault_properties_py3 import KeyVaultProperties + from .encryption_py3 import Encryption + from .virtual_network_rule_py3 import VirtualNetworkRule + from .ip_rule_py3 import IPRule + from .network_rule_set_py3 import NetworkRuleSet + from .identity_py3 import Identity + from .storage_account_create_parameters_py3 import StorageAccountCreateParameters + from .endpoints_py3 import Endpoints + from .storage_account_py3 import StorageAccount + from .storage_account_key_py3 import StorageAccountKey + from .storage_account_list_keys_result_py3 import StorageAccountListKeysResult + from .storage_account_regenerate_key_parameters_py3 import StorageAccountRegenerateKeyParameters + from .storage_account_update_parameters_py3 import StorageAccountUpdateParameters + from .usage_name_py3 import UsageName + from .usage_py3 import Usage + from .account_sas_parameters_py3 import AccountSasParameters + from .list_account_sas_response_py3 import ListAccountSasResponse + from .service_sas_parameters_py3 import ServiceSasParameters + from .list_service_sas_response_py3 import ListServiceSasResponse + from .storage_account_management_policies_py3 import StorageAccountManagementPolicies + from .management_policies_rules_set_parameter_py3 import ManagementPoliciesRulesSetParameter + from .proxy_resource_py3 import ProxyResource + from .tracked_resource_py3 import TrackedResource + from .azure_entity_resource_py3 import AzureEntityResource + from .resource_py3 import Resource + from .update_history_property_py3 import UpdateHistoryProperty + from .immutability_policy_properties_py3 import ImmutabilityPolicyProperties + from .tag_property_py3 import TagProperty + from .legal_hold_properties_py3 import LegalHoldProperties + from .blob_container_py3 import BlobContainer + from .immutability_policy_py3 import ImmutabilityPolicy + from .legal_hold_py3 import LegalHold + from .list_container_item_py3 import ListContainerItem + from .list_container_items_py3 import ListContainerItems +except (SyntaxError, ImportError): + from .operation_display import OperationDisplay + from .dimension import Dimension + from .metric_specification import MetricSpecification + from .service_specification import ServiceSpecification + from .operation import Operation + from .storage_account_check_name_availability_parameters import StorageAccountCheckNameAvailabilityParameters + from .sku_capability import SKUCapability + from .restriction import Restriction + from .sku import Sku + from .check_name_availability_result import CheckNameAvailabilityResult + from .custom_domain import CustomDomain + from .encryption_service import EncryptionService + from .encryption_services import EncryptionServices + from .key_vault_properties import KeyVaultProperties + from .encryption import Encryption + from .virtual_network_rule import VirtualNetworkRule + from .ip_rule import IPRule + from .network_rule_set import NetworkRuleSet + from .identity import Identity + from .storage_account_create_parameters import StorageAccountCreateParameters + from .endpoints import Endpoints + from .storage_account import StorageAccount + from .storage_account_key import StorageAccountKey + from .storage_account_list_keys_result import StorageAccountListKeysResult + from .storage_account_regenerate_key_parameters import StorageAccountRegenerateKeyParameters + from .storage_account_update_parameters import StorageAccountUpdateParameters + from .usage_name import UsageName + from .usage import Usage + from .account_sas_parameters import AccountSasParameters + from .list_account_sas_response import ListAccountSasResponse + from .service_sas_parameters import ServiceSasParameters + from .list_service_sas_response import ListServiceSasResponse + from .storage_account_management_policies import StorageAccountManagementPolicies + from .management_policies_rules_set_parameter import ManagementPoliciesRulesSetParameter + from .proxy_resource import ProxyResource + from .tracked_resource import TrackedResource + from .azure_entity_resource import AzureEntityResource + from .resource import Resource + from .update_history_property import UpdateHistoryProperty + from .immutability_policy_properties import ImmutabilityPolicyProperties + from .tag_property import TagProperty + from .legal_hold_properties import LegalHoldProperties + from .blob_container import BlobContainer + from .immutability_policy import ImmutabilityPolicy + from .legal_hold import LegalHold + from .list_container_item import ListContainerItem + from .list_container_items import ListContainerItems +from .operation_paged import OperationPaged +from .sku_paged import SkuPaged +from .storage_account_paged import StorageAccountPaged +from .usage_paged import UsagePaged +from .storage_management_client_enums import ( + ReasonCode, + SkuName, + SkuTier, + Kind, + Reason, + KeySource, + Action, + State, + Bypass, + DefaultAction, + AccessTier, + ProvisioningState, + AccountStatus, + KeyPermission, + UsageUnit, + Services, + SignedResourceTypes, + Permissions, + HttpProtocol, + SignedResource, + PublicAccess, + LeaseStatus, + LeaseState, + LeaseDuration, + ImmutabilityPolicyState, + ImmutabilityPolicyUpdateType, +) + +__all__ = [ + 'OperationDisplay', + 'Dimension', + 'MetricSpecification', + 'ServiceSpecification', + 'Operation', + 'StorageAccountCheckNameAvailabilityParameters', + 'SKUCapability', + 'Restriction', + 'Sku', + 'CheckNameAvailabilityResult', + 'CustomDomain', + 'EncryptionService', + 'EncryptionServices', + 'KeyVaultProperties', + 'Encryption', + 'VirtualNetworkRule', + 'IPRule', + 'NetworkRuleSet', + 'Identity', + 'StorageAccountCreateParameters', + 'Endpoints', + 'StorageAccount', + 'StorageAccountKey', + 'StorageAccountListKeysResult', + 'StorageAccountRegenerateKeyParameters', + 'StorageAccountUpdateParameters', + 'UsageName', + 'Usage', + 'AccountSasParameters', + 'ListAccountSasResponse', + 'ServiceSasParameters', + 'ListServiceSasResponse', + 'StorageAccountManagementPolicies', + 'ManagementPoliciesRulesSetParameter', + 'ProxyResource', + 'TrackedResource', + 'AzureEntityResource', + 'Resource', + 'UpdateHistoryProperty', + 'ImmutabilityPolicyProperties', + 'TagProperty', + 'LegalHoldProperties', + 'BlobContainer', + 'ImmutabilityPolicy', + 'LegalHold', + 'ListContainerItem', + 'ListContainerItems', + 'OperationPaged', + 'SkuPaged', + 'StorageAccountPaged', + 'UsagePaged', + 'ReasonCode', + 'SkuName', + 'SkuTier', + 'Kind', + 'Reason', + 'KeySource', + 'Action', + 'State', + 'Bypass', + 'DefaultAction', + 'AccessTier', + 'ProvisioningState', + 'AccountStatus', + 'KeyPermission', + 'UsageUnit', + 'Services', + 'SignedResourceTypes', + 'Permissions', + 'HttpProtocol', + 'SignedResource', + 'PublicAccess', + 'LeaseStatus', + 'LeaseState', + 'LeaseDuration', + 'ImmutabilityPolicyState', + 'ImmutabilityPolicyUpdateType', +] diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/account_sas_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/account_sas_parameters.py new file mode 100644 index 000000000000..8ae3152f1b2d --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/account_sas_parameters.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccountSasParameters(Model): + """The parameters to list SAS credentials of a storage account. + + All required parameters must be populated in order to send to Azure. + + :param services: Required. The signed services accessible with the account + SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). + Possible values include: 'b', 'q', 't', 'f' + :type services: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.Services + :param resource_types: Required. The signed resource types that are + accessible with the account SAS. Service (s): Access to service-level + APIs; Container (c): Access to container-level APIs; Object (o): Access to + object-level APIs for blobs, queue messages, table entities, and files. + Possible values include: 's', 'c', 'o' + :type resource_types: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.SignedResourceTypes + :param permissions: Required. The signed permissions for the account SAS. + Possible values include: Read (r), Write (w), Delete (d), List (l), Add + (a), Create (c), Update (u) and Process (p). Possible values include: 'r', + 'd', 'w', 'l', 'a', 'c', 'u', 'p' + :type permissions: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.Permissions + :param ip_address_or_range: An IP address or a range of IP addresses from + which to accept requests. + :type ip_address_or_range: str + :param protocols: The protocol permitted for a request made with the + account SAS. Possible values include: 'https,http', 'https' + :type protocols: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.HttpProtocol + :param shared_access_start_time: The time at which the SAS becomes valid. + :type shared_access_start_time: datetime + :param shared_access_expiry_time: Required. The time at which the shared + access signature becomes invalid. + :type shared_access_expiry_time: datetime + :param key_to_sign: The key to sign the account SAS token with. + :type key_to_sign: str + """ + + _validation = { + 'services': {'required': True}, + 'resource_types': {'required': True}, + 'permissions': {'required': True}, + 'shared_access_expiry_time': {'required': True}, + } + + _attribute_map = { + 'services': {'key': 'signedServices', 'type': 'str'}, + 'resource_types': {'key': 'signedResourceTypes', 'type': 'str'}, + 'permissions': {'key': 'signedPermission', 'type': 'str'}, + 'ip_address_or_range': {'key': 'signedIp', 'type': 'str'}, + 'protocols': {'key': 'signedProtocol', 'type': 'HttpProtocol'}, + 'shared_access_start_time': {'key': 'signedStart', 'type': 'iso-8601'}, + 'shared_access_expiry_time': {'key': 'signedExpiry', 'type': 'iso-8601'}, + 'key_to_sign': {'key': 'keyToSign', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccountSasParameters, self).__init__(**kwargs) + self.services = kwargs.get('services', None) + self.resource_types = kwargs.get('resource_types', None) + self.permissions = kwargs.get('permissions', None) + self.ip_address_or_range = kwargs.get('ip_address_or_range', None) + self.protocols = kwargs.get('protocols', None) + self.shared_access_start_time = kwargs.get('shared_access_start_time', None) + self.shared_access_expiry_time = kwargs.get('shared_access_expiry_time', None) + self.key_to_sign = kwargs.get('key_to_sign', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/account_sas_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/account_sas_parameters_py3.py new file mode 100644 index 000000000000..305a5c27508a --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/account_sas_parameters_py3.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccountSasParameters(Model): + """The parameters to list SAS credentials of a storage account. + + All required parameters must be populated in order to send to Azure. + + :param services: Required. The signed services accessible with the account + SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). + Possible values include: 'b', 'q', 't', 'f' + :type services: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.Services + :param resource_types: Required. The signed resource types that are + accessible with the account SAS. Service (s): Access to service-level + APIs; Container (c): Access to container-level APIs; Object (o): Access to + object-level APIs for blobs, queue messages, table entities, and files. + Possible values include: 's', 'c', 'o' + :type resource_types: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.SignedResourceTypes + :param permissions: Required. The signed permissions for the account SAS. + Possible values include: Read (r), Write (w), Delete (d), List (l), Add + (a), Create (c), Update (u) and Process (p). Possible values include: 'r', + 'd', 'w', 'l', 'a', 'c', 'u', 'p' + :type permissions: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.Permissions + :param ip_address_or_range: An IP address or a range of IP addresses from + which to accept requests. + :type ip_address_or_range: str + :param protocols: The protocol permitted for a request made with the + account SAS. Possible values include: 'https,http', 'https' + :type protocols: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.HttpProtocol + :param shared_access_start_time: The time at which the SAS becomes valid. + :type shared_access_start_time: datetime + :param shared_access_expiry_time: Required. The time at which the shared + access signature becomes invalid. + :type shared_access_expiry_time: datetime + :param key_to_sign: The key to sign the account SAS token with. + :type key_to_sign: str + """ + + _validation = { + 'services': {'required': True}, + 'resource_types': {'required': True}, + 'permissions': {'required': True}, + 'shared_access_expiry_time': {'required': True}, + } + + _attribute_map = { + 'services': {'key': 'signedServices', 'type': 'str'}, + 'resource_types': {'key': 'signedResourceTypes', 'type': 'str'}, + 'permissions': {'key': 'signedPermission', 'type': 'str'}, + 'ip_address_or_range': {'key': 'signedIp', 'type': 'str'}, + 'protocols': {'key': 'signedProtocol', 'type': 'HttpProtocol'}, + 'shared_access_start_time': {'key': 'signedStart', 'type': 'iso-8601'}, + 'shared_access_expiry_time': {'key': 'signedExpiry', 'type': 'iso-8601'}, + 'key_to_sign': {'key': 'keyToSign', 'type': 'str'}, + } + + def __init__(self, *, services, resource_types, permissions, shared_access_expiry_time, ip_address_or_range: str=None, protocols=None, shared_access_start_time=None, key_to_sign: str=None, **kwargs) -> None: + super(AccountSasParameters, self).__init__(**kwargs) + self.services = services + self.resource_types = resource_types + self.permissions = permissions + self.ip_address_or_range = ip_address_or_range + self.protocols = protocols + self.shared_access_start_time = shared_access_start_time + self.shared_access_expiry_time = shared_access_expiry_time + self.key_to_sign = key_to_sign diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/azure_entity_resource.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/azure_entity_resource.py new file mode 100644 index 000000000000..3bffaab8d35b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/azure_entity_resource.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/azure_entity_resource_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/azure_entity_resource_py3.py new file mode 100644 index 000000000000..d3f80d87498a --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/azure_entity_resource_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/blob_container.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/blob_container.py new file mode 100644 index 000000000000..aa1d2acd4c26 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/blob_container.py @@ -0,0 +1,119 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource import AzureEntityResource + + +class BlobContainer(AzureEntityResource): + """Properties of the blob container, including Id, resource name, resource + type, Etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.PublicAccess + :ivar last_modified_time: Returns the date and time the container was last + modified. + :vartype last_modified_time: datetime + :ivar lease_status: The lease status of the container. Possible values + include: 'Locked', 'Unlocked' + :vartype lease_status: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.LeaseStatus + :ivar lease_state: Lease state of the container. Possible values include: + 'Available', 'Leased', 'Expired', 'Breaking', 'Broken' + :vartype lease_state: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.LeaseState + :ivar lease_duration: Specifies whether the lease on a container is of + infinite or fixed duration, only when the container is leased. Possible + values include: 'Infinite', 'Fixed' + :vartype lease_duration: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.LeaseDuration + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :ivar immutability_policy: The ImmutabilityPolicy property of the + container. + :vartype immutability_policy: + ~azure.mgmt.storage.v2018_03_01_preview.models.ImmutabilityPolicyProperties + :ivar legal_hold: The LegalHold property of the container. + :vartype legal_hold: + ~azure.mgmt.storage.v2018_03_01_preview.models.LegalHoldProperties + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :ivar has_immutability_policy: The hasImmutabilityPolicy public property + is set to true by SRP if ImmutabilityPolicy has been created for this + container. The hasImmutabilityPolicy public property is set to false by + SRP if ImmutabilityPolicy has not been created for this container. + :vartype has_immutability_policy: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'lease_status': {'readonly': True}, + 'lease_state': {'readonly': True}, + 'lease_duration': {'readonly': True}, + 'immutability_policy': {'readonly': True}, + 'legal_hold': {'readonly': True}, + 'has_legal_hold': {'readonly': True}, + 'has_immutability_policy': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'public_access': {'key': 'properties.publicAccess', 'type': 'PublicAccess'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'lease_status': {'key': 'properties.leaseStatus', 'type': 'str'}, + 'lease_state': {'key': 'properties.leaseState', 'type': 'str'}, + 'lease_duration': {'key': 'properties.leaseDuration', 'type': 'str'}, + 'metadata': {'key': 'properties.metadata', 'type': '{str}'}, + 'immutability_policy': {'key': 'properties.immutabilityPolicy', 'type': 'ImmutabilityPolicyProperties'}, + 'legal_hold': {'key': 'properties.legalHold', 'type': 'LegalHoldProperties'}, + 'has_legal_hold': {'key': 'properties.hasLegalHold', 'type': 'bool'}, + 'has_immutability_policy': {'key': 'properties.hasImmutabilityPolicy', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(BlobContainer, self).__init__(**kwargs) + self.public_access = kwargs.get('public_access', None) + self.last_modified_time = None + self.lease_status = None + self.lease_state = None + self.lease_duration = None + self.metadata = kwargs.get('metadata', None) + self.immutability_policy = None + self.legal_hold = None + self.has_legal_hold = None + self.has_immutability_policy = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/blob_container_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/blob_container_py3.py new file mode 100644 index 000000000000..680ad34c6809 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/blob_container_py3.py @@ -0,0 +1,119 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource_py3 import AzureEntityResource + + +class BlobContainer(AzureEntityResource): + """Properties of the blob container, including Id, resource name, resource + type, Etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.PublicAccess + :ivar last_modified_time: Returns the date and time the container was last + modified. + :vartype last_modified_time: datetime + :ivar lease_status: The lease status of the container. Possible values + include: 'Locked', 'Unlocked' + :vartype lease_status: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.LeaseStatus + :ivar lease_state: Lease state of the container. Possible values include: + 'Available', 'Leased', 'Expired', 'Breaking', 'Broken' + :vartype lease_state: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.LeaseState + :ivar lease_duration: Specifies whether the lease on a container is of + infinite or fixed duration, only when the container is leased. Possible + values include: 'Infinite', 'Fixed' + :vartype lease_duration: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.LeaseDuration + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :ivar immutability_policy: The ImmutabilityPolicy property of the + container. + :vartype immutability_policy: + ~azure.mgmt.storage.v2018_03_01_preview.models.ImmutabilityPolicyProperties + :ivar legal_hold: The LegalHold property of the container. + :vartype legal_hold: + ~azure.mgmt.storage.v2018_03_01_preview.models.LegalHoldProperties + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :ivar has_immutability_policy: The hasImmutabilityPolicy public property + is set to true by SRP if ImmutabilityPolicy has been created for this + container. The hasImmutabilityPolicy public property is set to false by + SRP if ImmutabilityPolicy has not been created for this container. + :vartype has_immutability_policy: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'lease_status': {'readonly': True}, + 'lease_state': {'readonly': True}, + 'lease_duration': {'readonly': True}, + 'immutability_policy': {'readonly': True}, + 'legal_hold': {'readonly': True}, + 'has_legal_hold': {'readonly': True}, + 'has_immutability_policy': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'public_access': {'key': 'properties.publicAccess', 'type': 'PublicAccess'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'lease_status': {'key': 'properties.leaseStatus', 'type': 'str'}, + 'lease_state': {'key': 'properties.leaseState', 'type': 'str'}, + 'lease_duration': {'key': 'properties.leaseDuration', 'type': 'str'}, + 'metadata': {'key': 'properties.metadata', 'type': '{str}'}, + 'immutability_policy': {'key': 'properties.immutabilityPolicy', 'type': 'ImmutabilityPolicyProperties'}, + 'legal_hold': {'key': 'properties.legalHold', 'type': 'LegalHoldProperties'}, + 'has_legal_hold': {'key': 'properties.hasLegalHold', 'type': 'bool'}, + 'has_immutability_policy': {'key': 'properties.hasImmutabilityPolicy', 'type': 'bool'}, + } + + def __init__(self, *, public_access=None, metadata=None, **kwargs) -> None: + super(BlobContainer, self).__init__(**kwargs) + self.public_access = public_access + self.last_modified_time = None + self.lease_status = None + self.lease_state = None + self.lease_duration = None + self.metadata = metadata + self.immutability_policy = None + self.legal_hold = None + self.has_legal_hold = None + self.has_immutability_policy = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/check_name_availability_result.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/check_name_availability_result.py new file mode 100644 index 000000000000..41c2210d22a8 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/check_name_availability_result.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityResult(Model): + """The CheckNameAvailability operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: Gets a boolean value that indicates whether the name + is available for you to use. If true, the name is available. If false, the + name has already been taken or is invalid and cannot be used. + :vartype name_available: bool + :ivar reason: Gets the reason that a storage account name could not be + used. The Reason element is only returned if NameAvailable is false. + Possible values include: 'AccountNameInvalid', 'AlreadyExists' + :vartype reason: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.Reason + :ivar message: Gets an error message explaining the Reason value in more + detail. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'Reason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/check_name_availability_result_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/check_name_availability_result_py3.py new file mode 100644 index 000000000000..9d10045600bb --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/check_name_availability_result_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityResult(Model): + """The CheckNameAvailability operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: Gets a boolean value that indicates whether the name + is available for you to use. If true, the name is available. If false, the + name has already been taken or is invalid and cannot be used. + :vartype name_available: bool + :ivar reason: Gets the reason that a storage account name could not be + used. The Reason element is only returned if NameAvailable is false. + Possible values include: 'AccountNameInvalid', 'AlreadyExists' + :vartype reason: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.Reason + :ivar message: Gets an error message explaining the Reason value in more + detail. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'Reason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/custom_domain.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/custom_domain.py new file mode 100644 index 000000000000..585480d7321a --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/custom_domain.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomDomain(Model): + """The custom domain assigned to this storage account. This can be set via + Update. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the custom domain name assigned to the + storage account. Name is the CNAME source. + :type name: str + :param use_sub_domain: Indicates whether indirect CName validation is + enabled. Default value is false. This should only be set on updates. + :type use_sub_domain: bool + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'use_sub_domain': {'key': 'useSubDomain', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(CustomDomain, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.use_sub_domain = kwargs.get('use_sub_domain', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/custom_domain_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/custom_domain_py3.py new file mode 100644 index 000000000000..4c6fe3f83e35 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/custom_domain_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomDomain(Model): + """The custom domain assigned to this storage account. This can be set via + Update. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the custom domain name assigned to the + storage account. Name is the CNAME source. + :type name: str + :param use_sub_domain: Indicates whether indirect CName validation is + enabled. Default value is false. This should only be set on updates. + :type use_sub_domain: bool + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'use_sub_domain': {'key': 'useSubDomain', 'type': 'bool'}, + } + + def __init__(self, *, name: str, use_sub_domain: bool=None, **kwargs) -> None: + super(CustomDomain, self).__init__(**kwargs) + self.name = name + self.use_sub_domain = use_sub_domain diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/dimension.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/dimension.py new file mode 100644 index 000000000000..0a0cdaf75da7 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/dimension.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Dimension(Model): + """Dimension of blobs, possiblly be blob type or access tier. + + :param name: Display name of dimension. + :type name: str + :param display_name: Display name of dimension. + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Dimension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/dimension_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/dimension_py3.py new file mode 100644 index 000000000000..6845aa528b4b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/dimension_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Dimension(Model): + """Dimension of blobs, possiblly be blob type or access tier. + + :param name: Display name of dimension. + :type name: str + :param display_name: Display name of dimension. + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, **kwargs) -> None: + super(Dimension, self).__init__(**kwargs) + self.name = name + self.display_name = display_name diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption.py new file mode 100644 index 000000000000..06c2c3f1a3be --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Encryption(Model): + """The encryption settings on the storage account. + + All required parameters must be populated in order to send to Azure. + + :param services: List of services which support encryption. + :type services: + ~azure.mgmt.storage.v2018_03_01_preview.models.EncryptionServices + :param key_source: Required. The encryption keySource (provider). Possible + values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. + Possible values include: 'Microsoft.Storage', 'Microsoft.Keyvault'. + Default value: "Microsoft.Storage" . + :type key_source: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.KeySource + :param key_vault_properties: Properties provided by key vault. + :type key_vault_properties: + ~azure.mgmt.storage.v2018_03_01_preview.models.KeyVaultProperties + """ + + _validation = { + 'key_source': {'required': True}, + } + + _attribute_map = { + 'services': {'key': 'services', 'type': 'EncryptionServices'}, + 'key_source': {'key': 'keySource', 'type': 'str'}, + 'key_vault_properties': {'key': 'keyvaultproperties', 'type': 'KeyVaultProperties'}, + } + + def __init__(self, **kwargs): + super(Encryption, self).__init__(**kwargs) + self.services = kwargs.get('services', None) + self.key_source = kwargs.get('key_source', "Microsoft.Storage") + self.key_vault_properties = kwargs.get('key_vault_properties', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption_py3.py new file mode 100644 index 000000000000..7fe3395b43f8 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Encryption(Model): + """The encryption settings on the storage account. + + All required parameters must be populated in order to send to Azure. + + :param services: List of services which support encryption. + :type services: + ~azure.mgmt.storage.v2018_03_01_preview.models.EncryptionServices + :param key_source: Required. The encryption keySource (provider). Possible + values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. + Possible values include: 'Microsoft.Storage', 'Microsoft.Keyvault'. + Default value: "Microsoft.Storage" . + :type key_source: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.KeySource + :param key_vault_properties: Properties provided by key vault. + :type key_vault_properties: + ~azure.mgmt.storage.v2018_03_01_preview.models.KeyVaultProperties + """ + + _validation = { + 'key_source': {'required': True}, + } + + _attribute_map = { + 'services': {'key': 'services', 'type': 'EncryptionServices'}, + 'key_source': {'key': 'keySource', 'type': 'str'}, + 'key_vault_properties': {'key': 'keyvaultproperties', 'type': 'KeyVaultProperties'}, + } + + def __init__(self, *, services=None, key_source="Microsoft.Storage", key_vault_properties=None, **kwargs) -> None: + super(Encryption, self).__init__(**kwargs) + self.services = services + self.key_source = key_source + self.key_vault_properties = key_vault_properties diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption_service.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption_service.py new file mode 100644 index 000000000000..3a020c468f64 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption_service.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EncryptionService(Model): + """A service that allows server-side encryption to be used. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param enabled: A boolean indicating whether or not the service encrypts + the data as it is stored. + :type enabled: bool + :ivar last_enabled_time: Gets a rough estimate of the date/time when the + encryption was last enabled by the user. Only returned when encryption is + enabled. There might be some unencrypted blobs which were written after + this time, as it is just a rough estimate. + :vartype last_enabled_time: datetime + """ + + _validation = { + 'last_enabled_time': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'last_enabled_time': {'key': 'lastEnabledTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(EncryptionService, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.last_enabled_time = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption_service_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption_service_py3.py new file mode 100644 index 000000000000..0566050c6155 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption_service_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EncryptionService(Model): + """A service that allows server-side encryption to be used. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param enabled: A boolean indicating whether or not the service encrypts + the data as it is stored. + :type enabled: bool + :ivar last_enabled_time: Gets a rough estimate of the date/time when the + encryption was last enabled by the user. Only returned when encryption is + enabled. There might be some unencrypted blobs which were written after + this time, as it is just a rough estimate. + :vartype last_enabled_time: datetime + """ + + _validation = { + 'last_enabled_time': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'last_enabled_time': {'key': 'lastEnabledTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, enabled: bool=None, **kwargs) -> None: + super(EncryptionService, self).__init__(**kwargs) + self.enabled = enabled + self.last_enabled_time = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption_services.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption_services.py new file mode 100644 index 000000000000..c7d48b4fb675 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption_services.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EncryptionServices(Model): + """A list of services that support encryption. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param blob: The encryption function of the blob storage service. + :type blob: + ~azure.mgmt.storage.v2018_03_01_preview.models.EncryptionService + :param file: The encryption function of the file storage service. + :type file: + ~azure.mgmt.storage.v2018_03_01_preview.models.EncryptionService + :ivar table: The encryption function of the table storage service. + :vartype table: + ~azure.mgmt.storage.v2018_03_01_preview.models.EncryptionService + :ivar queue: The encryption function of the queue storage service. + :vartype queue: + ~azure.mgmt.storage.v2018_03_01_preview.models.EncryptionService + """ + + _validation = { + 'table': {'readonly': True}, + 'queue': {'readonly': True}, + } + + _attribute_map = { + 'blob': {'key': 'blob', 'type': 'EncryptionService'}, + 'file': {'key': 'file', 'type': 'EncryptionService'}, + 'table': {'key': 'table', 'type': 'EncryptionService'}, + 'queue': {'key': 'queue', 'type': 'EncryptionService'}, + } + + def __init__(self, **kwargs): + super(EncryptionServices, self).__init__(**kwargs) + self.blob = kwargs.get('blob', None) + self.file = kwargs.get('file', None) + self.table = None + self.queue = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption_services_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption_services_py3.py new file mode 100644 index 000000000000..b8fe79876044 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/encryption_services_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EncryptionServices(Model): + """A list of services that support encryption. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param blob: The encryption function of the blob storage service. + :type blob: + ~azure.mgmt.storage.v2018_03_01_preview.models.EncryptionService + :param file: The encryption function of the file storage service. + :type file: + ~azure.mgmt.storage.v2018_03_01_preview.models.EncryptionService + :ivar table: The encryption function of the table storage service. + :vartype table: + ~azure.mgmt.storage.v2018_03_01_preview.models.EncryptionService + :ivar queue: The encryption function of the queue storage service. + :vartype queue: + ~azure.mgmt.storage.v2018_03_01_preview.models.EncryptionService + """ + + _validation = { + 'table': {'readonly': True}, + 'queue': {'readonly': True}, + } + + _attribute_map = { + 'blob': {'key': 'blob', 'type': 'EncryptionService'}, + 'file': {'key': 'file', 'type': 'EncryptionService'}, + 'table': {'key': 'table', 'type': 'EncryptionService'}, + 'queue': {'key': 'queue', 'type': 'EncryptionService'}, + } + + def __init__(self, *, blob=None, file=None, **kwargs) -> None: + super(EncryptionServices, self).__init__(**kwargs) + self.blob = blob + self.file = file + self.table = None + self.queue = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/endpoints.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/endpoints.py new file mode 100644 index 000000000000..ec345fceac47 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/endpoints.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Endpoints(Model): + """The URIs that are used to perform a retrieval of a public blob, queue, or + table object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar blob: Gets the blob endpoint. + :vartype blob: str + :ivar queue: Gets the queue endpoint. + :vartype queue: str + :ivar table: Gets the table endpoint. + :vartype table: str + :ivar file: Gets the file endpoint. + :vartype file: str + """ + + _validation = { + 'blob': {'readonly': True}, + 'queue': {'readonly': True}, + 'table': {'readonly': True}, + 'file': {'readonly': True}, + } + + _attribute_map = { + 'blob': {'key': 'blob', 'type': 'str'}, + 'queue': {'key': 'queue', 'type': 'str'}, + 'table': {'key': 'table', 'type': 'str'}, + 'file': {'key': 'file', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Endpoints, self).__init__(**kwargs) + self.blob = None + self.queue = None + self.table = None + self.file = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/endpoints_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/endpoints_py3.py new file mode 100644 index 000000000000..a186e9c8d6a9 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/endpoints_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Endpoints(Model): + """The URIs that are used to perform a retrieval of a public blob, queue, or + table object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar blob: Gets the blob endpoint. + :vartype blob: str + :ivar queue: Gets the queue endpoint. + :vartype queue: str + :ivar table: Gets the table endpoint. + :vartype table: str + :ivar file: Gets the file endpoint. + :vartype file: str + """ + + _validation = { + 'blob': {'readonly': True}, + 'queue': {'readonly': True}, + 'table': {'readonly': True}, + 'file': {'readonly': True}, + } + + _attribute_map = { + 'blob': {'key': 'blob', 'type': 'str'}, + 'queue': {'key': 'queue', 'type': 'str'}, + 'table': {'key': 'table', 'type': 'str'}, + 'file': {'key': 'file', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Endpoints, self).__init__(**kwargs) + self.blob = None + self.queue = None + self.table = None + self.file = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/identity.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/identity.py new file mode 100644 index 000000000000..f526b986fc70 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/identity.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Identity(Model): + """Identity for the 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 principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :ivar type: Required. The identity type. Default value: "SystemAssigned" . + :vartype type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "SystemAssigned" + + def __init__(self, **kwargs): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/identity_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/identity_py3.py new file mode 100644 index 000000000000..22d25fdd85b7 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/identity_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Identity(Model): + """Identity for the 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 principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :ivar type: Required. The identity type. Default value: "SystemAssigned" . + :vartype type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "SystemAssigned" + + def __init__(self, **kwargs) -> None: + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/immutability_policy.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/immutability_policy.py new file mode 100644 index 000000000000..2ec3c69f0f72 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/immutability_policy.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource import AzureEntityResource + + +class ImmutabilityPolicy(AzureEntityResource): + """The ImmutabilityPolicy property of a blob container, including Id, resource + name, resource type, Etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param immutability_period_since_creation_in_days: Required. The + immutability period for the blobs in the container since the policy + creation, in days. + :type immutability_period_since_creation_in_days: int + :ivar state: The ImmutabilityPolicy state of a blob container, possible + values include: Locked and Unlocked. Possible values include: 'Locked', + 'Unlocked' + :vartype state: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.ImmutabilityPolicyState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'immutability_period_since_creation_in_days': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'immutability_period_since_creation_in_days': {'key': 'properties.immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImmutabilityPolicy, self).__init__(**kwargs) + self.immutability_period_since_creation_in_days = kwargs.get('immutability_period_since_creation_in_days', None) + self.state = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/immutability_policy_properties.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/immutability_policy_properties.py new file mode 100644 index 000000000000..80da1f189c17 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/immutability_policy_properties.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ImmutabilityPolicyProperties(Model): + """The properties of an ImmutabilityPolicy of a blob container. + + 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 immutability_period_since_creation_in_days: Required. The + immutability period for the blobs in the container since the policy + creation, in days. + :type immutability_period_since_creation_in_days: int + :ivar state: The ImmutabilityPolicy state of a blob container, possible + values include: Locked and Unlocked. Possible values include: 'Locked', + 'Unlocked' + :vartype state: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.ImmutabilityPolicyState + :ivar etag: ImmutabilityPolicy Etag. + :vartype etag: str + :ivar update_history: The ImmutabilityPolicy update history of the blob + container. + :vartype update_history: + list[~azure.mgmt.storage.v2018_03_01_preview.models.UpdateHistoryProperty] + """ + + _validation = { + 'immutability_period_since_creation_in_days': {'required': True}, + 'state': {'readonly': True}, + 'etag': {'readonly': True}, + 'update_history': {'readonly': True}, + } + + _attribute_map = { + 'immutability_period_since_creation_in_days': {'key': 'properties.immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'update_history': {'key': 'updateHistory', 'type': '[UpdateHistoryProperty]'}, + } + + def __init__(self, **kwargs): + super(ImmutabilityPolicyProperties, self).__init__(**kwargs) + self.immutability_period_since_creation_in_days = kwargs.get('immutability_period_since_creation_in_days', None) + self.state = None + self.etag = None + self.update_history = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/immutability_policy_properties_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/immutability_policy_properties_py3.py new file mode 100644 index 000000000000..586e5c4667f5 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/immutability_policy_properties_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ImmutabilityPolicyProperties(Model): + """The properties of an ImmutabilityPolicy of a blob container. + + 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 immutability_period_since_creation_in_days: Required. The + immutability period for the blobs in the container since the policy + creation, in days. + :type immutability_period_since_creation_in_days: int + :ivar state: The ImmutabilityPolicy state of a blob container, possible + values include: Locked and Unlocked. Possible values include: 'Locked', + 'Unlocked' + :vartype state: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.ImmutabilityPolicyState + :ivar etag: ImmutabilityPolicy Etag. + :vartype etag: str + :ivar update_history: The ImmutabilityPolicy update history of the blob + container. + :vartype update_history: + list[~azure.mgmt.storage.v2018_03_01_preview.models.UpdateHistoryProperty] + """ + + _validation = { + 'immutability_period_since_creation_in_days': {'required': True}, + 'state': {'readonly': True}, + 'etag': {'readonly': True}, + 'update_history': {'readonly': True}, + } + + _attribute_map = { + 'immutability_period_since_creation_in_days': {'key': 'properties.immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'update_history': {'key': 'updateHistory', 'type': '[UpdateHistoryProperty]'}, + } + + def __init__(self, *, immutability_period_since_creation_in_days: int, **kwargs) -> None: + super(ImmutabilityPolicyProperties, self).__init__(**kwargs) + self.immutability_period_since_creation_in_days = immutability_period_since_creation_in_days + self.state = None + self.etag = None + self.update_history = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/immutability_policy_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/immutability_policy_py3.py new file mode 100644 index 000000000000..6e612b9f60b2 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/immutability_policy_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource_py3 import AzureEntityResource + + +class ImmutabilityPolicy(AzureEntityResource): + """The ImmutabilityPolicy property of a blob container, including Id, resource + name, resource type, Etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param immutability_period_since_creation_in_days: Required. The + immutability period for the blobs in the container since the policy + creation, in days. + :type immutability_period_since_creation_in_days: int + :ivar state: The ImmutabilityPolicy state of a blob container, possible + values include: Locked and Unlocked. Possible values include: 'Locked', + 'Unlocked' + :vartype state: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.ImmutabilityPolicyState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'immutability_period_since_creation_in_days': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'immutability_period_since_creation_in_days': {'key': 'properties.immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, immutability_period_since_creation_in_days: int, **kwargs) -> None: + super(ImmutabilityPolicy, self).__init__(**kwargs) + self.immutability_period_since_creation_in_days = immutability_period_since_creation_in_days + self.state = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/ip_rule.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/ip_rule.py new file mode 100644 index 000000000000..02c554774c05 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/ip_rule.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IPRule(Model): + """IP rule with specific IP or IP range in CIDR format. + + All required parameters must be populated in order to send to Azure. + + :param ip_address_or_range: Required. Specifies the IP or IP range in CIDR + format. Only IPV4 address is allowed. + :type ip_address_or_range: str + :param action: The action of IP ACL rule. Possible values include: + 'Allow'. Default value: "Allow" . + :type action: str or ~azure.mgmt.storage.v2018_03_01_preview.models.Action + """ + + _validation = { + 'ip_address_or_range': {'required': True}, + } + + _attribute_map = { + 'ip_address_or_range': {'key': 'value', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'Action'}, + } + + def __init__(self, **kwargs): + super(IPRule, self).__init__(**kwargs) + self.ip_address_or_range = kwargs.get('ip_address_or_range', None) + self.action = kwargs.get('action', "Allow") diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/ip_rule_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/ip_rule_py3.py new file mode 100644 index 000000000000..7a8328a92aa9 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/ip_rule_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IPRule(Model): + """IP rule with specific IP or IP range in CIDR format. + + All required parameters must be populated in order to send to Azure. + + :param ip_address_or_range: Required. Specifies the IP or IP range in CIDR + format. Only IPV4 address is allowed. + :type ip_address_or_range: str + :param action: The action of IP ACL rule. Possible values include: + 'Allow'. Default value: "Allow" . + :type action: str or ~azure.mgmt.storage.v2018_03_01_preview.models.Action + """ + + _validation = { + 'ip_address_or_range': {'required': True}, + } + + _attribute_map = { + 'ip_address_or_range': {'key': 'value', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'Action'}, + } + + def __init__(self, *, ip_address_or_range: str, action="Allow", **kwargs) -> None: + super(IPRule, self).__init__(**kwargs) + self.ip_address_or_range = ip_address_or_range + self.action = action diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/key_vault_properties.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/key_vault_properties.py new file mode 100644 index 000000000000..44eaf379f6f2 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/key_vault_properties.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyVaultProperties(Model): + """Properties of key vault. + + :param key_name: The name of KeyVault key. + :type key_name: str + :param key_version: The version of KeyVault key. + :type key_version: str + :param key_vault_uri: The Uri of KeyVault. + :type key_vault_uri: str + """ + + _attribute_map = { + 'key_name': {'key': 'keyname', 'type': 'str'}, + 'key_version': {'key': 'keyversion', 'type': 'str'}, + 'key_vault_uri': {'key': 'keyvaulturi', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) + self.key_version = kwargs.get('key_version', None) + self.key_vault_uri = kwargs.get('key_vault_uri', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/key_vault_properties_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/key_vault_properties_py3.py new file mode 100644 index 000000000000..9e6350eec898 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/key_vault_properties_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyVaultProperties(Model): + """Properties of key vault. + + :param key_name: The name of KeyVault key. + :type key_name: str + :param key_version: The version of KeyVault key. + :type key_version: str + :param key_vault_uri: The Uri of KeyVault. + :type key_vault_uri: str + """ + + _attribute_map = { + 'key_name': {'key': 'keyname', 'type': 'str'}, + 'key_version': {'key': 'keyversion', 'type': 'str'}, + 'key_vault_uri': {'key': 'keyvaulturi', 'type': 'str'}, + } + + def __init__(self, *, key_name: str=None, key_version: str=None, key_vault_uri: str=None, **kwargs) -> None: + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_name = key_name + self.key_version = key_version + self.key_vault_uri = key_vault_uri diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/legal_hold.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/legal_hold.py new file mode 100644 index 000000000000..4eb93df1d9fe --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/legal_hold.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LegalHold(Model): + """The LegalHold property of a blob container. + + 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 has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :param tags: Required. Each tag should be 3 to 23 alphanumeric characters + and is normalized to lower case at SRP. + :type tags: list[str] + """ + + _validation = { + 'has_legal_hold': {'readonly': True}, + 'tags': {'required': True}, + } + + _attribute_map = { + 'has_legal_hold': {'key': 'hasLegalHold', 'type': 'bool'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(LegalHold, self).__init__(**kwargs) + self.has_legal_hold = None + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/legal_hold_properties.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/legal_hold_properties.py new file mode 100644 index 000000000000..cf219925a93e --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/legal_hold_properties.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LegalHoldProperties(Model): + """The LegalHold property of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :param tags: The list of LegalHold tags of a blob container. + :type tags: + list[~azure.mgmt.storage.v2018_03_01_preview.models.TagProperty] + """ + + _validation = { + 'has_legal_hold': {'readonly': True}, + } + + _attribute_map = { + 'has_legal_hold': {'key': 'hasLegalHold', 'type': 'bool'}, + 'tags': {'key': 'tags', 'type': '[TagProperty]'}, + } + + def __init__(self, **kwargs): + super(LegalHoldProperties, self).__init__(**kwargs) + self.has_legal_hold = None + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/legal_hold_properties_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/legal_hold_properties_py3.py new file mode 100644 index 000000000000..9004b110ecde --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/legal_hold_properties_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LegalHoldProperties(Model): + """The LegalHold property of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :param tags: The list of LegalHold tags of a blob container. + :type tags: + list[~azure.mgmt.storage.v2018_03_01_preview.models.TagProperty] + """ + + _validation = { + 'has_legal_hold': {'readonly': True}, + } + + _attribute_map = { + 'has_legal_hold': {'key': 'hasLegalHold', 'type': 'bool'}, + 'tags': {'key': 'tags', 'type': '[TagProperty]'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(LegalHoldProperties, self).__init__(**kwargs) + self.has_legal_hold = None + self.tags = tags diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/legal_hold_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/legal_hold_py3.py new file mode 100644 index 000000000000..a4bc196cb604 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/legal_hold_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LegalHold(Model): + """The LegalHold property of a blob container. + + 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 has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :param tags: Required. Each tag should be 3 to 23 alphanumeric characters + and is normalized to lower case at SRP. + :type tags: list[str] + """ + + _validation = { + 'has_legal_hold': {'readonly': True}, + 'tags': {'required': True}, + } + + _attribute_map = { + 'has_legal_hold': {'key': 'hasLegalHold', 'type': 'bool'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + } + + def __init__(self, *, tags, **kwargs) -> None: + super(LegalHold, self).__init__(**kwargs) + self.has_legal_hold = None + self.tags = tags diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_account_sas_response.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_account_sas_response.py new file mode 100644 index 000000000000..a56e959a34bd --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_account_sas_response.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListAccountSasResponse(Model): + """The List SAS credentials operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_sas_token: List SAS credentials of storage account. + :vartype account_sas_token: str + """ + + _validation = { + 'account_sas_token': {'readonly': True}, + } + + _attribute_map = { + 'account_sas_token': {'key': 'accountSasToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ListAccountSasResponse, self).__init__(**kwargs) + self.account_sas_token = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_account_sas_response_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_account_sas_response_py3.py new file mode 100644 index 000000000000..b8b9a314d9f6 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_account_sas_response_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListAccountSasResponse(Model): + """The List SAS credentials operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_sas_token: List SAS credentials of storage account. + :vartype account_sas_token: str + """ + + _validation = { + 'account_sas_token': {'readonly': True}, + } + + _attribute_map = { + 'account_sas_token': {'key': 'accountSasToken', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ListAccountSasResponse, self).__init__(**kwargs) + self.account_sas_token = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_container_item.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_container_item.py new file mode 100644 index 000000000000..d48987c875dc --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_container_item.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource import AzureEntityResource + + +class ListContainerItem(AzureEntityResource): + """The blob container properties be listed out. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.PublicAccess + :ivar last_modified_time: Returns the date and time the container was last + modified. + :vartype last_modified_time: datetime + :ivar lease_status: The lease status of the container. Possible values + include: 'Locked', 'Unlocked' + :vartype lease_status: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.LeaseStatus + :ivar lease_state: Lease state of the container. Possible values include: + 'Available', 'Leased', 'Expired', 'Breaking', 'Broken' + :vartype lease_state: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.LeaseState + :ivar lease_duration: Specifies whether the lease on a container is of + infinite or fixed duration, only when the container is leased. Possible + values include: 'Infinite', 'Fixed' + :vartype lease_duration: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.LeaseDuration + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :ivar immutability_policy: The ImmutabilityPolicy property of the + container. + :vartype immutability_policy: + ~azure.mgmt.storage.v2018_03_01_preview.models.ImmutabilityPolicyProperties + :ivar legal_hold: The LegalHold property of the container. + :vartype legal_hold: + ~azure.mgmt.storage.v2018_03_01_preview.models.LegalHoldProperties + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :ivar has_immutability_policy: The hasImmutabilityPolicy public property + is set to true by SRP if ImmutabilityPolicy has been created for this + container. The hasImmutabilityPolicy public property is set to false by + SRP if ImmutabilityPolicy has not been created for this container. + :vartype has_immutability_policy: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'lease_status': {'readonly': True}, + 'lease_state': {'readonly': True}, + 'lease_duration': {'readonly': True}, + 'immutability_policy': {'readonly': True}, + 'legal_hold': {'readonly': True}, + 'has_legal_hold': {'readonly': True}, + 'has_immutability_policy': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'public_access': {'key': 'properties.publicAccess', 'type': 'PublicAccess'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'lease_status': {'key': 'properties.leaseStatus', 'type': 'str'}, + 'lease_state': {'key': 'properties.leaseState', 'type': 'str'}, + 'lease_duration': {'key': 'properties.leaseDuration', 'type': 'str'}, + 'metadata': {'key': 'properties.metadata', 'type': '{str}'}, + 'immutability_policy': {'key': 'properties.immutabilityPolicy', 'type': 'ImmutabilityPolicyProperties'}, + 'legal_hold': {'key': 'properties.legalHold', 'type': 'LegalHoldProperties'}, + 'has_legal_hold': {'key': 'properties.hasLegalHold', 'type': 'bool'}, + 'has_immutability_policy': {'key': 'properties.hasImmutabilityPolicy', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ListContainerItem, self).__init__(**kwargs) + self.public_access = kwargs.get('public_access', None) + self.last_modified_time = None + self.lease_status = None + self.lease_state = None + self.lease_duration = None + self.metadata = kwargs.get('metadata', None) + self.immutability_policy = None + self.legal_hold = None + self.has_legal_hold = None + self.has_immutability_policy = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_container_item_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_container_item_py3.py new file mode 100644 index 000000000000..771dc1011cf2 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_container_item_py3.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource_py3 import AzureEntityResource + + +class ListContainerItem(AzureEntityResource): + """The blob container properties be listed out. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.PublicAccess + :ivar last_modified_time: Returns the date and time the container was last + modified. + :vartype last_modified_time: datetime + :ivar lease_status: The lease status of the container. Possible values + include: 'Locked', 'Unlocked' + :vartype lease_status: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.LeaseStatus + :ivar lease_state: Lease state of the container. Possible values include: + 'Available', 'Leased', 'Expired', 'Breaking', 'Broken' + :vartype lease_state: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.LeaseState + :ivar lease_duration: Specifies whether the lease on a container is of + infinite or fixed duration, only when the container is leased. Possible + values include: 'Infinite', 'Fixed' + :vartype lease_duration: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.LeaseDuration + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :ivar immutability_policy: The ImmutabilityPolicy property of the + container. + :vartype immutability_policy: + ~azure.mgmt.storage.v2018_03_01_preview.models.ImmutabilityPolicyProperties + :ivar legal_hold: The LegalHold property of the container. + :vartype legal_hold: + ~azure.mgmt.storage.v2018_03_01_preview.models.LegalHoldProperties + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :ivar has_immutability_policy: The hasImmutabilityPolicy public property + is set to true by SRP if ImmutabilityPolicy has been created for this + container. The hasImmutabilityPolicy public property is set to false by + SRP if ImmutabilityPolicy has not been created for this container. + :vartype has_immutability_policy: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'lease_status': {'readonly': True}, + 'lease_state': {'readonly': True}, + 'lease_duration': {'readonly': True}, + 'immutability_policy': {'readonly': True}, + 'legal_hold': {'readonly': True}, + 'has_legal_hold': {'readonly': True}, + 'has_immutability_policy': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'public_access': {'key': 'properties.publicAccess', 'type': 'PublicAccess'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'lease_status': {'key': 'properties.leaseStatus', 'type': 'str'}, + 'lease_state': {'key': 'properties.leaseState', 'type': 'str'}, + 'lease_duration': {'key': 'properties.leaseDuration', 'type': 'str'}, + 'metadata': {'key': 'properties.metadata', 'type': '{str}'}, + 'immutability_policy': {'key': 'properties.immutabilityPolicy', 'type': 'ImmutabilityPolicyProperties'}, + 'legal_hold': {'key': 'properties.legalHold', 'type': 'LegalHoldProperties'}, + 'has_legal_hold': {'key': 'properties.hasLegalHold', 'type': 'bool'}, + 'has_immutability_policy': {'key': 'properties.hasImmutabilityPolicy', 'type': 'bool'}, + } + + def __init__(self, *, public_access=None, metadata=None, **kwargs) -> None: + super(ListContainerItem, self).__init__(**kwargs) + self.public_access = public_access + self.last_modified_time = None + self.lease_status = None + self.lease_state = None + self.lease_duration = None + self.metadata = metadata + self.immutability_policy = None + self.legal_hold = None + self.has_legal_hold = None + self.has_immutability_policy = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_container_items.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_container_items.py new file mode 100644 index 000000000000..34cf699feaf6 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_container_items.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListContainerItems(Model): + """The list of blob containers. + + :param value: The list of blob containers. + :type value: + list[~azure.mgmt.storage.v2018_03_01_preview.models.ListContainerItem] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ListContainerItem]'}, + } + + def __init__(self, **kwargs): + super(ListContainerItems, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_container_items_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_container_items_py3.py new file mode 100644 index 000000000000..99bb2bcb0e5f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_container_items_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListContainerItems(Model): + """The list of blob containers. + + :param value: The list of blob containers. + :type value: + list[~azure.mgmt.storage.v2018_03_01_preview.models.ListContainerItem] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ListContainerItem]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(ListContainerItems, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_service_sas_response.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_service_sas_response.py new file mode 100644 index 000000000000..800c0298af61 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_service_sas_response.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListServiceSasResponse(Model): + """The List service SAS credentials operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_sas_token: List service SAS credentials of speicific + resource. + :vartype service_sas_token: str + """ + + _validation = { + 'service_sas_token': {'readonly': True}, + } + + _attribute_map = { + 'service_sas_token': {'key': 'serviceSasToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ListServiceSasResponse, self).__init__(**kwargs) + self.service_sas_token = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_service_sas_response_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_service_sas_response_py3.py new file mode 100644 index 000000000000..cffd962e2041 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/list_service_sas_response_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListServiceSasResponse(Model): + """The List service SAS credentials operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_sas_token: List service SAS credentials of speicific + resource. + :vartype service_sas_token: str + """ + + _validation = { + 'service_sas_token': {'readonly': True}, + } + + _attribute_map = { + 'service_sas_token': {'key': 'serviceSasToken', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ListServiceSasResponse, self).__init__(**kwargs) + self.service_sas_token = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/management_policies_rules_set_parameter.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/management_policies_rules_set_parameter.py new file mode 100644 index 000000000000..c814a5b9391f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/management_policies_rules_set_parameter.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPoliciesRulesSetParameter(Model): + """The Storage Account ManagementPolicies Rules, in JSON format. See more + details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + + :param policy: The Storage Account ManagementPolicies Rules, in JSON + format. See more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + :type policy: object + """ + + _attribute_map = { + 'policy': {'key': 'properties.policy', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ManagementPoliciesRulesSetParameter, self).__init__(**kwargs) + self.policy = kwargs.get('policy', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/management_policies_rules_set_parameter_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/management_policies_rules_set_parameter_py3.py new file mode 100644 index 000000000000..7fb665877844 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/management_policies_rules_set_parameter_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPoliciesRulesSetParameter(Model): + """The Storage Account ManagementPolicies Rules, in JSON format. See more + details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + + :param policy: The Storage Account ManagementPolicies Rules, in JSON + format. See more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + :type policy: object + """ + + _attribute_map = { + 'policy': {'key': 'properties.policy', 'type': 'object'}, + } + + def __init__(self, *, policy=None, **kwargs) -> None: + super(ManagementPoliciesRulesSetParameter, self).__init__(**kwargs) + self.policy = policy diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/metric_specification.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/metric_specification.py new file mode 100644 index 000000000000..34c2fe591d18 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/metric_specification.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricSpecification(Model): + """Metric specification of operation. + + :param name: Name of metric specification. + :type name: str + :param display_name: Display name of metric specification. + :type display_name: str + :param display_description: Display description of metric specification. + :type display_description: str + :param unit: Unit could be Bytes or Count. + :type unit: str + :param dimensions: Dimensions of blobs, including blob type and access + tier. + :type dimensions: + list[~azure.mgmt.storage.v2018_03_01_preview.models.Dimension] + :param aggregation_type: Aggregation type could be Average. + :type aggregation_type: str + :param fill_gap_with_zero: The property to decide fill gap with zero or + not. + :type fill_gap_with_zero: bool + :param category: The category this metric specification belong to, could + be Capacity. + :type category: str + :param resource_id_dimension_name_override: Account Resource Id. + :type resource_id_dimension_name_override: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'category': {'key': 'category', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.display_description = kwargs.get('display_description', None) + self.unit = kwargs.get('unit', None) + self.dimensions = kwargs.get('dimensions', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) + self.category = kwargs.get('category', None) + self.resource_id_dimension_name_override = kwargs.get('resource_id_dimension_name_override', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/metric_specification_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/metric_specification_py3.py new file mode 100644 index 000000000000..33704d9da324 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/metric_specification_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricSpecification(Model): + """Metric specification of operation. + + :param name: Name of metric specification. + :type name: str + :param display_name: Display name of metric specification. + :type display_name: str + :param display_description: Display description of metric specification. + :type display_description: str + :param unit: Unit could be Bytes or Count. + :type unit: str + :param dimensions: Dimensions of blobs, including blob type and access + tier. + :type dimensions: + list[~azure.mgmt.storage.v2018_03_01_preview.models.Dimension] + :param aggregation_type: Aggregation type could be Average. + :type aggregation_type: str + :param fill_gap_with_zero: The property to decide fill gap with zero or + not. + :type fill_gap_with_zero: bool + :param category: The category this metric specification belong to, could + be Capacity. + :type category: str + :param resource_id_dimension_name_override: Account Resource Id. + :type resource_id_dimension_name_override: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'category': {'key': 'category', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, dimensions=None, aggregation_type: str=None, fill_gap_with_zero: bool=None, category: str=None, resource_id_dimension_name_override: str=None, **kwargs) -> None: + super(MetricSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.dimensions = dimensions + self.aggregation_type = aggregation_type + self.fill_gap_with_zero = fill_gap_with_zero + self.category = category + self.resource_id_dimension_name_override = resource_id_dimension_name_override diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/network_rule_set.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/network_rule_set.py new file mode 100644 index 000000000000..803725178c81 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/network_rule_set.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkRuleSet(Model): + """Network rule set. + + All required parameters must be populated in order to send to Azure. + + :param bypass: Specifies whether traffic is bypassed for + Logging/Metrics/AzureServices. Possible values are any combination of + Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None + to bypass none of those traffics. Possible values include: 'None', + 'Logging', 'Metrics', 'AzureServices'. Default value: "AzureServices" . + :type bypass: str or ~azure.mgmt.storage.v2018_03_01_preview.models.Bypass + :param virtual_network_rules: Sets the virtual network rules + :type virtual_network_rules: + list[~azure.mgmt.storage.v2018_03_01_preview.models.VirtualNetworkRule] + :param ip_rules: Sets the IP ACL rules + :type ip_rules: + list[~azure.mgmt.storage.v2018_03_01_preview.models.IPRule] + :param default_action: Required. Specifies the default action of allow or + deny when no other rules match. Possible values include: 'Allow', 'Deny'. + Default value: "Allow" . + :type default_action: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.DefaultAction + """ + + _validation = { + 'default_action': {'required': True}, + } + + _attribute_map = { + 'bypass': {'key': 'bypass', 'type': 'str'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'}, + 'default_action': {'key': 'defaultAction', 'type': 'DefaultAction'}, + } + + def __init__(self, **kwargs): + super(NetworkRuleSet, self).__init__(**kwargs) + self.bypass = kwargs.get('bypass', "AzureServices") + self.virtual_network_rules = kwargs.get('virtual_network_rules', None) + self.ip_rules = kwargs.get('ip_rules', None) + self.default_action = kwargs.get('default_action', "Allow") diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/network_rule_set_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/network_rule_set_py3.py new file mode 100644 index 000000000000..9c455a986759 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/network_rule_set_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkRuleSet(Model): + """Network rule set. + + All required parameters must be populated in order to send to Azure. + + :param bypass: Specifies whether traffic is bypassed for + Logging/Metrics/AzureServices. Possible values are any combination of + Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None + to bypass none of those traffics. Possible values include: 'None', + 'Logging', 'Metrics', 'AzureServices'. Default value: "AzureServices" . + :type bypass: str or ~azure.mgmt.storage.v2018_03_01_preview.models.Bypass + :param virtual_network_rules: Sets the virtual network rules + :type virtual_network_rules: + list[~azure.mgmt.storage.v2018_03_01_preview.models.VirtualNetworkRule] + :param ip_rules: Sets the IP ACL rules + :type ip_rules: + list[~azure.mgmt.storage.v2018_03_01_preview.models.IPRule] + :param default_action: Required. Specifies the default action of allow or + deny when no other rules match. Possible values include: 'Allow', 'Deny'. + Default value: "Allow" . + :type default_action: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.DefaultAction + """ + + _validation = { + 'default_action': {'required': True}, + } + + _attribute_map = { + 'bypass': {'key': 'bypass', 'type': 'str'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'}, + 'default_action': {'key': 'defaultAction', 'type': 'DefaultAction'}, + } + + def __init__(self, *, bypass="AzureServices", virtual_network_rules=None, ip_rules=None, default_action="Allow", **kwargs) -> None: + super(NetworkRuleSet, self).__init__(**kwargs) + self.bypass = bypass + self.virtual_network_rules = virtual_network_rules + self.ip_rules = ip_rules + self.default_action = default_action diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/operation.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/operation.py new file mode 100644 index 000000000000..414b1e14671c --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/operation.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Storage REST API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: + ~azure.mgmt.storage.v2018_03_01_preview.models.OperationDisplay + :param origin: The origin of operations. + :type origin: str + :param service_specification: One property of operation, include metric + specifications. + :type service_specification: + ~azure.mgmt.storage.v2018_03_01_preview.models.ServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.service_specification = kwargs.get('service_specification', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/operation_display.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/operation_display.py new file mode 100644 index 000000000000..12d72186c4f2 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/operation_display.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft Storage. + :type provider: str + :param resource: Resource on which the operation is performed etc. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/operation_display_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/operation_display_py3.py new file mode 100644 index 000000000000..632a6393c99f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/operation_display_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft Storage. + :type provider: str + :param resource: Resource on which the operation is performed etc. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/operation_paged.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/operation_paged.py new file mode 100644 index 000000000000..78bb839cc067 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/operation_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/operation_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/operation_py3.py new file mode 100644 index 000000000000..e916d274b9ab --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/operation_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Storage REST API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: + ~azure.mgmt.storage.v2018_03_01_preview.models.OperationDisplay + :param origin: The origin of operations. + :type origin: str + :param service_specification: One property of operation, include metric + specifications. + :type service_specification: + ~azure.mgmt.storage.v2018_03_01_preview.models.ServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, service_specification=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.service_specification = service_specification diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/proxy_resource.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/proxy_resource.py new file mode 100644 index 000000000000..0de8fb6bd420 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/proxy_resource.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/proxy_resource_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/proxy_resource_py3.py new file mode 100644 index 000000000000..2e8391f912d6 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/proxy_resource_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/resource.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/resource.py new file mode 100644 index 000000000000..9333a2ac49ef --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/resource.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/resource_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/resource_py3.py new file mode 100644 index 000000000000..370e6c506581 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/resource_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/restriction.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/restriction.py new file mode 100644 index 000000000000..68f70bfe33d8 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/restriction.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Restriction(Model): + """The restriction because of which SKU cannot be used. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. As of now only possible value for + this is location. + :vartype type: str + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :param reason_code: The reason for the restriction. As of now this can be + “QuotaId” or “NotAvailableForSubscription”. Quota Id is set when the SKU + has requiredQuotas parameter as the subscription does not belong to that + quota. The “NotAvailableForSubscription” is related to capacity at DC. + Possible values include: 'QuotaId', 'NotAvailableForSubscription' + :type reason_code: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.ReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Restriction, self).__init__(**kwargs) + self.type = None + self.values = None + self.reason_code = kwargs.get('reason_code', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/restriction_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/restriction_py3.py new file mode 100644 index 000000000000..02d8fda6fd96 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/restriction_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Restriction(Model): + """The restriction because of which SKU cannot be used. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. As of now only possible value for + this is location. + :vartype type: str + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :param reason_code: The reason for the restriction. As of now this can be + “QuotaId” or “NotAvailableForSubscription”. Quota Id is set when the SKU + has requiredQuotas parameter as the subscription does not belong to that + quota. The “NotAvailableForSubscription” is related to capacity at DC. + Possible values include: 'QuotaId', 'NotAvailableForSubscription' + :type reason_code: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.ReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__(self, *, reason_code=None, **kwargs) -> None: + super(Restriction, self).__init__(**kwargs) + self.type = None + self.values = None + self.reason_code = reason_code diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/service_sas_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/service_sas_parameters.py new file mode 100644 index 000000000000..736424ddc9c3 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/service_sas_parameters.py @@ -0,0 +1,121 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceSasParameters(Model): + """The parameters to list service SAS credentials of a speicific resource. + + All required parameters must be populated in order to send to Azure. + + :param canonicalized_resource: Required. The canonical path to the signed + resource. + :type canonicalized_resource: str + :param resource: Required. The signed services accessible with the service + SAS. Possible values include: Blob (b), Container (c), File (f), Share + (s). Possible values include: 'b', 'c', 'f', 's' + :type resource: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.SignedResource + :param permissions: The signed permissions for the service SAS. Possible + values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create + (c), Update (u) and Process (p). Possible values include: 'r', 'd', 'w', + 'l', 'a', 'c', 'u', 'p' + :type permissions: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.Permissions + :param ip_address_or_range: An IP address or a range of IP addresses from + which to accept requests. + :type ip_address_or_range: str + :param protocols: The protocol permitted for a request made with the + account SAS. Possible values include: 'https,http', 'https' + :type protocols: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.HttpProtocol + :param shared_access_start_time: The time at which the SAS becomes valid. + :type shared_access_start_time: datetime + :param shared_access_expiry_time: The time at which the shared access + signature becomes invalid. + :type shared_access_expiry_time: datetime + :param identifier: A unique value up to 64 characters in length that + correlates to an access policy specified for the container, queue, or + table. + :type identifier: str + :param partition_key_start: The start of partition key. + :type partition_key_start: str + :param partition_key_end: The end of partition key. + :type partition_key_end: str + :param row_key_start: The start of row key. + :type row_key_start: str + :param row_key_end: The end of row key. + :type row_key_end: str + :param key_to_sign: The key to sign the account SAS token with. + :type key_to_sign: str + :param cache_control: The response header override for cache control. + :type cache_control: str + :param content_disposition: The response header override for content + disposition. + :type content_disposition: str + :param content_encoding: The response header override for content + encoding. + :type content_encoding: str + :param content_language: The response header override for content + language. + :type content_language: str + :param content_type: The response header override for content type. + :type content_type: str + """ + + _validation = { + 'canonicalized_resource': {'required': True}, + 'resource': {'required': True}, + 'identifier': {'max_length': 64}, + } + + _attribute_map = { + 'canonicalized_resource': {'key': 'canonicalizedResource', 'type': 'str'}, + 'resource': {'key': 'signedResource', 'type': 'str'}, + 'permissions': {'key': 'signedPermission', 'type': 'str'}, + 'ip_address_or_range': {'key': 'signedIp', 'type': 'str'}, + 'protocols': {'key': 'signedProtocol', 'type': 'HttpProtocol'}, + 'shared_access_start_time': {'key': 'signedStart', 'type': 'iso-8601'}, + 'shared_access_expiry_time': {'key': 'signedExpiry', 'type': 'iso-8601'}, + 'identifier': {'key': 'signedIdentifier', 'type': 'str'}, + 'partition_key_start': {'key': 'startPk', 'type': 'str'}, + 'partition_key_end': {'key': 'endPk', 'type': 'str'}, + 'row_key_start': {'key': 'startRk', 'type': 'str'}, + 'row_key_end': {'key': 'endRk', 'type': 'str'}, + 'key_to_sign': {'key': 'keyToSign', 'type': 'str'}, + 'cache_control': {'key': 'rscc', 'type': 'str'}, + 'content_disposition': {'key': 'rscd', 'type': 'str'}, + 'content_encoding': {'key': 'rsce', 'type': 'str'}, + 'content_language': {'key': 'rscl', 'type': 'str'}, + 'content_type': {'key': 'rsct', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceSasParameters, self).__init__(**kwargs) + self.canonicalized_resource = kwargs.get('canonicalized_resource', None) + self.resource = kwargs.get('resource', None) + self.permissions = kwargs.get('permissions', None) + self.ip_address_or_range = kwargs.get('ip_address_or_range', None) + self.protocols = kwargs.get('protocols', None) + self.shared_access_start_time = kwargs.get('shared_access_start_time', None) + self.shared_access_expiry_time = kwargs.get('shared_access_expiry_time', None) + self.identifier = kwargs.get('identifier', None) + self.partition_key_start = kwargs.get('partition_key_start', None) + self.partition_key_end = kwargs.get('partition_key_end', None) + self.row_key_start = kwargs.get('row_key_start', None) + self.row_key_end = kwargs.get('row_key_end', None) + self.key_to_sign = kwargs.get('key_to_sign', None) + self.cache_control = kwargs.get('cache_control', None) + self.content_disposition = kwargs.get('content_disposition', None) + self.content_encoding = kwargs.get('content_encoding', None) + self.content_language = kwargs.get('content_language', None) + self.content_type = kwargs.get('content_type', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/service_sas_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/service_sas_parameters_py3.py new file mode 100644 index 000000000000..e1bc7bc90e0e --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/service_sas_parameters_py3.py @@ -0,0 +1,121 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceSasParameters(Model): + """The parameters to list service SAS credentials of a speicific resource. + + All required parameters must be populated in order to send to Azure. + + :param canonicalized_resource: Required. The canonical path to the signed + resource. + :type canonicalized_resource: str + :param resource: Required. The signed services accessible with the service + SAS. Possible values include: Blob (b), Container (c), File (f), Share + (s). Possible values include: 'b', 'c', 'f', 's' + :type resource: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.SignedResource + :param permissions: The signed permissions for the service SAS. Possible + values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create + (c), Update (u) and Process (p). Possible values include: 'r', 'd', 'w', + 'l', 'a', 'c', 'u', 'p' + :type permissions: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.Permissions + :param ip_address_or_range: An IP address or a range of IP addresses from + which to accept requests. + :type ip_address_or_range: str + :param protocols: The protocol permitted for a request made with the + account SAS. Possible values include: 'https,http', 'https' + :type protocols: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.HttpProtocol + :param shared_access_start_time: The time at which the SAS becomes valid. + :type shared_access_start_time: datetime + :param shared_access_expiry_time: The time at which the shared access + signature becomes invalid. + :type shared_access_expiry_time: datetime + :param identifier: A unique value up to 64 characters in length that + correlates to an access policy specified for the container, queue, or + table. + :type identifier: str + :param partition_key_start: The start of partition key. + :type partition_key_start: str + :param partition_key_end: The end of partition key. + :type partition_key_end: str + :param row_key_start: The start of row key. + :type row_key_start: str + :param row_key_end: The end of row key. + :type row_key_end: str + :param key_to_sign: The key to sign the account SAS token with. + :type key_to_sign: str + :param cache_control: The response header override for cache control. + :type cache_control: str + :param content_disposition: The response header override for content + disposition. + :type content_disposition: str + :param content_encoding: The response header override for content + encoding. + :type content_encoding: str + :param content_language: The response header override for content + language. + :type content_language: str + :param content_type: The response header override for content type. + :type content_type: str + """ + + _validation = { + 'canonicalized_resource': {'required': True}, + 'resource': {'required': True}, + 'identifier': {'max_length': 64}, + } + + _attribute_map = { + 'canonicalized_resource': {'key': 'canonicalizedResource', 'type': 'str'}, + 'resource': {'key': 'signedResource', 'type': 'str'}, + 'permissions': {'key': 'signedPermission', 'type': 'str'}, + 'ip_address_or_range': {'key': 'signedIp', 'type': 'str'}, + 'protocols': {'key': 'signedProtocol', 'type': 'HttpProtocol'}, + 'shared_access_start_time': {'key': 'signedStart', 'type': 'iso-8601'}, + 'shared_access_expiry_time': {'key': 'signedExpiry', 'type': 'iso-8601'}, + 'identifier': {'key': 'signedIdentifier', 'type': 'str'}, + 'partition_key_start': {'key': 'startPk', 'type': 'str'}, + 'partition_key_end': {'key': 'endPk', 'type': 'str'}, + 'row_key_start': {'key': 'startRk', 'type': 'str'}, + 'row_key_end': {'key': 'endRk', 'type': 'str'}, + 'key_to_sign': {'key': 'keyToSign', 'type': 'str'}, + 'cache_control': {'key': 'rscc', 'type': 'str'}, + 'content_disposition': {'key': 'rscd', 'type': 'str'}, + 'content_encoding': {'key': 'rsce', 'type': 'str'}, + 'content_language': {'key': 'rscl', 'type': 'str'}, + 'content_type': {'key': 'rsct', 'type': 'str'}, + } + + def __init__(self, *, canonicalized_resource: str, resource, permissions=None, ip_address_or_range: str=None, protocols=None, shared_access_start_time=None, shared_access_expiry_time=None, identifier: str=None, partition_key_start: str=None, partition_key_end: str=None, row_key_start: str=None, row_key_end: str=None, key_to_sign: str=None, cache_control: str=None, content_disposition: str=None, content_encoding: str=None, content_language: str=None, content_type: str=None, **kwargs) -> None: + super(ServiceSasParameters, self).__init__(**kwargs) + self.canonicalized_resource = canonicalized_resource + self.resource = resource + self.permissions = permissions + self.ip_address_or_range = ip_address_or_range + self.protocols = protocols + self.shared_access_start_time = shared_access_start_time + self.shared_access_expiry_time = shared_access_expiry_time + self.identifier = identifier + self.partition_key_start = partition_key_start + self.partition_key_end = partition_key_end + self.row_key_start = row_key_start + self.row_key_end = row_key_end + self.key_to_sign = key_to_sign + self.cache_control = cache_control + self.content_disposition = content_disposition + self.content_encoding = content_encoding + self.content_language = content_language + self.content_type = content_type diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/service_specification.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/service_specification.py new file mode 100644 index 000000000000..f0221d7d9f0d --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/service_specification.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceSpecification(Model): + """One property of operation, include metric specifications. + + :param metric_specifications: Metric specifications of operation. + :type metric_specifications: + list[~azure.mgmt.storage.v2018_03_01_preview.models.MetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, **kwargs): + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_specifications', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/service_specification_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/service_specification_py3.py new file mode 100644 index 000000000000..a0447d578365 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/service_specification_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceSpecification(Model): + """One property of operation, include metric specifications. + + :param metric_specifications: Metric specifications of operation. + :type metric_specifications: + list[~azure.mgmt.storage.v2018_03_01_preview.models.MetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, *, metric_specifications=None, **kwargs) -> None: + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = metric_specifications diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/sku.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/sku.py new file mode 100644 index 000000000000..4acb2cabee52 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/sku.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """The SKU of the storage account. + + 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 name: Required. Gets or sets the sku name. Required for account + creation; optional for update. Note that in older versions, sku name was + called accountType. Possible values include: 'Standard_LRS', + 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS' + :type name: str or ~azure.mgmt.storage.v2018_03_01_preview.models.SkuName + :ivar tier: Gets the sku tier. This is based on the SKU name. Possible + values include: 'Standard', 'Premium' + :vartype tier: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.SkuTier + :ivar resource_type: The type of the resource, usually it is + 'storageAccounts'. + :vartype resource_type: str + :ivar kind: Indicates the type of storage account. Possible values + include: 'Storage', 'StorageV2', 'BlobStorage' + :vartype kind: str or ~azure.mgmt.storage.v2018_03_01_preview.models.Kind + :ivar locations: The set of locations that the SKU is available. This will + be supported and registered Azure Geo Regions (e.g. West US, East US, + Southeast Asia, etc.). + :vartype locations: list[str] + :ivar capabilities: The capability information in the specified sku, + including file encryption, network acls, change notification, etc. + :vartype capabilities: + list[~azure.mgmt.storage.v2018_03_01_preview.models.SKUCapability] + :param restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :type restrictions: + list[~azure.mgmt.storage.v2018_03_01_preview.models.Restriction] + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'locations': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuName'}, + 'tier': {'key': 'tier', 'type': 'SkuTier'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'}, + 'restrictions': {'key': 'restrictions', 'type': '[Restriction]'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = None + self.resource_type = None + self.kind = None + self.locations = None + self.capabilities = None + self.restrictions = kwargs.get('restrictions', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/sku_capability.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/sku_capability.py new file mode 100644 index 000000000000..b8fa68ce7778 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/sku_capability.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SKUCapability(Model): + """The capability information in the specified sku, including file encryption, + network acls, change notification, etc. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of capability, The capability information in the + specified sku, including file encryption, network acls, change + notification, etc. + :vartype name: str + :ivar value: A string value to indicate states of given capability. + Possibly 'true' or 'false'. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SKUCapability, self).__init__(**kwargs) + self.name = None + self.value = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/sku_capability_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/sku_capability_py3.py new file mode 100644 index 000000000000..f349a08eda21 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/sku_capability_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SKUCapability(Model): + """The capability information in the specified sku, including file encryption, + network acls, change notification, etc. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of capability, The capability information in the + specified sku, including file encryption, network acls, change + notification, etc. + :vartype name: str + :ivar value: A string value to indicate states of given capability. + Possibly 'true' or 'false'. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SKUCapability, self).__init__(**kwargs) + self.name = None + self.value = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/sku_paged.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/sku_paged.py new file mode 100644 index 000000000000..f15c72443a27 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/sku_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class SkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`Sku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Sku]'} + } + + def __init__(self, *args, **kwargs): + + super(SkuPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/sku_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/sku_py3.py new file mode 100644 index 000000000000..ab98d7b85f74 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/sku_py3.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """The SKU of the storage account. + + 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 name: Required. Gets or sets the sku name. Required for account + creation; optional for update. Note that in older versions, sku name was + called accountType. Possible values include: 'Standard_LRS', + 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS' + :type name: str or ~azure.mgmt.storage.v2018_03_01_preview.models.SkuName + :ivar tier: Gets the sku tier. This is based on the SKU name. Possible + values include: 'Standard', 'Premium' + :vartype tier: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.SkuTier + :ivar resource_type: The type of the resource, usually it is + 'storageAccounts'. + :vartype resource_type: str + :ivar kind: Indicates the type of storage account. Possible values + include: 'Storage', 'StorageV2', 'BlobStorage' + :vartype kind: str or ~azure.mgmt.storage.v2018_03_01_preview.models.Kind + :ivar locations: The set of locations that the SKU is available. This will + be supported and registered Azure Geo Regions (e.g. West US, East US, + Southeast Asia, etc.). + :vartype locations: list[str] + :ivar capabilities: The capability information in the specified sku, + including file encryption, network acls, change notification, etc. + :vartype capabilities: + list[~azure.mgmt.storage.v2018_03_01_preview.models.SKUCapability] + :param restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :type restrictions: + list[~azure.mgmt.storage.v2018_03_01_preview.models.Restriction] + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'locations': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuName'}, + 'tier': {'key': 'tier', 'type': 'SkuTier'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'}, + 'restrictions': {'key': 'restrictions', 'type': '[Restriction]'}, + } + + def __init__(self, *, name, restrictions=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = None + self.resource_type = None + self.kind = None + self.locations = None + self.capabilities = None + self.restrictions = restrictions diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account.py new file mode 100644 index 000000000000..a0149cce35d8 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account.py @@ -0,0 +1,170 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource import TrackedResource + + +class StorageAccount(TrackedResource): + """The storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :ivar sku: Gets the SKU. + :vartype sku: ~azure.mgmt.storage.v2018_03_01_preview.models.Sku + :ivar kind: Gets the Kind. Possible values include: 'Storage', + 'StorageV2', 'BlobStorage' + :vartype kind: str or ~azure.mgmt.storage.v2018_03_01_preview.models.Kind + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2018_03_01_preview.models.Identity + :ivar provisioning_state: Gets the status of the storage account at the + time the operation was called. Possible values include: 'Creating', + 'ResolvingDNS', 'Succeeded' + :vartype provisioning_state: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.ProvisioningState + :ivar primary_endpoints: Gets the URLs that are used to perform a + retrieval of a public blob, queue, or table object. Note that Standard_ZRS + and Premium_LRS accounts only return the blob endpoint. + :vartype primary_endpoints: + ~azure.mgmt.storage.v2018_03_01_preview.models.Endpoints + :ivar primary_location: Gets the location of the primary data center for + the storage account. + :vartype primary_location: str + :ivar status_of_primary: Gets the status indicating whether the primary + location of the storage account is available or unavailable. Possible + values include: 'available', 'unavailable' + :vartype status_of_primary: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.AccountStatus + :ivar last_geo_failover_time: Gets the timestamp of the most recent + instance of a failover to the secondary location. Only the most recent + timestamp is retained. This element is not returned if there has never + been a failover instance. Only available if the accountType is + Standard_GRS or Standard_RAGRS. + :vartype last_geo_failover_time: datetime + :ivar secondary_location: Gets the location of the geo-replicated + secondary for the storage account. Only available if the accountType is + Standard_GRS or Standard_RAGRS. + :vartype secondary_location: str + :ivar status_of_secondary: Gets the status indicating whether the + secondary location of the storage account is available or unavailable. + Only available if the SKU name is Standard_GRS or Standard_RAGRS. Possible + values include: 'available', 'unavailable' + :vartype status_of_secondary: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.AccountStatus + :ivar creation_time: Gets the creation date and time of the storage + account in UTC. + :vartype creation_time: datetime + :ivar custom_domain: Gets the custom domain the user assigned to this + storage account. + :vartype custom_domain: + ~azure.mgmt.storage.v2018_03_01_preview.models.CustomDomain + :ivar secondary_endpoints: Gets the URLs that are used to perform a + retrieval of a public blob, queue, or table object from the secondary + location of the storage account. Only available if the SKU name is + Standard_RAGRS. + :vartype secondary_endpoints: + ~azure.mgmt.storage.v2018_03_01_preview.models.Endpoints + :ivar encryption: Gets the encryption settings on the account. If + unspecified, the account is unencrypted. + :vartype encryption: + ~azure.mgmt.storage.v2018_03_01_preview.models.Encryption + :ivar access_tier: Required for storage accounts where kind = BlobStorage. + The access tier used for billing. Possible values include: 'Hot', 'Cool' + :vartype access_tier: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.AccessTier + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. Default value: False . + :type enable_https_traffic_only: bool + :ivar network_rule_set: Network rule set + :vartype network_rule_set: + ~azure.mgmt.storage.v2018_03_01_preview.models.NetworkRuleSet + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'readonly': True}, + 'kind': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'primary_endpoints': {'readonly': True}, + 'primary_location': {'readonly': True}, + 'status_of_primary': {'readonly': True}, + 'last_geo_failover_time': {'readonly': True}, + 'secondary_location': {'readonly': True}, + 'status_of_secondary': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'custom_domain': {'readonly': True}, + 'secondary_endpoints': {'readonly': True}, + 'encryption': {'readonly': True}, + 'access_tier': {'readonly': True}, + 'network_rule_set': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'primary_endpoints': {'key': 'properties.primaryEndpoints', 'type': 'Endpoints'}, + 'primary_location': {'key': 'properties.primaryLocation', 'type': 'str'}, + 'status_of_primary': {'key': 'properties.statusOfPrimary', 'type': 'AccountStatus'}, + 'last_geo_failover_time': {'key': 'properties.lastGeoFailoverTime', 'type': 'iso-8601'}, + 'secondary_location': {'key': 'properties.secondaryLocation', 'type': 'str'}, + 'status_of_secondary': {'key': 'properties.statusOfSecondary', 'type': 'AccountStatus'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'secondary_endpoints': {'key': 'properties.secondaryEndpoints', 'type': 'Endpoints'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + } + + def __init__(self, **kwargs): + super(StorageAccount, self).__init__(**kwargs) + self.sku = None + self.kind = None + self.identity = kwargs.get('identity', None) + self.provisioning_state = None + self.primary_endpoints = None + self.primary_location = None + self.status_of_primary = None + self.last_geo_failover_time = None + self.secondary_location = None + self.status_of_secondary = None + self.creation_time = None + self.custom_domain = None + self.secondary_endpoints = None + self.encryption = None + self.access_tier = None + self.enable_https_traffic_only = kwargs.get('enable_https_traffic_only', False) + self.network_rule_set = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_check_name_availability_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_check_name_availability_parameters.py new file mode 100644 index 000000000000..42cf88a074a0 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_check_name_availability_parameters.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountCheckNameAvailabilityParameters(Model): + """The parameters used to check the availabity of the storage account name. + + 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 name: Required. The storage account name. + :type name: str + :ivar type: Required. The type of resource, + Microsoft.Storage/storageAccounts. Default value: + "Microsoft.Storage/storageAccounts" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Storage/storageAccounts" + + def __init__(self, **kwargs): + super(StorageAccountCheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_check_name_availability_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_check_name_availability_parameters_py3.py new file mode 100644 index 000000000000..e6f50a456902 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_check_name_availability_parameters_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountCheckNameAvailabilityParameters(Model): + """The parameters used to check the availabity of the storage account name. + + 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 name: Required. The storage account name. + :type name: str + :ivar type: Required. The type of resource, + Microsoft.Storage/storageAccounts. Default value: + "Microsoft.Storage/storageAccounts" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Storage/storageAccounts" + + def __init__(self, *, name: str, **kwargs) -> None: + super(StorageAccountCheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_create_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_create_parameters.py new file mode 100644 index 000000000000..a0d483df316a --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_create_parameters.py @@ -0,0 +1,93 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountCreateParameters(Model): + """The parameters used when creating a storage account. + + All required parameters must be populated in order to send to Azure. + + :param sku: Required. Required. Gets or sets the sku name. + :type sku: ~azure.mgmt.storage.v2018_03_01_preview.models.Sku + :param kind: Required. Required. Indicates the type of storage account. + Possible values include: 'Storage', 'StorageV2', 'BlobStorage' + :type kind: str or ~azure.mgmt.storage.v2018_03_01_preview.models.Kind + :param location: Required. Required. Gets or sets the location of the + resource. This will be one of the supported and registered Azure Geo + Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + resource cannot be changed once it is created, but if an identical geo + region is specified on update, the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used for viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key with a length no greater than 128 + characters and a value with a length no greater than 256 characters. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2018_03_01_preview.models.Identity + :param custom_domain: User domain assigned to the storage account. Name is + the CNAME source. Only one custom domain is supported per storage account + at this time. To clear the existing custom domain, use an empty string for + the custom domain name property. + :type custom_domain: + ~azure.mgmt.storage.v2018_03_01_preview.models.CustomDomain + :param encryption: Provides the encryption settings on the account. If + left unspecified the account encryption settings will remain the same. The + default setting is unencrypted. + :type encryption: + ~azure.mgmt.storage.v2018_03_01_preview.models.Encryption + :param network_rule_set: Network rule set + :type network_rule_set: + ~azure.mgmt.storage.v2018_03_01_preview.models.NetworkRuleSet + :param access_tier: Required for storage accounts where kind = + BlobStorage. The access tier used for billing. Possible values include: + 'Hot', 'Cool' + :type access_tier: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.AccessTier + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. Default value: False . + :type enable_https_traffic_only: bool + """ + + _validation = { + 'sku': {'required': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(StorageAccountCreateParameters, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.kind = kwargs.get('kind', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + self.custom_domain = kwargs.get('custom_domain', None) + self.encryption = kwargs.get('encryption', None) + self.network_rule_set = kwargs.get('network_rule_set', None) + self.access_tier = kwargs.get('access_tier', None) + self.enable_https_traffic_only = kwargs.get('enable_https_traffic_only', False) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_create_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_create_parameters_py3.py new file mode 100644 index 000000000000..79946d658426 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_create_parameters_py3.py @@ -0,0 +1,93 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountCreateParameters(Model): + """The parameters used when creating a storage account. + + All required parameters must be populated in order to send to Azure. + + :param sku: Required. Required. Gets or sets the sku name. + :type sku: ~azure.mgmt.storage.v2018_03_01_preview.models.Sku + :param kind: Required. Required. Indicates the type of storage account. + Possible values include: 'Storage', 'StorageV2', 'BlobStorage' + :type kind: str or ~azure.mgmt.storage.v2018_03_01_preview.models.Kind + :param location: Required. Required. Gets or sets the location of the + resource. This will be one of the supported and registered Azure Geo + Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + resource cannot be changed once it is created, but if an identical geo + region is specified on update, the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used for viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key with a length no greater than 128 + characters and a value with a length no greater than 256 characters. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2018_03_01_preview.models.Identity + :param custom_domain: User domain assigned to the storage account. Name is + the CNAME source. Only one custom domain is supported per storage account + at this time. To clear the existing custom domain, use an empty string for + the custom domain name property. + :type custom_domain: + ~azure.mgmt.storage.v2018_03_01_preview.models.CustomDomain + :param encryption: Provides the encryption settings on the account. If + left unspecified the account encryption settings will remain the same. The + default setting is unencrypted. + :type encryption: + ~azure.mgmt.storage.v2018_03_01_preview.models.Encryption + :param network_rule_set: Network rule set + :type network_rule_set: + ~azure.mgmt.storage.v2018_03_01_preview.models.NetworkRuleSet + :param access_tier: Required for storage accounts where kind = + BlobStorage. The access tier used for billing. Possible values include: + 'Hot', 'Cool' + :type access_tier: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.AccessTier + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. Default value: False . + :type enable_https_traffic_only: bool + """ + + _validation = { + 'sku': {'required': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + } + + def __init__(self, *, sku, kind, location: str, tags=None, identity=None, custom_domain=None, encryption=None, network_rule_set=None, access_tier=None, enable_https_traffic_only: bool=False, **kwargs) -> None: + super(StorageAccountCreateParameters, self).__init__(**kwargs) + self.sku = sku + self.kind = kind + self.location = location + self.tags = tags + self.identity = identity + self.custom_domain = custom_domain + self.encryption = encryption + self.network_rule_set = network_rule_set + self.access_tier = access_tier + self.enable_https_traffic_only = enable_https_traffic_only diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_key.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_key.py new file mode 100644 index 000000000000..ed3a2995cf02 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_key.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountKey(Model): + """An access key for the storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar key_name: Name of the key. + :vartype key_name: str + :ivar value: Base 64-encoded value of the key. + :vartype value: str + :ivar permissions: Permissions for the key -- read-only or full + permissions. Possible values include: 'Read', 'Full' + :vartype permissions: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.KeyPermission + """ + + _validation = { + 'key_name': {'readonly': True}, + 'value': {'readonly': True}, + 'permissions': {'readonly': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'permissions': {'key': 'permissions', 'type': 'KeyPermission'}, + } + + def __init__(self, **kwargs): + super(StorageAccountKey, self).__init__(**kwargs) + self.key_name = None + self.value = None + self.permissions = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_key_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_key_py3.py new file mode 100644 index 000000000000..fa850882f1bb --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_key_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountKey(Model): + """An access key for the storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar key_name: Name of the key. + :vartype key_name: str + :ivar value: Base 64-encoded value of the key. + :vartype value: str + :ivar permissions: Permissions for the key -- read-only or full + permissions. Possible values include: 'Read', 'Full' + :vartype permissions: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.KeyPermission + """ + + _validation = { + 'key_name': {'readonly': True}, + 'value': {'readonly': True}, + 'permissions': {'readonly': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'permissions': {'key': 'permissions', 'type': 'KeyPermission'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageAccountKey, self).__init__(**kwargs) + self.key_name = None + self.value = None + self.permissions = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_list_keys_result.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_list_keys_result.py new file mode 100644 index 000000000000..4d56465c568c --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_list_keys_result.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountListKeysResult(Model): + """The response from the ListKeys operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar keys: Gets the list of storage account keys and their properties for + the specified storage account. + :vartype keys: + list[~azure.mgmt.storage.v2018_03_01_preview.models.StorageAccountKey] + """ + + _validation = { + 'keys': {'readonly': True}, + } + + _attribute_map = { + 'keys': {'key': 'keys', 'type': '[StorageAccountKey]'}, + } + + def __init__(self, **kwargs): + super(StorageAccountListKeysResult, self).__init__(**kwargs) + self.keys = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_list_keys_result_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_list_keys_result_py3.py new file mode 100644 index 000000000000..4d2a927c421f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_list_keys_result_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountListKeysResult(Model): + """The response from the ListKeys operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar keys: Gets the list of storage account keys and their properties for + the specified storage account. + :vartype keys: + list[~azure.mgmt.storage.v2018_03_01_preview.models.StorageAccountKey] + """ + + _validation = { + 'keys': {'readonly': True}, + } + + _attribute_map = { + 'keys': {'key': 'keys', 'type': '[StorageAccountKey]'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageAccountListKeysResult, self).__init__(**kwargs) + self.keys = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_management_policies.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_management_policies.py new file mode 100644 index 000000000000..59ee515d9a04 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_management_policies.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class StorageAccountManagementPolicies(Resource): + """The Get Storage Account ManagementPolicies operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param policy: The Storage Account ManagementPolicies Rules, in JSON + format. See more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + :type policy: object + :ivar last_modified_time: Returns the date and time the ManagementPolicies + was last modified. + :vartype last_modified_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'policy': {'key': 'properties.policy', 'type': 'object'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(StorageAccountManagementPolicies, self).__init__(**kwargs) + self.policy = kwargs.get('policy', None) + self.last_modified_time = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_management_policies_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_management_policies_py3.py new file mode 100644 index 000000000000..3dc977624949 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_management_policies_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class StorageAccountManagementPolicies(Resource): + """The Get Storage Account ManagementPolicies operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param policy: The Storage Account ManagementPolicies Rules, in JSON + format. See more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + :type policy: object + :ivar last_modified_time: Returns the date and time the ManagementPolicies + was last modified. + :vartype last_modified_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'policy': {'key': 'properties.policy', 'type': 'object'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, policy=None, **kwargs) -> None: + super(StorageAccountManagementPolicies, self).__init__(**kwargs) + self.policy = policy + self.last_modified_time = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_paged.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_paged.py new file mode 100644 index 000000000000..9bcc5490740d --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class StorageAccountPaged(Paged): + """ + A paging container for iterating over a list of :class:`StorageAccount ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StorageAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(StorageAccountPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_py3.py new file mode 100644 index 000000000000..3a50655f115f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_py3.py @@ -0,0 +1,170 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource_py3 import TrackedResource + + +class StorageAccount(TrackedResource): + """The storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :ivar sku: Gets the SKU. + :vartype sku: ~azure.mgmt.storage.v2018_03_01_preview.models.Sku + :ivar kind: Gets the Kind. Possible values include: 'Storage', + 'StorageV2', 'BlobStorage' + :vartype kind: str or ~azure.mgmt.storage.v2018_03_01_preview.models.Kind + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2018_03_01_preview.models.Identity + :ivar provisioning_state: Gets the status of the storage account at the + time the operation was called. Possible values include: 'Creating', + 'ResolvingDNS', 'Succeeded' + :vartype provisioning_state: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.ProvisioningState + :ivar primary_endpoints: Gets the URLs that are used to perform a + retrieval of a public blob, queue, or table object. Note that Standard_ZRS + and Premium_LRS accounts only return the blob endpoint. + :vartype primary_endpoints: + ~azure.mgmt.storage.v2018_03_01_preview.models.Endpoints + :ivar primary_location: Gets the location of the primary data center for + the storage account. + :vartype primary_location: str + :ivar status_of_primary: Gets the status indicating whether the primary + location of the storage account is available or unavailable. Possible + values include: 'available', 'unavailable' + :vartype status_of_primary: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.AccountStatus + :ivar last_geo_failover_time: Gets the timestamp of the most recent + instance of a failover to the secondary location. Only the most recent + timestamp is retained. This element is not returned if there has never + been a failover instance. Only available if the accountType is + Standard_GRS or Standard_RAGRS. + :vartype last_geo_failover_time: datetime + :ivar secondary_location: Gets the location of the geo-replicated + secondary for the storage account. Only available if the accountType is + Standard_GRS or Standard_RAGRS. + :vartype secondary_location: str + :ivar status_of_secondary: Gets the status indicating whether the + secondary location of the storage account is available or unavailable. + Only available if the SKU name is Standard_GRS or Standard_RAGRS. Possible + values include: 'available', 'unavailable' + :vartype status_of_secondary: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.AccountStatus + :ivar creation_time: Gets the creation date and time of the storage + account in UTC. + :vartype creation_time: datetime + :ivar custom_domain: Gets the custom domain the user assigned to this + storage account. + :vartype custom_domain: + ~azure.mgmt.storage.v2018_03_01_preview.models.CustomDomain + :ivar secondary_endpoints: Gets the URLs that are used to perform a + retrieval of a public blob, queue, or table object from the secondary + location of the storage account. Only available if the SKU name is + Standard_RAGRS. + :vartype secondary_endpoints: + ~azure.mgmt.storage.v2018_03_01_preview.models.Endpoints + :ivar encryption: Gets the encryption settings on the account. If + unspecified, the account is unencrypted. + :vartype encryption: + ~azure.mgmt.storage.v2018_03_01_preview.models.Encryption + :ivar access_tier: Required for storage accounts where kind = BlobStorage. + The access tier used for billing. Possible values include: 'Hot', 'Cool' + :vartype access_tier: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.AccessTier + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. Default value: False . + :type enable_https_traffic_only: bool + :ivar network_rule_set: Network rule set + :vartype network_rule_set: + ~azure.mgmt.storage.v2018_03_01_preview.models.NetworkRuleSet + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'readonly': True}, + 'kind': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'primary_endpoints': {'readonly': True}, + 'primary_location': {'readonly': True}, + 'status_of_primary': {'readonly': True}, + 'last_geo_failover_time': {'readonly': True}, + 'secondary_location': {'readonly': True}, + 'status_of_secondary': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'custom_domain': {'readonly': True}, + 'secondary_endpoints': {'readonly': True}, + 'encryption': {'readonly': True}, + 'access_tier': {'readonly': True}, + 'network_rule_set': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'primary_endpoints': {'key': 'properties.primaryEndpoints', 'type': 'Endpoints'}, + 'primary_location': {'key': 'properties.primaryLocation', 'type': 'str'}, + 'status_of_primary': {'key': 'properties.statusOfPrimary', 'type': 'AccountStatus'}, + 'last_geo_failover_time': {'key': 'properties.lastGeoFailoverTime', 'type': 'iso-8601'}, + 'secondary_location': {'key': 'properties.secondaryLocation', 'type': 'str'}, + 'status_of_secondary': {'key': 'properties.statusOfSecondary', 'type': 'AccountStatus'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'secondary_endpoints': {'key': 'properties.secondaryEndpoints', 'type': 'Endpoints'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, enable_https_traffic_only: bool=False, **kwargs) -> None: + super(StorageAccount, self).__init__(tags=tags, location=location, **kwargs) + self.sku = None + self.kind = None + self.identity = identity + self.provisioning_state = None + self.primary_endpoints = None + self.primary_location = None + self.status_of_primary = None + self.last_geo_failover_time = None + self.secondary_location = None + self.status_of_secondary = None + self.creation_time = None + self.custom_domain = None + self.secondary_endpoints = None + self.encryption = None + self.access_tier = None + self.enable_https_traffic_only = enable_https_traffic_only + self.network_rule_set = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_regenerate_key_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_regenerate_key_parameters.py new file mode 100644 index 000000000000..ca7f33b25112 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_regenerate_key_parameters.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountRegenerateKeyParameters(Model): + """The parameters used to regenerate the storage account key. + + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The name of storage keys that want to be + regenerated, possible vaules are key1, key2. + :type key_name: str + """ + + _validation = { + 'key_name': {'required': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageAccountRegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_regenerate_key_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_regenerate_key_parameters_py3.py new file mode 100644 index 000000000000..42f3c0b2e94a --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_regenerate_key_parameters_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountRegenerateKeyParameters(Model): + """The parameters used to regenerate the storage account key. + + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The name of storage keys that want to be + regenerated, possible vaules are key1, key2. + :type key_name: str + """ + + _validation = { + 'key_name': {'required': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, *, key_name: str, **kwargs) -> None: + super(StorageAccountRegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = key_name diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_update_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_update_parameters.py new file mode 100644 index 000000000000..16136fe068dc --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_update_parameters.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountUpdateParameters(Model): + """The parameters that can be provided when updating the storage account + properties. + + :param sku: Gets or sets the SKU name. Note that the SKU name cannot be + updated to Standard_ZRS or Premium_LRS, nor can accounts of those sku + names be updated to any other value. + :type sku: ~azure.mgmt.storage.v2018_03_01_preview.models.Sku + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater in length than 128 + characters and a value no greater in length than 256 characters. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2018_03_01_preview.models.Identity + :param custom_domain: Custom domain assigned to the storage account by the + user. Name is the CNAME source. Only one custom domain is supported per + storage account at this time. To clear the existing custom domain, use an + empty string for the custom domain name property. + :type custom_domain: + ~azure.mgmt.storage.v2018_03_01_preview.models.CustomDomain + :param encryption: Provides the encryption settings on the account. The + default setting is unencrypted. + :type encryption: + ~azure.mgmt.storage.v2018_03_01_preview.models.Encryption + :param access_tier: Required for storage accounts where kind = + BlobStorage. The access tier used for billing. Possible values include: + 'Hot', 'Cool' + :type access_tier: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.AccessTier + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. Default value: False . + :type enable_https_traffic_only: bool + :param network_rule_set: Network rule set + :type network_rule_set: + ~azure.mgmt.storage.v2018_03_01_preview.models.NetworkRuleSet + :param kind: Optional. Indicates the type of storage account. Currently + only StorageV2 value supported by server. Possible values include: + 'Storage', 'StorageV2', 'BlobStorage' + :type kind: str or ~azure.mgmt.storage.v2018_03_01_preview.models.Kind + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + } + + def __init__(self, **kwargs): + super(StorageAccountUpdateParameters, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + self.custom_domain = kwargs.get('custom_domain', None) + self.encryption = kwargs.get('encryption', None) + self.access_tier = kwargs.get('access_tier', None) + self.enable_https_traffic_only = kwargs.get('enable_https_traffic_only', False) + self.network_rule_set = kwargs.get('network_rule_set', None) + self.kind = kwargs.get('kind', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_update_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_update_parameters_py3.py new file mode 100644 index 000000000000..fa13aa650aa6 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_account_update_parameters_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountUpdateParameters(Model): + """The parameters that can be provided when updating the storage account + properties. + + :param sku: Gets or sets the SKU name. Note that the SKU name cannot be + updated to Standard_ZRS or Premium_LRS, nor can accounts of those sku + names be updated to any other value. + :type sku: ~azure.mgmt.storage.v2018_03_01_preview.models.Sku + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater in length than 128 + characters and a value no greater in length than 256 characters. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2018_03_01_preview.models.Identity + :param custom_domain: Custom domain assigned to the storage account by the + user. Name is the CNAME source. Only one custom domain is supported per + storage account at this time. To clear the existing custom domain, use an + empty string for the custom domain name property. + :type custom_domain: + ~azure.mgmt.storage.v2018_03_01_preview.models.CustomDomain + :param encryption: Provides the encryption settings on the account. The + default setting is unencrypted. + :type encryption: + ~azure.mgmt.storage.v2018_03_01_preview.models.Encryption + :param access_tier: Required for storage accounts where kind = + BlobStorage. The access tier used for billing. Possible values include: + 'Hot', 'Cool' + :type access_tier: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.AccessTier + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. Default value: False . + :type enable_https_traffic_only: bool + :param network_rule_set: Network rule set + :type network_rule_set: + ~azure.mgmt.storage.v2018_03_01_preview.models.NetworkRuleSet + :param kind: Optional. Indicates the type of storage account. Currently + only StorageV2 value supported by server. Possible values include: + 'Storage', 'StorageV2', 'BlobStorage' + :type kind: str or ~azure.mgmt.storage.v2018_03_01_preview.models.Kind + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + } + + def __init__(self, *, sku=None, tags=None, identity=None, custom_domain=None, encryption=None, access_tier=None, enable_https_traffic_only: bool=False, network_rule_set=None, kind=None, **kwargs) -> None: + super(StorageAccountUpdateParameters, self).__init__(**kwargs) + self.sku = sku + self.tags = tags + self.identity = identity + self.custom_domain = custom_domain + self.encryption = encryption + self.access_tier = access_tier + self.enable_https_traffic_only = enable_https_traffic_only + self.network_rule_set = network_rule_set + self.kind = kind diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_management_client_enums.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_management_client_enums.py new file mode 100644 index 000000000000..a5a7f3c7171e --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/storage_management_client_enums.py @@ -0,0 +1,197 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class ReasonCode(str, Enum): + + quota_id = "QuotaId" + not_available_for_subscription = "NotAvailableForSubscription" + + +class SkuName(str, Enum): + + standard_lrs = "Standard_LRS" + standard_grs = "Standard_GRS" + standard_ragrs = "Standard_RAGRS" + standard_zrs = "Standard_ZRS" + premium_lrs = "Premium_LRS" + + +class SkuTier(str, Enum): + + standard = "Standard" + premium = "Premium" + + +class Kind(str, Enum): + + storage = "Storage" + storage_v2 = "StorageV2" + blob_storage = "BlobStorage" + + +class Reason(str, Enum): + + account_name_invalid = "AccountNameInvalid" + already_exists = "AlreadyExists" + + +class KeySource(str, Enum): + + microsoft_storage = "Microsoft.Storage" + microsoft_keyvault = "Microsoft.Keyvault" + + +class Action(str, Enum): + + allow = "Allow" + + +class State(str, Enum): + + provisioning = "provisioning" + deprovisioning = "deprovisioning" + succeeded = "succeeded" + failed = "failed" + network_source_deleted = "networkSourceDeleted" + + +class Bypass(str, Enum): + + none = "None" + logging = "Logging" + metrics = "Metrics" + azure_services = "AzureServices" + + +class DefaultAction(str, Enum): + + allow = "Allow" + deny = "Deny" + + +class AccessTier(str, Enum): + + hot = "Hot" + cool = "Cool" + + +class ProvisioningState(str, Enum): + + creating = "Creating" + resolving_dns = "ResolvingDNS" + succeeded = "Succeeded" + + +class AccountStatus(str, Enum): + + available = "available" + unavailable = "unavailable" + + +class KeyPermission(str, Enum): + + read = "Read" + full = "Full" + + +class UsageUnit(str, Enum): + + count = "Count" + bytes = "Bytes" + seconds = "Seconds" + percent = "Percent" + counts_per_second = "CountsPerSecond" + bytes_per_second = "BytesPerSecond" + + +class Services(str, Enum): + + b = "b" + q = "q" + t = "t" + f = "f" + + +class SignedResourceTypes(str, Enum): + + s = "s" + c = "c" + o = "o" + + +class Permissions(str, Enum): + + r = "r" + d = "d" + w = "w" + l = "l" + a = "a" + c = "c" + u = "u" + p = "p" + + +class HttpProtocol(str, Enum): + + httpshttp = "https,http" + https = "https" + + +class SignedResource(str, Enum): + + b = "b" + c = "c" + f = "f" + s = "s" + + +class PublicAccess(str, Enum): + + container = "Container" + blob = "Blob" + none = "None" + + +class LeaseStatus(str, Enum): + + locked = "Locked" + unlocked = "Unlocked" + + +class LeaseState(str, Enum): + + available = "Available" + leased = "Leased" + expired = "Expired" + breaking = "Breaking" + broken = "Broken" + + +class LeaseDuration(str, Enum): + + infinite = "Infinite" + fixed = "Fixed" + + +class ImmutabilityPolicyState(str, Enum): + + locked = "Locked" + unlocked = "Unlocked" + + +class ImmutabilityPolicyUpdateType(str, Enum): + + put = "put" + lock = "lock" + extend = "extend" diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/tag_property.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/tag_property.py new file mode 100644 index 000000000000..3b879061fd2b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/tag_property.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TagProperty(Model): + """A tag of the LegalHold of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tag: The tag value. + :vartype tag: str + :ivar timestamp: Returns the date and time the tag was added. + :vartype timestamp: datetime + :ivar object_identifier: Returns the Object ID of the user who added the + tag. + :vartype object_identifier: str + :ivar tenant_id: Returns the Tenant ID that issued the token for the user + who added the tag. + :vartype tenant_id: str + :ivar upn: Returns the User Principal Name of the user who added the tag. + :vartype upn: str + """ + + _validation = { + 'tag': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'object_identifier': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'upn': {'readonly': True}, + } + + _attribute_map = { + 'tag': {'key': 'tag', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'object_identifier': {'key': 'objectIdentifier', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'upn': {'key': 'upn', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TagProperty, self).__init__(**kwargs) + self.tag = None + self.timestamp = None + self.object_identifier = None + self.tenant_id = None + self.upn = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/tag_property_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/tag_property_py3.py new file mode 100644 index 000000000000..22aaf6cb82ba --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/tag_property_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TagProperty(Model): + """A tag of the LegalHold of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tag: The tag value. + :vartype tag: str + :ivar timestamp: Returns the date and time the tag was added. + :vartype timestamp: datetime + :ivar object_identifier: Returns the Object ID of the user who added the + tag. + :vartype object_identifier: str + :ivar tenant_id: Returns the Tenant ID that issued the token for the user + who added the tag. + :vartype tenant_id: str + :ivar upn: Returns the User Principal Name of the user who added the tag. + :vartype upn: str + """ + + _validation = { + 'tag': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'object_identifier': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'upn': {'readonly': True}, + } + + _attribute_map = { + 'tag': {'key': 'tag', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'object_identifier': {'key': 'objectIdentifier', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'upn': {'key': 'upn', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(TagProperty, self).__init__(**kwargs) + self.tag = None + self.timestamp = None + self.object_identifier = None + self.tenant_id = None + self.upn = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/tracked_resource.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/tracked_resource.py new file mode 100644 index 000000000000..27ab94c7a8dd --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/tracked_resource.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level 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 id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/tracked_resource_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/tracked_resource_py3.py new file mode 100644 index 000000000000..b28cc1859448 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/tracked_resource_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level 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 id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/update_history_property.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/update_history_property.py new file mode 100644 index 000000000000..6681582b4a14 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/update_history_property.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateHistoryProperty(Model): + """An update history of the ImmutabilityPolicy of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar update: The ImmutabilityPolicy update type of a blob container, + possible values include: put, lock and extend. Possible values include: + 'put', 'lock', 'extend' + :vartype update: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.ImmutabilityPolicyUpdateType + :ivar immutability_period_since_creation_in_days: The immutability period + for the blobs in the container since the policy creation, in days. + :vartype immutability_period_since_creation_in_days: int + :ivar timestamp: Returns the date and time the ImmutabilityPolicy was + updated. + :vartype timestamp: datetime + :ivar object_identifier: Returns the Object ID of the user who updated the + ImmutabilityPolicy. + :vartype object_identifier: str + :ivar tenant_id: Returns the Tenant ID that issued the token for the user + who updated the ImmutabilityPolicy. + :vartype tenant_id: str + :ivar upn: Returns the User Principal Name of the user who updated the + ImmutabilityPolicy. + :vartype upn: str + """ + + _validation = { + 'update': {'readonly': True}, + 'immutability_period_since_creation_in_days': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'object_identifier': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'upn': {'readonly': True}, + } + + _attribute_map = { + 'update': {'key': 'update', 'type': 'str'}, + 'immutability_period_since_creation_in_days': {'key': 'immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'object_identifier': {'key': 'objectIdentifier', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'upn': {'key': 'upn', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpdateHistoryProperty, self).__init__(**kwargs) + self.update = None + self.immutability_period_since_creation_in_days = None + self.timestamp = None + self.object_identifier = None + self.tenant_id = None + self.upn = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/update_history_property_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/update_history_property_py3.py new file mode 100644 index 000000000000..ca55acf0c8fb --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/update_history_property_py3.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateHistoryProperty(Model): + """An update history of the ImmutabilityPolicy of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar update: The ImmutabilityPolicy update type of a blob container, + possible values include: put, lock and extend. Possible values include: + 'put', 'lock', 'extend' + :vartype update: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.ImmutabilityPolicyUpdateType + :ivar immutability_period_since_creation_in_days: The immutability period + for the blobs in the container since the policy creation, in days. + :vartype immutability_period_since_creation_in_days: int + :ivar timestamp: Returns the date and time the ImmutabilityPolicy was + updated. + :vartype timestamp: datetime + :ivar object_identifier: Returns the Object ID of the user who updated the + ImmutabilityPolicy. + :vartype object_identifier: str + :ivar tenant_id: Returns the Tenant ID that issued the token for the user + who updated the ImmutabilityPolicy. + :vartype tenant_id: str + :ivar upn: Returns the User Principal Name of the user who updated the + ImmutabilityPolicy. + :vartype upn: str + """ + + _validation = { + 'update': {'readonly': True}, + 'immutability_period_since_creation_in_days': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'object_identifier': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'upn': {'readonly': True}, + } + + _attribute_map = { + 'update': {'key': 'update', 'type': 'str'}, + 'immutability_period_since_creation_in_days': {'key': 'immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'object_identifier': {'key': 'objectIdentifier', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'upn': {'key': 'upn', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UpdateHistoryProperty, self).__init__(**kwargs) + self.update = None + self.immutability_period_since_creation_in_days = None + self.timestamp = None + self.object_identifier = None + self.tenant_id = None + self.upn = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/usage.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/usage.py new file mode 100644 index 000000000000..cbd34c470b04 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/usage.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Usage(Model): + """Describes Storage Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar unit: Gets the unit of measurement. Possible values include: + 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', + 'BytesPerSecond' + :vartype unit: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.UsageUnit + :ivar current_value: Gets the current count of the allocated resources in + the subscription. + :vartype current_value: int + :ivar limit: Gets the maximum count of the resources that can be allocated + in the subscription. + :vartype limit: int + :ivar name: Gets the name of the type of usage. + :vartype name: ~azure.mgmt.storage.v2018_03_01_preview.models.UsageName + """ + + _validation = { + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'UsageUnit'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.unit = None + self.current_value = None + self.limit = None + self.name = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/usage_name.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/usage_name.py new file mode 100644 index 000000000000..e4082bf52384 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/usage_name.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UsageName(Model): + """The usage names that can be used; currently limited to StorageAccount. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Gets a string describing the resource name. + :vartype value: str + :ivar localized_value: Gets a localized string describing the resource + name. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageName, self).__init__(**kwargs) + self.value = None + self.localized_value = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/usage_name_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/usage_name_py3.py new file mode 100644 index 000000000000..f519bb5072b1 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/usage_name_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UsageName(Model): + """The usage names that can be used; currently limited to StorageAccount. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Gets a string describing the resource name. + :vartype value: str + :ivar localized_value: Gets a localized string describing the resource + name. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UsageName, self).__init__(**kwargs) + self.value = None + self.localized_value = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/usage_paged.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/usage_paged.py new file mode 100644 index 000000000000..290c72b9edf7 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/usage_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/usage_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/usage_py3.py new file mode 100644 index 000000000000..0e9f13729f6e --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/usage_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Usage(Model): + """Describes Storage Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar unit: Gets the unit of measurement. Possible values include: + 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', + 'BytesPerSecond' + :vartype unit: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.UsageUnit + :ivar current_value: Gets the current count of the allocated resources in + the subscription. + :vartype current_value: int + :ivar limit: Gets the maximum count of the resources that can be allocated + in the subscription. + :vartype limit: int + :ivar name: Gets the name of the type of usage. + :vartype name: ~azure.mgmt.storage.v2018_03_01_preview.models.UsageName + """ + + _validation = { + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'UsageUnit'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + def __init__(self, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.unit = None + self.current_value = None + self.limit = None + self.name = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/virtual_network_rule.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/virtual_network_rule.py new file mode 100644 index 000000000000..2a5bc18acbba --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/virtual_network_rule.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VirtualNetworkRule(Model): + """Virtual Network rule. + + All required parameters must be populated in order to send to Azure. + + :param virtual_network_resource_id: Required. Resource ID of a subnet, for + example: + /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + :type virtual_network_resource_id: str + :param action: The action of virtual network rule. Possible values + include: 'Allow'. Default value: "Allow" . + :type action: str or ~azure.mgmt.storage.v2018_03_01_preview.models.Action + :param state: Gets the state of virtual network rule. Possible values + include: 'provisioning', 'deprovisioning', 'succeeded', 'failed', + 'networkSourceDeleted' + :type state: str or ~azure.mgmt.storage.v2018_03_01_preview.models.State + """ + + _validation = { + 'virtual_network_resource_id': {'required': True}, + } + + _attribute_map = { + 'virtual_network_resource_id': {'key': 'id', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'Action'}, + 'state': {'key': 'state', 'type': 'State'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_resource_id = kwargs.get('virtual_network_resource_id', None) + self.action = kwargs.get('action', "Allow") + self.state = kwargs.get('state', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/virtual_network_rule_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/virtual_network_rule_py3.py new file mode 100644 index 000000000000..9da122642920 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/virtual_network_rule_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VirtualNetworkRule(Model): + """Virtual Network rule. + + All required parameters must be populated in order to send to Azure. + + :param virtual_network_resource_id: Required. Resource ID of a subnet, for + example: + /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + :type virtual_network_resource_id: str + :param action: The action of virtual network rule. Possible values + include: 'Allow'. Default value: "Allow" . + :type action: str or ~azure.mgmt.storage.v2018_03_01_preview.models.Action + :param state: Gets the state of virtual network rule. Possible values + include: 'provisioning', 'deprovisioning', 'succeeded', 'failed', + 'networkSourceDeleted' + :type state: str or ~azure.mgmt.storage.v2018_03_01_preview.models.State + """ + + _validation = { + 'virtual_network_resource_id': {'required': True}, + } + + _attribute_map = { + 'virtual_network_resource_id': {'key': 'id', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'Action'}, + 'state': {'key': 'state', 'type': 'State'}, + } + + def __init__(self, *, virtual_network_resource_id: str, action="Allow", state=None, **kwargs) -> None: + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_resource_id = virtual_network_resource_id + self.action = action + self.state = state diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/__init__.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/__init__.py new file mode 100644 index 000000000000..6282db615d53 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/__init__.py @@ -0,0 +1,24 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .operations import Operations +from .skus_operations import SkusOperations +from .storage_accounts_operations import StorageAccountsOperations +from .usages_operations import UsagesOperations +from .blob_containers_operations import BlobContainersOperations + +__all__ = [ + 'Operations', + 'SkusOperations', + 'StorageAccountsOperations', + 'UsagesOperations', + 'BlobContainersOperations', +] diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/blob_containers_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/blob_containers_operations.py new file mode 100644 index 000000000000..56fe57423fc9 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/blob_containers_operations.py @@ -0,0 +1,1051 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class BlobContainersOperations(object): + """BlobContainersOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-03-01-preview". + :ivar immutability_policy_name: The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'. Constant value: "default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-03-01-preview" + self.immutability_policy_name = "default" + + self.config = config + + def list( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists all containers and does not support a prefix like data plane. + Also SRP today does not return continuation token. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ListContainerItems or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.ListContainerItems or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ListContainerItems', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers'} + + def create( + self, resource_group_name, account_name, container_name, public_access=None, metadata=None, custom_headers=None, raw=False, **operation_config): + """Creates a new container under the specified account as described by + request body. The container resource includes metadata and properties + for that container. It does not include a list of the blobs contained + by the container. . + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param container_name: The name of the blob container within the + specified storage account. Blob container names must be between 3 and + 63 characters in length and use numbers, lower-case letters and dash + (-) only. Every dash (-) character must be immediately preceded and + followed by a letter or number. + :type container_name: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.PublicAccess + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BlobContainer or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_03_01_preview.models.BlobContainer + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + blob_container = models.BlobContainer(public_access=public_access, metadata=metadata) + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(blob_container, 'BlobContainer') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('BlobContainer', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}'} + + def update( + self, resource_group_name, account_name, container_name, public_access=None, metadata=None, custom_headers=None, raw=False, **operation_config): + """Updates container properties as specified in request body. Properties + not mentioned in the request will be unchanged. Update fails if the + specified container doesn't already exist. . + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param container_name: The name of the blob container within the + specified storage account. Blob container names must be between 3 and + 63 characters in length and use numbers, lower-case letters and dash + (-) only. Every dash (-) character must be immediately preceded and + followed by a letter or number. + :type container_name: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2018_03_01_preview.models.PublicAccess + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BlobContainer or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_03_01_preview.models.BlobContainer + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + blob_container = models.BlobContainer(public_access=public_access, metadata=metadata) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(blob_container, 'BlobContainer') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BlobContainer', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}'} + + def get( + self, resource_group_name, account_name, container_name, custom_headers=None, raw=False, **operation_config): + """Gets properties of a specified container. . + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param container_name: The name of the blob container within the + specified storage account. Blob container names must be between 3 and + 63 characters in length and use numbers, lower-case letters and dash + (-) only. Every dash (-) character must be immediately preceded and + followed by a letter or number. + :type container_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BlobContainer or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_03_01_preview.models.BlobContainer + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BlobContainer', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}'} + + def delete( + self, resource_group_name, account_name, container_name, custom_headers=None, raw=False, **operation_config): + """Deletes specified container under its account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param container_name: The name of the blob container within the + specified storage account. Blob container names must be between 3 and + 63 characters in length and use numbers, lower-case letters and dash + (-) only. Every dash (-) character must be immediately preceded and + followed by a letter or number. + :type container_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}'} + + def set_legal_hold( + self, resource_group_name, account_name, container_name, tags, custom_headers=None, raw=False, **operation_config): + """Sets legal hold tags. Setting the same tag results in an idempotent + operation. SetLegalHold follows an append pattern and does not clear + out the existing tags that are not specified in the request. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param container_name: The name of the blob container within the + specified storage account. Blob container names must be between 3 and + 63 characters in length and use numbers, lower-case letters and dash + (-) only. Every dash (-) character must be immediately preceded and + followed by a letter or number. + :type container_name: str + :param tags: Each tag should be 3 to 23 alphanumeric characters and is + normalized to lower case at SRP. + :type tags: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LegalHold or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_03_01_preview.models.LegalHold or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + legal_hold = models.LegalHold(tags=tags) + + # Construct URL + url = self.set_legal_hold.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(legal_hold, 'LegalHold') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LegalHold', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + set_legal_hold.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/setLegalHold'} + + def clear_legal_hold( + self, resource_group_name, account_name, container_name, tags, custom_headers=None, raw=False, **operation_config): + """Clears legal hold tags. Clearing the same or non-existent tag results + in an idempotent operation. ClearLegalHold clears out only the + specified tags in the request. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param container_name: The name of the blob container within the + specified storage account. Blob container names must be between 3 and + 63 characters in length and use numbers, lower-case letters and dash + (-) only. Every dash (-) character must be immediately preceded and + followed by a letter or number. + :type container_name: str + :param tags: Each tag should be 3 to 23 alphanumeric characters and is + normalized to lower case at SRP. + :type tags: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LegalHold or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_03_01_preview.models.LegalHold or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + legal_hold = models.LegalHold(tags=tags) + + # Construct URL + url = self.clear_legal_hold.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(legal_hold, 'LegalHold') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LegalHold', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + clear_legal_hold.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/clearLegalHold'} + + def create_or_update_immutability_policy( + self, resource_group_name, account_name, container_name, immutability_period_since_creation_in_days, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates an unlocked immutability policy. ETag in If-Match is + honored if given but not required for this operation. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param container_name: The name of the blob container within the + specified storage account. Blob container names must be between 3 and + 63 characters in length and use numbers, lower-case letters and dash + (-) only. Every dash (-) character must be immediately preceded and + followed by a letter or number. + :type container_name: str + :param immutability_period_since_creation_in_days: The immutability + period for the blobs in the container since the policy creation, in + days. + :type immutability_period_since_creation_in_days: int + :param if_match: The entity state (ETag) version of the immutability + policy to update. A value of "*" can be used to apply the operation + only if the immutability policy already exists. If omitted, this + operation will always be applied. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImmutabilityPolicy or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.ImmutabilityPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = None + if immutability_period_since_creation_in_days is not None: + parameters = models.ImmutabilityPolicy(immutability_period_since_creation_in_days=immutability_period_since_creation_in_days) + + # Construct URL + url = self.create_or_update_immutability_policy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'immutabilityPolicyName': self._serialize.url("self.immutability_policy_name", self.immutability_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'ImmutabilityPolicy') + else: + body_content = None + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ImmutabilityPolicy', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}'} + + def get_immutability_policy( + self, resource_group_name, account_name, container_name, if_match=None, custom_headers=None, raw=False, **operation_config): + """Gets the existing immutability policy along with the corresponding ETag + in response headers and body. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param container_name: The name of the blob container within the + specified storage account. Blob container names must be between 3 and + 63 characters in length and use numbers, lower-case letters and dash + (-) only. Every dash (-) character must be immediately preceded and + followed by a letter or number. + :type container_name: str + :param if_match: The entity state (ETag) version of the immutability + policy to update. A value of "*" can be used to apply the operation + only if the immutability policy already exists. If omitted, this + operation will always be applied. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImmutabilityPolicy or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.ImmutabilityPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_immutability_policy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'immutabilityPolicyName': self._serialize.url("self.immutability_policy_name", self.immutability_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ImmutabilityPolicy', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}'} + + def delete_immutability_policy( + self, resource_group_name, account_name, container_name, if_match, custom_headers=None, raw=False, **operation_config): + """Aborts an unlocked immutability policy. The response of delete has + immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is + required for this operation. Deleting a locked immutability policy is + not allowed, only way is to delete the container after deleting all + blobs inside the container. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param container_name: The name of the blob container within the + specified storage account. Blob container names must be between 3 and + 63 characters in length and use numbers, lower-case letters and dash + (-) only. Every dash (-) character must be immediately preceded and + followed by a letter or number. + :type container_name: str + :param if_match: The entity state (ETag) version of the immutability + policy to update. A value of "*" can be used to apply the operation + only if the immutability policy already exists. If omitted, this + operation will always be applied. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImmutabilityPolicy or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.ImmutabilityPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_immutability_policy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'immutabilityPolicyName': self._serialize.url("self.immutability_policy_name", self.immutability_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ImmutabilityPolicy', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + delete_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}'} + + def lock_immutability_policy( + self, resource_group_name, account_name, container_name, if_match, custom_headers=None, raw=False, **operation_config): + """Sets the ImmutabilityPolicy to Locked state. The only action allowed on + a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is + required for this operation. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param container_name: The name of the blob container within the + specified storage account. Blob container names must be between 3 and + 63 characters in length and use numbers, lower-case letters and dash + (-) only. Every dash (-) character must be immediately preceded and + followed by a letter or number. + :type container_name: str + :param if_match: The entity state (ETag) version of the immutability + policy to update. A value of "*" can be used to apply the operation + only if the immutability policy already exists. If omitted, this + operation will always be applied. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImmutabilityPolicy or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.ImmutabilityPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.lock_immutability_policy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ImmutabilityPolicy', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + lock_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/lock'} + + def extend_immutability_policy( + self, resource_group_name, account_name, container_name, if_match, immutability_period_since_creation_in_days, custom_headers=None, raw=False, **operation_config): + """Extends the immutabilityPeriodSinceCreationInDays of a locked + immutabilityPolicy. The only action allowed on a Locked policy will be + this action. ETag in If-Match is required for this operation. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param container_name: The name of the blob container within the + specified storage account. Blob container names must be between 3 and + 63 characters in length and use numbers, lower-case letters and dash + (-) only. Every dash (-) character must be immediately preceded and + followed by a letter or number. + :type container_name: str + :param if_match: The entity state (ETag) version of the immutability + policy to update. A value of "*" can be used to apply the operation + only if the immutability policy already exists. If omitted, this + operation will always be applied. + :type if_match: str + :param immutability_period_since_creation_in_days: The immutability + period for the blobs in the container since the policy creation, in + days. + :type immutability_period_since_creation_in_days: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImmutabilityPolicy or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.ImmutabilityPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = None + if immutability_period_since_creation_in_days is not None: + parameters = models.ImmutabilityPolicy(immutability_period_since_creation_in_days=immutability_period_since_creation_in_days) + + # Construct URL + url = self.extend_immutability_policy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'ImmutabilityPolicy') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ImmutabilityPolicy', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + extend_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/extend'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/operations.py new file mode 100644 index 000000000000..445d1003e64c --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/operations.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-03-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available Storage Rest API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.OperationPaged[~azure.mgmt.storage.v2018_03_01_preview.models.Operation] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Storage/operations'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/skus_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/skus_operations.py new file mode 100644 index 000000000000..e0ca2a05942d --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/skus_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class SkusOperations(object): + """SkusOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-03-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists the available SKUs supported by Microsoft.Storage for given + subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Sku + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.SkuPaged[~azure.mgmt.storage.v2018_03_01_preview.models.Sku] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.SkuPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.SkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/skus'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/storage_accounts_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/storage_accounts_operations.py new file mode 100644 index 000000000000..3709199456c1 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/storage_accounts_operations.py @@ -0,0 +1,1056 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class StorageAccountsOperations(object): + """StorageAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-03-01-preview". + :ivar management_policy_name: The name of the Storage Account Management Policy. It should always be 'default'. Constant value: "default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-03-01-preview" + self.management_policy_name = "default" + + self.config = config + + def check_name_availability( + self, name, custom_headers=None, raw=False, **operation_config): + """Checks that the storage account name is valid and is not already in + use. + + :param name: The storage account name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CheckNameAvailabilityResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.CheckNameAvailabilityResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + account_name = models.StorageAccountCheckNameAvailabilityParameters(name=name) + + # Construct URL + url = self.check_name_availability.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(account_name, 'StorageAccountCheckNameAvailabilityParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CheckNameAvailabilityResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability'} + + + def _create_initial( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'StorageAccountCreateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Asynchronously creates a new storage account with the specified + parameters. If an account is already created and a subsequent create + request is issued with different properties, the account properties + will be updated. If an account is already created and a subsequent + create or update request is issued with the exact same set of + properties, the request will succeed. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param parameters: The parameters to provide for the created account. + :type parameters: + ~azure.mgmt.storage.v2018_03_01_preview.models.StorageAccountCreateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns StorageAccount or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.storage.v2018_03_01_preview.models.StorageAccount] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.storage.v2018_03_01_preview.models.StorageAccount]] + :raises: :class:`CloudError` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + account_name=account_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'} + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes a storage account in Microsoft Azure. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'} + + def get_properties( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Returns the properties for the specified storage account including but + not limited to name, SKU name, location, and account status. The + ListKeys operation should be used to retrieve storage keys. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StorageAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_03_01_preview.models.StorageAccount + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_properties.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_properties.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'} + + def update( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + """The update operation can be used to update the SKU, encryption, access + tier, or tags for a storage account. It can also be used to map the + account to a custom domain. Only one custom domain is supported per + storage account; the replacement/change of custom domain is not + supported. In order to replace an old custom domain, the old value must + be cleared/unregistered before a new value can be set. The update of + multiple properties is supported. This call does not change the storage + keys for the account. If you want to change the storage account keys, + use the regenerate keys operation. The location and name of the storage + account cannot be changed after creation. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param parameters: The parameters to provide for the updated account. + :type parameters: + ~azure.mgmt.storage.v2018_03_01_preview.models.StorageAccountUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StorageAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_03_01_preview.models.StorageAccount + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'StorageAccountUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the storage accounts available under the subscription. Note + that storage keys are not returned; use the ListKeys operation for + this. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StorageAccount + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.StorageAccountPaged[~azure.mgmt.storage.v2018_03_01_preview.models.StorageAccount] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.StorageAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.StorageAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the storage accounts available under the given resource + group. Note that storage keys are not returned; use the ListKeys + operation for this. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StorageAccount + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.StorageAccountPaged[~azure.mgmt.storage.v2018_03_01_preview.models.StorageAccount] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.StorageAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.StorageAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts'} + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified storage account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StorageAccountListKeysResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.StorageAccountListKeysResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys'} + + def regenerate_key( + self, resource_group_name, account_name, key_name, custom_headers=None, raw=False, **operation_config): + """Regenerates one of the access keys for the specified storage account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param key_name: The name of storage keys that want to be regenerated, + possible vaules are key1, key2. + :type key_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StorageAccountListKeysResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.StorageAccountListKeysResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + regenerate_key1 = models.StorageAccountRegenerateKeyParameters(key_name=key_name) + + # Construct URL + url = self.regenerate_key.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(regenerate_key1, 'StorageAccountRegenerateKeyParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey'} + + def list_account_sas( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + """List SAS credentials of a storage account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param parameters: The parameters to provide to list SAS credentials + for the storage account. + :type parameters: + ~azure.mgmt.storage.v2018_03_01_preview.models.AccountSasParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ListAccountSasResponse or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.ListAccountSasResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_account_sas.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AccountSasParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ListAccountSasResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_account_sas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas'} + + def list_service_sas( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + """List service SAS credentials of a specific resource. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param parameters: The parameters to provide to list service SAS + credentials. + :type parameters: + ~azure.mgmt.storage.v2018_03_01_preview.models.ServiceSasParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ListServiceSasResponse or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.ListServiceSasResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_service_sas.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ServiceSasParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ListServiceSasResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_service_sas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas'} + + def get_management_policies( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Gets the data policy rules associated with the specified storage + account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StorageAccountManagementPolicies or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.StorageAccountManagementPolicies + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_management_policies.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'managementPolicyName': self._serialize.url("self.management_policy_name", self.management_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageAccountManagementPolicies', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_management_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}'} + + def create_or_update_management_policies( + self, resource_group_name, account_name, policy=None, custom_headers=None, raw=False, **operation_config): + """Sets the data policy rules associated with the specified storage + account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param policy: The Storage Account ManagementPolicies Rules, in JSON + format. See more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + :type policy: object + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StorageAccountManagementPolicies or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.StorageAccountManagementPolicies + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + properties = models.ManagementPoliciesRulesSetParameter(policy=policy) + + # Construct URL + url = self.create_or_update_management_policies.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'managementPolicyName': self._serialize.url("self.management_policy_name", self.management_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(properties, 'ManagementPoliciesRulesSetParameter') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageAccountManagementPolicies', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_management_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}'} + + def delete_management_policies( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes the data policy rules associated with the specified storage + account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of the storage account within the + specified resource group. Storage account names must be between 3 and + 24 characters in length and use numbers and lower-case letters only. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_management_policies.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'managementPolicyName': self._serialize.url("self.management_policy_name", self.management_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_management_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/usages_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/usages_operations.py new file mode 100644 index 000000000000..1adfde6245d0 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/usages_operations.py @@ -0,0 +1,173 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsagesOperations(object): + """UsagesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-03-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets the current usage count and the limit for the resources under the + subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.UsagePaged[~azure.mgmt.storage.v2018_03_01_preview.models.Usage] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/usages'} + + def list_by_location( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets the current usage count and the limit for the resources of the + location under the subscription. + + :param location: The location of the Azure Storage resource. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.UsagePaged[~azure.mgmt.storage.v2018_03_01_preview.models.Usage] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'location': self._serialize.url("location", location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/storage_management_client.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/storage_management_client.py new file mode 100644 index 000000000000..8f683afba982 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/storage_management_client.py @@ -0,0 +1,101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.operations import Operations +from .operations.skus_operations import SkusOperations +from .operations.storage_accounts_operations import StorageAccountsOperations +from .operations.usages_operations import UsagesOperations +from .operations.blob_containers_operations import BlobContainersOperations +from . import models + + +class StorageManagementClientConfiguration(AzureConfiguration): + """Configuration for StorageManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(StorageManagementClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-storage/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class StorageManagementClient(SDKClient): + """The Azure Storage Management API. + + :ivar config: Configuration for client. + :vartype config: StorageManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.storage.v2018_03_01_preview.operations.Operations + :ivar skus: Skus operations + :vartype skus: azure.mgmt.storage.v2018_03_01_preview.operations.SkusOperations + :ivar storage_accounts: StorageAccounts operations + :vartype storage_accounts: azure.mgmt.storage.v2018_03_01_preview.operations.StorageAccountsOperations + :ivar usages: Usages operations + :vartype usages: azure.mgmt.storage.v2018_03_01_preview.operations.UsagesOperations + :ivar blob_containers: BlobContainers operations + :vartype blob_containers: azure.mgmt.storage.v2018_03_01_preview.operations.BlobContainersOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = StorageManagementClientConfiguration(credentials, subscription_id, base_url) + super(StorageManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-03-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.skus = SkusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.storage_accounts = StorageAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usages = UsagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.blob_containers = BlobContainersOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/version.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/version.py new file mode 100644 index 000000000000..623d610ecc13 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "2018-03-01-preview" + diff --git a/azure-mgmt-storage/azure/mgmt/storage/version.py b/azure-mgmt-storage/azure/mgmt/storage/version.py index 9a4b5b101553..b9304b9e9eb4 100644 --- a/azure-mgmt-storage/azure/mgmt/storage/version.py +++ b/azure-mgmt-storage/azure/mgmt/storage/version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "2.0.0rc2" +VERSION = "2.0.0rc3" diff --git a/azure-mgmt-storage/sdk_packaging.toml b/azure-mgmt-storage/sdk_packaging.toml new file mode 100644 index 000000000000..20f15bee4332 --- /dev/null +++ b/azure-mgmt-storage/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-storage" +package_pprint_name = "Storage Management" +package_doc_id = "storage" +is_stable = true diff --git a/azure-mgmt-storage/setup.py b/azure-mgmt-storage/setup.py index ad97c57ee3aa..fa5deedb8bd4 100644 --- a/azure-mgmt-storage/setup.py +++ b/azure-mgmt-storage/setup.py @@ -78,7 +78,7 @@ packages=find_packages(exclude=["tests"]), install_requires=[ 'msrestazure>=0.4.27,<2.0.0', - 'azure-common~=1.1', + 'azure-common~=1.1,>=1.1.10', ], cmdclass=cmdclass ) diff --git a/azure-mgmt-storage/tests/__init__.py b/azure-mgmt-storage/tests/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/azure-mgmt-trafficmanager/HISTORY.rst b/azure-mgmt-trafficmanager/HISTORY.rst index 080ba80372a2..35693628de5e 100644 --- a/azure-mgmt-trafficmanager/HISTORY.rst +++ b/azure-mgmt-trafficmanager/HISTORY.rst @@ -3,6 +3,48 @@ Release History =============== +0.50.0 (2018-05-25) ++++++++++++++++++++ + +**Features** + +- Model Endpoint has a new parameter custom_headers +- Model MonitorConfig has a new parameter custom_headers +- Model MonitorConfig has a new parameter expected_status_code_ranges +- Model Profile has a new parameter traffic_view_enrollment_status +- Added operation group HeatMapOperations +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + + 0.40.0 (2017-07-03) +++++++++++++++++++ diff --git a/azure-mgmt-trafficmanager/README.rst b/azure-mgmt-trafficmanager/README.rst index dbacee1b4596..947b56fed25d 100644 --- a/azure-mgmt-trafficmanager/README.rst +++ b/azure-mgmt-trafficmanager/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Traffic Manager Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `Traffic Manager -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py index c41ba9dd7f2c..16e7f531c796 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py @@ -9,18 +9,46 @@ # regenerated. # -------------------------------------------------------------------------- -from .delete_operation_result import DeleteOperationResult -from .endpoint import Endpoint -from .check_traffic_manager_relative_dns_name_availability_parameters import CheckTrafficManagerRelativeDnsNameAvailabilityParameters -from .dns_config import DnsConfig -from .monitor_config import MonitorConfig -from .profile import Profile -from .traffic_manager_name_availability import TrafficManagerNameAvailability -from .region import Region -from .traffic_manager_geographic_hierarchy import TrafficManagerGeographicHierarchy -from .resource import Resource -from .tracked_resource import TrackedResource -from .proxy_resource import ProxyResource +try: + from .delete_operation_result_py3 import DeleteOperationResult + from .endpoint_properties_custom_headers_item_py3 import EndpointPropertiesCustomHeadersItem + from .heat_map_endpoint_py3 import HeatMapEndpoint + from .query_experience_py3 import QueryExperience + from .traffic_flow_py3 import TrafficFlow + from .heat_map_model_py3 import HeatMapModel + from .endpoint_py3 import Endpoint + from .check_traffic_manager_relative_dns_name_availability_parameters_py3 import CheckTrafficManagerRelativeDnsNameAvailabilityParameters + from .dns_config_py3 import DnsConfig + from .monitor_config_custom_headers_item_py3 import MonitorConfigCustomHeadersItem + from .monitor_config_expected_status_code_ranges_item_py3 import MonitorConfigExpectedStatusCodeRangesItem + from .monitor_config_py3 import MonitorConfig + from .profile_py3 import Profile + from .traffic_manager_name_availability_py3 import TrafficManagerNameAvailability + from .region_py3 import Region + from .traffic_manager_geographic_hierarchy_py3 import TrafficManagerGeographicHierarchy + from .resource_py3 import Resource + from .tracked_resource_py3 import TrackedResource + from .proxy_resource_py3 import ProxyResource +except (SyntaxError, ImportError): + from .delete_operation_result import DeleteOperationResult + from .endpoint_properties_custom_headers_item import EndpointPropertiesCustomHeadersItem + from .heat_map_endpoint import HeatMapEndpoint + from .query_experience import QueryExperience + from .traffic_flow import TrafficFlow + from .heat_map_model import HeatMapModel + from .endpoint import Endpoint + from .check_traffic_manager_relative_dns_name_availability_parameters import CheckTrafficManagerRelativeDnsNameAvailabilityParameters + from .dns_config import DnsConfig + from .monitor_config_custom_headers_item import MonitorConfigCustomHeadersItem + from .monitor_config_expected_status_code_ranges_item import MonitorConfigExpectedStatusCodeRangesItem + from .monitor_config import MonitorConfig + from .profile import Profile + from .traffic_manager_name_availability import TrafficManagerNameAvailability + from .region import Region + from .traffic_manager_geographic_hierarchy import TrafficManagerGeographicHierarchy + from .resource import Resource + from .tracked_resource import TrackedResource + from .proxy_resource import ProxyResource from .profile_paged import ProfilePaged from .traffic_manager_management_client_enums import ( EndpointStatus, @@ -29,13 +57,21 @@ MonitorProtocol, ProfileStatus, TrafficRoutingMethod, + TrafficViewEnrollmentStatus, ) __all__ = [ 'DeleteOperationResult', + 'EndpointPropertiesCustomHeadersItem', + 'HeatMapEndpoint', + 'QueryExperience', + 'TrafficFlow', + 'HeatMapModel', 'Endpoint', 'CheckTrafficManagerRelativeDnsNameAvailabilityParameters', 'DnsConfig', + 'MonitorConfigCustomHeadersItem', + 'MonitorConfigExpectedStatusCodeRangesItem', 'MonitorConfig', 'Profile', 'TrafficManagerNameAvailability', @@ -51,4 +87,5 @@ 'MonitorProtocol', 'ProfileStatus', 'TrafficRoutingMethod', + 'TrafficViewEnrollmentStatus', ] diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters.py index 5f0f8a69e760..1e26b45eb788 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters.py @@ -26,6 +26,7 @@ class CheckTrafficManagerRelativeDnsNameAvailabilityParameters(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, name=None, type=None): - self.name = name - self.type = type + def __init__(self, **kwargs): + super(CheckTrafficManagerRelativeDnsNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters_py3.py new file mode 100644 index 000000000000..d8ef2dda2b26 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckTrafficManagerRelativeDnsNameAvailabilityParameters(Model): + """Parameters supplied to check Traffic Manager name operation. + + :param name: The name of the resource. + :type name: str + :param type: The type of the resource. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, type: str=None, **kwargs) -> None: + super(CheckTrafficManagerRelativeDnsNameAvailabilityParameters, self).__init__(**kwargs) + self.name = name + self.type = type diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result.py index b3f73ced1df7..2da7e41543e4 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result.py @@ -30,5 +30,6 @@ class DeleteOperationResult(Model): 'operation_result': {'key': 'boolean', 'type': 'bool'}, } - def __init__(self): + def __init__(self, **kwargs): + super(DeleteOperationResult, self).__init__(**kwargs) self.operation_result = None diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result_py3.py new file mode 100644 index 000000000000..5cc1960c6f7e --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeleteOperationResult(Model): + """The result of the request or operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar operation_result: The result of the operation or request. + :vartype operation_result: bool + """ + + _validation = { + 'operation_result': {'readonly': True}, + } + + _attribute_map = { + 'operation_result': {'key': 'boolean', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(DeleteOperationResult, self).__init__(**kwargs) + self.operation_result = None diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config.py index 9091f3f250ed..501be4bfb276 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config.py @@ -43,7 +43,8 @@ class DnsConfig(Model): 'ttl': {'key': 'ttl', 'type': 'long'}, } - def __init__(self, relative_name=None, ttl=None): - self.relative_name = relative_name + def __init__(self, **kwargs): + super(DnsConfig, self).__init__(**kwargs) + self.relative_name = kwargs.get('relative_name', None) self.fqdn = None - self.ttl = ttl + self.ttl = kwargs.get('ttl', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config_py3.py new file mode 100644 index 000000000000..74a79966f868 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DnsConfig(Model): + """Class containing DNS settings in a Traffic Manager profile. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param relative_name: The relative DNS name provided by this Traffic + Manager profile. This value is combined with the DNS domain name used by + Azure Traffic Manager to form the fully-qualified domain name (FQDN) of + the profile. + :type relative_name: str + :ivar fqdn: The fully-qualified domain name (FQDN) of the Traffic Manager + profile. This is formed from the concatenation of the RelativeName with + the DNS domain used by Azure Traffic Manager. + :vartype fqdn: str + :param ttl: The DNS Time-To-Live (TTL), in seconds. This informs the local + DNS resolvers and DNS clients how long to cache DNS responses provided by + this Traffic Manager profile. + :type ttl: long + """ + + _validation = { + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'relative_name': {'key': 'relativeName', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'ttl': {'key': 'ttl', 'type': 'long'}, + } + + def __init__(self, *, relative_name: str=None, ttl: int=None, **kwargs) -> None: + super(DnsConfig, self).__init__(**kwargs) + self.relative_name = relative_name + self.fqdn = None + self.ttl = ttl diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py index d521b844fa53..0054ed7b772b 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py @@ -15,29 +15,26 @@ class Endpoint(ProxyResource): """Class representing a Traffic Manager endpoint. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: str :param target_resource_id: The Azure Resource URI of the of the endpoint. Not applicable to endpoints of type 'ExternalEndpoints'. :type target_resource_id: str - :param target: The fully-qualified DNS name of the endpoint. Traffic - Manager returns this value in DNS responses to direct traffic to this - endpoint. + :param target: The fully-qualified DNS name or IP address of the endpoint. + Traffic Manager returns this value in DNS responses to direct traffic to + this endpoint. :type target: str :param endpoint_status: The status of the endpoint. If the endpoint is Enabled, it is probed for endpoint health and is included in the traffic routing method. Possible values include: 'Enabled', 'Disabled' - :type endpoint_status: str or :class:`EndpointStatus - ` + :type endpoint_status: str or + ~azure.mgmt.trafficmanager.models.EndpointStatus :param weight: The weight of this endpoint when using the 'Weighted' traffic routing method. Possible values are from 1 to 1000. :type weight: long @@ -53,8 +50,8 @@ class Endpoint(ProxyResource): :param endpoint_monitor_status: The monitoring status of the endpoint. Possible values include: 'CheckingEndpoint', 'Online', 'Degraded', 'Disabled', 'Inactive', 'Stopped' - :type endpoint_monitor_status: str or :class:`EndpointMonitorStatus - ` + :type endpoint_monitor_status: str or + ~azure.mgmt.trafficmanager.models.EndpointMonitorStatus :param min_child_endpoints: The minimum number of endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type @@ -63,15 +60,12 @@ class Endpoint(ProxyResource): :param geo_mapping: The list of countries/regions mapped to this endpoint when using the ‘Geographic’ traffic routing method. Please consult Traffic Manager Geographic documentation for a full list of accepted values. - :type geo_mapping: list of str + :type geo_mapping: list[str] + :param custom_headers: List of custom headers. + :type custom_headers: + list[~azure.mgmt.trafficmanager.models.EndpointPropertiesCustomHeadersItem] """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -85,16 +79,18 @@ class Endpoint(ProxyResource): 'endpoint_monitor_status': {'key': 'properties.endpointMonitorStatus', 'type': 'str'}, 'min_child_endpoints': {'key': 'properties.minChildEndpoints', 'type': 'long'}, 'geo_mapping': {'key': 'properties.geoMapping', 'type': '[str]'}, + 'custom_headers': {'key': 'properties.customHeaders', 'type': '[EndpointPropertiesCustomHeadersItem]'}, } - def __init__(self, target_resource_id=None, target=None, endpoint_status=None, weight=None, priority=None, endpoint_location=None, endpoint_monitor_status=None, min_child_endpoints=None, geo_mapping=None): - super(Endpoint, self).__init__() - self.target_resource_id = target_resource_id - self.target = target - self.endpoint_status = endpoint_status - self.weight = weight - self.priority = priority - self.endpoint_location = endpoint_location - self.endpoint_monitor_status = endpoint_monitor_status - self.min_child_endpoints = min_child_endpoints - self.geo_mapping = geo_mapping + def __init__(self, **kwargs): + super(Endpoint, self).__init__(**kwargs) + self.target_resource_id = kwargs.get('target_resource_id', None) + self.target = kwargs.get('target', None) + self.endpoint_status = kwargs.get('endpoint_status', None) + self.weight = kwargs.get('weight', None) + self.priority = kwargs.get('priority', None) + self.endpoint_location = kwargs.get('endpoint_location', None) + self.endpoint_monitor_status = kwargs.get('endpoint_monitor_status', None) + self.min_child_endpoints = kwargs.get('min_child_endpoints', None) + self.geo_mapping = kwargs.get('geo_mapping', None) + self.custom_headers = kwargs.get('custom_headers', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item.py new file mode 100644 index 000000000000..ac5b3c43ed1a --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EndpointPropertiesCustomHeadersItem(Model): + """Custom header name and value. + + :param name: Header name. + :type name: str + :param value: Header value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EndpointPropertiesCustomHeadersItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item_py3.py new file mode 100644 index 000000000000..d0c95f5ca25b --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EndpointPropertiesCustomHeadersItem(Model): + """Custom header name and value. + + :param name: Header name. + :type name: str + :param value: Header value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(EndpointPropertiesCustomHeadersItem, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_py3.py new file mode 100644 index 000000000000..367993bbf1c5 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_py3.py @@ -0,0 +1,96 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class Endpoint(ProxyResource): + """Class representing a Traffic Manager endpoint. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param target_resource_id: The Azure Resource URI of the of the endpoint. + Not applicable to endpoints of type 'ExternalEndpoints'. + :type target_resource_id: str + :param target: The fully-qualified DNS name or IP address of the endpoint. + Traffic Manager returns this value in DNS responses to direct traffic to + this endpoint. + :type target: str + :param endpoint_status: The status of the endpoint. If the endpoint is + Enabled, it is probed for endpoint health and is included in the traffic + routing method. Possible values include: 'Enabled', 'Disabled' + :type endpoint_status: str or + ~azure.mgmt.trafficmanager.models.EndpointStatus + :param weight: The weight of this endpoint when using the 'Weighted' + traffic routing method. Possible values are from 1 to 1000. + :type weight: long + :param priority: The priority of this endpoint when using the ‘Priority’ + traffic routing method. Possible values are from 1 to 1000, lower values + represent higher priority. This is an optional parameter. If specified, + it must be specified on all endpoints, and no two endpoints can share the + same priority value. + :type priority: long + :param endpoint_location: Specifies the location of the external or nested + endpoints when using the ‘Performance’ traffic routing method. + :type endpoint_location: str + :param endpoint_monitor_status: The monitoring status of the endpoint. + Possible values include: 'CheckingEndpoint', 'Online', 'Degraded', + 'Disabled', 'Inactive', 'Stopped' + :type endpoint_monitor_status: str or + ~azure.mgmt.trafficmanager.models.EndpointMonitorStatus + :param min_child_endpoints: The minimum number of endpoints that must be + available in the child profile in order for the parent profile to be + considered available. Only applicable to endpoint of type + 'NestedEndpoints'. + :type min_child_endpoints: long + :param geo_mapping: The list of countries/regions mapped to this endpoint + when using the ‘Geographic’ traffic routing method. Please consult Traffic + Manager Geographic documentation for a full list of accepted values. + :type geo_mapping: list[str] + :param custom_headers: List of custom headers. + :type custom_headers: + list[~azure.mgmt.trafficmanager.models.EndpointPropertiesCustomHeadersItem] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'str'}, + 'endpoint_status': {'key': 'properties.endpointStatus', 'type': 'str'}, + 'weight': {'key': 'properties.weight', 'type': 'long'}, + 'priority': {'key': 'properties.priority', 'type': 'long'}, + 'endpoint_location': {'key': 'properties.endpointLocation', 'type': 'str'}, + 'endpoint_monitor_status': {'key': 'properties.endpointMonitorStatus', 'type': 'str'}, + 'min_child_endpoints': {'key': 'properties.minChildEndpoints', 'type': 'long'}, + 'geo_mapping': {'key': 'properties.geoMapping', 'type': '[str]'}, + 'custom_headers': {'key': 'properties.customHeaders', 'type': '[EndpointPropertiesCustomHeadersItem]'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, target_resource_id: str=None, target: str=None, endpoint_status=None, weight: int=None, priority: int=None, endpoint_location: str=None, endpoint_monitor_status=None, min_child_endpoints: int=None, geo_mapping=None, custom_headers=None, **kwargs) -> None: + super(Endpoint, self).__init__(id=id, name=name, type=type, **kwargs) + self.target_resource_id = target_resource_id + self.target = target + self.endpoint_status = endpoint_status + self.weight = weight + self.priority = priority + self.endpoint_location = endpoint_location + self.endpoint_monitor_status = endpoint_monitor_status + self.min_child_endpoints = min_child_endpoints + self.geo_mapping = geo_mapping + self.custom_headers = custom_headers diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint.py new file mode 100644 index 000000000000..add3cf93b309 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HeatMapEndpoint(Model): + """Class which is a sparse representation of a Traffic Manager endpoint. + + :param resource_id: The ARM Resource ID of this Traffic Manager endpoint. + :type resource_id: str + :param endpoint_id: A number uniquely identifying this endpoint in query + experiences. + :type endpoint_id: int + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'endpoint_id': {'key': 'endpointId', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(HeatMapEndpoint, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.endpoint_id = kwargs.get('endpoint_id', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint_py3.py new file mode 100644 index 000000000000..eff0c0887005 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HeatMapEndpoint(Model): + """Class which is a sparse representation of a Traffic Manager endpoint. + + :param resource_id: The ARM Resource ID of this Traffic Manager endpoint. + :type resource_id: str + :param endpoint_id: A number uniquely identifying this endpoint in query + experiences. + :type endpoint_id: int + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'endpoint_id': {'key': 'endpointId', 'type': 'int'}, + } + + def __init__(self, *, resource_id: str=None, endpoint_id: int=None, **kwargs) -> None: + super(HeatMapEndpoint, self).__init__(**kwargs) + self.resource_id = resource_id + self.endpoint_id = endpoint_id diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model.py new file mode 100644 index 000000000000..255716b0acd9 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class HeatMapModel(ProxyResource): + """Class representing a Traffic Manager HeatMap. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param start_time: The beginning of the time window for this HeatMap, + inclusive. + :type start_time: datetime + :param end_time: The ending of the time window for this HeatMap, + exclusive. + :type end_time: datetime + :param endpoints: The endpoints used in this HeatMap calculation. + :type endpoints: list[~azure.mgmt.trafficmanager.models.HeatMapEndpoint] + :param traffic_flows: The traffic flows produced in this HeatMap + calculation. + :type traffic_flows: list[~azure.mgmt.trafficmanager.models.TrafficFlow] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[HeatMapEndpoint]'}, + 'traffic_flows': {'key': 'properties.trafficFlows', 'type': '[TrafficFlow]'}, + } + + def __init__(self, **kwargs): + super(HeatMapModel, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.endpoints = kwargs.get('endpoints', None) + self.traffic_flows = kwargs.get('traffic_flows', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model_py3.py new file mode 100644 index 000000000000..c5a47ad4f537 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class HeatMapModel(ProxyResource): + """Class representing a Traffic Manager HeatMap. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param start_time: The beginning of the time window for this HeatMap, + inclusive. + :type start_time: datetime + :param end_time: The ending of the time window for this HeatMap, + exclusive. + :type end_time: datetime + :param endpoints: The endpoints used in this HeatMap calculation. + :type endpoints: list[~azure.mgmt.trafficmanager.models.HeatMapEndpoint] + :param traffic_flows: The traffic flows produced in this HeatMap + calculation. + :type traffic_flows: list[~azure.mgmt.trafficmanager.models.TrafficFlow] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[HeatMapEndpoint]'}, + 'traffic_flows': {'key': 'properties.trafficFlows', 'type': '[TrafficFlow]'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, start_time=None, end_time=None, endpoints=None, traffic_flows=None, **kwargs) -> None: + super(HeatMapModel, self).__init__(id=id, name=name, type=type, **kwargs) + self.start_time = start_time + self.end_time = end_time + self.endpoints = endpoints + self.traffic_flows = traffic_flows diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config.py index 590518ae775c..829c3bc20ec4 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config.py @@ -18,12 +18,11 @@ class MonitorConfig(Model): :param profile_monitor_status: The profile-level monitoring status of the Traffic Manager profile. Possible values include: 'CheckingEndpoints', 'Online', 'Degraded', 'Disabled', 'Inactive' - :type profile_monitor_status: str or :class:`ProfileMonitorStatus - ` + :type profile_monitor_status: str or + ~azure.mgmt.trafficmanager.models.ProfileMonitorStatus :param protocol: The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health. Possible values include: 'HTTP', 'HTTPS', 'TCP' - :type protocol: str or :class:`MonitorProtocol - ` + :type protocol: str or ~azure.mgmt.trafficmanager.models.MonitorProtocol :param port: The TCP port used to probe for endpoint health. :type port: long :param path: The path relative to the endpoint domain name used to probe @@ -41,6 +40,12 @@ class MonitorConfig(Model): health check that Traffic Manager tolerates before declaring an endpoint in this profile Degraded after the next failed health check. :type tolerated_number_of_failures: long + :param custom_headers: List of custom headers. + :type custom_headers: + list[~azure.mgmt.trafficmanager.models.MonitorConfigCustomHeadersItem] + :param expected_status_code_ranges: List of expected status code ranges. + :type expected_status_code_ranges: + list[~azure.mgmt.trafficmanager.models.MonitorConfigExpectedStatusCodeRangesItem] """ _attribute_map = { @@ -51,13 +56,18 @@ class MonitorConfig(Model): 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'long'}, 'timeout_in_seconds': {'key': 'timeoutInSeconds', 'type': 'long'}, 'tolerated_number_of_failures': {'key': 'toleratedNumberOfFailures', 'type': 'long'}, + 'custom_headers': {'key': 'customHeaders', 'type': '[MonitorConfigCustomHeadersItem]'}, + 'expected_status_code_ranges': {'key': 'expectedStatusCodeRanges', 'type': '[MonitorConfigExpectedStatusCodeRangesItem]'}, } - def __init__(self, profile_monitor_status=None, protocol=None, port=None, path=None, interval_in_seconds=None, timeout_in_seconds=None, tolerated_number_of_failures=None): - self.profile_monitor_status = profile_monitor_status - self.protocol = protocol - self.port = port - self.path = path - self.interval_in_seconds = interval_in_seconds - self.timeout_in_seconds = timeout_in_seconds - self.tolerated_number_of_failures = tolerated_number_of_failures + def __init__(self, **kwargs): + super(MonitorConfig, self).__init__(**kwargs) + self.profile_monitor_status = kwargs.get('profile_monitor_status', None) + self.protocol = kwargs.get('protocol', None) + self.port = kwargs.get('port', None) + self.path = kwargs.get('path', None) + self.interval_in_seconds = kwargs.get('interval_in_seconds', None) + self.timeout_in_seconds = kwargs.get('timeout_in_seconds', None) + self.tolerated_number_of_failures = kwargs.get('tolerated_number_of_failures', None) + self.custom_headers = kwargs.get('custom_headers', None) + self.expected_status_code_ranges = kwargs.get('expected_status_code_ranges', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item.py new file mode 100644 index 000000000000..e98f2ae02d49 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MonitorConfigCustomHeadersItem(Model): + """Custom header name and value. + + :param name: Header name. + :type name: str + :param value: Header value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MonitorConfigCustomHeadersItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item_py3.py new file mode 100644 index 000000000000..7d616409cf51 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MonitorConfigCustomHeadersItem(Model): + """Custom header name and value. + + :param name: Header name. + :type name: str + :param value: Header value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(MonitorConfigCustomHeadersItem, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item.py new file mode 100644 index 000000000000..a5276d230394 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MonitorConfigExpectedStatusCodeRangesItem(Model): + """Min and max value of a status code range. + + :param min: Min status code. + :type min: int + :param max: Max status code. + :type max: int + """ + + _attribute_map = { + 'min': {'key': 'min', 'type': 'int'}, + 'max': {'key': 'max', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(MonitorConfigExpectedStatusCodeRangesItem, self).__init__(**kwargs) + self.min = kwargs.get('min', None) + self.max = kwargs.get('max', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item_py3.py new file mode 100644 index 000000000000..f999298028a8 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MonitorConfigExpectedStatusCodeRangesItem(Model): + """Min and max value of a status code range. + + :param min: Min status code. + :type min: int + :param max: Max status code. + :type max: int + """ + + _attribute_map = { + 'min': {'key': 'min', 'type': 'int'}, + 'max': {'key': 'max', 'type': 'int'}, + } + + def __init__(self, *, min: int=None, max: int=None, **kwargs) -> None: + super(MonitorConfigExpectedStatusCodeRangesItem, self).__init__(**kwargs) + self.min = min + self.max = max diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_py3.py new file mode 100644 index 000000000000..ed9d0b39ff48 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_py3.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MonitorConfig(Model): + """Class containing endpoint monitoring settings in a Traffic Manager profile. + + :param profile_monitor_status: The profile-level monitoring status of the + Traffic Manager profile. Possible values include: 'CheckingEndpoints', + 'Online', 'Degraded', 'Disabled', 'Inactive' + :type profile_monitor_status: str or + ~azure.mgmt.trafficmanager.models.ProfileMonitorStatus + :param protocol: The protocol (HTTP, HTTPS or TCP) used to probe for + endpoint health. Possible values include: 'HTTP', 'HTTPS', 'TCP' + :type protocol: str or ~azure.mgmt.trafficmanager.models.MonitorProtocol + :param port: The TCP port used to probe for endpoint health. + :type port: long + :param path: The path relative to the endpoint domain name used to probe + for endpoint health. + :type path: str + :param interval_in_seconds: The monitor interval for endpoints in this + profile. This is the interval at which Traffic Manager will check the + health of each endpoint in this profile. + :type interval_in_seconds: long + :param timeout_in_seconds: The monitor timeout for endpoints in this + profile. This is the time that Traffic Manager allows endpoints in this + profile to response to the health check. + :type timeout_in_seconds: long + :param tolerated_number_of_failures: The number of consecutive failed + health check that Traffic Manager tolerates before declaring an endpoint + in this profile Degraded after the next failed health check. + :type tolerated_number_of_failures: long + :param custom_headers: List of custom headers. + :type custom_headers: + list[~azure.mgmt.trafficmanager.models.MonitorConfigCustomHeadersItem] + :param expected_status_code_ranges: List of expected status code ranges. + :type expected_status_code_ranges: + list[~azure.mgmt.trafficmanager.models.MonitorConfigExpectedStatusCodeRangesItem] + """ + + _attribute_map = { + 'profile_monitor_status': {'key': 'profileMonitorStatus', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'long'}, + 'path': {'key': 'path', 'type': 'str'}, + 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'long'}, + 'timeout_in_seconds': {'key': 'timeoutInSeconds', 'type': 'long'}, + 'tolerated_number_of_failures': {'key': 'toleratedNumberOfFailures', 'type': 'long'}, + 'custom_headers': {'key': 'customHeaders', 'type': '[MonitorConfigCustomHeadersItem]'}, + 'expected_status_code_ranges': {'key': 'expectedStatusCodeRanges', 'type': '[MonitorConfigExpectedStatusCodeRangesItem]'}, + } + + def __init__(self, *, profile_monitor_status=None, protocol=None, port: int=None, path: str=None, interval_in_seconds: int=None, timeout_in_seconds: int=None, tolerated_number_of_failures: int=None, custom_headers=None, expected_status_code_ranges=None, **kwargs) -> None: + super(MonitorConfig, self).__init__(**kwargs) + self.profile_monitor_status = profile_monitor_status + self.protocol = protocol + self.port = port + self.path = path + self.interval_in_seconds = interval_in_seconds + self.timeout_in_seconds = timeout_in_seconds + self.tolerated_number_of_failures = tolerated_number_of_failures + self.custom_headers = custom_headers + self.expected_status_code_ranges = expected_status_code_ranges diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py index 61e38bbe7b4e..5c5831e70ccd 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py @@ -15,48 +15,42 @@ class Profile(TrackedResource): """Class representing a Traffic Manager profile. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param location: The Azure Region where the resource lives :type location: str :param profile_status: The status of the Traffic Manager profile. Possible values include: 'Enabled', 'Disabled' - :type profile_status: str or :class:`ProfileStatus - ` + :type profile_status: str or + ~azure.mgmt.trafficmanager.models.ProfileStatus :param traffic_routing_method: The traffic routing method of the Traffic Manager profile. Possible values include: 'Performance', 'Priority', 'Weighted', 'Geographic' - :type traffic_routing_method: str or :class:`TrafficRoutingMethod - ` + :type traffic_routing_method: str or + ~azure.mgmt.trafficmanager.models.TrafficRoutingMethod :param dns_config: The DNS settings of the Traffic Manager profile. - :type dns_config: :class:`DnsConfig - ` + :type dns_config: ~azure.mgmt.trafficmanager.models.DnsConfig :param monitor_config: The endpoint monitoring settings of the Traffic Manager profile. - :type monitor_config: :class:`MonitorConfig - ` + :type monitor_config: ~azure.mgmt.trafficmanager.models.MonitorConfig :param endpoints: The list of endpoints in the Traffic Manager profile. - :type endpoints: list of :class:`Endpoint - ` + :type endpoints: list[~azure.mgmt.trafficmanager.models.Endpoint] + :param traffic_view_enrollment_status: Indicates whether Traffic View is + 'Enabled' or 'Disabled' for the Traffic Manager profile. Null, indicates + 'Disabled'. Enabling this feature will increase the cost of the Traffic + Manage profile. Possible values include: 'Enabled', 'Disabled' + :type traffic_view_enrollment_status: str or + ~azure.mgmt.trafficmanager.models.TrafficViewEnrollmentStatus """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -68,12 +62,14 @@ class Profile(TrackedResource): 'dns_config': {'key': 'properties.dnsConfig', 'type': 'DnsConfig'}, 'monitor_config': {'key': 'properties.monitorConfig', 'type': 'MonitorConfig'}, 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, + 'traffic_view_enrollment_status': {'key': 'properties.trafficViewEnrollmentStatus', 'type': 'str'}, } - def __init__(self, tags=None, location=None, profile_status=None, traffic_routing_method=None, dns_config=None, monitor_config=None, endpoints=None): - super(Profile, self).__init__(tags=tags, location=location) - self.profile_status = profile_status - self.traffic_routing_method = traffic_routing_method - self.dns_config = dns_config - self.monitor_config = monitor_config - self.endpoints = endpoints + def __init__(self, **kwargs): + super(Profile, self).__init__(**kwargs) + self.profile_status = kwargs.get('profile_status', None) + self.traffic_routing_method = kwargs.get('traffic_routing_method', None) + self.dns_config = kwargs.get('dns_config', None) + self.monitor_config = kwargs.get('monitor_config', None) + self.endpoints = kwargs.get('endpoints', None) + self.traffic_view_enrollment_status = kwargs.get('traffic_view_enrollment_status', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_paged.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_paged.py index 3d62cd910cd0..04652ccd9400 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_paged.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_paged.py @@ -14,7 +14,7 @@ class ProfilePaged(Paged): """ - A paging container for iterating over a list of Profile object + A paging container for iterating over a list of :class:`Profile ` object """ _attribute_map = { diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_py3.py new file mode 100644 index 000000000000..f412c1e65900 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_py3.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource_py3 import TrackedResource + + +class Profile(TrackedResource): + """Class representing a Traffic Manager profile. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + :param profile_status: The status of the Traffic Manager profile. Possible + values include: 'Enabled', 'Disabled' + :type profile_status: str or + ~azure.mgmt.trafficmanager.models.ProfileStatus + :param traffic_routing_method: The traffic routing method of the Traffic + Manager profile. Possible values include: 'Performance', 'Priority', + 'Weighted', 'Geographic' + :type traffic_routing_method: str or + ~azure.mgmt.trafficmanager.models.TrafficRoutingMethod + :param dns_config: The DNS settings of the Traffic Manager profile. + :type dns_config: ~azure.mgmt.trafficmanager.models.DnsConfig + :param monitor_config: The endpoint monitoring settings of the Traffic + Manager profile. + :type monitor_config: ~azure.mgmt.trafficmanager.models.MonitorConfig + :param endpoints: The list of endpoints in the Traffic Manager profile. + :type endpoints: list[~azure.mgmt.trafficmanager.models.Endpoint] + :param traffic_view_enrollment_status: Indicates whether Traffic View is + 'Enabled' or 'Disabled' for the Traffic Manager profile. Null, indicates + 'Disabled'. Enabling this feature will increase the cost of the Traffic + Manage profile. Possible values include: 'Enabled', 'Disabled' + :type traffic_view_enrollment_status: str or + ~azure.mgmt.trafficmanager.models.TrafficViewEnrollmentStatus + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'profile_status': {'key': 'properties.profileStatus', 'type': 'str'}, + 'traffic_routing_method': {'key': 'properties.trafficRoutingMethod', 'type': 'str'}, + 'dns_config': {'key': 'properties.dnsConfig', 'type': 'DnsConfig'}, + 'monitor_config': {'key': 'properties.monitorConfig', 'type': 'MonitorConfig'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, + 'traffic_view_enrollment_status': {'key': 'properties.trafficViewEnrollmentStatus', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, tags=None, location: str=None, profile_status=None, traffic_routing_method=None, dns_config=None, monitor_config=None, endpoints=None, traffic_view_enrollment_status=None, **kwargs) -> None: + super(Profile, self).__init__(id=id, name=name, type=type, tags=tags, location=location, **kwargs) + self.profile_status = profile_status + self.traffic_routing_method = traffic_routing_method + self.dns_config = dns_config + self.monitor_config = monitor_config + self.endpoints = endpoints + self.traffic_view_enrollment_status = traffic_view_enrollment_status diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource.py index 27d4c8b91fb5..6c28b1486d47 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource.py @@ -16,24 +16,21 @@ class ProxyResource(Resource): """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: str """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self): - super(ProxyResource, self).__init__() + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource_py3.py new file mode 100644 index 000000000000..2ddbec4c9593 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, **kwargs) -> None: + super(ProxyResource, self).__init__(id=id, name=name, type=type, **kwargs) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience.py new file mode 100644 index 000000000000..18f8555520a1 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class QueryExperience(Model): + """Class representing a Traffic Manager HeatMap query experience properties. + + All required parameters must be populated in order to send to Azure. + + :param endpoint_id: Required. The id of the endpoint from the 'endpoints' + array which these queries were routed to. + :type endpoint_id: int + :param query_count: Required. The number of queries originating from this + location. + :type query_count: int + :param latency: The latency experienced by queries originating from this + location. + :type latency: float + """ + + _validation = { + 'endpoint_id': {'required': True}, + 'query_count': {'required': True}, + } + + _attribute_map = { + 'endpoint_id': {'key': 'endpointId', 'type': 'int'}, + 'query_count': {'key': 'queryCount', 'type': 'int'}, + 'latency': {'key': 'latency', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(QueryExperience, self).__init__(**kwargs) + self.endpoint_id = kwargs.get('endpoint_id', None) + self.query_count = kwargs.get('query_count', None) + self.latency = kwargs.get('latency', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience_py3.py new file mode 100644 index 000000000000..84b7835b59a0 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class QueryExperience(Model): + """Class representing a Traffic Manager HeatMap query experience properties. + + All required parameters must be populated in order to send to Azure. + + :param endpoint_id: Required. The id of the endpoint from the 'endpoints' + array which these queries were routed to. + :type endpoint_id: int + :param query_count: Required. The number of queries originating from this + location. + :type query_count: int + :param latency: The latency experienced by queries originating from this + location. + :type latency: float + """ + + _validation = { + 'endpoint_id': {'required': True}, + 'query_count': {'required': True}, + } + + _attribute_map = { + 'endpoint_id': {'key': 'endpointId', 'type': 'int'}, + 'query_count': {'key': 'queryCount', 'type': 'int'}, + 'latency': {'key': 'latency', 'type': 'float'}, + } + + def __init__(self, *, endpoint_id: int, query_count: int, latency: float=None, **kwargs) -> None: + super(QueryExperience, self).__init__(**kwargs) + self.endpoint_id = endpoint_id + self.query_count = query_count + self.latency = latency diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region.py index 3502d19c19e4..1e358a541bfd 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region.py @@ -22,8 +22,7 @@ class Region(Model): :type name: str :param regions: The list of Regions grouped under this Region in the Geographic Hierarchy. - :type regions: list of :class:`Region - ` + :type regions: list[~azure.mgmt.trafficmanager.models.Region] """ _attribute_map = { @@ -32,7 +31,8 @@ class Region(Model): 'regions': {'key': 'regions', 'type': '[Region]'}, } - def __init__(self, code=None, name=None, regions=None): - self.code = code - self.name = name - self.regions = regions + def __init__(self, **kwargs): + super(Region, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.name = kwargs.get('name', None) + self.regions = kwargs.get('regions', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region_py3.py new file mode 100644 index 000000000000..5899c229f365 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Region(Model): + """Class representing a region in the Geographic hierarchy used with the + Geographic traffic routing method. + + :param code: The code of the region + :type code: str + :param name: The name of the region + :type name: str + :param regions: The list of Regions grouped under this Region in the + Geographic Hierarchy. + :type regions: list[~azure.mgmt.trafficmanager.models.Region] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'regions': {'key': 'regions', 'type': '[Region]'}, + } + + def __init__(self, *, code: str=None, name: str=None, regions=None, **kwargs) -> None: + super(Region, self).__init__(**kwargs) + self.code = code + self.name = name + self.regions = regions diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py index 502263321c4f..e69909f81f81 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py @@ -15,32 +15,24 @@ class Resource(Model): """The core properties of ARM resources. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: str """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self): - self.id = None - self.name = None - self.type = None + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource_py3.py new file mode 100644 index 000000000000..b3b3eb79ac2c --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """The core properties of ARM resources. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py index 9969862c3a39..0400b888df53 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py @@ -15,29 +15,20 @@ class TrackedResource(Resource): """The resource model definition for a ARM tracked top level resource. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param location: The Azure Region where the resource lives :type location: str """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -46,7 +37,7 @@ class TrackedResource(Resource): 'location': {'key': 'location', 'type': 'str'}, } - def __init__(self, tags=None, location=None): - super(TrackedResource, self).__init__() - self.tags = tags - self.location = location + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource_py3.py new file mode 100644 index 000000000000..90ace2635832 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, tags=None, location: str=None, **kwargs) -> None: + super(TrackedResource, self).__init__(id=id, name=name, type=type, **kwargs) + self.tags = tags + self.location = location diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow.py new file mode 100644 index 000000000000..0c32b8cac1d3 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TrafficFlow(Model): + """Class representing a Traffic Manager HeatMap traffic flow properties. + + :param source_ip: The IP address that this query experience originated + from. + :type source_ip: str + :param latitude: The approximate latitude that these queries originated + from. + :type latitude: float + :param longitude: The approximate longitude that these queries originated + from. + :type longitude: float + :param query_experiences: The query experiences produced in this HeatMap + calculation. + :type query_experiences: + list[~azure.mgmt.trafficmanager.models.QueryExperience] + """ + + _attribute_map = { + 'source_ip': {'key': 'sourceIp', 'type': 'str'}, + 'latitude': {'key': 'latitude', 'type': 'float'}, + 'longitude': {'key': 'longitude', 'type': 'float'}, + 'query_experiences': {'key': 'queryExperiences', 'type': '[QueryExperience]'}, + } + + def __init__(self, **kwargs): + super(TrafficFlow, self).__init__(**kwargs) + self.source_ip = kwargs.get('source_ip', None) + self.latitude = kwargs.get('latitude', None) + self.longitude = kwargs.get('longitude', None) + self.query_experiences = kwargs.get('query_experiences', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow_py3.py new file mode 100644 index 000000000000..28c396b417f5 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TrafficFlow(Model): + """Class representing a Traffic Manager HeatMap traffic flow properties. + + :param source_ip: The IP address that this query experience originated + from. + :type source_ip: str + :param latitude: The approximate latitude that these queries originated + from. + :type latitude: float + :param longitude: The approximate longitude that these queries originated + from. + :type longitude: float + :param query_experiences: The query experiences produced in this HeatMap + calculation. + :type query_experiences: + list[~azure.mgmt.trafficmanager.models.QueryExperience] + """ + + _attribute_map = { + 'source_ip': {'key': 'sourceIp', 'type': 'str'}, + 'latitude': {'key': 'latitude', 'type': 'float'}, + 'longitude': {'key': 'longitude', 'type': 'float'}, + 'query_experiences': {'key': 'queryExperiences', 'type': '[QueryExperience]'}, + } + + def __init__(self, *, source_ip: str=None, latitude: float=None, longitude: float=None, query_experiences=None, **kwargs) -> None: + super(TrafficFlow, self).__init__(**kwargs) + self.source_ip = source_ip + self.latitude = latitude + self.longitude = longitude + self.query_experiences = query_experiences diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy.py index b10c5fe5b23d..11d886c49f10 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy.py @@ -16,29 +16,19 @@ class TrafficManagerGeographicHierarchy(ProxyResource): """Class representing the Geographic hierarchy used with the Geographic traffic routing method. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: str :param geographic_hierarchy: The region at the root of the hierarchy from all the regions in the hierarchy can be retrieved. - :type geographic_hierarchy: :class:`Region - ` + :type geographic_hierarchy: ~azure.mgmt.trafficmanager.models.Region """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -46,6 +36,6 @@ class TrafficManagerGeographicHierarchy(ProxyResource): 'geographic_hierarchy': {'key': 'properties.geographicHierarchy', 'type': 'Region'}, } - def __init__(self, geographic_hierarchy=None): - super(TrafficManagerGeographicHierarchy, self).__init__() - self.geographic_hierarchy = geographic_hierarchy + def __init__(self, **kwargs): + super(TrafficManagerGeographicHierarchy, self).__init__(**kwargs) + self.geographic_hierarchy = kwargs.get('geographic_hierarchy', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy_py3.py new file mode 100644 index 000000000000..142fffe5f15b --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class TrafficManagerGeographicHierarchy(ProxyResource): + """Class representing the Geographic hierarchy used with the Geographic + traffic routing method. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param geographic_hierarchy: The region at the root of the hierarchy from + all the regions in the hierarchy can be retrieved. + :type geographic_hierarchy: ~azure.mgmt.trafficmanager.models.Region + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'geographic_hierarchy': {'key': 'properties.geographicHierarchy', 'type': 'Region'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, geographic_hierarchy=None, **kwargs) -> None: + super(TrafficManagerGeographicHierarchy, self).__init__(id=id, name=name, type=type, **kwargs) + self.geographic_hierarchy = geographic_hierarchy diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_management_client_enums.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_management_client_enums.py index 2cfc1756cb51..5efc19f68740 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_management_client_enums.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_management_client_enums.py @@ -12,13 +12,13 @@ from enum import Enum -class EndpointStatus(Enum): +class EndpointStatus(str, Enum): enabled = "Enabled" disabled = "Disabled" -class EndpointMonitorStatus(Enum): +class EndpointMonitorStatus(str, Enum): checking_endpoint = "CheckingEndpoint" online = "Online" @@ -28,7 +28,7 @@ class EndpointMonitorStatus(Enum): stopped = "Stopped" -class ProfileMonitorStatus(Enum): +class ProfileMonitorStatus(str, Enum): checking_endpoints = "CheckingEndpoints" online = "Online" @@ -37,22 +37,28 @@ class ProfileMonitorStatus(Enum): inactive = "Inactive" -class MonitorProtocol(Enum): +class MonitorProtocol(str, Enum): http = "HTTP" https = "HTTPS" tcp = "TCP" -class ProfileStatus(Enum): +class ProfileStatus(str, Enum): enabled = "Enabled" disabled = "Disabled" -class TrafficRoutingMethod(Enum): +class TrafficRoutingMethod(str, Enum): performance = "Performance" priority = "Priority" weighted = "Weighted" geographic = "Geographic" + + +class TrafficViewEnrollmentStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability.py index a38a59b5f873..f51a8785201b 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability.py @@ -37,9 +37,10 @@ class TrafficManagerNameAvailability(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, name=None, type=None, name_available=None, reason=None, message=None): - self.name = name - self.type = type - self.name_available = name_available - self.reason = reason - self.message = message + def __init__(self, **kwargs): + super(TrafficManagerNameAvailability, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability_py3.py new file mode 100644 index 000000000000..c28513705c95 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TrafficManagerNameAvailability(Model): + """Class representing a Traffic Manager Name Availability response. + + :param name: The relative name. + :type name: str + :param type: Traffic Manager profile resource type. + :type type: str + :param name_available: Describes whether the relative name is available or + not. + :type name_available: bool + :param reason: The reason why the name is not available, when applicable. + :type reason: str + :param message: Descriptive message that explains why the name is not + available, when applicable. + :type message: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, type: str=None, name_available: bool=None, reason: str=None, message: str=None, **kwargs) -> None: + super(TrafficManagerNameAvailability, self).__init__(**kwargs) + self.name = name + self.type = type + self.name_available = name_available + self.reason = reason + self.message = message diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py index 415f816221f4..d337ba0ff8a0 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py @@ -12,9 +12,11 @@ from .endpoints_operations import EndpointsOperations from .profiles_operations import ProfilesOperations from .geographic_hierarchies_operations import GeographicHierarchiesOperations +from .heat_map_operations import HeatMapOperations __all__ = [ 'EndpointsOperations', 'ProfilesOperations', 'GeographicHierarchiesOperations', + 'HeatMapOperations', ] diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/endpoints_operations.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/endpoints_operations.py index b115a7edf4b5..f4edba686289 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/endpoints_operations.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/endpoints_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,16 +22,18 @@ class EndpointsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-05-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-05-01" + self.api_version = "2018-03-01" self.config = config @@ -52,20 +54,19 @@ def update( :type endpoint_name: str :param parameters: The Traffic Manager endpoint parameters supplied to the Update operation. - :type parameters: :class:`Endpoint - ` + :type parameters: ~azure.mgmt.trafficmanager.models.Endpoint :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Endpoint ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Endpoint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Endpoint or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -95,7 +96,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -112,6 +113,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'} def get( self, resource_group_name, profile_name, endpoint_type, endpoint_name, custom_headers=None, raw=False, **operation_config): @@ -131,13 +133,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Endpoint ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Endpoint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Endpoint or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -163,7 +165,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -180,6 +182,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'} def create_or_update( self, resource_group_name, profile_name, endpoint_type, endpoint_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -198,20 +201,19 @@ def create_or_update( :type endpoint_name: str :param parameters: The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. - :type parameters: :class:`Endpoint - ` + :type parameters: ~azure.mgmt.trafficmanager.models.Endpoint :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Endpoint ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Endpoint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Endpoint or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -241,7 +243,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -260,6 +262,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'} def delete( self, resource_group_name, profile_name, endpoint_type, endpoint_name, custom_headers=None, raw=False, **operation_config): @@ -281,14 +284,13 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`DeleteOperationResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: DeleteOperationResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.DeleteOperationResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -314,7 +316,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -331,3 +333,4 @@ def delete( return client_raw_response return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'} diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/geographic_hierarchies_operations.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/geographic_hierarchies_operations.py index a08339703e51..48ec79c5cc6f 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/geographic_hierarchies_operations.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/geographic_hierarchies_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,16 +22,18 @@ class GeographicHierarchiesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-05-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-05-01" + self.api_version = "2018-03-01" self.config = config @@ -45,14 +47,15 @@ def get_default( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`TrafficManagerGeographicHierarchy - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: TrafficManagerGeographicHierarchy or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.trafficmanager.models.TrafficManagerGeographicHierarchy or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/providers/Microsoft.Network/trafficManagerGeographicHierarchies/default' + url = self.get_default.metadata['url'] # Construct parameters query_parameters = {} @@ -70,7 +73,7 @@ def get_default( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -87,3 +90,4 @@ def get_default( return client_raw_response return deserialized + get_default.metadata = {'url': '/providers/Microsoft.Network/trafficManagerGeographicHierarchies/default'} diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/heat_map_operations.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/heat_map_operations.py new file mode 100644 index 000000000000..0e2006fa2c8d --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/heat_map_operations.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class HeatMapOperations(object): + """HeatMapOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar heat_map_type: The type of HeatMap for the Traffic Manager profile. Constant value: "default". + :ivar api_version: Client Api Version. Constant value: "2018-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.heat_map_type = "default" + self.api_version = "2018-03-01" + + self.config = config + + def get( + self, resource_group_name, profile_name, top_left=None, bot_right=None, custom_headers=None, raw=False, **operation_config): + """Gets latest heatmap for Traffic Manager profile. + + :param resource_group_name: The name of the resource group containing + the Traffic Manager endpoint. + :type resource_group_name: str + :param profile_name: The name of the Traffic Manager profile. + :type profile_name: str + :param top_left: The top left latitude,longitude pair of the + rectangular viewport to query for. + :type top_left: list[float] + :param bot_right: The bottom right latitude,longitude pair of the + rectangular viewport to query for. + :type bot_right: list[float] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HeatMapModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.HeatMapModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str'), + 'heatMapType': self._serialize.url("self.heat_map_type", self.heat_map_type, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if top_left is not None: + query_parameters['topLeft'] = self._serialize.query("top_left", top_left, '[float]', div=',', max_items=2, min_items=2) + if bot_right is not None: + query_parameters['botRight'] = self._serialize.query("bot_right", bot_right, '[float]', div=',', max_items=2, min_items=2) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('HeatMapModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/heatMaps/{heatMapType}'} diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/profiles_operations.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/profiles_operations.py index eceeab07fe19..d7b1ab52f633 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/profiles_operations.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/profiles_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,16 +22,18 @@ class ProfilesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-05-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-05-01" + self.api_version = "2018-03-01" self.config = config @@ -48,16 +50,17 @@ def check_traffic_manager_relative_dns_name_availability( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`TrafficManagerNameAvailability - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: TrafficManagerNameAvailability or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.trafficmanager.models.TrafficManagerNameAvailability or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = models.CheckTrafficManagerRelativeDnsNameAvailabilityParameters(name=name, type=type) # Construct URL - url = '/providers/Microsoft.Network/checkTrafficManagerNameAvailability' + url = self.check_traffic_manager_relative_dns_name_availability.metadata['url'] # Construct parameters query_parameters = {} @@ -79,7 +82,7 @@ def check_traffic_manager_relative_dns_name_availability( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -96,6 +99,7 @@ def check_traffic_manager_relative_dns_name_availability( return client_raw_response return deserialized + check_traffic_manager_relative_dns_name_availability.metadata = {'url': '/providers/Microsoft.Network/checkTrafficManagerNameAvailability'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -109,15 +113,16 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ProfilePaged - ` + :return: An iterator like instance of Profile + :rtype: + ~azure.mgmt.trafficmanager.models.ProfilePaged[~azure.mgmt.trafficmanager.models.Profile] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -145,7 +150,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -163,6 +168,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles'} def list_by_subscription( self, custom_headers=None, raw=False, **operation_config): @@ -173,15 +179,16 @@ def list_by_subscription( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ProfilePaged - ` + :return: An iterator like instance of Profile + :rtype: + ~azure.mgmt.trafficmanager.models.ProfilePaged[~azure.mgmt.trafficmanager.models.Profile] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles' + url = self.list_by_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -208,7 +215,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -226,6 +233,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles'} def get( self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): @@ -241,13 +249,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Profile ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Profile or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Profile or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -271,7 +279,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -288,6 +296,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}'} def create_or_update( self, resource_group_name, profile_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -300,20 +309,19 @@ def create_or_update( :type profile_name: str :param parameters: The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. - :type parameters: :class:`Profile - ` + :type parameters: ~azure.mgmt.trafficmanager.models.Profile :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Profile ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Profile or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Profile or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -341,7 +349,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -360,6 +368,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}'} def delete( self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): @@ -376,14 +385,13 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`DeleteOperationResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: DeleteOperationResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.DeleteOperationResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -407,7 +415,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -424,6 +432,7 @@ def delete( return client_raw_response return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}'} def update( self, resource_group_name, profile_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -436,20 +445,19 @@ def update( :type profile_name: str :param parameters: The Traffic Manager profile parameters supplied to the Update operation. - :type parameters: :class:`Profile - ` + :type parameters: ~azure.mgmt.trafficmanager.models.Profile :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Profile ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Profile or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Profile or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -477,7 +485,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -494,3 +502,4 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}'} diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/traffic_manager_management_client.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/traffic_manager_management_client.py index 4fc420ca3bdf..5982206b29ae 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/traffic_manager_management_client.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/traffic_manager_management_client.py @@ -9,13 +9,14 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from .operations.endpoints_operations import EndpointsOperations from .operations.profiles_operations import ProfilesOperations from .operations.geographic_hierarchies_operations import GeographicHierarchiesOperations +from .operations.heat_map_operations import HeatMapOperations from . import models @@ -41,21 +42,19 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(TrafficManagerManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('trafficmanagermanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-trafficmanager/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class TrafficManagerManagementClient(object): +class TrafficManagerManagementClient(SDKClient): """TrafficManagerManagementClient :ivar config: Configuration for client. @@ -67,6 +66,8 @@ class TrafficManagerManagementClient(object): :vartype profiles: azure.mgmt.trafficmanager.operations.ProfilesOperations :ivar geographic_hierarchies: GeographicHierarchies operations :vartype geographic_hierarchies: azure.mgmt.trafficmanager.operations.GeographicHierarchiesOperations + :ivar heat_map: HeatMap operations + :vartype heat_map: azure.mgmt.trafficmanager.operations.HeatMapOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -82,10 +83,10 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = TrafficManagerManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(TrafficManagerManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2017-05-01' + self.api_version = '2018-03-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -95,3 +96,5 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.geographic_hierarchies = GeographicHierarchiesOperations( self._client, self.config, self._serialize, self._deserialize) + self.heat_map = HeatMapOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/version.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/version.py index 57866fdf17d0..1002e003856c 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/version.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.40.0" +VERSION = "0.50.0" diff --git a/azure-mgmt-trafficmanager/build.json b/azure-mgmt-trafficmanager/build.json deleted file mode 100644 index f1f715d8363e..000000000000 --- a/azure-mgmt-trafficmanager/build.json +++ /dev/null @@ -1 +0,0 @@ -{"autorest": "1.1.0", "date": "2017-06-30T18:58:00Z", "version": ""} \ No newline at end of file diff --git a/azure-mgmt-trafficmanager/sdk_packaging.toml b/azure-mgmt-trafficmanager/sdk_packaging.toml new file mode 100644 index 000000000000..95a3d39ca5db --- /dev/null +++ b/azure-mgmt-trafficmanager/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-trafficmanager" +package_pprint_name = "Traffic Manager" +package_doc_id = "traffic-manager" +is_stable = false diff --git a/azure-mgmt-trafficmanager/setup.py b/azure-mgmt-trafficmanager/setup.py index 9eed435aa049..c126f5565201 100644 --- a/azure-mgmt-trafficmanager/setup.py +++ b/azure-mgmt-trafficmanager/setup.py @@ -61,7 +61,7 @@ long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ 'Development Status :: 4 - Beta', @@ -69,17 +69,16 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(), + packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.8', - 'azure-common~=1.1.6', + 'msrestazure>=0.4.27,<2.0.0', + 'azure-common~=1.1', ], cmdclass=cmdclass ) diff --git a/azure-sdk-testutils/test-requirements.txt b/azure-sdk-testutils/test-requirements.txt deleted file mode 100644 index f726b90e99ac..000000000000 --- a/azure-sdk-testutils/test-requirements.txt +++ /dev/null @@ -1,9 +0,0 @@ --r ../requirements.txt - -pytest-cov -pytest>=3.5.1 -azure-devtools>=0.4.1 -vcrpy -readme_renderer -wheel -cookiecutter diff --git a/azure-sdk-tools/changelog_generics.rst b/azure-sdk-tools/changelog_generics.rst new file mode 100644 index 000000000000..f0374878e1ac --- /dev/null +++ b/azure-sdk-tools/changelog_generics.rst @@ -0,0 +1,38 @@ +Autorest context manager + +**Features** + +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +Autorest 3.x + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +Misc + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 \ No newline at end of file diff --git a/azure-sdk-testutils/devtools_testutils/__init__.py b/azure-sdk-tools/devtools_testutils/__init__.py similarity index 100% rename from azure-sdk-testutils/devtools_testutils/__init__.py rename to azure-sdk-tools/devtools_testutils/__init__.py diff --git a/azure-sdk-testutils/devtools_testutils/config.py b/azure-sdk-tools/devtools_testutils/config.py similarity index 100% rename from azure-sdk-testutils/devtools_testutils/config.py rename to azure-sdk-tools/devtools_testutils/config.py diff --git a/azure-sdk-testutils/devtools_testutils/mgmt_settings_fake.py b/azure-sdk-tools/devtools_testutils/mgmt_settings_fake.py similarity index 100% rename from azure-sdk-testutils/devtools_testutils/mgmt_settings_fake.py rename to azure-sdk-tools/devtools_testutils/mgmt_settings_fake.py diff --git a/azure-sdk-testutils/devtools_testutils/mgmt_testcase.py b/azure-sdk-tools/devtools_testutils/mgmt_testcase.py similarity index 100% rename from azure-sdk-testutils/devtools_testutils/mgmt_testcase.py rename to azure-sdk-tools/devtools_testutils/mgmt_testcase.py diff --git a/azure-sdk-testutils/devtools_testutils/resource_testcase.py b/azure-sdk-tools/devtools_testutils/resource_testcase.py similarity index 100% rename from azure-sdk-testutils/devtools_testutils/resource_testcase.py rename to azure-sdk-tools/devtools_testutils/resource_testcase.py diff --git a/azure-sdk-testutils/devtools_testutils/setup.py b/azure-sdk-tools/devtools_testutils/setup.py similarity index 100% rename from azure-sdk-testutils/devtools_testutils/setup.py rename to azure-sdk-tools/devtools_testutils/setup.py diff --git a/azure-sdk-testutils/devtools_testutils/storage_testcase.py b/azure-sdk-tools/devtools_testutils/storage_testcase.py similarity index 100% rename from azure-sdk-testutils/devtools_testutils/storage_testcase.py rename to azure-sdk-tools/devtools_testutils/storage_testcase.py diff --git a/azure-sdk-tools/packaging_requirements.txt b/azure-sdk-tools/packaging_requirements.txt new file mode 100644 index 000000000000..8e9429c459e0 --- /dev/null +++ b/azure-sdk-tools/packaging_requirements.txt @@ -0,0 +1,5 @@ +packaging +wheel +Jinja2 +pytoml +json-delta>=2.0 \ No newline at end of file diff --git a/azure-sdk-tools/packaging_tools/__init__.py b/azure-sdk-tools/packaging_tools/__init__.py new file mode 100644 index 000000000000..ab7099952f52 --- /dev/null +++ b/azure-sdk-tools/packaging_tools/__init__.py @@ -0,0 +1,62 @@ +import logging +from pathlib import Path +from typing import Dict, Any + +from jinja2 import Template, PackageLoader, Environment +from .conf import read_conf, build_default_conf, CONF_NAME + +_LOGGER = logging.getLogger(__name__) + +_CWD = Path(__file__).resolve().parent +_TEMPLATE_PATH = _CWD / "template" + +def build_config(config : Dict[str, Any]) -> Dict[str, str]: + """Will build the actual config for Jinja2, based on SDK config. + """ + result = config.copy() + # Manage the classifier stable/beta + is_stable = result.pop("is_stable", False) + if is_stable: + result["classifier"] = "Development Status :: 5 - Production/Stable" + else: + result["classifier"] = "Development Status :: 4 - Beta" + # Manage the nspkg + package_name = result["package_name"] + result["package_nspkg"] = package_name[:package_name.rindex('-')]+"-nspkg" + + # Return result + return result + +def build_packaging(package_name: str, output_folder: str, build_conf: bool = False) -> None: + _LOGGER.info("Building template %s", package_name) + package_folder = Path(output_folder) / Path(package_name) + + if build_conf: + build_default_conf(package_folder, package_name) + + conf = read_conf(package_folder) + if not conf: + raise ValueError("Create a {} file before calling this script".format(package_folder / CONF_NAME)) + + env = Environment( + loader=PackageLoader('packaging_tools', 'templates'), + keep_trailing_newline=True + ) + conf = build_config(conf) + + for template_name in env.list_templates(): + future_filepath = Path(output_folder) / package_name / template_name + + # Might decide to make it more generic one day + if template_name == "HISTORY.rst" and future_filepath.exists(): + _LOGGER.info("Skipping HISTORY.txt template, since a previous one was found") + # Never overwirte the ChangeLog + continue + + template = env.get_template(template_name) + result = template.render(**conf) + + with open(Path(output_folder) / package_name / template_name, "w") as fd: + fd.write(result) + + _LOGGER.info("Template done %s", package_name) \ No newline at end of file diff --git a/azure-sdk-tools/packaging_tools/__main__.py b/azure-sdk-tools/packaging_tools/__main__.py new file mode 100644 index 000000000000..2faec6d52012 --- /dev/null +++ b/azure-sdk-tools/packaging_tools/__main__.py @@ -0,0 +1,41 @@ +import argparse +import logging +import sys + +from . import build_packaging + +_LOGGER = logging.getLogger(__name__) + +_epilog="""This script will automatically build the TOML configuration file with default value if it doesn't exist. +""" + +parser = argparse.ArgumentParser( + description='Packaging tools for Azure SDK for Python', + formatter_class=argparse.RawTextHelpFormatter, + epilog=_epilog +) +parser.add_argument('--output', '-o', + dest='output', default='.', + help='Output dir, should be SDK repo folder. [default: %(default)s]') +parser.add_argument("--debug", + dest="debug", action="store_true", + help="Verbosity in DEBUG mode") +parser.add_argument("--build-conf", + dest="build_conf", action="store_true", + help="Build a default TOML file, with package name, fake pretty name, as beta package and no doc page. Do nothing if the file exists, remove manually the file if needed.") +parser.add_argument('package_name', help='The package name.') + +args = parser.parse_args() + +main_logger = logging.getLogger() +logging.basicConfig() +main_logger.setLevel(logging.DEBUG if args.debug else logging.INFO) + +try: + build_packaging(args.package_name, args.output, build_conf=args.build_conf) +except Exception as err: + if args.debug: + _LOGGER.exception(err) + else: + _LOGGER.critical(err) + sys.exit(1) \ No newline at end of file diff --git a/azure-sdk-tools/packaging_tools/change_log.py b/azure-sdk-tools/packaging_tools/change_log.py new file mode 100644 index 000000000000..109b4a3593ed --- /dev/null +++ b/azure-sdk-tools/packaging_tools/change_log.py @@ -0,0 +1,191 @@ +import json +import logging + +from json_delta import diff + +_LOGGER = logging.getLogger(__name__) + +class ChangeLog: + def __init__(self, old_report, new_report): + self.features = [] + self.breaking_changes = [] + self._old_report = old_report + self._new_report = new_report + + def build_md(self): + buffer = [] + if self.features: + buffer.append("**Features**") + buffer.append("") + for feature in self.features: + buffer.append("- "+feature) + buffer.append("") + if self.breaking_changes: + buffer.append("**Breaking changes**") + buffer.append("") + for breaking_change in self.breaking_changes: + buffer.append("- "+breaking_change) + return "\n".join(buffer).strip() + + @staticmethod + def _unpack_diff_entry(diff_entry): + return diff_entry[0], len(diff_entry) == 1 + + def operation(self, diff_entry): + path, is_deletion = self._unpack_diff_entry(diff_entry) + + # Is this a new operation group? + _, operation_name, *remaining_path = path + if not remaining_path: + if is_deletion: + self.breaking_changes.append(_REMOVE_OPERATION_GROUP.format(operation_name)) + else: + self.features.append(_ADD_OPERATION_GROUP.format(operation_name)) + return + + _, *remaining_path = remaining_path + if not remaining_path: + # Not common, but this means this has changed a lot. Compute the list manually + old_ops_name = list(self._old_report["operations"][operation_name]["functions"]) + new_ops_name = list(self._new_report["operations"][operation_name]["functions"]) + for removed_function in set(old_ops_name) - set(new_ops_name): + self.breaking_changes.append(_REMOVE_OPERATION.format(operation_name, removed_function)) + for added_function in set(new_ops_name) - set(old_ops_name): + self.features.append(_ADD_OPERATION.format(operation_name, added_function)) + return + + # Is this a new operation, inside a known operation group? + function_name, *remaining_path = remaining_path + if not remaining_path: + if is_deletion: + self.breaking_changes.append(_REMOVE_OPERATION.format(operation_name, function_name)) + else: + self.features.append(_ADD_OPERATION.format(operation_name, function_name)) + return + + if remaining_path[0] == "metadata": + # Ignore change in metadata for now, they have no impact + return + + # So method signaure changed. Be vague for now + self.breaking_changes.append(_SIGNATURE_CHANGE.format(operation_name, function_name)) + + + def models(self, diff_entry): + path, is_deletion = self._unpack_diff_entry(diff_entry) + + # Is this a new model? + _, mtype, model_name, *remaining_path = path + if not remaining_path: + # A new model or a model deletion is not very interesting by itself + # since it usually means that there is a new operation + # + # We might miss some discrimanator new sub-classes however + return + + # That's a model signature change + if mtype in ["enums", "exceptions"]: + # Don't change log anything for Enums for now + return + + _, *remaining_path = remaining_path + if not remaining_path: # This means massive signature changes, that we don't even try to list them + self.breaking_changes.append(_MODEL_SIGNATURE_CHANGE.format(model_name)) + return + + # This is a real model + parameter_name, *remaining_path = remaining_path + is_required = lambda report, model_name, param_name: report["models"]["models"][model_name]["parameters"][param_name]["properties"]["required"] + if not remaining_path: + if is_deletion: + self.breaking_changes.append(_MODEL_PARAM_DELETE.format(model_name, parameter_name)) + else: + # This one is tough, if the new parameter is "required", + # then it's breaking. If not, it's a feature + if is_required(self._new_report, model_name, parameter_name): + self.breaking_changes.append(_MODEL_PARAM_ADD_REQUIRED.format(model_name, parameter_name)) + else: + self.features.append(_MODEL_PARAM_ADD.format(model_name, parameter_name)) + return + + # The parameter already exists + new_is_required = is_required(self._new_report, model_name, parameter_name) + old_is_required = is_required(self._old_report, model_name, parameter_name) + + if new_is_required and not old_is_required: + # This shift from optional to required + self.breaking_changes.append(_MODEL_PARAM_CHANGE_REQUIRED.format(parameter_name, model_name)) + return + + +## Features +_ADD_OPERATION_GROUP = "Added operation group {}" +_ADD_OPERATION = "Added operation {}.{}" +_MODEL_PARAM_ADD = "Model {} has a new parameter {}" + +## Breaking Changes +_REMOVE_OPERATION_GROUP = "Removed operation group {}" +_REMOVE_OPERATION = "Removed operation {}.{}" +_SIGNATURE_CHANGE = "Operation {}.{} has a new signature" +_MODEL_SIGNATURE_CHANGE = "Model {} has a new signature" +_MODEL_PARAM_DELETE = "Model {} no longer has parameter {}" +_MODEL_PARAM_ADD_REQUIRED = "Model {} has a new required parameter {}" +_MODEL_PARAM_CHANGE_REQUIRED = "Parameter {} of model {} is now required" + +def build_change_log(old_report, new_report): + change_log = ChangeLog(old_report, new_report) + + result = diff(old_report, new_report) + + for diff_line in result: + # Operations + if diff_line[0][0] == "operations": + change_log.operation(diff_line) + else: + change_log.models(diff_line) + + return change_log + + +if __name__ == "__main__": + import argparse + + parser = argparse.ArgumentParser( + description='ChangeLog computation', + formatter_class=argparse.RawTextHelpFormatter, + epilog="Package Name and Package Print are mutually exclusive and at least one must be provided" + ) + parser.add_argument('base_input', + help='Input base fingerprint') + parser.add_argument('--package-name', '-n', + dest='package_name', + help='Package name to test. Must be importable.') + parser.add_argument('--package-print', '-p', + dest='package_print', + help='Package name to test. Must be importable.') + parser.add_argument("--debug", + dest="debug", action="store_true", + help="Verbosity in DEBUG mode") + + args = parser.parse_args() + + main_logger = logging.getLogger() + logging.basicConfig() + main_logger.setLevel(logging.DEBUG if args.debug else logging.INFO) + + if args.package_name: + raise NotImplementedError("FIXME") + + if args.package_print: + with open(args.package_print) as fd: + new_report = json.load(fd) + + with open(args.base_input) as fd: + old_report = json.load(fd) + + result = diff(old_report, new_report) + with open("result.json", "w") as fd: + json.dump(result, fd) + + change_log = build_change_log(old_report, new_report) + print(change_log.build_md()) diff --git a/azure-sdk-tools/packaging_tools/code_report.py b/azure-sdk-tools/packaging_tools/code_report.py new file mode 100644 index 000000000000..c64234ad97f6 --- /dev/null +++ b/azure-sdk-tools/packaging_tools/code_report.py @@ -0,0 +1,129 @@ +import importlib +import inspect +import json +import logging +import types +from typing import Dict, Any + +_LOGGER = logging.getLogger(__name__) + +def parse_input(input_parameter): + """From a syntax like package_name#submodule, build a package name + and complete module name. + """ + split_package_name = input_parameter.split('#') + package_name = split_package_name[0] + module_name = package_name.replace("-", ".") + if len(split_package_name) >= 2: + module_name = ".".join([module_name, split_package_name[1]]) + return package_name, module_name + + +def create_report(module_name: str) -> Dict[str, Any]: + module_to_generate = importlib.import_module(module_name) + + report = {} + report["models"] = { + "enums": {}, + "exceptions": {}, + "models": {} + } + # Look for models first + model_names = [model_name for model_name in dir(module_to_generate.models) if model_name[0].isupper()] + for model_name in model_names: + model_cls = getattr(module_to_generate.models, model_name) + if hasattr(model_cls, "_attribute_map"): + report["models"]["models"][model_name] = create_model_report(model_cls) + elif issubclass(model_cls, Exception): # If not, might be an exception + report["models"]["exceptions"][model_name] = create_model_report(model_cls) + else: + report["models"]["enums"][model_name] = create_model_report(model_cls) + # Look for operation groups + operations_classes = [op_name for op_name in dir(module_to_generate.operations) if op_name[0].isupper()] + for op_name in operations_classes: + op_content = {'name': op_name} + op_cls = getattr(module_to_generate.operations, op_name) + for op_attr_name in dir(op_cls): + op_attr = getattr(op_cls, op_attr_name) + if isinstance(op_attr, types.FunctionType) and not op_attr_name.startswith("_"): + # Keep it + func_content = create_report_from_func(op_attr) + op_content.setdefault("functions", {})[op_attr_name] = func_content + report.setdefault("operations", {})[op_name] = op_content + + return report + +def create_model_report(model_cls): + result = { + 'name': model_cls.__name__, + } + # If _attribute_map, it's a model + if hasattr(model_cls, "_attribute_map"): + result['type'] = "Model" + for attribute, conf in model_cls._attribute_map.items(): + attribute_validation = getattr(model_cls, "_validation", {}).get(attribute, {}) + + result.setdefault('parameters', {})[attribute] = { + 'name': attribute, + 'properties': { + 'type': conf['type'], + 'required': attribute_validation.get('required', False), + 'readonly': attribute_validation.get('readonly', False) + } + } + elif issubclass(model_cls, Exception): # If not, might be an exception + result['type'] = "Exception" + else: # If not, it's an enum + result['type'] = "Enum" + result['values'] = list(model_cls.__members__) + + return result + +def create_report_from_func(function_attr): + func_content = { + 'name': function_attr.__name__, + 'metadata': getattr(function_attr, "metadata", {}), + 'parameters': [] + } + signature = inspect.signature(function_attr) + for parameter_name in signature.parameters: + if parameter_name == "self": + continue + if parameter_name =="custom_headers": + break # We reach Autorest generic + parameter = signature.parameters[parameter_name] + func_content["parameters"].append({ + 'name': parameter.name, + }) + return func_content + +def main(input_parameter: str, output_filename: str): + _, module_name = parse_input(input_parameter) + report = create_report(module_name) + + with open(output_filename, "w") as fd: + json.dump(report, fd, indent=2) + +if __name__ == "__main__": + import argparse + + parser = argparse.ArgumentParser( + description='Code fingerprint building', + formatter_class=argparse.RawTextHelpFormatter, + ) + parser.add_argument('package_name', + help='Package name') + parser.add_argument('--output-file', '-o', + dest='output_file', default='./report.json', + help='Output file. [default: %(default)s]') + parser.add_argument("--debug", + dest="debug", action="store_true", + help="Verbosity in DEBUG mode") + + args = parser.parse_args() + + main_logger = logging.getLogger() + logging.basicConfig() + main_logger.setLevel(logging.DEBUG if args.debug else logging.INFO) + + main(args.package_name, args.output_file) diff --git a/azure-sdk-tools/packaging_tools/conf.py b/azure-sdk-tools/packaging_tools/conf.py new file mode 100644 index 000000000000..6140b6eac2de --- /dev/null +++ b/azure-sdk-tools/packaging_tools/conf.py @@ -0,0 +1,39 @@ +import logging +from pathlib import Path +from typing import Dict, Any + +import pytoml as toml + +_LOGGER = logging.getLogger(__name__) + +CONF_NAME = "sdk_packaging.toml" +_SECTION = "packaging" + +# Default conf +_CONFIG = { + "package_name": "packagename", + "package_pprint_name": "MyService Management", + "package_doc_id": "", + "is_stable": False +} + +def read_conf(folder: Path) -> Dict[str, Any]: + conf_path = folder / CONF_NAME + if not conf_path.exists(): + return {} + + with open(conf_path, "rb") as fd: + return toml.load(fd)[_SECTION] + +def build_default_conf(folder: Path, package_name: str) -> None: + conf_path = folder / CONF_NAME + if conf_path.exists(): + _LOGGER.info("Skipping default conf since the file exists") + return + + _LOGGER.info("Build default conf for %s", package_name) + conf = {_SECTION: _CONFIG.copy()} + conf[_SECTION]["package_name"] = package_name + + with open(conf_path, "w") as fd: + toml.dump(conf, fd) diff --git a/azure-sdk-tools/packaging_tools/templates/HISTORY.rst b/azure-sdk-tools/packaging_tools/templates/HISTORY.rst new file mode 100644 index 000000000000..8924d5d6c445 --- /dev/null +++ b/azure-sdk-tools/packaging_tools/templates/HISTORY.rst @@ -0,0 +1,9 @@ +.. :changelog: + +Release History +=============== + +0.1.0 (1970-01-01) +++++++++++++++++++ + +* Initial Release diff --git a/azure-sdk-tools/packaging_tools/templates/MANIFEST.in b/azure-sdk-tools/packaging_tools/templates/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/azure-sdk-tools/packaging_tools/templates/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-sdk-tools/packaging_tools/templates/README.rst b/azure-sdk-tools/packaging_tools/templates/README.rst new file mode 100644 index 000000000000..41025dfbb229 --- /dev/null +++ b/azure-sdk-tools/packaging_tools/templates/README.rst @@ -0,0 +1,49 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure {{package_pprint_name}} Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `{{package_pprint_name}} +`__ +on docs.microsoft.com. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. diff --git a/azure-sdk-tools/packaging_tools/templates/azure_bdist_wheel.py b/azure-sdk-tools/packaging_tools/templates/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/azure-sdk-tools/packaging_tools/templates/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/azure-sdk-tools/packaging_tools/templates/setup.cfg b/azure-sdk-tools/packaging_tools/templates/setup.cfg new file mode 100644 index 000000000000..57c8683c0b05 --- /dev/null +++ b/azure-sdk-tools/packaging_tools/templates/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package={{package_nspkg}} \ No newline at end of file diff --git a/azure-sdk-tools/packaging_tools/templates/setup.py b/azure-sdk-tools/packaging_tools/templates/setup.py new file mode 100644 index 000000000000..584d888a218e --- /dev/null +++ b/azure-sdk-tools/packaging_tools/templates/setup.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "{{package_name}}" +PACKAGE_PPRINT_NAME = "{{package_pprint_name}}" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + '{{classifier}}', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(exclude=["tests"]), + install_requires=[ + 'msrestazure>=0.4.27,<2.0.0', + 'azure-common~=1.1', + ], + cmdclass=cmdclass +) diff --git a/azure-sdk-testutils/setup.py b/azure-sdk-tools/setup.py similarity index 84% rename from azure-sdk-testutils/setup.py rename to azure-sdk-tools/setup.py index c5832f90bee2..77df62008bc6 100644 --- a/azure-sdk-testutils/setup.py +++ b/azure-sdk-tools/setup.py @@ -5,9 +5,9 @@ # locally with "pip install -e" setup( - name = "azure-sdk-testutils", + name = "azure-sdk-tools", version = "0.0.0", - author='Microsoft Corporation', + author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', packages=find_packages(), diff --git a/azure-sdk-tools/test-requirements.txt b/azure-sdk-tools/test-requirements.txt new file mode 100644 index 000000000000..1c95e47010d7 --- /dev/null +++ b/azure-sdk-tools/test-requirements.txt @@ -0,0 +1,12 @@ +-r ../requirements.txt + +azure-storage-blob # azure-servicemanagement-legacy azure-keyvault +azure-storage-file # azure-mgmt-batchai +azure-storage-common # azure-keyvault +pytest-cov +pytest>=3.5.1 +azure-devtools>=0.4.1 +vcrpy +readme_renderer +wheel +cookiecutter diff --git a/package_service_mapping.json b/package_service_mapping.json index d902db1be12b..b175024d3bc4 100644 --- a/package_service_mapping.json +++ b/package_service_mapping.json @@ -313,6 +313,13 @@ ], "service_name": "Key Vault" }, + "azure-mgmt-loganalytics": { + "category ": "Management", + "namespaces": [ + "azure.mgmt.loganalytics" + ], + "service_name": "Log Analytics" + }, "azure-mgmt-logic": { "category ": "Management", "namespaces": [ @@ -327,6 +334,13 @@ ], "service_name": "Machine Learning Compute" }, + "azure-mgmt-managementgroups": { + "category ": "Management", + "namespaces": [ + "azure.mgmt.managementgroups" + ], + "service_name": "Management Groups" + }, "azure-mgmt-media": { "category ": "Management", "namespaces": [ @@ -439,6 +453,7 @@ "azure.mgmt.resource.resources.v2016_02_01", "azure.mgmt.resource.resources.v2016_09_01", "azure.mgmt.resource.resources.v2017_05_10", + "azure.mgmt.resource.resources.v2018_02_01", "azure.mgmt.resource.policy.v2015_10_01_preview", "azure.mgmt.resource.policy.v2016_04_01", "azure.mgmt.resource.policy.v2016_12_01", diff --git a/scripts/dev_setup.py b/scripts/dev_setup.py index 2b7ab54251bf..8441539d861a 100644 --- a/scripts/dev_setup.py +++ b/scripts/dev_setup.py @@ -50,13 +50,10 @@ def pip_command(command): pip_command('install -e {}'.format(package_name)) # install test requirements -pip_command('install -r azure-sdk-testutils/test-requirements.txt') +pip_command('install -r azure-sdk-tools/test-requirements.txt') # install packaging requirements -pip_command('install -r scripts/packaging_requirements.txt') - -# install storage for tests -pip_command('install azure-storage') +pip_command('install -r azure-sdk-tools/packaging_requirements.txt') # Ensure that the site package's azure/__init__.py has the old style namespace # package declaration by installing the old namespace package diff --git a/scripts/multiapi_init_gen.py b/scripts/multiapi_init_gen.py index 0dd403ab0c45..a6e169d1a6b5 100644 --- a/scripts/multiapi_init_gen.py +++ b/scripts/multiapi_init_gen.py @@ -3,6 +3,7 @@ import pkgutil import re import sys +import types from pathlib import Path from unittest.mock import MagicMock, patch @@ -10,27 +11,17 @@ import msrestazure except: # Install msrestazure. Would be best to mock it, since we don't need it, but all scenarios I know are fine with a pip install for now import subprocess - subprocess.call("pip install msrestazure", shell=True) # Use shell to use venv if available + subprocess.call(sys.executable + " -m pip install msrestazure", shell=True) # Use shell to use venv if available try: - import azure.profiles - import azure.profiles.multiapiclient + import azure.common except: - patch_profiles = patch.dict('sys.modules', { - "azure.profiles": MagicMock(), - "azure.profiles.multiapiclient": MagicMock()} - ) - patch_profiles.start() - -# try: -# import azure.profiles -# except: # Install azure-common. Would be best to mock it, since we don't need it, but all scenarios I know are fine with a pip install for now -# import subprocess -# subprocess.call("pip install -e azure-common", shell=True) # Use shell to use venv if available - - # The following DOES not work, since it bypasses venv for some reason - # import pip - # pip.main(["install", "msrestazure"]) + sdk_root = Path(__file__).parents[1] + sys.path.append(str((sdk_root / "azure-common").resolve())) + import azure.common + +import pkg_resources +pkg_resources.declare_namespace('azure') _GENERATE_MARKER = "############ Generated from here ############\n" @@ -49,7 +40,9 @@ def get_versionned_modules(package_name, module_name, sdk_root=None): if not sdk_root: sdk_root = Path(__file__).parents[1] - sys.path.append(str((sdk_root / package_name).resolve())) + azure.__path__.append(str((sdk_root / package_name / "azure").resolve())) + # Doesn't work with namespace package + # sys.path.append(str((sdk_root / package_name).resolve())) module_to_generate = importlib.import_module(module_name) return [(label, importlib.import_module('.'+label, module_to_generate.__name__)) for (_, label, ispkg) in pkgutil.iter_modules(module_to_generate.__path__) diff --git a/scripts/packaging_requirements.txt b/scripts/packaging_requirements.txt deleted file mode 100644 index 87db124f67a4..000000000000 --- a/scripts/packaging_requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -cookiecutter -packaging -wheel