POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/tdeCertificates?api-version=2021-11-01
URI Parameters
Name
In
Required
Type
Description
resourceGroupName
path
True
string
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverName
path
True
string
The name of the server.
subscriptionId
path
True
string
The subscription ID that identifies an Azure subscription.
api-version
query
True
string
The API version to use for the request.
Request Body
Name
Required
Type
Description
properties.privateBlob
True
string
The base64 encoded certificate private blob.
properties.certPassword
string
The certificate password.
Responses
Name
Type
Description
200 OK
Successfully created the TDE certificate.
202 Accepted
Accepted
Other Status Codes
*** Error Responses: ***
400 MissingPrivateBlob - The private blob is missing.
400 InvalidPrivateBlobOrPassword - Invalid private blob or password specified.
400 PrivateBlobWithoutPrivateKey - The provided blob does not contain private key.
400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.
404 SubscriptionDoesNotHaveServer - The requested server was not found
404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.
404 ResourceNotFound - The requested resource was not found.
404 OperationIdNotFound - The operation with Id does not exist.
409 OperationCancelled - The operation has been cancelled by user.
409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.
429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.
429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.
500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.
503 TooManyRequests - Requests beyond max requests that can be processed by available resources.
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/testtdecert/providers/Microsoft.Sql/servers/testtdecert/tdeCertificates?api-version=2021-11-01
{
"properties": {
"privateBlob": "MIIXXXXXXXX"
}
}
import com.azure.resourcemanager.sql.models.TdeCertificate;
/**
* Samples for TdeCertificates Create.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SqlTdeCertificateCreate.json
*/
/**
* Sample code: Upload a TDE certificate.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void uploadATDECertificate(com.azure.resourcemanager.AzureResourceManager azure) {
azure.sqlServers().manager().serviceClient().getTdeCertificates().create("testtdecert", "testtdecert",
new TdeCertificate().withPrivateBlob("MIIXXXXXXXX"), com.azure.core.util.Context.NONE);
}
}