diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/__init__.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/__init__.py index c9859074da49..b17c4c0b6fef 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/__init__.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/__init__.py @@ -21,13 +21,18 @@ from ._models_py3 import ExpressRouteAuthorization from ._models_py3 import HcxEnterpriseSite from ._models_py3 import IdentitySource + from ._models_py3 import LogSpecification from ._models_py3 import ManagementCluster + from ._models_py3 import MetricDimension + from ._models_py3 import MetricSpecification from ._models_py3 import Operation from ._models_py3 import OperationDisplay + from ._models_py3 import OperationProperties from ._models_py3 import PrivateCloud from ._models_py3 import PrivateCloudUpdate from ._models_py3 import Quota from ._models_py3 import Resource + from ._models_py3 import ServiceSpecification from ._models_py3 import Sku from ._models_py3 import TrackedResource from ._models_py3 import Trial @@ -43,13 +48,18 @@ from ._models import ExpressRouteAuthorization from ._models import HcxEnterpriseSite from ._models import IdentitySource + from ._models import LogSpecification from ._models import ManagementCluster + from ._models import MetricDimension + from ._models import MetricSpecification from ._models import Operation from ._models import OperationDisplay + from ._models import OperationProperties from ._models import PrivateCloud from ._models import PrivateCloudUpdate from ._models import Quota from ._models import Resource + from ._models import ServiceSpecification from ._models import Sku from ._models import TrackedResource from ._models import Trial @@ -64,8 +74,8 @@ ExpressRouteAuthorizationProvisioningState, SslEnum, PrivateCloudProvisioningState, - InternetEnum, ClusterProvisioningState, + InternetEnum, HcxEnterpriseSiteStatus, ) @@ -81,13 +91,18 @@ 'ExpressRouteAuthorization', 'HcxEnterpriseSite', 'IdentitySource', + 'LogSpecification', 'ManagementCluster', + 'MetricDimension', + 'MetricSpecification', 'Operation', 'OperationDisplay', + 'OperationProperties', 'PrivateCloud', 'PrivateCloudUpdate', 'Quota', 'Resource', + 'ServiceSpecification', 'Sku', 'TrackedResource', 'Trial', @@ -101,7 +116,7 @@ 'ExpressRouteAuthorizationProvisioningState', 'SslEnum', 'PrivateCloudProvisioningState', - 'InternetEnum', 'ClusterProvisioningState', + 'InternetEnum', 'HcxEnterpriseSiteStatus', ] diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_avs_client_enums.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_avs_client_enums.py index dfda35df4748..153fc821f5f8 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_avs_client_enums.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_avs_client_enums.py @@ -49,12 +49,6 @@ class PrivateCloudProvisioningState(str, Enum): updating = "Updating" -class InternetEnum(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - class ClusterProvisioningState(str, Enum): succeeded = "Succeeded" @@ -64,6 +58,12 @@ class ClusterProvisioningState(str, Enum): updating = "Updating" +class InternetEnum(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + class HcxEnterpriseSiteStatus(str, Enum): available = "Available" diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models.py index f268da2f0a80..efd508dd4773 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models.py @@ -170,14 +170,14 @@ class Cluster(Resource): :type sku: ~azure.mgmt.avs.models.Sku :param cluster_size: The cluster size :type cluster_size: int + :param provisioning_state: The state of the cluster provisioning. Possible + values include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating' + :type provisioning_state: str or + ~azure.mgmt.avs.models.ClusterProvisioningState :ivar cluster_id: The identity :vartype cluster_id: int :ivar hosts: The hosts :vartype hosts: list[str] - :ivar provisioning_state: The state of the cluster provisioning. Possible - values include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating' - :vartype provisioning_state: str or - ~azure.mgmt.avs.models.ClusterProvisioningState """ _validation = { @@ -187,7 +187,6 @@ class Cluster(Resource): 'sku': {'required': True}, 'cluster_id': {'readonly': True}, 'hosts': {'readonly': True}, - 'provisioning_state': {'readonly': True}, } _attribute_map = { @@ -196,18 +195,18 @@ class Cluster(Resource): 'type': {'key': 'type', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'cluster_size': {'key': 'properties.clusterSize', 'type': 'int'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'cluster_id': {'key': 'properties.clusterId', 'type': 'int'}, 'hosts': {'key': 'properties.hosts', 'type': '[str]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } def __init__(self, **kwargs): super(Cluster, self).__init__(**kwargs) self.sku = kwargs.get('sku', None) self.cluster_size = kwargs.get('cluster_size', None) + self.provisioning_state = kwargs.get('provisioning_state', None) self.cluster_id = None self.hosts = None - self.provisioning_state = None class ClusterUpdate(Model): @@ -304,7 +303,11 @@ def __init__(self, **kwargs): class ErrorResponse(Model): - """The resource management error response. + """Error Response. + + Common error response for all Azure Resource Manager APIs to return error + details for failed operations. (This also follows the OData error response + format.). Variables are only populated by the server, and will be ignored when sending a request. @@ -492,6 +495,30 @@ def __init__(self, **kwargs): self.password = kwargs.get('password', None) +class LogSpecification(Model): + """Specifications of the Log for Azure Monitoring. + + :param name: Name of the log + :type name: str + :param display_name: Localized friendly display name of the log + :type display_name: str + :param blob_duration: Blob duration of the log + :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, **kwargs): + super(LogSpecification, 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) + + class ManagementCluster(ClusterUpdateProperties): """The properties of a default cluster. @@ -500,6 +527,10 @@ class ManagementCluster(ClusterUpdateProperties): :param cluster_size: The cluster size :type cluster_size: int + :param provisioning_state: The state of the cluster provisioning. Possible + values include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating' + :type provisioning_state: str or + ~azure.mgmt.avs.models.ClusterProvisioningState :ivar cluster_id: The identity :vartype cluster_id: int :ivar hosts: The hosts @@ -513,16 +544,106 @@ class ManagementCluster(ClusterUpdateProperties): _attribute_map = { 'cluster_size': {'key': 'clusterSize', 'type': 'int'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'cluster_id': {'key': 'clusterId', 'type': 'int'}, 'hosts': {'key': 'hosts', 'type': '[str]'}, } def __init__(self, **kwargs): super(ManagementCluster, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) self.cluster_id = None self.hosts = None +class MetricDimension(Model): + """Specifications of the Dimension of metrics. + + :param name: Name of the dimension + :type name: str + :param display_name: Localized friendly display name of the dimension + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricDimension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + + +class MetricSpecification(Model): + """Specifications of the Metrics for Azure Monitoring. + + :param name: Name of the metric + :type name: str + :param display_name: Localized friendly display name of the metric + :type display_name: str + :param display_description: Localized friendly description of the metric + :type display_description: str + :param unit: Unit that makes sense for the metric + :type unit: str + :param category: Name of the metric category that the metric belongs to. A + metric can only belong to a single category. + :type category: str + :param aggregation_type: Only provide one value for this field. Valid + values: Average, Minimum, Maximum, Total, Count. + :type aggregation_type: str + :param supported_aggregation_types: Supported aggregation types + :type supported_aggregation_types: list[str] + :param supported_time_grain_types: Supported time grain types + :type supported_time_grain_types: list[str] + :param fill_gap_with_zero: Optional. If set to true, then zero will be + returned for time duration where no metric is emitted/published. + :type fill_gap_with_zero: bool + :param dimensions: Dimensions of the metric + :type dimensions: list[~azure.mgmt.avs.models.MetricDimension] + :param enable_regional_mdm_account: Whether or not the service is using + regional MDM accounts. + :type enable_regional_mdm_account: str + :param source_mdm_account: The name of the MDM account. + :type source_mdm_account: str + :param source_mdm_namespace: The name of the MDM namespace. + :type source_mdm_namespace: 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'}, + 'category': {'key': 'category', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'str'}, + 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', '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.category = kwargs.get('category', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) + self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) + self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) + self.dimensions = kwargs.get('dimensions', None) + self.enable_regional_mdm_account = kwargs.get('enable_regional_mdm_account', None) + self.source_mdm_account = kwargs.get('source_mdm_account', None) + self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) + + class Operation(Model): """A REST API operation. @@ -534,6 +655,13 @@ class Operation(Model): :ivar display: Contains the localized display information for this operation :vartype display: ~azure.mgmt.avs.models.OperationDisplay + :param is_data_action: Gets or sets a value indicating whether the + operation is a data action or not + :type is_data_action: bool + :param origin: Origin of the operation + :type origin: str + :param properties: Properties of the operation + :type properties: ~azure.mgmt.avs.models.OperationProperties """ _validation = { @@ -544,12 +672,18 @@ class Operation(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OperationProperties'}, } def __init__(self, **kwargs): super(Operation, self).__init__(**kwargs) self.name = None self.display = None + self.is_data_action = kwargs.get('is_data_action', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) class OperationDisplay(Model): @@ -591,6 +725,22 @@ def __init__(self, **kwargs): self.description = None +class OperationProperties(Model): + """Extra Operation properties. + + :param service_specification: Service specifications of the operation + :type service_specification: ~azure.mgmt.avs.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, **kwargs): + super(OperationProperties, self).__init__(**kwargs) + self.service_specification = kwargs.get('service_specification', None) + + class TrackedResource(Resource): """The resource model definition for a ARM tracked top level resource. @@ -652,7 +802,7 @@ class PrivateCloud(TrackedResource): :param management_cluster: The default cluster used for management :type management_cluster: ~azure.mgmt.avs.models.ManagementCluster :param internet: Connectivity to internet is enabled or disabled. Possible - values include: 'Enabled', 'Disabled' + values include: 'Enabled', 'Disabled'. Default value: "Disabled" . :type internet: str or ~azure.mgmt.avs.models.InternetEnum :param identity_sources: vCenter Single Sign On Identity Sources :type identity_sources: list[~azure.mgmt.avs.models.IdentitySource] @@ -734,7 +884,7 @@ def __init__(self, **kwargs): super(PrivateCloud, self).__init__(**kwargs) self.sku = kwargs.get('sku', None) self.management_cluster = kwargs.get('management_cluster', None) - self.internet = kwargs.get('internet', None) + self.internet = kwargs.get('internet', "Disabled") self.identity_sources = kwargs.get('identity_sources', None) self.provisioning_state = None self.circuit = kwargs.get('circuit', None) @@ -757,7 +907,7 @@ class PrivateCloudUpdate(Model): :param management_cluster: The default cluster used for management :type management_cluster: ~azure.mgmt.avs.models.ManagementCluster :param internet: Connectivity to internet is enabled or disabled. Possible - values include: 'Enabled', 'Disabled' + values include: 'Enabled', 'Disabled'. Default value: "Disabled" . :type internet: str or ~azure.mgmt.avs.models.InternetEnum :param identity_sources: vCenter Single Sign On Identity Sources :type identity_sources: list[~azure.mgmt.avs.models.IdentitySource] @@ -774,7 +924,7 @@ def __init__(self, **kwargs): super(PrivateCloudUpdate, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) self.management_cluster = kwargs.get('management_cluster', None) - self.internet = kwargs.get('internet', None) + self.internet = kwargs.get('internet', "Disabled") self.identity_sources = kwargs.get('identity_sources', None) @@ -807,6 +957,28 @@ def __init__(self, **kwargs): self.quota_enabled = None +class ServiceSpecification(Model): + """Service specification payload. + + :param log_specifications: Specifications of the Log for Azure Monitoring + :type log_specifications: list[~azure.mgmt.avs.models.LogSpecification] + :param metric_specifications: Specifications of the Metrics for Azure + Monitoring + :type metric_specifications: + list[~azure.mgmt.avs.models.MetricSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, **kwargs): + super(ServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) + self.metric_specifications = kwargs.get('metric_specifications', None) + + class Sku(Model): """The resource model definition representing SKU. diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models_py3.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models_py3.py index dd91b09cdb61..f8863c224113 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models_py3.py @@ -170,14 +170,14 @@ class Cluster(Resource): :type sku: ~azure.mgmt.avs.models.Sku :param cluster_size: The cluster size :type cluster_size: int + :param provisioning_state: The state of the cluster provisioning. Possible + values include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating' + :type provisioning_state: str or + ~azure.mgmt.avs.models.ClusterProvisioningState :ivar cluster_id: The identity :vartype cluster_id: int :ivar hosts: The hosts :vartype hosts: list[str] - :ivar provisioning_state: The state of the cluster provisioning. Possible - values include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating' - :vartype provisioning_state: str or - ~azure.mgmt.avs.models.ClusterProvisioningState """ _validation = { @@ -187,7 +187,6 @@ class Cluster(Resource): 'sku': {'required': True}, 'cluster_id': {'readonly': True}, 'hosts': {'readonly': True}, - 'provisioning_state': {'readonly': True}, } _attribute_map = { @@ -196,18 +195,18 @@ class Cluster(Resource): 'type': {'key': 'type', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'cluster_size': {'key': 'properties.clusterSize', 'type': 'int'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'cluster_id': {'key': 'properties.clusterId', 'type': 'int'}, 'hosts': {'key': 'properties.hosts', 'type': '[str]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, sku, cluster_size: int=None, **kwargs) -> None: + def __init__(self, *, sku, cluster_size: int=None, provisioning_state=None, **kwargs) -> None: super(Cluster, self).__init__(**kwargs) self.sku = sku self.cluster_size = cluster_size + self.provisioning_state = provisioning_state self.cluster_id = None self.hosts = None - self.provisioning_state = None class ClusterUpdate(Model): @@ -304,7 +303,11 @@ def __init__(self, **kwargs) -> None: class ErrorResponse(Model): - """The resource management error response. + """Error Response. + + Common error response for all Azure Resource Manager APIs to return error + details for failed operations. (This also follows the OData error response + format.). Variables are only populated by the server, and will be ignored when sending a request. @@ -492,6 +495,30 @@ def __init__(self, *, name: str=None, alias: str=None, domain: str=None, base_us self.password = password +class LogSpecification(Model): + """Specifications of the Log for Azure Monitoring. + + :param name: Name of the log + :type name: str + :param display_name: Localized friendly display name of the log + :type display_name: str + :param blob_duration: Blob duration of the log + :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(LogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration + + class ManagementCluster(ClusterUpdateProperties): """The properties of a default cluster. @@ -500,6 +527,10 @@ class ManagementCluster(ClusterUpdateProperties): :param cluster_size: The cluster size :type cluster_size: int + :param provisioning_state: The state of the cluster provisioning. Possible + values include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating' + :type provisioning_state: str or + ~azure.mgmt.avs.models.ClusterProvisioningState :ivar cluster_id: The identity :vartype cluster_id: int :ivar hosts: The hosts @@ -513,16 +544,106 @@ class ManagementCluster(ClusterUpdateProperties): _attribute_map = { 'cluster_size': {'key': 'clusterSize', 'type': 'int'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'cluster_id': {'key': 'clusterId', 'type': 'int'}, 'hosts': {'key': 'hosts', 'type': '[str]'}, } - def __init__(self, *, cluster_size: int=None, **kwargs) -> None: + def __init__(self, *, cluster_size: int=None, provisioning_state=None, **kwargs) -> None: super(ManagementCluster, self).__init__(cluster_size=cluster_size, **kwargs) + self.provisioning_state = provisioning_state self.cluster_id = None self.hosts = None +class MetricDimension(Model): + """Specifications of the Dimension of metrics. + + :param name: Name of the dimension + :type name: str + :param display_name: Localized friendly display name of the 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(MetricDimension, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + + +class MetricSpecification(Model): + """Specifications of the Metrics for Azure Monitoring. + + :param name: Name of the metric + :type name: str + :param display_name: Localized friendly display name of the metric + :type display_name: str + :param display_description: Localized friendly description of the metric + :type display_description: str + :param unit: Unit that makes sense for the metric + :type unit: str + :param category: Name of the metric category that the metric belongs to. A + metric can only belong to a single category. + :type category: str + :param aggregation_type: Only provide one value for this field. Valid + values: Average, Minimum, Maximum, Total, Count. + :type aggregation_type: str + :param supported_aggregation_types: Supported aggregation types + :type supported_aggregation_types: list[str] + :param supported_time_grain_types: Supported time grain types + :type supported_time_grain_types: list[str] + :param fill_gap_with_zero: Optional. If set to true, then zero will be + returned for time duration where no metric is emitted/published. + :type fill_gap_with_zero: bool + :param dimensions: Dimensions of the metric + :type dimensions: list[~azure.mgmt.avs.models.MetricDimension] + :param enable_regional_mdm_account: Whether or not the service is using + regional MDM accounts. + :type enable_regional_mdm_account: str + :param source_mdm_account: The name of the MDM account. + :type source_mdm_account: str + :param source_mdm_namespace: The name of the MDM namespace. + :type source_mdm_namespace: 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'}, + 'category': {'key': 'category', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'str'}, + 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, category: str=None, aggregation_type: str=None, supported_aggregation_types=None, supported_time_grain_types=None, fill_gap_with_zero: bool=None, dimensions=None, enable_regional_mdm_account: str=None, source_mdm_account: str=None, source_mdm_namespace: 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.category = category + self.aggregation_type = aggregation_type + self.supported_aggregation_types = supported_aggregation_types + self.supported_time_grain_types = supported_time_grain_types + self.fill_gap_with_zero = fill_gap_with_zero + self.dimensions = dimensions + self.enable_regional_mdm_account = enable_regional_mdm_account + self.source_mdm_account = source_mdm_account + self.source_mdm_namespace = source_mdm_namespace + + class Operation(Model): """A REST API operation. @@ -534,6 +655,13 @@ class Operation(Model): :ivar display: Contains the localized display information for this operation :vartype display: ~azure.mgmt.avs.models.OperationDisplay + :param is_data_action: Gets or sets a value indicating whether the + operation is a data action or not + :type is_data_action: bool + :param origin: Origin of the operation + :type origin: str + :param properties: Properties of the operation + :type properties: ~azure.mgmt.avs.models.OperationProperties """ _validation = { @@ -544,12 +672,18 @@ class Operation(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OperationProperties'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, is_data_action: bool=None, origin: str=None, properties=None, **kwargs) -> None: super(Operation, self).__init__(**kwargs) self.name = None self.display = None + self.is_data_action = is_data_action + self.origin = origin + self.properties = properties class OperationDisplay(Model): @@ -591,6 +725,22 @@ def __init__(self, **kwargs) -> None: self.description = None +class OperationProperties(Model): + """Extra Operation properties. + + :param service_specification: Service specifications of the operation + :type service_specification: ~azure.mgmt.avs.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, service_specification=None, **kwargs) -> None: + super(OperationProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + class TrackedResource(Resource): """The resource model definition for a ARM tracked top level resource. @@ -652,7 +802,7 @@ class PrivateCloud(TrackedResource): :param management_cluster: The default cluster used for management :type management_cluster: ~azure.mgmt.avs.models.ManagementCluster :param internet: Connectivity to internet is enabled or disabled. Possible - values include: 'Enabled', 'Disabled' + values include: 'Enabled', 'Disabled'. Default value: "Disabled" . :type internet: str or ~azure.mgmt.avs.models.InternetEnum :param identity_sources: vCenter Single Sign On Identity Sources :type identity_sources: list[~azure.mgmt.avs.models.IdentitySource] @@ -730,7 +880,7 @@ class PrivateCloud(TrackedResource): 'nsxt_certificate_thumbprint': {'key': 'properties.nsxtCertificateThumbprint', 'type': 'str'}, } - def __init__(self, *, sku, network_block: str, location: str=None, tags=None, management_cluster=None, internet=None, identity_sources=None, circuit=None, vcenter_password: str=None, nsxt_password: str=None, **kwargs) -> None: + def __init__(self, *, sku, network_block: str, location: str=None, tags=None, management_cluster=None, internet="Disabled", identity_sources=None, circuit=None, vcenter_password: str=None, nsxt_password: str=None, **kwargs) -> None: super(PrivateCloud, self).__init__(location=location, tags=tags, **kwargs) self.sku = sku self.management_cluster = management_cluster @@ -757,7 +907,7 @@ class PrivateCloudUpdate(Model): :param management_cluster: The default cluster used for management :type management_cluster: ~azure.mgmt.avs.models.ManagementCluster :param internet: Connectivity to internet is enabled or disabled. Possible - values include: 'Enabled', 'Disabled' + values include: 'Enabled', 'Disabled'. Default value: "Disabled" . :type internet: str or ~azure.mgmt.avs.models.InternetEnum :param identity_sources: vCenter Single Sign On Identity Sources :type identity_sources: list[~azure.mgmt.avs.models.IdentitySource] @@ -770,7 +920,7 @@ class PrivateCloudUpdate(Model): 'identity_sources': {'key': 'properties.identitySources', 'type': '[IdentitySource]'}, } - def __init__(self, *, tags=None, management_cluster=None, internet=None, identity_sources=None, **kwargs) -> None: + def __init__(self, *, tags=None, management_cluster=None, internet="Disabled", identity_sources=None, **kwargs) -> None: super(PrivateCloudUpdate, self).__init__(**kwargs) self.tags = tags self.management_cluster = management_cluster @@ -807,6 +957,28 @@ def __init__(self, **kwargs) -> None: self.quota_enabled = None +class ServiceSpecification(Model): + """Service specification payload. + + :param log_specifications: Specifications of the Log for Azure Monitoring + :type log_specifications: list[~azure.mgmt.avs.models.LogSpecification] + :param metric_specifications: Specifications of the Metrics for Azure + Monitoring + :type metric_specifications: + list[~azure.mgmt.avs.models.MetricSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, *, log_specifications=None, metric_specifications=None, **kwargs) -> None: + super(ServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications + self.metric_specifications = metric_specifications + + class Sku(Model): """The resource model definition representing SKU. diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_authorizations_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_authorizations_operations.py index ae761e630faa..215100aaae98 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_authorizations_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_authorizations_operations.py @@ -182,7 +182,9 @@ def get( def _create_or_update_initial( - self, resource_group_name, private_cloud_name, authorization_name, authorization, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, private_cloud_name, authorization_name, custom_headers=None, raw=False, **operation_config): + authorization = None + # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -209,7 +211,7 @@ def _create_or_update_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(authorization, 'object') + body_content = self._serialize.body(authorization, 'ExpressRouteAuthorization') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -234,7 +236,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, private_cloud_name, authorization_name, authorization, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, private_cloud_name, authorization_name, custom_headers=None, raw=False, polling=True, **operation_config): """Create or update an ExpressRoute Circuit Authorization in a private cloud. @@ -246,8 +248,6 @@ def create_or_update( :param authorization_name: Name of the ExpressRoute Circuit Authorization in the private cloud :type authorization_name: str - :param authorization: An ExpressRoute Circuit Authorization - :type authorization: object :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 @@ -266,7 +266,6 @@ def create_or_update( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, authorization_name=authorization_name, - authorization=authorization, custom_headers=custom_headers, raw=True, **operation_config diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_clusters_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_clusters_operations.py index 3d9a15ab9ec8..b8a0b62774b7 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_clusters_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_clusters_operations.py @@ -181,9 +181,7 @@ def get( def _create_or_update_initial( - self, resource_group_name, private_cloud_name, cluster_name, sku, cluster_size=None, custom_headers=None, raw=False, **operation_config): - cluster = models.Cluster(sku=sku, cluster_size=cluster_size) - + self, resource_group_name, private_cloud_name, cluster_name, cluster, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -235,7 +233,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, private_cloud_name, cluster_name, sku, cluster_size=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, private_cloud_name, cluster_name, cluster, custom_headers=None, raw=False, polling=True, **operation_config): """Create or update a cluster in a private cloud. :param resource_group_name: The name of the resource group. The name @@ -245,10 +243,8 @@ def create_or_update( :type private_cloud_name: str :param cluster_name: Name of the cluster in the private cloud :type cluster_name: str - :param sku: The cluster SKU - :type sku: ~azure.mgmt.avs.models.Sku - :param cluster_size: The cluster size - :type cluster_size: int + :param cluster: A cluster in the private cloud + :type cluster: ~azure.mgmt.avs.models.Cluster :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 @@ -266,8 +262,7 @@ def create_or_update( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, cluster_name=cluster_name, - sku=sku, - cluster_size=cluster_size, + cluster=cluster, custom_headers=custom_headers, raw=True, **operation_config diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_hcx_enterprise_sites_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_hcx_enterprise_sites_operations.py index 2a6b139c72e3..42603116ec08 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_hcx_enterprise_sites_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_hcx_enterprise_sites_operations.py @@ -179,7 +179,7 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}'} def create_or_update( - self, resource_group_name, private_cloud_name, hcx_enterprise_site_name, hcx_enterprise_site, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, private_cloud_name, hcx_enterprise_site_name, custom_headers=None, raw=False, **operation_config): """Create or update an HCX Enterprise Site in a private cloud. :param resource_group_name: The name of the resource group. The name @@ -190,8 +190,6 @@ def create_or_update( :param hcx_enterprise_site_name: Name of the HCX Enterprise Site in the private cloud :type hcx_enterprise_site_name: str - :param hcx_enterprise_site: The HCX Enterprise Site - :type hcx_enterprise_site: object :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -202,6 +200,8 @@ def create_or_update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + hcx_enterprise_site = None + # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -228,7 +228,7 @@ def create_or_update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(hcx_enterprise_site, 'object') + body_content = self._serialize.body(hcx_enterprise_site, 'HcxEnterpriseSite') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content)