Skip to main content

managed_instance_administrators

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

Overview

Namemanaged_instance_administrators
TypeResource
Idazure.sql.managed_instance_administrators

Fields

NameDatatypeDescription
administratorNametextfield from the properties object
administrator_typetextfield from the properties object
logintextfield from the properties object
managedInstanceNametextfield from the properties object
resourceGroupNametextfield from the properties object
sidtextfield from the properties object
subscriptionIdtextfield from the properties object
tenant_idtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTadministratorName, managedInstanceName, resourceGroupName, subscriptionIdGets a managed instance administrator.
create_or_updateINSERTadministratorName, managedInstanceName, resourceGroupName, subscriptionIdCreates or updates a managed instance administrator.
deleteDELETEadministratorName, managedInstanceName, resourceGroupName, subscriptionIdDeletes a managed instance administrator.

SELECT examples

Gets a managed instance administrator.

SELECT
administratorName,
administrator_type,
login,
managedInstanceName,
resourceGroupName,
sid,
subscriptionId,
tenant_id
FROM azure.sql.vw_managed_instance_administrators
WHERE administratorName = '{{ administratorName }}'
AND managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new managed_instance_administrators resource.

/*+ create */
INSERT INTO azure.sql.managed_instance_administrators (
administratorName,
managedInstanceName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ administratorName }}',
'{{ managedInstanceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified managed_instance_administrators resource.

/*+ delete */
DELETE FROM azure.sql.managed_instance_administrators
WHERE administratorName = '{{ administratorName }}'
AND managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';