Private DNS Zone Suffix - Execute
Get private DNS zone suffix in the cloud
POST https://management.azure.com/providers/Microsoft.DBforPostgreSQL/getPrivateDnsZoneSuffix?api-version=2021-06-01
URI Parameters
Name
In
Required
Type
Description
api-version
query
True
string
minLength: 1
The API version to use for this operation.
Responses
Name
Type
Description
200 OK
string
OK
Other Status Codes
CloudError
Error response describing why the operation failed.
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name
Description
user_impersonation
impersonate your user account
Examples
GetPrivateDnsZoneSuffix
Sample request
POST https://management.azure.com/providers/Microsoft.DBforPostgreSQL/getPrivateDnsZoneSuffix?api-version=2021-06-01
import com.azure.core.util.Context;
/** Samples for GetPrivateDnsZoneSuffix Execute. */
public final class Main {
/*
* x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/examples/GetPrivateDnsZoneSuffix.json
*/
/**
* Sample code: GetPrivateDnsZoneSuffix.
*
* @param manager Entry point to PostgreSqlManager.
*/
public static void getPrivateDnsZoneSuffix(
com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
manager.getPrivateDnsZoneSuffixes().executeWithResponse(Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation . To provide feedback on this code sample, open a GitHub issue
package armpostgresqlflexibleservers_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/examples/GetPrivateDnsZoneSuffix.json
func ExampleGetPrivateDNSZoneSuffixClient_Execute() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armpostgresqlflexibleservers.NewGetPrivateDNSZoneSuffixClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Execute(ctx,
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
To use the Azure SDK library in your project, see this documentation . To provide feedback on this code sample, open a GitHub issue
const { PostgreSQLManagementFlexibleServerClient } = require("@azure/arm-postgresql-flexible");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get private DNS zone suffix in the cloud
*
* @summary Get private DNS zone suffix in the cloud
* x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/examples/GetPrivateDnsZoneSuffix.json
*/
async function getPrivateDnsZoneSuffix() {
const subscriptionId =
process.env["POSTGRESQL_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new PostgreSQLManagementFlexibleServerClient(credential, subscriptionId);
const result = await client.getPrivateDnsZoneSuffix.execute();
console.log(result);
}
To use the Azure SDK library in your project, see this documentation . To provide feedback on this code sample, open a GitHub issue
Sample response
"postgres.database.azure.com"
Definitions
CloudError
Object
An error response from the Batch service.
Name
Type
Description
error
ErrorResponse
Error Response
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.)
ErrorAdditionalInfo
Object
The resource management error additional info.
Name
Type
Description
info
object
The additional info.
type
string
The additional info type.
ErrorResponse
Object
Error Response
Name
Type
Description
additionalInfo
ErrorAdditionalInfo []
The error additional info.
code
string
The error code.
details
ErrorResponse []
The error details.
message
string
The error message.
target
string
The error target.