ManagedInstancesOperations Class
ManagedInstancesOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Inheritance
-
builtins.objectManagedInstancesOperations
Constructor
ManagedInstancesOperations(client, config, serializer, deserializer)
Parameters
Name | Description |
---|---|
client
Required
|
Client for service requests. |
config
Required
|
Configuration of service client. |
serializer
Required
|
An object model serializer. |
deserializer
Required
|
An object model deserializer. |
Variables
Name | Description |
---|---|
models
|
Alias to model classes used in this operation group. |
Methods
begin_create_or_update |
Creates or updates a managed instance. |
begin_delete |
Deletes a managed instance. |
begin_failover |
Failovers a managed instance. |
begin_update |
Updates a managed instance. |
get |
Gets a managed instance. |
list |
Gets a list of all managed instances in the subscription. |
list_by_instance_pool |
Gets a list of all managed instances in an instance pool. |
list_by_managed_instance |
Get top resource consuming queries of a managed instance. |
list_by_resource_group |
Gets a list of managed instances in a resource group. |
begin_create_or_update
Creates or updates a managed instance.
begin_create_or_update(resource_group_name: str, managed_instance_name: str, parameters: '_models.ManagedInstance', **kwargs: Any) -> LROPoller['_models.ManagedInstance']
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
managed_instance_name
Required
|
The name of the managed instance. |
parameters
Required
|
The requested managed instance resource state. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
continuation_token
|
A continuation token to restart a poller from a saved state. |
polling
|
By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. |
polling_interval
|
Default waiting time between two polls for LRO operations if no Retry-After header is present. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either ManagedInstance or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_delete
Deletes a managed instance.
begin_delete(resource_group_name: str, managed_instance_name: str, **kwargs: Any) -> LROPoller[None]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
managed_instance_name
Required
|
The name of the managed instance. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
continuation_token
|
A continuation token to restart a poller from a saved state. |
polling
|
By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. |
polling_interval
|
Default waiting time between two polls for LRO operations if no Retry-After header is present. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_failover
Failovers a managed instance.
begin_failover(resource_group_name: str, managed_instance_name: str, replica_type: str | '_models.ReplicaType' | None = None, **kwargs: Any) -> LROPoller[None]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
managed_instance_name
Required
|
The name of the managed instance to failover. |
replica_type
|
str or
ReplicaType
The type of replica to be failed over. Default value: None
|
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
continuation_token
|
A continuation token to restart a poller from a saved state. |
polling
|
By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. |
polling_interval
|
Default waiting time between two polls for LRO operations if no Retry-After header is present. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_update
Updates a managed instance.
begin_update(resource_group_name: str, managed_instance_name: str, parameters: '_models.ManagedInstanceUpdate', **kwargs: Any) -> LROPoller['_models.ManagedInstance']
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
managed_instance_name
Required
|
The name of the managed instance. |
parameters
Required
|
The requested managed instance resource state. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
continuation_token
|
A continuation token to restart a poller from a saved state. |
polling
|
By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. |
polling_interval
|
Default waiting time between two polls for LRO operations if no Retry-After header is present. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either ManagedInstance or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get
Gets a managed instance.
get(resource_group_name: str, managed_instance_name: str, expand: str | None = None, **kwargs: Any) -> _models.ManagedInstance
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
managed_instance_name
Required
|
The name of the managed instance. |
expand
|
The child resources to include in the response. Default value: None
|
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
ManagedInstance, or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list
Gets a list of all managed instances in the subscription.
list(expand: str | None = None, **kwargs: Any) -> Iterable['_models.ManagedInstanceListResult']
Parameters
Name | Description |
---|---|
expand
|
The child resources to include in the response. Default value: None
|
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either ManagedInstanceListResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_instance_pool
Gets a list of all managed instances in an instance pool.
list_by_instance_pool(resource_group_name: str, instance_pool_name: str, expand: str | None = None, **kwargs: Any) -> Iterable['_models.ManagedInstanceListResult']
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
instance_pool_name
Required
|
The instance pool name. |
expand
|
The child resources to include in the response. Default value: None
|
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either ManagedInstanceListResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_managed_instance
Get top resource consuming queries of a managed instance.
list_by_managed_instance(resource_group_name: str, managed_instance_name: str, number_of_queries: int | None = None, databases: str | None = None, start_time: str | None = None, end_time: str | None = None, interval: str | '_models.QueryTimeGrainType' | None = None, aggregation_function: str | '_models.AggregationFunctionType' | None = None, observation_metric: str | '_models.MetricType' | None = None, **kwargs: Any) -> Iterable['_models.TopQueriesListResult']
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
managed_instance_name
Required
|
The name of the managed instance. |
number_of_queries
|
How many 'top queries' to return. Default is 5. Default value: None
|
databases
|
Comma separated list of databases to be included into search. All DB's are included if this parameter is not specified. Default value: None
|
start_time
|
Start time for observed period. Default value: None
|
end_time
|
End time for observed period. Default value: None
|
interval
|
The time step to be used to summarize the metric values. Default value is PT1H. Default value: None
|
aggregation_function
|
Aggregation function to be used, default value is 'sum'. Default value: None
|
observation_metric
|
str or
MetricType
Metric to be used for ranking top queries. Default is 'cpu'. Default value: None
|
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either TopQueriesListResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_resource_group
Gets a list of managed instances in a resource group.
list_by_resource_group(resource_group_name: str, expand: str | None = None, **kwargs: Any) -> Iterable['_models.ManagedInstanceListResult']
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
expand
|
The child resources to include in the response. Default value: None
|
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either ManagedInstanceListResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.sql.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\sql\\models\\__init__.py'>
Azure SDK for Python