1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 .proxy_resource import ProxyResource
class RecommendedIndex(ProxyResource):
"""Represents a database recommended index.
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 action: The proposed index action. You can create a missing index,
drop an unused index, or rebuild an existing index to improve its
performance. Possible values include: 'Create', 'Drop', 'Rebuild'
:vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction
:ivar state: The current recommendation state. Possible values include:
'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert',
'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success'
:vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState
:ivar created: The UTC datetime showing when this resource was created
(ISO8601 format).
:vartype created: datetime
:ivar last_modified: The UTC datetime of when was this resource last
changed (ISO8601 format).
:vartype last_modified: datetime
:ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE,
CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED',
'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE'
:vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType
:ivar schema: The schema where table to build index over resides
:vartype schema: str
:ivar table: The table on which to build index.
:vartype table: str
:ivar columns: Columns over which to build index
:vartype columns: list[str]
:ivar included_columns: The list of column names to be included in the
index
:vartype included_columns: list[str]
:ivar index_script: The full build index script
:vartype index_script: str
:ivar estimated_impact: The estimated impact of doing recommended index
action.
:vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact]
:ivar reported_impact: The values reported after index action is complete.
:vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact]
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'action': {'readonly': True},
'state': {'readonly': True},
'created': {'readonly': True},
'last_modified': {'readonly': True},
'index_type': {'readonly': True},
'schema': {'readonly': True},
'table': {'readonly': True},
'columns': {'readonly': True},
'included_columns': {'readonly': True},
'index_script': {'readonly': True},
'estimated_impact': {'readonly': True},
'reported_impact': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'},
'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'},
'created': {'key': 'properties.created', 'type': 'iso-8601'},
'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'},
'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'},
'schema': {'key': 'properties.schema', 'type': 'str'},
'table': {'key': 'properties.table', 'type': 'str'},
'columns': {'key': 'properties.columns', 'type': '[str]'},
'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'},
'index_script': {'key': 'properties.indexScript', 'type': 'str'},
'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'},
'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'},
}
def __init__(self, **kwargs):
super(RecommendedIndex, self).__init__(**kwargs)
self.action = None
self.state = None
self.created = None
self.last_modified = None
self.index_type = None
self.schema = None
self.table = None
self.columns = None
self.included_columns = None
self.index_script = None
self.estimated_impact = None
self.reported_impact = None
|