Condividi tramite


ManagedInstance Class

An Azure SQL managed instance.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to server.

Constructor

ManagedInstance(*, location: str, tags: dict[str, str] | None = None, identity: _models.ResourceIdentity | None = None, sku: _models.Sku | None = None, managed_instance_create_mode: str | _models.ManagedServerCreateMode | None = None, is_general_purpose_v2: bool | None = None, administrator_login: str | None = None, administrator_login_password: str | None = None, subnet_id: str | None = None, license_type: str | _models.ManagedInstanceLicenseType | None = None, hybrid_secondary_usage: str | _models.HybridSecondaryUsage | None = None, v_cores: int | None = None, storage_size_in_gb: int | None = None, storage_iops: int | None = None, storage_throughput_mbps: int | None = None, collation: str | None = None, dns_zone_partner: str | None = None, public_data_endpoint_enabled: bool | None = None, source_managed_instance_id: str | None = None, restore_point_in_time: datetime | None = None, proxy_override: str | _models.ManagedInstanceProxyOverride | None = None, timezone_id: str | None = None, instance_pool_id: str | None = None, maintenance_configuration_id: str | None = None, minimal_tls_version: str | None = None, requested_backup_storage_redundancy: str | _models.BackupStorageRedundancy | None = None, zone_redundant: bool | None = None, primary_user_assigned_identity_id: str | None = None, key_id: str | None = None, administrators: _models.ManagedInstanceExternalAdministrator | None = None, service_principal: _models.ServicePrincipal | None = None, pricing_model: str | _models.FreemiumType | None = None, authentication_metadata: str | _models.AuthMetadataLookupModes | None = None, database_format: str | _models.ManagedInstanceDatabaseFormat | None = None, **kwargs: Any)

Keyword-Only Parameters

Name Description
location
str

Resource location. Required.

tags

Resource tags.

Default value: None
identity

The Azure Active Directory identity of the managed instance.

Default value: None
sku
Sku

Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH.

Default value: None
managed_instance_create_mode

Specifies the mode of database creation.

Default: Regular instance creation.

Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. Known values are: "Default" and "PointInTimeRestore".

Default value: None
is_general_purpose_v2

Whether or not this is a GPv2 variant of General Purpose edition.

Default value: None
administrator_login
str

Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation).

Default value: None
administrator_login_password
str

The administrator login password (required for managed instance creation).

Default value: None
subnet_id
str

Subnet resource ID for the managed instance.

Default value: None
license_type

The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). Known values are: "LicenseIncluded" and "BasePrice".

Default value: None
hybrid_secondary_usage

Hybrid secondary usage. Possible values are 'Active' (default value) and 'Passive' (customer uses the secondary as Passive DR). Known values are: "Active" and "Passive".

Default value: None
v_cores
int

The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80.

Default value: None
storage_size_in_gb
int

Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores.

Default value: None
storage_iops
int

Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps allowed only. Maximum value depends on the selected hardware family and number of vCores.

Default value: None
storage_throughput_mbps
int

Storage throughput MBps parameter is not supported in the instance create/update operation.

Default value: None
collation
str

Collation of the managed instance.

Default value: None
dns_zone_partner
str

The resource id of another managed instance whose DNS zone this managed instance will share after creation.

Default value: None
public_data_endpoint_enabled

Whether or not the public data endpoint is enabled.

Default value: None
source_managed_instance_id
str

The resource identifier of the source managed instance associated with create operation of this instance.

Default value: None
restore_point_in_time

Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.

Default value: None
proxy_override

Connection type used for connecting to the instance. Known values are: "Proxy", "Redirect", and "Default".

Default value: None
timezone_id
str

Id of the timezone. Allowed values are timezones supported by Windows. Windows keeps details on supported timezones, including the id, in registry under KEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionTime Zones. You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time".

Default value: None
instance_pool_id
str

The Id of the instance pool this managed server belongs to.

Default value: None
maintenance_configuration_id
str

Specifies maintenance configuration id to apply to this managed instance.

Default value: None
minimal_tls_version
str

Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'.

Default value: None
requested_backup_storage_redundancy

The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). Known values are: "Geo", "Local", "Zone", and "GeoZone".

Default value: None
zone_redundant

Whether or not the multi-az is enabled.

Default value: None
primary_user_assigned_identity_id
str

The resource id of a user assigned identity to be used by default.

Default value: None
key_id
str

A CMK URI of the key to use for encryption.

Default value: None
administrators

The Azure Active Directory administrator of the instance. This can only be used at instance create time. If used for instance update, it will be ignored or it will result in an error. For updates individual APIs will need to be used.

Default value: None
service_principal

The managed instance's service principal.

Default value: None
pricing_model

Weather or not Managed Instance is freemium. Known values are: "Regular" and "Freemium".

Default value: None
authentication_metadata

The managed instance's authentication metadata lookup mode. Known values are: "AzureAD", "Paired", and "Windows".

Default value: None
database_format

Specifies the internal format of instance databases specific to the SQL engine version. Known values are: "AlwaysUpToDate" and "SQLServer2022".

Default value: None

Variables

Name Description
id
str

Resource ID.

name
str

Resource name.

type
str

Resource type.

location
str

Resource location. Required.

tags

Resource tags.

identity

The Azure Active Directory identity of the managed instance.

sku
Sku

Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH.

provisioning_state

Provisioning state of managed instance. Known values are: "Created", "InProgress", "Succeeded", "Failed", and "Canceled".

managed_instance_create_mode

Specifies the mode of database creation.

Default: Regular instance creation.

Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. Known values are: "Default" and "PointInTimeRestore".

fully_qualified_domain_name
str

The fully qualified domain name of the managed instance.

is_general_purpose_v2

Whether or not this is a GPv2 variant of General Purpose edition.

administrator_login
str

Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation).

administrator_login_password
str

The administrator login password (required for managed instance creation).

subnet_id
str

Subnet resource ID for the managed instance.

state
str

The state of the managed instance.

license_type

The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). Known values are: "LicenseIncluded" and "BasePrice".

hybrid_secondary_usage

Hybrid secondary usage. Possible values are 'Active' (default value) and 'Passive' (customer uses the secondary as Passive DR). Known values are: "Active" and "Passive".

hybrid_secondary_usage_detected

Hybrid secondary usage detected. Possible values are 'Active' (customer does not meet the requirements to use the secondary as Passive DR) and 'Passive' (customer meets the requirements to use the secondary as Passive DR). Known values are: "Active" and "Passive".

v_cores
int

The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80.

storage_size_in_gb
int

Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores.

storage_iops
int

Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps allowed only. Maximum value depends on the selected hardware family and number of vCores.

storage_throughput_mbps
int

Storage throughput MBps parameter is not supported in the instance create/update operation.

collation
str

Collation of the managed instance.

dns_zone
str

The Dns Zone that the managed instance is in.

dns_zone_partner
str

The resource id of another managed instance whose DNS zone this managed instance will share after creation.

public_data_endpoint_enabled

Whether or not the public data endpoint is enabled.

source_managed_instance_id
str

The resource identifier of the source managed instance associated with create operation of this instance.

restore_point_in_time

Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.

proxy_override

Connection type used for connecting to the instance. Known values are: "Proxy", "Redirect", and "Default".

timezone_id
str

Id of the timezone. Allowed values are timezones supported by Windows. Windows keeps details on supported timezones, including the id, in registry under KEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionTime Zones. You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time".

instance_pool_id
str

The Id of the instance pool this managed server belongs to.

maintenance_configuration_id
str

Specifies maintenance configuration id to apply to this managed instance.

private_endpoint_connections

List of private endpoint connections on a managed instance.

minimal_tls_version
str

Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'.

current_backup_storage_redundancy

The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). Known values are: "Geo", "Local", "Zone", and "GeoZone".

requested_backup_storage_redundancy

The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). Known values are: "Geo", "Local", "Zone", and "GeoZone".

zone_redundant

Whether or not the multi-az is enabled.

primary_user_assigned_identity_id
str

The resource id of a user assigned identity to be used by default.

key_id
str

A CMK URI of the key to use for encryption.

administrators

The Azure Active Directory administrator of the instance. This can only be used at instance create time. If used for instance update, it will be ignored or it will result in an error. For updates individual APIs will need to be used.

service_principal

The managed instance's service principal.

virtual_cluster_id
str

Virtual cluster resource id for the Managed Instance.

external_governance_status

Status of external governance. Known values are: "Enabled" and "Disabled".

pricing_model

Weather or not Managed Instance is freemium. Known values are: "Regular" and "Freemium".

create_time

Specifies the point in time (ISO8601 format) of the Managed Instance creation.

authentication_metadata

The managed instance's authentication metadata lookup mode. Known values are: "AzureAD", "Paired", and "Windows".

database_format

Specifies the internal format of instance databases specific to the SQL engine version. Known values are: "AlwaysUpToDate" and "SQLServer2022".