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

[ReleasePR azure-mgmt-maintenance] Adding Untracked Public Maintenance Config Resource Type #12841

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
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from msrest import Serializer, Deserializer

from ._configuration import MaintenanceManagementClientConfiguration
from .operations import PublicMaintenanceConfigurationsOperations
from .operations import ApplyUpdatesOperations
from .operations import ConfigurationAssignmentsOperations
from .operations import MaintenanceConfigurationsOperations
Expand All @@ -27,6 +28,8 @@ class MaintenanceManagementClient(SDKClient):
:ivar config: Configuration for client.
:vartype config: MaintenanceManagementClientConfiguration

:ivar public_maintenance_configurations: PublicMaintenanceConfigurations operations
:vartype public_maintenance_configurations: azure.mgmt.maintenance.operations.PublicMaintenanceConfigurationsOperations
:ivar apply_updates: ApplyUpdates operations
:vartype apply_updates: azure.mgmt.maintenance.operations.ApplyUpdatesOperations
:ivar configuration_assignments: ConfigurationAssignments operations
Expand Down Expand Up @@ -55,10 +58,12 @@ def __init__(
super(MaintenanceManagementClient, self).__init__(self.config.credentials, self.config)

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

self.public_maintenance_configurations = PublicMaintenanceConfigurationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.apply_updates = ApplyUpdatesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.configuration_assignments = ConfigurationAssignmentsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from ._maintenance_management_client_enums import (
UpdateStatus,
MaintenanceScope,
Visibility,
ImpactType,
)

Expand All @@ -49,11 +50,12 @@
'OperationInfo',
'Resource',
'Update',
'ConfigurationAssignmentPaged',
'MaintenanceConfigurationPaged',
'ConfigurationAssignmentPaged',
'OperationPaged',
'UpdatePaged',
'UpdateStatus',
'MaintenanceScope',
'Visibility',
'ImpactType',
]
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ class MaintenanceScope(str, Enum):
host = "Host"
resource = "Resource"
in_resource = "InResource"
os_image = "OSImage"
extension = "Extension"
in_guest_patch = "InGuestPatch"
sqldb = "SQLDB"
sql_managed_instance = "SQLManagedInstance"


class Visibility(str, Enum):

custom = "Custom"
public = "Public"


class ImpactType(str, Enum):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,48 @@ class MaintenanceConfiguration(Resource):
:type extension_properties: dict[str, str]
:param maintenance_scope: Gets or sets maintenanceScope of the
configuration. Possible values include: 'All', 'Host', 'Resource',
'InResource'
'InResource', 'OSImage', 'Extension', 'InGuestPatch', 'SQLDB',
'SQLManagedInstance'
:type maintenance_scope: str or
~azure.mgmt.maintenance.models.MaintenanceScope
:param start_date_time: Effective start date of the maintenance window in
YYYY-MM-DD hh:mm format. The start date can be set to either the current
date or future date. The window will be created in the time zone provided
and adjusted to daylight savings according to that time zone.
:type start_date_time: str
:param expiration_date_time: Effective expiration date of the maintenance
window in YYYY-MM-DD hh:mm format. The window will be created in the time
zone provided and adjusted to daylight savings according to that time
zone. Expiration date must be set to a future date. If not provided, it
will be set to the maximum datetime 9999-12-31 23:59:59.
:type expiration_date_time: str
:param duration: Duration of the maintenance window in HH:mm format. If
not provided, default value will be used based on maintenance scope
provided. Example: 05:00.
:type duration: str
:param time_zone: Name of the timezone. List of timezones can be obtained
by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
Example: Pacific Standard Time, UTC, W. Europe Standard Time, Korea
Standard Time, Cen. Australia Standard Time.
:type time_zone: str
:param recur_every: Rate at which a Maintenance window is expected to
recur. The rate can be expressed as daily, weekly, or monthly schedules.
Daily schedule are formatted as recurEvery: [Frequency as
integer]['Day(s)']. If no frequency is provided, the default frequency is
1. Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly
schedule are formatted as recurEvery: [Frequency as integer]['Week(s)']
[Optional comma separated list of weekdays Monday-Sunday]. Weekly schedule
examples are recurEvery: 3Weeks, recurEvery: Week Saturday,Sunday. Monthly
schedules are formatted as [Frequency as integer]['Month(s)'] [Comma
separated list of month days] or [Frequency as integer]['Month(s)'] [Week
of Month (First, Second, Third, Fourth, Last)] [Weekday Monday-Sunday].
Monthly schedule examples are recurEvery: Month, recurEvery: 2Months,
recurEvery: Month day23,day24, recurEvery: Month Last Sunday, recurEvery:
Month Fourth Monday.
:type recur_every: str
:param visibility: Gets or sets the visibility of the configuration.
Possible values include: 'Custom', 'Public'
:type visibility: str or ~azure.mgmt.maintenance.models.Visibility
"""

_validation = {
Expand All @@ -203,6 +242,12 @@ class MaintenanceConfiguration(Resource):
'namespace': {'key': 'properties.namespace', 'type': 'str'},
'extension_properties': {'key': 'properties.extensionProperties', 'type': '{str}'},
'maintenance_scope': {'key': 'properties.maintenanceScope', 'type': 'str'},
'start_date_time': {'key': 'properties.maintenanceWindow.startDateTime', 'type': 'str'},
'expiration_date_time': {'key': 'properties.maintenanceWindow.expirationDateTime', 'type': 'str'},
'duration': {'key': 'properties.maintenanceWindow.duration', 'type': 'str'},
'time_zone': {'key': 'properties.maintenanceWindow.timeZone', 'type': 'str'},
'recur_every': {'key': 'properties.maintenanceWindow.recurEvery', 'type': 'str'},
'visibility': {'key': 'properties.visibility', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -212,6 +257,12 @@ def __init__(self, **kwargs):
self.namespace = kwargs.get('namespace', None)
self.extension_properties = kwargs.get('extension_properties', None)
self.maintenance_scope = kwargs.get('maintenance_scope', None)
self.start_date_time = kwargs.get('start_date_time', None)
self.expiration_date_time = kwargs.get('expiration_date_time', None)
self.duration = kwargs.get('duration', None)
self.time_zone = kwargs.get('time_zone', None)
self.recur_every = kwargs.get('recur_every', None)
self.visibility = kwargs.get('visibility', None)


class MaintenanceError(Model):
Expand Down Expand Up @@ -302,7 +353,8 @@ class Update(Model):
"""Maintenance update on a resource.

:param maintenance_scope: The impact area. Possible values include: 'All',
'Host', 'Resource', 'InResource'
'Host', 'Resource', 'InResource', 'OSImage', 'Extension', 'InGuestPatch',
'SQLDB', 'SQLManagedInstance'
:type maintenance_scope: str or
~azure.mgmt.maintenance.models.MaintenanceScope
:param impact_type: The impact type. Possible values include: 'None',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,48 @@ class MaintenanceConfiguration(Resource):
:type extension_properties: dict[str, str]
:param maintenance_scope: Gets or sets maintenanceScope of the
configuration. Possible values include: 'All', 'Host', 'Resource',
'InResource'
'InResource', 'OSImage', 'Extension', 'InGuestPatch', 'SQLDB',
'SQLManagedInstance'
:type maintenance_scope: str or
~azure.mgmt.maintenance.models.MaintenanceScope
:param start_date_time: Effective start date of the maintenance window in
YYYY-MM-DD hh:mm format. The start date can be set to either the current
date or future date. The window will be created in the time zone provided
and adjusted to daylight savings according to that time zone.
:type start_date_time: str
:param expiration_date_time: Effective expiration date of the maintenance
window in YYYY-MM-DD hh:mm format. The window will be created in the time
zone provided and adjusted to daylight savings according to that time
zone. Expiration date must be set to a future date. If not provided, it
will be set to the maximum datetime 9999-12-31 23:59:59.
:type expiration_date_time: str
:param duration: Duration of the maintenance window in HH:mm format. If
not provided, default value will be used based on maintenance scope
provided. Example: 05:00.
:type duration: str
:param time_zone: Name of the timezone. List of timezones can be obtained
by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
Example: Pacific Standard Time, UTC, W. Europe Standard Time, Korea
Standard Time, Cen. Australia Standard Time.
:type time_zone: str
:param recur_every: Rate at which a Maintenance window is expected to
recur. The rate can be expressed as daily, weekly, or monthly schedules.
Daily schedule are formatted as recurEvery: [Frequency as
integer]['Day(s)']. If no frequency is provided, the default frequency is
1. Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly
schedule are formatted as recurEvery: [Frequency as integer]['Week(s)']
[Optional comma separated list of weekdays Monday-Sunday]. Weekly schedule
examples are recurEvery: 3Weeks, recurEvery: Week Saturday,Sunday. Monthly
schedules are formatted as [Frequency as integer]['Month(s)'] [Comma
separated list of month days] or [Frequency as integer]['Month(s)'] [Week
of Month (First, Second, Third, Fourth, Last)] [Weekday Monday-Sunday].
Monthly schedule examples are recurEvery: Month, recurEvery: 2Months,
recurEvery: Month day23,day24, recurEvery: Month Last Sunday, recurEvery:
Month Fourth Monday.
:type recur_every: str
:param visibility: Gets or sets the visibility of the configuration.
Possible values include: 'Custom', 'Public'
:type visibility: str or ~azure.mgmt.maintenance.models.Visibility
"""

_validation = {
Expand All @@ -203,15 +242,27 @@ class MaintenanceConfiguration(Resource):
'namespace': {'key': 'properties.namespace', 'type': 'str'},
'extension_properties': {'key': 'properties.extensionProperties', 'type': '{str}'},
'maintenance_scope': {'key': 'properties.maintenanceScope', 'type': 'str'},
'start_date_time': {'key': 'properties.maintenanceWindow.startDateTime', 'type': 'str'},
'expiration_date_time': {'key': 'properties.maintenanceWindow.expirationDateTime', 'type': 'str'},
'duration': {'key': 'properties.maintenanceWindow.duration', 'type': 'str'},
'time_zone': {'key': 'properties.maintenanceWindow.timeZone', 'type': 'str'},
'recur_every': {'key': 'properties.maintenanceWindow.recurEvery', 'type': 'str'},
'visibility': {'key': 'properties.visibility', 'type': 'str'},
}

def __init__(self, *, location: str=None, tags=None, namespace: str=None, extension_properties=None, maintenance_scope=None, **kwargs) -> None:
def __init__(self, *, location: str=None, tags=None, namespace: str=None, extension_properties=None, maintenance_scope=None, start_date_time: str=None, expiration_date_time: str=None, duration: str=None, time_zone: str=None, recur_every: str=None, visibility=None, **kwargs) -> None:
super(MaintenanceConfiguration, self).__init__(**kwargs)
self.location = location
self.tags = tags
self.namespace = namespace
self.extension_properties = extension_properties
self.maintenance_scope = maintenance_scope
self.start_date_time = start_date_time
self.expiration_date_time = expiration_date_time
self.duration = duration
self.time_zone = time_zone
self.recur_every = recur_every
self.visibility = visibility


class MaintenanceError(Model):
Expand Down Expand Up @@ -302,7 +353,8 @@ class Update(Model):
"""Maintenance update on a resource.

:param maintenance_scope: The impact area. Possible values include: 'All',
'Host', 'Resource', 'InResource'
'Host', 'Resource', 'InResource', 'OSImage', 'Extension', 'InGuestPatch',
'SQLDB', 'SQLManagedInstance'
:type maintenance_scope: str or
~azure.mgmt.maintenance.models.MaintenanceScope
:param impact_type: The impact type. Possible values include: 'None',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,32 @@
from msrest.paging import Paged


class ConfigurationAssignmentPaged(Paged):
class MaintenanceConfigurationPaged(Paged):
"""
A paging container for iterating over a list of :class:`ConfigurationAssignment <azure.mgmt.maintenance.models.ConfigurationAssignment>` object
A paging container for iterating over a list of :class:`MaintenanceConfiguration <azure.mgmt.maintenance.models.MaintenanceConfiguration>` object
"""

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

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

super(ConfigurationAssignmentPaged, self).__init__(*args, **kwargs)
class MaintenanceConfigurationPaged(Paged):
super(MaintenanceConfigurationPaged, self).__init__(*args, **kwargs)
class ConfigurationAssignmentPaged(Paged):
"""
A paging container for iterating over a list of :class:`MaintenanceConfiguration <azure.mgmt.maintenance.models.MaintenanceConfiguration>` object
A paging container for iterating over a list of :class:`ConfigurationAssignment <azure.mgmt.maintenance.models.ConfigurationAssignment>` object
"""

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

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

super(MaintenanceConfigurationPaged, self).__init__(*args, **kwargs)
super(ConfigurationAssignmentPaged, self).__init__(*args, **kwargs)
class OperationPaged(Paged):
"""
A paging container for iterating over a list of :class:`Operation <azure.mgmt.maintenance.models.Operation>` object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
# regenerated.
# --------------------------------------------------------------------------

from ._public_maintenance_configurations_operations import PublicMaintenanceConfigurationsOperations
from ._apply_updates_operations import ApplyUpdatesOperations
from ._configuration_assignments_operations import ConfigurationAssignmentsOperations
from ._maintenance_configurations_operations import MaintenanceConfigurationsOperations
from ._operations import Operations
from ._updates_operations import UpdatesOperations

__all__ = [
'PublicMaintenanceConfigurationsOperations',
'ApplyUpdatesOperations',
'ConfigurationAssignmentsOperations',
'MaintenanceConfigurationsOperations',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ApplyUpdatesOperations(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. Constant value: "2018-06-01-preview".
:ivar api_version: Version of the API to be used with the client request. Constant value: "2020-07-01-preview".
"""

models = models
Expand All @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2018-06-01-preview"
self.api_version = "2020-07-01-preview"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ConfigurationAssignmentsOperations(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. Constant value: "2018-06-01-preview".
:ivar api_version: Version of the API to be used with the client request. Constant value: "2020-07-01-preview".
"""

models = models
Expand All @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2018-06-01-preview"
self.api_version = "2020-07-01-preview"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class MaintenanceConfigurationsOperations(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. Constant value: "2018-06-01-preview".
:ivar api_version: Version of the API to be used with the client request. Constant value: "2020-07-01-preview".
"""

models = models
Expand All @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2018-06-01-preview"
self.api_version = "2020-07-01-preview"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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. Constant value: "2018-06-01-preview".
:ivar api_version: Version of the API to be used with the client request. Constant value: "2020-07-01-preview".
"""

models = models
Expand All @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2018-06-01-preview"
self.api_version = "2020-07-01-preview"

self.config = config

Expand Down
Loading