Gets information about a configuration of server.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/configurations/{configurationName}?api-version=2023-06-01-preview
URI Parameters
Name |
In |
Required |
Type |
Description |
configurationName
|
path |
True
|
string
|
The name of the server configuration.
|
resourceGroupName
|
path |
True
|
string
|
The name of the resource group. The name is case insensitive.
|
serverName
|
path |
True
|
string
|
The name of the server.
Regex pattern: ^[a-z0-9][-a-z0-9]*(?<!-)$
|
subscriptionId
|
path |
True
|
string
uuid
|
The ID of the target subscription. The value must be an UUID.
|
api-version
|
query |
True
|
string
|
The API version to use for this operation.
|
Responses
Name |
Type |
Description |
200 OK
|
Configuration
|
OK
|
Other Status Codes
|
ErrorResponse
|
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
Get a configuration
Sample request
GET https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/configurations/event_scheduler?api-version=2023-06-01-preview
/**
* Samples for Configurations Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/
* ConfigurationGet.json
*/
/**
* Sample code: Get a configuration.
*
* @param manager Entry point to MySqlManager.
*/
public static void getAConfiguration(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
manager.configurations().getWithResponse("TestGroup", "testserver", "event_scheduler",
com.azure.core.util.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
from azure.identity import DefaultAzureCredential
from azure.mgmt.rdbms.mysql_flexibleservers import MySQLManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-rdbms
# USAGE
python configuration_get.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MySQLManagementClient(
credential=DefaultAzureCredential(),
subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff",
)
response = client.configurations.get(
resource_group_name="TestGroup",
server_name="testserver",
configuration_name="event_scheduler",
)
print(response)
# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationGet.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armmysqlflexibleservers_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationGet.json
func ExampleConfigurationsClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewConfigurationsClient().Get(ctx, "TestGroup", "testserver", "event_scheduler", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Configuration = armmysqlflexibleservers.Configuration{
// Name: to.Ptr("event_scheduler"),
// Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/configurations"),
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/configurations/event_scheduler"),
// Properties: &armmysqlflexibleservers.ConfigurationProperties{
// Description: to.Ptr("Indicates the status of the Event Scheduler. It is always OFF for a replica server to keep the replication consistency."),
// AllowedValues: to.Ptr("ON,OFF"),
// DataType: to.Ptr("Enumeration"),
// DefaultValue: to.Ptr("OFF"),
// IsConfigPendingRestart: to.Ptr(armmysqlflexibleservers.IsConfigPendingRestartFalse),
// IsDynamicConfig: to.Ptr(armmysqlflexibleservers.IsDynamicConfigTrue),
// IsReadOnly: to.Ptr(armmysqlflexibleservers.IsReadOnlyFalse),
// Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceSystemDefault),
// Value: to.Ptr("OFF"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { MySQLManagementFlexibleServerClient } = require("@azure/arm-mysql-flexible");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets information about a configuration of server.
*
* @summary Gets information about a configuration of server.
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationGet.json
*/
async function getAConfiguration() {
const subscriptionId =
process.env["MYSQL_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff";
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "TestGroup";
const serverName = "testserver";
const configurationName = "event_scheduler";
const credential = new DefaultAzureCredential();
const client = new MySQLManagementFlexibleServerClient(credential, subscriptionId);
const result = await client.configurations.get(resourceGroupName, serverName, configurationName);
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
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.MySql.FlexibleServers;
using Azure.ResourceManager.MySql.FlexibleServers.Models;
// Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationGet.json
// this example is just showing the usage of "Configurations_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this MySqlFlexibleServerResource created on azure
// for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource
string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
string resourceGroupName = "TestGroup";
string serverName = "testserver";
ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName);
MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId);
// get the collection of this MySqlFlexibleServerConfigurationResource
MySqlFlexibleServerConfigurationCollection collection = mySqlFlexibleServer.GetMySqlFlexibleServerConfigurations();
// invoke the operation
string configurationName = "event_scheduler";
NullableResponse<MySqlFlexibleServerConfigurationResource> response = await collection.GetIfExistsAsync(configurationName);
MySqlFlexibleServerConfigurationResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine($"Succeeded with null as result");
}
else
{
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
MySqlFlexibleServerConfigurationData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
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
{
"properties": {
"value": "OFF",
"description": "Indicates the status of the Event Scheduler. It is always OFF for a replica server to keep the replication consistency.",
"defaultValue": "OFF",
"dataType": "Enumeration",
"allowedValues": "ON,OFF",
"source": "system-default",
"isConfigPendingRestart": "False",
"isDynamicConfig": "True",
"isReadOnly": "False"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/configurations/event_scheduler",
"name": "event_scheduler",
"type": "Microsoft.DBforMySQL/flexibleServers/configurations"
}
Definitions
Configuration
Represents a Configuration.
Name |
Type |
Description |
id
|
string
|
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
name
|
string
|
The name of the resource
|
properties.allowedValues
|
string
|
Allowed values of the configuration.
|
properties.currentValue
|
string
|
Current value of the configuration.
|
properties.dataType
|
string
|
Data type of the configuration.
|
properties.defaultValue
|
string
|
Default value of the configuration.
|
properties.description
|
string
|
Description of the configuration.
|
properties.documentationLink
|
string
|
The link used to get the document from community or Azure site.
|
properties.isConfigPendingRestart
|
IsConfigPendingRestart
|
If is the configuration pending restart or not.
|
properties.isDynamicConfig
|
IsDynamicConfig
|
If is the configuration dynamic.
|
properties.isReadOnly
|
IsReadOnly
|
If is the configuration read only.
|
properties.source
|
ConfigurationSource
|
Source of the configuration.
|
properties.value
|
string
|
Value of the configuration.
|
systemData
|
systemData
|
Azure Resource Manager metadata containing createdBy and modifiedBy information.
|
type
|
string
|
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
|
ConfigurationSource
Source of the configuration.
Name |
Type |
Description |
system-default
|
string
|
|
user-override
|
string
|
|
createdByType
The type of identity that created the resource.
Name |
Type |
Description |
Application
|
string
|
|
Key
|
string
|
|
ManagedIdentity
|
string
|
|
User
|
string
|
|
ErrorAdditionalInfo
The resource management error additional info.
Name |
Type |
Description |
info
|
object
|
The additional info.
|
type
|
string
|
The additional info type.
|
ErrorDetail
The error detail.
Name |
Type |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
The error additional info.
|
code
|
string
|
The error code.
|
details
|
ErrorDetail[]
|
The error details.
|
message
|
string
|
The error message.
|
target
|
string
|
The error target.
|
ErrorResponse
Error response
Name |
Type |
Description |
error
|
ErrorDetail
|
The error object.
|
IsConfigPendingRestart
If is the configuration pending restart or not.
Name |
Type |
Description |
False
|
string
|
|
True
|
string
|
|
IsDynamicConfig
If is the configuration dynamic.
Name |
Type |
Description |
False
|
string
|
|
True
|
string
|
|
IsReadOnly
If is the configuration read only.
Name |
Type |
Description |
False
|
string
|
|
True
|
string
|
|
systemData
Metadata pertaining to creation and last modification of the resource.
Name |
Type |
Description |
createdAt
|
string
|
The timestamp of resource creation (UTC).
|
createdBy
|
string
|
The identity that created the resource.
|
createdByType
|
createdByType
|
The type of identity that created the resource.
|
lastModifiedAt
|
string
|
The timestamp of resource last modification (UTC)
|
lastModifiedBy
|
string
|
The identity that last modified the resource.
|
lastModifiedByType
|
createdByType
|
The type of identity that last modified the resource.
|