Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR automation/resource-manager] Watcher resource swagger specs. For more details on the Usage of the resource: https://docs.microsoft.com/en-us/azure/automation/automation-watchers-tutorial #2585

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions azure-mgmt-automation/azure/mgmt/automation/automation_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from .operations.software_update_configuration_machine_runs_operations import SoftwareUpdateConfigurationMachineRunsOperations
from .operations.source_control_operations import SourceControlOperations
from .operations.source_control_sync_job_operations import SourceControlSyncJobOperations
from .operations.source_control_sync_job_streams_operations import SourceControlSyncJobStreamsOperations
from .operations.job_operations import JobOperations
from .operations.job_stream_operations import JobStreamOperations
from .operations.agent_registration_information_operations import AgentRegistrationInformationOperations
Expand All @@ -50,6 +51,7 @@
from .operations.dsc_compilation_job_operations import DscCompilationJobOperations
from .operations.dsc_compilation_job_stream_operations import DscCompilationJobStreamOperations
from .operations.dsc_node_configuration_operations import DscNodeConfigurationOperations
from .operations.watcher_operations import WatcherOperations
from . import models


Expand Down Expand Up @@ -151,6 +153,8 @@ class AutomationClient(object):
:vartype source_control: azure.mgmt.automation.operations.SourceControlOperations
:ivar source_control_sync_job: SourceControlSyncJob operations
:vartype source_control_sync_job: azure.mgmt.automation.operations.SourceControlSyncJobOperations
:ivar source_control_sync_job_streams: SourceControlSyncJobStreams operations
:vartype source_control_sync_job_streams: azure.mgmt.automation.operations.SourceControlSyncJobStreamsOperations
:ivar job: Job operations
:vartype job: azure.mgmt.automation.operations.JobOperations
:ivar job_stream: JobStream operations
Expand All @@ -167,6 +171,8 @@ class AutomationClient(object):
:vartype dsc_compilation_job_stream: azure.mgmt.automation.operations.DscCompilationJobStreamOperations
:ivar dsc_node_configuration: DscNodeConfiguration operations
:vartype dsc_node_configuration: azure.mgmt.automation.operations.DscNodeConfigurationOperations
:ivar watcher: Watcher operations
:vartype watcher: azure.mgmt.automation.operations.WatcherOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand Down Expand Up @@ -246,6 +252,8 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.source_control_sync_job = SourceControlSyncJobOperations(
self._client, self.config, self._serialize, self._deserialize)
self.source_control_sync_job_streams = SourceControlSyncJobStreamsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.job = JobOperations(
self._client, self.config, self._serialize, self._deserialize)
self.job_stream = JobStreamOperations(
Expand All @@ -262,3 +270,5 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.dsc_node_configuration = DscNodeConfigurationOperations(
self._client, self.config, self._serialize, self._deserialize)
self.watcher = WatcherOperations(
self._client, self.config, self._serialize, self._deserialize)
20 changes: 18 additions & 2 deletions azure-mgmt-automation/azure/mgmt/automation/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from .certificate import Certificate
from .proxy_resource import ProxyResource
from .resource import Resource
from .watcher import Watcher
from .runbook_parameter import RunbookParameter
from .content_hash import ContentHash
from .content_link import ContentLink
Expand Down Expand Up @@ -65,7 +66,6 @@
from .dsc_configuration_create_or_update_parameters import DscConfigurationCreateOrUpdateParameters
from .dsc_configuration_update_parameters import DscConfigurationUpdateParameters
from .dsc_meta_configuration import DscMetaConfiguration
from .dsc_node_configuration_create_or_update_parameters import DscNodeConfigurationCreateOrUpdateParameters
from .dsc_node_configuration_association_property import DscNodeConfigurationAssociationProperty
from .dsc_node_extension_handler_association_property import DscNodeExtensionHandlerAssociationProperty
from .dsc_node_update_parameters_properties import DscNodeUpdateParametersProperties
Expand Down Expand Up @@ -106,6 +106,8 @@
from .variable_update_parameters import VariableUpdateParameters
from .webhook_create_or_update_parameters import WebhookCreateOrUpdateParameters
from .webhook_update_parameters import WebhookUpdateParameters
from .watcher_update_parameters import WatcherUpdateParameters
from .watcher_create_or_update_parameters import WatcherCreateOrUpdateParameters
from .job_collection_item import JobCollectionItem
from .windows_properties import WindowsProperties
from .linux_properties import LinuxProperties
Expand All @@ -126,8 +128,11 @@
from .source_control_sync_job import SourceControlSyncJob
from .source_control_sync_job_create_parameters import SourceControlSyncJobCreateParameters
from .source_control_sync_job_by_id import SourceControlSyncJobById
from .source_control_sync_job_stream import SourceControlSyncJobStream
from .source_control_sync_job_stream_by_id import SourceControlSyncJobStreamById
from .dsc_node import DscNode
from .dsc_node_configuration import DscNodeConfiguration
from .dsc_node_configuration_create_or_update_parameters import DscNodeConfigurationCreateOrUpdateParameters
from .automation_account_paged import AutomationAccountPaged
from .operation_paged import OperationPaged
from .statistics_paged import StatisticsPaged
Expand All @@ -150,11 +155,13 @@
from .webhook_paged import WebhookPaged
from .source_control_paged import SourceControlPaged
from .source_control_sync_job_paged import SourceControlSyncJobPaged
from .source_control_sync_job_stream_paged import SourceControlSyncJobStreamPaged
from .job_collection_item_paged import JobCollectionItemPaged
from .dsc_node_paged import DscNodePaged
from .dsc_node_report_paged import DscNodeReportPaged
from .dsc_compilation_job_paged import DscCompilationJobPaged
from .dsc_node_configuration_paged import DscNodeConfigurationPaged
from .watcher_paged import WatcherPaged
from .automation_client_enums import (
AutomationKeyName,
AutomationKeyPermissions,
Expand All @@ -180,6 +187,7 @@
SourceType,
ProvisioningState,
StartType,
StreamType,
)

__all__ = [
Expand All @@ -200,6 +208,7 @@
'Certificate',
'ProxyResource',
'Resource',
'Watcher',
'RunbookParameter',
'ContentHash',
'ContentLink',
Expand Down Expand Up @@ -239,7 +248,6 @@
'DscConfigurationCreateOrUpdateParameters',
'DscConfigurationUpdateParameters',
'DscMetaConfiguration',
'DscNodeConfigurationCreateOrUpdateParameters',
'DscNodeConfigurationAssociationProperty',
'DscNodeExtensionHandlerAssociationProperty',
'DscNodeUpdateParametersProperties',
Expand Down Expand Up @@ -280,6 +288,8 @@
'VariableUpdateParameters',
'WebhookCreateOrUpdateParameters',
'WebhookUpdateParameters',
'WatcherUpdateParameters',
'WatcherCreateOrUpdateParameters',
'JobCollectionItem',
'WindowsProperties',
'LinuxProperties',
Expand All @@ -300,8 +310,11 @@
'SourceControlSyncJob',
'SourceControlSyncJobCreateParameters',
'SourceControlSyncJobById',
'SourceControlSyncJobStream',
'SourceControlSyncJobStreamById',
'DscNode',
'DscNodeConfiguration',
'DscNodeConfigurationCreateOrUpdateParameters',
'AutomationAccountPaged',
'OperationPaged',
'StatisticsPaged',
Expand All @@ -324,11 +337,13 @@
'WebhookPaged',
'SourceControlPaged',
'SourceControlSyncJobPaged',
'SourceControlSyncJobStreamPaged',
'JobCollectionItemPaged',
'DscNodePaged',
'DscNodeReportPaged',
'DscCompilationJobPaged',
'DscNodeConfigurationPaged',
'WatcherPaged',
'AutomationKeyName',
'AutomationKeyPermissions',
'JobProvisioningState',
Expand All @@ -353,4 +368,5 @@
'SourceType',
'ProvisioningState',
'StartType',
'StreamType',
]
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,9 @@ class StartType(Enum):

auto_sync = "AutoSync"
manual_sync = "ManualSync"


class StreamType(Enum):

error = "Error"
output = "Output"
Original file line number Diff line number Diff line change
Expand Up @@ -18,57 +18,35 @@ class DscNodeConfigurationCreateOrUpdateParameters(Model):

:param source: Gets or sets the source.
:type source: ~azure.mgmt.automation.models.ContentSource
:param name: Name of the node configuration.
:type name: str
:param configuration: Gets or sets the configuration of the node.
:type configuration:
~azure.mgmt.automation.models.DscConfigurationAssociationProperty
:param new_node_configuration_build_version_required: If a new build
version of NodeConfiguration is required.
:type new_node_configuration_build_version_required: bool
:param source1: Gets or sets the source.
:type source1: ~azure.mgmt.automation.models.ContentSource
:param name1: Gets or sets the type of the parameter.
:type name1: str
:param configuration1: Gets or sets the configuration of the node.
:type configuration1:
~azure.mgmt.automation.models.DscConfigurationAssociationProperty
:param increment_node_configuration_build: If a new build version of
NodeConfiguration is required.
:type increment_node_configuration_build: bool
:param name: Name of the node configuration.
:type name: str
:param tags: Gets or sets the tags attached to the resource.
:type tags: dict[str, str]
"""

_validation = {
'source': {'required': True},
'name': {'required': True},
'configuration': {'required': True},
'source1': {'required': True},
'name1': {'required': True},
'configuration1': {'required': True},
}

_attribute_map = {
'source': {'key': 'source', 'type': 'ContentSource'},
'name': {'key': 'name', 'type': 'str'},
'configuration': {'key': 'configuration', 'type': 'DscConfigurationAssociationProperty'},
'new_node_configuration_build_version_required': {'key': 'newNodeConfigurationBuildVersionRequired', 'type': 'bool'},
'source1': {'key': 'properties.source', 'type': 'ContentSource'},
'name1': {'key': 'properties.name', 'type': 'str'},
'configuration1': {'key': 'properties.configuration', 'type': 'DscConfigurationAssociationProperty'},
'source': {'key': 'properties.source', 'type': 'ContentSource'},
'configuration': {'key': 'properties.configuration', 'type': 'DscConfigurationAssociationProperty'},
'increment_node_configuration_build': {'key': 'properties.incrementNodeConfigurationBuild', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
}

def __init__(self, source, name, configuration, source1, name1, configuration1, new_node_configuration_build_version_required=None, increment_node_configuration_build=None, tags=None):
def __init__(self, source, configuration, increment_node_configuration_build=None, name=None, tags=None):
super(DscNodeConfigurationCreateOrUpdateParameters, self).__init__()
self.source = source
self.name = name
self.configuration = configuration
self.new_node_configuration_build_version_required = new_node_configuration_build_version_required
self.source1 = source1
self.name1 = name1
self.configuration1 = configuration1
self.increment_node_configuration_build = increment_node_configuration_build
self.name = name
self.tags = tags
Original file line number Diff line number Diff line change
@@ -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 SourceControlSyncJobStream(Model):
"""Definition of the source control sync job stream.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Resource id.
:vartype id: str
:param sync_job_stream_id: Gets the sync job stream id.
:type sync_job_stream_id: str
:param summary: Gets the summary of the sync job stream.
:type summary: str
:ivar time: Gets the time of the sync job stream.
:vartype time: datetime
:param stream_type: Gets the type of the sync job stream. Possible values
include: 'Error', 'Output'
:type stream_type: str or ~azure.mgmt.automation.models.StreamType
"""

_validation = {
'id': {'readonly': True},
'time': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'sync_job_stream_id': {'key': 'properties.syncJobStreamId', 'type': 'str'},
'summary': {'key': 'properties.summary', 'type': 'str'},
'time': {'key': 'properties.time', 'type': 'iso-8601'},
'stream_type': {'key': 'properties.streamType', 'type': 'str'},
}

def __init__(self, sync_job_stream_id=None, summary=None, stream_type=None):
super(SourceControlSyncJobStream, self).__init__()
self.id = None
self.sync_job_stream_id = sync_job_stream_id
self.summary = summary
self.time = None
self.stream_type = stream_type
Original file line number Diff line number Diff line change
@@ -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 SourceControlSyncJobStreamById(Model):
"""Definition of the source control sync job stream by id.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Resource id.
:vartype id: str
:param sync_job_stream_id: Gets the sync job stream id.
:type sync_job_stream_id: str
:param summary: Gets the summary of the sync job stream.
:type summary: str
:ivar time: Gets the time of the sync job stream.
:vartype time: datetime
:param stream_type: Gets the type of the sync job stream. Possible values
include: 'Error', 'Output'
:type stream_type: str or ~azure.mgmt.automation.models.StreamType
:param stream_text: Gets the text of the sync job stream.
:type stream_text: str
:param value: Gets the value of the sync job stream.
:type value: str
"""

_validation = {
'id': {'readonly': True},
'time': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'sync_job_stream_id': {'key': 'properties.syncJobStreamId', 'type': 'str'},
'summary': {'key': 'properties.summary', 'type': 'str'},
'time': {'key': 'properties.time', 'type': 'iso-8601'},
'stream_type': {'key': 'properties.streamType', 'type': 'str'},
'stream_text': {'key': 'properties.streamText', 'type': 'str'},
'value': {'key': 'properties.value', 'type': 'str'},
}

def __init__(self, sync_job_stream_id=None, summary=None, stream_type=None, stream_text=None, value=None):
super(SourceControlSyncJobStreamById, self).__init__()
self.id = None
self.sync_job_stream_id = sync_job_stream_id
self.summary = summary
self.time = None
self.stream_type = stream_type
self.stream_text = stream_text
self.value = value
Original file line number Diff line number Diff line change
@@ -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 SourceControlSyncJobStreamPaged(Paged):
"""
A paging container for iterating over a list of :class:`SourceControlSyncJobStream <azure.mgmt.automation.models.SourceControlSyncJobStream>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[SourceControlSyncJobStream]'}
}

def __init__(self, *args, **kwargs):

super(SourceControlSyncJobStreamPaged, self).__init__(*args, **kwargs)
Loading