Skip to main content

server_trust_certificates

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

Overview

Nameserver_trust_certificates
TypeResource
Idazure.sql.server_trust_certificates

Fields

NameDatatypeDescription
certificateNametextfield from the properties object
certificate_nametextfield from the properties object
managedInstanceNametextfield from the properties object
public_blobtextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
thumbprinttextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTcertificateName, managedInstanceName, resourceGroupName, subscriptionIdGets a server trust certificate that was uploaded from box to Sql Managed Instance.
create_or_updateINSERTcertificateName, managedInstanceName, resourceGroupName, subscriptionIdUploads a server trust certificate from box to Sql Managed Instance.
deleteDELETEcertificateName, managedInstanceName, resourceGroupName, subscriptionIdDeletes a server trust certificate that was uploaded from box to Sql Managed Instance.

SELECT examples

Gets a server trust certificate that was uploaded from box to Sql Managed Instance.

SELECT
certificateName,
certificate_name,
managedInstanceName,
public_blob,
resourceGroupName,
subscriptionId,
thumbprint
FROM azure.sql.vw_server_trust_certificates
WHERE certificateName = '{{ certificateName }}'
AND managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

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

DELETE example

Deletes the specified server_trust_certificates resource.

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