Skip to main content

sql_managed_instances

Creates, updates, deletes, gets or lists a sql_managed_instances resource.

Overview

Namesql_managed_instances
TypeResource
Idazure.azure_arc_data.sql_managed_instances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
activeDirectoryInformationobjectActive Directory information related to this SQL Managed Instance.
adminstringThe instance admin user.
basicLoginInformationobjectUsername and password for basic authentication.
clusterIdstringIf a CustomLocation is provided, this contains the ARM id of the connected cluster the custom location belongs to.
dataControllerIdstringnull.
endTimestringThe instance end time.
extendedLocationobjectThe extendedLocation of the resource.
extensionIdstringIf a CustomLocation is provided, this contains the ARM id of the extension the custom location belongs to.
k8sRawobjectThe raw kubernetes information.
lastUploadedDatestring (date-time)Last uploaded date from Kubernetes cluster. Defaults to current date time.
licenseTypestringThe license type to apply for this managed instance. Known values are: "BasePrice", "LicenseIncluded", and "DisasterRecovery".
locationstringThe geo-location where the resource lives. Required.
provisioningStatestringThe provisioning state of the Arc-enabled SQL Managed Instance resource.
skuobjectResource sku.
startTimestringThe instance start time.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, sql_managed_instance_name, subscription_idRetrieves a SQL Managed Instance resource.
list_by_resource_groupselectresource_group_name, subscription_idList sqlManagedInstance resources in the resource group. Gets all sqlManagedInstances in a resource group.
listselectsubscription_idList sqlManagedInstance resources in the subscription. List sqlManagedInstance resources in the subscription.
createinsertresource_group_name, sql_managed_instance_name, subscription_id, location, propertiesCreates or replaces a SQL Managed Instance resource.
updateupdateresource_group_name, sql_managed_instance_name, subscription_idUpdates a SQL Managed Instance resource.
deletedeleteresource_group_name, sql_managed_instance_name, subscription_idDeletes a SQL Managed Instance resource.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
resource_group_namestringThe name of the Azure resource group. Required.
sql_managed_instance_namestringName of SQL Managed Instance. Required.
subscription_idstring

SELECT examples

Retrieves a SQL Managed Instance resource.

SELECT
id,
name,
activeDirectoryInformation,
admin,
basicLoginInformation,
clusterId,
dataControllerId,
endTime,
extendedLocation,
extensionId,
k8sRaw,
lastUploadedDate,
licenseType,
location,
provisioningState,
sku,
startTime,
systemData,
tags,
type
FROM azure.azure_arc_data.sql_managed_instances
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND sql_managed_instance_name = '{{ sql_managed_instance_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or replaces a SQL Managed Instance resource.

INSERT INTO azure.azure_arc_data.sql_managed_instances (
tags,
location,
properties,
extendedLocation,
sku,
resource_group_name,
sql_managed_instance_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}' /* required */,
'{{ extendedLocation }}',
'{{ sku }}',
'{{ resource_group_name }}',
'{{ sql_managed_instance_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
extendedLocation,
location,
properties,
sku,
systemData,
tags,
type
;

UPDATE examples

Updates a SQL Managed Instance resource.

UPDATE azure.azure_arc_data.sql_managed_instances
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND sql_managed_instance_name = '{{ sql_managed_instance_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
extendedLocation,
location,
properties,
sku,
systemData,
tags,
type;

DELETE examples

Deletes a SQL Managed Instance resource.

DELETE FROM azure.azure_arc_data.sql_managed_instances
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND sql_managed_instance_name = '{{ sql_managed_instance_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;