ManagedInstancesOperations Class
ManagedInstancesOperations async 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.
async begin_create_or_update(resource_group_name: str, managed_instance_name: str, parameters: ManagedInstance, **kwargs: Any) -> AsyncLROPoller[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 AsyncARMPolling. 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 AsyncLROPoller that returns either ManagedInstance or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_delete
Deletes a managed instance.
async begin_delete(resource_group_name: str, managed_instance_name: str, **kwargs: Any) -> AsyncLROPoller[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 AsyncARMPolling. 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 AsyncLROPoller that returns either None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_failover
Failovers a managed instance.
async begin_failover(resource_group_name: str, managed_instance_name: str, replica_type: str | ReplicaType | None = None, **kwargs: Any) -> AsyncLROPoller[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
Required
|
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 AsyncARMPolling. 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 AsyncLROPoller that returns either None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_update
Updates a managed instance.
async begin_update(resource_group_name: str, managed_instance_name: str, parameters: ManagedInstanceUpdate, **kwargs: Any) -> AsyncLROPoller[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 AsyncARMPolling. 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 AsyncLROPoller that returns either ManagedInstance or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get
Gets a managed instance.
async get(resource_group_name: str, managed_instance_name: str, expand: str | None = None, **kwargs: Any) -> 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
Required
|
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) -> AsyncIterable[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) -> AsyncIterable[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
Required
|
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 | QueryTimeGrainType | None = None, aggregation_function: str | AggregationFunctionType | None = None, observation_metric: str | MetricType | None = None, **kwargs: Any) -> AsyncIterable[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
Required
|
How many 'top queries' to return. Default is 5. Default value: None
|
databases
Required
|
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
Required
|
Start time for observed period. Default value: None
|
end_time
Required
|
End time for observed period. Default value: None
|
interval
Required
|
The time step to be used to summarize the metric values. Default value is PT1H. Default value: None
|
aggregation_function
Required
|
Aggregation function to be used, default value is 'sum'. Default value: None
|
observation_metric
Required
|
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) -> AsyncIterable[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
Required
|
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