既存のサーバーを更新します。 要求本文には、通常のサーバー定義に存在する 1 から多くのプロパティを含めることができます。
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}?api-version=2023-12-30
URI パラメーター
名前 |
/ |
必須 |
型 |
説明 |
resourceGroupName
|
path |
True
|
string
|
リソース グループの名前。 名前の大文字と小文字は区別されます。
|
serverName
|
path |
True
|
string
|
サーバーの名前。
正規表現パターン: ^[a-z0-9][-a-z0-9]*(?<!-)$
|
subscriptionId
|
path |
True
|
string
uuid
|
ターゲット サブスクリプションの ID。 値は UUID である必要があります。
|
api-version
|
query |
True
|
string
|
この操作に使用する API バージョン。
|
要求本文
名前 |
型 |
説明 |
identity.type
|
ManagedServiceIdentityType
|
マネージド サービス ID の種類。
|
identity.userAssignedIdentities
|
object
|
ユーザー割り当て ID のメタデータ。
|
properties.administratorLoginPassword
|
string
|
管理者ログインのパスワード。
|
properties.backup
|
Backup
|
サーバーのバックアップ関連プロパティ。
|
properties.dataEncryption
|
DataEncryption
|
CMK のデータ暗号化。
|
properties.highAvailability
|
HighAvailability
|
サーバーの高可用性関連のプロパティ。
|
properties.maintenanceWindow
|
MaintenanceWindow
|
サーバーのメンテナンス期間。
|
properties.network
|
Network
|
サーバーのネットワーク関連のプロパティ
|
properties.replicationRole
|
ReplicationRole
|
サーバーのレプリケーション ロール。
|
properties.storage
|
Storage
|
サーバーのストレージ関連のプロパティ。
|
properties.version
|
ServerVersion
|
サーバーのバージョン。
|
sku
|
MySQLServerSku
|
サーバーの SKU (価格レベル)。
|
tags
|
object
|
キーと値のペアの形式による、アプリケーション固有のメタデータ。
|
応答
名前 |
型 |
説明 |
200 OK
|
Server
|
OK
|
202 Accepted
|
|
同意
ヘッダー
Location: string
|
Other Status Codes
|
ErrorResponse
|
操作に失敗した理由を説明するエラー応答。
|
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー
型:
oauth2
フロー:
implicit
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
スコープ
名前 |
説明 |
user_impersonation
|
ユーザー アカウントの借用
|
例
Update a server
要求のサンプル
PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver?api-version=2023-12-30
{
"properties": {
"storage": {
"storageSizeGB": 30,
"iops": 200,
"autoGrow": "Disabled",
"autoIoScaling": "Disabled"
},
"network": {
"publicNetworkAccess": "Disabled"
}
}
}
from typing import Any, IO, Union
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 server_update.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.servers.begin_update(
resource_group_name="testrg",
server_name="mysqltestserver",
parameters={
"properties": {
"network": {"publicNetworkAccess": "Disabled"},
"storage": {"autoGrow": "Disabled", "autoIoScaling": "Disabled", "iops": 200, "storageSizeGB": 30},
}
},
).result()
print(response)
# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdate.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/azcore/to"
"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/FlexibleServers/stable/2023-12-30/examples/ServerUpdate.json
func ExampleServersClient_BeginUpdate_updateAServer() {
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)
}
poller, err := clientFactory.NewServersClient().BeginUpdate(ctx, "testrg", "mysqltestserver", armmysqlflexibleservers.ServerForUpdate{
Properties: &armmysqlflexibleservers.ServerPropertiesForUpdate{
Network: &armmysqlflexibleservers.Network{
PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
},
Storage: &armmysqlflexibleservers.Storage{
AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
AutoIoScaling: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
Iops: to.Ptr[int32](200),
StorageSizeGB: to.Ptr[int32](30),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %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.Server = armmysqlflexibleservers.Server{
// Name: to.Ptr("mysqltestserver"),
// Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"),
// Location: to.Ptr("Southeast Asia"),
// Tags: map[string]*string{
// "num": to.Ptr("1"),
// },
// Properties: &armmysqlflexibleservers.ServerProperties{
// AdministratorLogin: to.Ptr("cloudsa"),
// AvailabilityZone: to.Ptr("3"),
// Backup: &armmysqlflexibleservers.Backup{
// BackupIntervalHours: to.Ptr[int32](24),
// BackupRetentionDays: to.Ptr[int32](7),
// EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T06:11:38.415Z"); return t}()),
// GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// },
// FullyQualifiedDomainName: to.Ptr("mysqltestserver.database.mysql.azure.com"),
// HighAvailability: &armmysqlflexibleservers.HighAvailability{
// Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled),
// State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled),
// },
// MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
// CustomWindow: to.Ptr("Enabled"),
// DayOfWeek: to.Ptr[int32](1),
// StartHour: to.Ptr[int32](1),
// StartMinute: to.Ptr[int32](0),
// },
// Network: &armmysqlflexibleservers.Network{
// PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// },
// ReplicaCapacity: to.Ptr[int32](10),
// ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone),
// State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
// Storage: &armmysqlflexibleservers.Storage{
// AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// AutoIoScaling: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// Iops: to.Ptr[int32](200),
// StorageSizeGB: to.Ptr[int32](30),
// StorageSKU: to.Ptr("Premium_LRS"),
// },
// Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
// },
// SKU: &armmysqlflexibleservers.MySQLServerSKU{
// Name: to.Ptr("Standard_D2ds_v4"),
// Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose),
// },
// }
}
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 Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
*
* @summary Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdate.json
*/
async function updateAServer() {
const subscriptionId =
process.env["MYSQL_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff";
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "testrg";
const serverName = "mysqltestserver";
const parameters = {
network: { publicNetworkAccess: "Disabled" },
storage: {
autoGrow: "Disabled",
autoIoScaling: "Disabled",
iops: 200,
storageSizeGB: 30,
},
};
const credential = new DefaultAzureCredential();
const client = new MySQLManagementFlexibleServerClient(credential, subscriptionId);
const result = await client.servers.beginUpdateAndWait(resourceGroupName, serverName, parameters);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.MySql.FlexibleServers.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MySql.FlexibleServers;
// Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdate.json
// this example is just showing the usage of "Servers_Update" 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 = "testrg";
string serverName = "mysqltestserver";
ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName);
MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId);
// invoke the operation
MySqlFlexibleServerPatch patch = new MySqlFlexibleServerPatch()
{
Storage = new MySqlFlexibleServerStorage()
{
StorageSizeInGB = 30,
Iops = 200,
AutoGrow = MySqlFlexibleServerEnableStatusEnum.Disabled,
AutoIoScaling = MySqlFlexibleServerEnableStatusEnum.Disabled,
},
Network = new MySqlFlexibleServerNetwork()
{
PublicNetworkAccess = MySqlFlexibleServerEnableStatusEnum.Disabled,
},
};
ArmOperation<MySqlFlexibleServerResource> lro = await mySqlFlexibleServer.UpdateAsync(WaitUntil.Completed, patch);
MySqlFlexibleServerResource result = lro.Value;
// 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
MySqlFlexibleServerData 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
応答のサンプル
{
"sku": {
"name": "Standard_D2ds_v4",
"tier": "GeneralPurpose"
},
"properties": {
"administratorLogin": "cloudsa",
"storage": {
"storageSizeGB": 30,
"iops": 200,
"autoGrow": "Disabled",
"storageSku": "Premium_LRS",
"autoIoScaling": "Disabled"
},
"version": "5.7",
"state": "Ready",
"fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com",
"availabilityZone": "3",
"maintenanceWindow": {
"customWindow": "Enabled",
"dayOfWeek": 1,
"startHour": 1,
"startMinute": 0
},
"replicationRole": "None",
"replicaCapacity": 10,
"network": {
"publicNetworkAccess": "Disabled"
},
"backup": {
"backupRetentionDays": 7,
"backupIntervalHours": 24,
"geoRedundantBackup": "Disabled",
"earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00"
},
"highAvailability": {
"mode": "Disabled",
"state": "NotEnabled"
}
},
"location": "Southeast Asia",
"tags": {
"num": "1"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver",
"name": "mysqltestserver",
"type": "Microsoft.DBforMySQL/flexibleServers"
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-12-30
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-12-30
Update server customer maintenance window
要求のサンプル
PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver?api-version=2023-12-30
{
"properties": {
"maintenanceWindow": {
"customWindow": "Enabled",
"dayOfWeek": 1,
"startHour": 8,
"startMinute": 0
}
}
}
from typing import Any, IO, Union
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 server_update_with_customer_maintenance_window.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.servers.begin_update(
resource_group_name="testrg",
server_name="mysqltestserver",
parameters={
"properties": {
"maintenanceWindow": {"customWindow": "Enabled", "dayOfWeek": 1, "startHour": 8, "startMinute": 0}
}
},
).result()
print(response)
# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithCustomerMaintenanceWindow.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/azcore/to"
"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/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithCustomerMaintenanceWindow.json
func ExampleServersClient_BeginUpdate_updateServerCustomerMaintenanceWindow() {
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)
}
poller, err := clientFactory.NewServersClient().BeginUpdate(ctx, "testrg", "mysqltestserver", armmysqlflexibleservers.ServerForUpdate{
Properties: &armmysqlflexibleservers.ServerPropertiesForUpdate{
MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
CustomWindow: to.Ptr("Enabled"),
DayOfWeek: to.Ptr[int32](1),
StartHour: to.Ptr[int32](8),
StartMinute: to.Ptr[int32](0),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %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.Server = armmysqlflexibleservers.Server{
// Name: to.Ptr("mysqltestserver"),
// Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"),
// Location: to.Ptr("Southeast Asia"),
// Tags: map[string]*string{
// "num": to.Ptr("1"),
// },
// Properties: &armmysqlflexibleservers.ServerProperties{
// AdministratorLogin: to.Ptr("cloudsa"),
// AvailabilityZone: to.Ptr("3"),
// Backup: &armmysqlflexibleservers.Backup{
// BackupIntervalHours: to.Ptr[int32](24),
// BackupRetentionDays: to.Ptr[int32](7),
// EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T06:11:38.415Z"); return t}()),
// GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// },
// FullyQualifiedDomainName: to.Ptr("mysqltestserver.database.mysql.azure.com"),
// HighAvailability: &armmysqlflexibleservers.HighAvailability{
// Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled),
// State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled),
// },
// MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
// CustomWindow: to.Ptr("Enabled"),
// DayOfWeek: to.Ptr[int32](1),
// StartHour: to.Ptr[int32](8),
// StartMinute: to.Ptr[int32](0),
// },
// Network: &armmysqlflexibleservers.Network{
// PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// },
// ReplicaCapacity: to.Ptr[int32](10),
// ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone),
// State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
// Storage: &armmysqlflexibleservers.Storage{
// AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// Iops: to.Ptr[int32](600),
// StorageSizeGB: to.Ptr[int32](100),
// StorageSKU: to.Ptr("Premium_LRS"),
// },
// Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
// },
// SKU: &armmysqlflexibleservers.MySQLServerSKU{
// Name: to.Ptr("Standard_D2ds_v4"),
// Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose),
// },
// }
}
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 Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
*
* @summary Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithCustomerMaintenanceWindow.json
*/
async function updateServerCustomerMaintenanceWindow() {
const subscriptionId =
process.env["MYSQL_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff";
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "testrg";
const serverName = "mysqltestserver";
const parameters = {
maintenanceWindow: {
customWindow: "Enabled",
dayOfWeek: 1,
startHour: 8,
startMinute: 0,
},
};
const credential = new DefaultAzureCredential();
const client = new MySQLManagementFlexibleServerClient(credential, subscriptionId);
const result = await client.servers.beginUpdateAndWait(resourceGroupName, serverName, parameters);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.MySql.FlexibleServers.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MySql.FlexibleServers;
// Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithCustomerMaintenanceWindow.json
// this example is just showing the usage of "Servers_Update" 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 = "testrg";
string serverName = "mysqltestserver";
ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName);
MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId);
// invoke the operation
MySqlFlexibleServerPatch patch = new MySqlFlexibleServerPatch()
{
MaintenanceWindow = new MySqlFlexibleServerMaintenanceWindow()
{
CustomWindow = "Enabled",
StartHour = 8,
StartMinute = 0,
DayOfWeek = 1,
},
};
ArmOperation<MySqlFlexibleServerResource> lro = await mySqlFlexibleServer.UpdateAsync(WaitUntil.Completed, patch);
MySqlFlexibleServerResource result = lro.Value;
// 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
MySqlFlexibleServerData 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
応答のサンプル
{
"sku": {
"name": "Standard_D2ds_v4",
"tier": "GeneralPurpose"
},
"properties": {
"administratorLogin": "cloudsa",
"storage": {
"storageSizeGB": 100,
"iops": 600,
"autoGrow": "Enabled",
"storageSku": "Premium_LRS"
},
"version": "5.7",
"state": "Ready",
"fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com",
"availabilityZone": "3",
"maintenanceWindow": {
"customWindow": "Enabled",
"dayOfWeek": 1,
"startHour": 8,
"startMinute": 0
},
"replicationRole": "None",
"replicaCapacity": 10,
"network": {
"publicNetworkAccess": "Enabled"
},
"backup": {
"backupRetentionDays": 7,
"backupIntervalHours": 24,
"geoRedundantBackup": "Disabled",
"earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00"
},
"highAvailability": {
"mode": "Disabled",
"state": "NotEnabled"
}
},
"location": "Southeast Asia",
"tags": {
"num": "1"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver",
"name": "mysqltestserver",
"type": "Microsoft.DBforMySQL/flexibleServers"
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-12-30
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-12-30
Update server with byok
要求のサンプル
PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver?api-version=2023-12-30
{
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity": {}
}
},
"properties": {
"dataEncryption": {
"type": "AzureKeyVault",
"primaryUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity",
"primaryKeyURI": "https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a",
"geoBackupUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity",
"geoBackupKeyURI": "https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"
}
}
}
from typing import Any, IO, Union
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 server_update_with_byok.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.servers.begin_update(
resource_group_name="testrg",
server_name="mysqltestserver",
parameters={
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity": {}
},
},
"properties": {
"dataEncryption": {
"geoBackupKeyURI": "https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a",
"geoBackupUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity",
"primaryKeyURI": "https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a",
"primaryUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity",
"type": "AzureKeyVault",
}
},
},
).result()
print(response)
# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithBYOK.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/azcore/to"
"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/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithBYOK.json
func ExampleServersClient_BeginUpdate_updateServerWithByok() {
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)
}
poller, err := clientFactory.NewServersClient().BeginUpdate(ctx, "testrg", "mysqltestserver", armmysqlflexibleservers.ServerForUpdate{
Identity: &armmysqlflexibleservers.MySQLServerIdentity{
Type: to.Ptr(armmysqlflexibleservers.ManagedServiceIdentityTypeUserAssigned),
UserAssignedIdentities: map[string]any{
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity": map[string]any{},
},
},
Properties: &armmysqlflexibleservers.ServerPropertiesForUpdate{
DataEncryption: &armmysqlflexibleservers.DataEncryption{
Type: to.Ptr(armmysqlflexibleservers.DataEncryptionTypeAzureKeyVault),
GeoBackupKeyURI: to.Ptr("https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"),
GeoBackupUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity"),
PrimaryKeyURI: to.Ptr("https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"),
PrimaryUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity"),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %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.Server = armmysqlflexibleservers.Server{
// Name: to.Ptr("mysqltestserver"),
// Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"),
// Location: to.Ptr("Southeast Asia"),
// Tags: map[string]*string{
// "num": to.Ptr("1"),
// },
// Properties: &armmysqlflexibleservers.ServerProperties{
// AdministratorLogin: to.Ptr("cloudsa"),
// AvailabilityZone: to.Ptr("1"),
// Backup: &armmysqlflexibleservers.Backup{
// BackupIntervalHours: to.Ptr[int32](24),
// BackupRetentionDays: to.Ptr[int32](7),
// EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T06:11:38.415Z"); return t}()),
// GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// },
// FullyQualifiedDomainName: to.Ptr("mysqltestserver.database.mysql.azure.com"),
// HighAvailability: &armmysqlflexibleservers.HighAvailability{
// Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeZoneRedundant),
// StandbyAvailabilityZone: to.Ptr("3"),
// State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateHealthy),
// },
// MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
// CustomWindow: to.Ptr("Disabled"),
// DayOfWeek: to.Ptr[int32](0),
// StartHour: to.Ptr[int32](0),
// StartMinute: to.Ptr[int32](0),
// },
// Network: &armmysqlflexibleservers.Network{
// PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// },
// ReplicaCapacity: to.Ptr[int32](10),
// ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone),
// State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
// Storage: &armmysqlflexibleservers.Storage{
// AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// Iops: to.Ptr[int32](600),
// StorageSizeGB: to.Ptr[int32](100),
// StorageSKU: to.Ptr("Premium_LRS"),
// },
// Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
// },
// SKU: &armmysqlflexibleservers.MySQLServerSKU{
// Name: to.Ptr("Standard_D2ds_v4"),
// Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose),
// },
// }
}
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 Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
*
* @summary Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithBYOK.json
*/
async function updateServerWithByok() {
const subscriptionId =
process.env["MYSQL_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff";
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "testrg";
const serverName = "mysqltestserver";
const parameters = {
dataEncryption: {
type: "AzureKeyVault",
geoBackupKeyURI: "https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a",
geoBackupUserAssignedIdentityId:
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity",
primaryKeyURI: "https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a",
primaryUserAssignedIdentityId:
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity",
},
identity: {
type: "UserAssigned",
userAssignedIdentities: {
"/subscriptions/ffffffffFfffFfffFfffFfffffffffff/resourceGroups/testrg/providers/MicrosoftManagedIdentity/userAssignedIdentities/testIdentity":
{},
},
},
};
const credential = new DefaultAzureCredential();
const client = new MySQLManagementFlexibleServerClient(credential, subscriptionId);
const result = await client.servers.beginUpdateAndWait(resourceGroupName, serverName, parameters);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.MySql.FlexibleServers.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MySql.FlexibleServers;
// Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithBYOK.json
// this example is just showing the usage of "Servers_Update" 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 = "testrg";
string serverName = "mysqltestserver";
ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName);
MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId);
// invoke the operation
MySqlFlexibleServerPatch patch = new MySqlFlexibleServerPatch()
{
Identity = new ManagedServiceIdentity("UserAssigned")
{
UserAssignedIdentities =
{
[new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity")] = new UserAssignedIdentity(),
},
},
DataEncryption = new MySqlFlexibleServerDataEncryption()
{
PrimaryUserAssignedIdentityId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity"),
PrimaryKeyUri = new Uri("https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"),
GeoBackupUserAssignedIdentityId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity"),
GeoBackupKeyUri = new Uri("https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"),
EncryptionType = MySqlFlexibleServerDataEncryptionType.AzureKeyVault,
},
};
ArmOperation<MySqlFlexibleServerResource> lro = await mySqlFlexibleServer.UpdateAsync(WaitUntil.Completed, patch);
MySqlFlexibleServerResource result = lro.Value;
// 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
MySqlFlexibleServerData 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
応答のサンプル
{
"sku": {
"name": "Standard_D2ds_v4",
"tier": "GeneralPurpose"
},
"properties": {
"administratorLogin": "cloudsa",
"storage": {
"storageSizeGB": 100,
"iops": 600,
"autoGrow": "Enabled",
"storageSku": "Premium_LRS"
},
"version": "5.7",
"state": "Ready",
"fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com",
"availabilityZone": "1",
"maintenanceWindow": {
"customWindow": "Disabled",
"dayOfWeek": 0,
"startHour": 0,
"startMinute": 0
},
"replicationRole": "None",
"replicaCapacity": 10,
"network": {
"publicNetworkAccess": "Enabled"
},
"backup": {
"backupRetentionDays": 7,
"backupIntervalHours": 24,
"geoRedundantBackup": "Disabled",
"earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00"
},
"highAvailability": {
"mode": "ZoneRedundant",
"state": "Healthy",
"standbyAvailabilityZone": "3"
}
},
"location": "Southeast Asia",
"tags": {
"num": "1"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver",
"name": "mysqltestserver",
"type": "Microsoft.DBforMySQL/flexibleServers"
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-12-30
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-12-30
定義
Backup
サーバーのストレージ プロファイルプロパティ
名前 |
型 |
規定値 |
説明 |
backupIntervalHours
|
integer
|
|
サーバーのバックアップ間隔時間。
|
backupRetentionDays
|
integer
|
|
サーバーのバックアップ保有日数。
|
earliestRestoreDate
|
string
|
|
最も早い復元ポイントの作成時刻 (ISO8601形式)
|
geoRedundantBackup
|
EnableStatusEnum
|
Disabled
|
geo 冗長バックアップが有効になっているかどうか。
|
createdByType
リソースを作成した ID の種類。
名前 |
型 |
説明 |
Application
|
string
|
|
Key
|
string
|
|
ManagedIdentity
|
string
|
|
User
|
string
|
|
CreateMode
新しい MySQL サーバーを作成するモード。
名前 |
型 |
説明 |
Default
|
string
|
|
GeoRestore
|
string
|
|
PointInTimeRestore
|
string
|
|
Replica
|
string
|
|
DataEncryption
cmk の日付暗号化。
名前 |
型 |
説明 |
geoBackupKeyURI
|
string
|
キー コンテナーがリージョンをまたがることができない geo バックアップ キー URI、geo バックアップと同じリージョンに cmk が必要
|
geoBackupUserAssignedIdentityId
|
string
|
GEO バックアップ ユーザー ID リソース ID は、ID がリージョンをまたがることができない、geo バックアップと同じリージョンに ID が必要
|
primaryKeyURI
|
string
|
主キー URI
|
primaryUserAssignedIdentityId
|
string
|
プライマリ ユーザー ID リソース ID
|
type
|
DataEncryptionType
|
キーの種類は 、cmk を有効にする場合は AzureKeyVault、無効化 cmk の場合は SystemManaged。
|
DataEncryptionType
キーの種類は 、cmk を有効にする場合は AzureKeyVault、無効化 cmk の場合は SystemManaged。
名前 |
型 |
説明 |
AzureKeyVault
|
string
|
|
SystemManaged
|
string
|
|
EnableStatusEnum
値が 'Enabled' か 'Disabled' かを示す列挙型
名前 |
型 |
説明 |
Disabled
|
string
|
|
Enabled
|
string
|
|
ErrorAdditionalInfo
リソース管理エラーの追加情報。
名前 |
型 |
説明 |
info
|
object
|
追加情報。
|
type
|
string
|
追加情報の種類。
|
ErrorDetail
エラーの詳細。
名前 |
型 |
説明 |
additionalInfo
|
ErrorAdditionalInfo[]
|
エラーの追加情報。
|
code
|
string
|
エラー コード。
|
details
|
ErrorDetail[]
|
エラーの詳細です。
|
message
|
string
|
エラー メッセージ。
|
target
|
string
|
エラーのターゲット。
|
ErrorResponse
エラー応答
HighAvailability
サーバーの高可用性プロパティ
HighAvailabilityMode
サーバーの高可用性モード。
名前 |
型 |
説明 |
Disabled
|
string
|
|
SameZone
|
string
|
|
ZoneRedundant
|
string
|
|
HighAvailabilityState
サーバーの高可用性の状態。
名前 |
型 |
説明 |
CreatingStandby
|
string
|
|
FailingOver
|
string
|
|
Healthy
|
string
|
|
NotEnabled
|
string
|
|
RemovingStandby
|
string
|
|
ImportSourceProperties
ソース関連のプロパティをインポートします。
名前 |
型 |
説明 |
dataDirPath
|
string
|
ストレージ内のデータ ディレクトリの相対パス。
|
sasToken
|
string
|
ソース ストレージにアクセスするための Sas トークン。 sas トークンには読み取りと一覧表示のアクセス許可が必要です。
|
storageType
|
ImportSourceStorageType
|
インポート ソースのストレージの種類。
|
storageUrl
|
string
|
インポート ソース ストレージの URI。
|
ImportSourceStorageType
インポート ソースのストレージの種類。
MaintenanceWindow
サーバーのメンテナンス期間。
名前 |
型 |
説明 |
customWindow
|
string
|
は、カスタム ウィンドウが有効か無効かを示します
|
dayOfWeek
|
integer
|
メンテナンス期間の曜日
|
startHour
|
integer
|
メンテナンス期間の開始時刻
|
startMinute
|
integer
|
メンテナンス期間の開始時間 (分)
|
ManagedServiceIdentityType
マネージド サービス ID の種類。
名前 |
型 |
説明 |
UserAssigned
|
string
|
|
MySQLServerSku
サーバーの課金情報関連のプロパティ。
名前 |
型 |
説明 |
name
|
string
|
sku の名前 (例: Standard_D32s_v3)。
|
tier
|
ServerSkuTier
|
特定の SKU のレベル (GeneralPurpose など)。
|
Network
サーバーのネットワーク関連のプロパティ
名前 |
型 |
説明 |
delegatedSubnetResourceId
|
string
|
サーバーの vnet をセットアップするために使用される委任されたサブネット リソース ID。
|
privateDnsZoneResourceId
|
string
|
ゾーン リソース ID をプライベート DNSします。
|
publicNetworkAccess
|
EnableStatusEnum
|
このサーバーに対してパブリック ネットワーク アクセスが許可されているかどうか。 サーバーに VNet 統合がある場合、値は "無効" になります。
|
PrivateEndpoint
プライベート エンドポイント リソース。
名前 |
型 |
説明 |
id
|
string
|
プライベート エンドポイントの ARM 識別子。
|
PrivateEndpointConnection
プライベート エンドポイント接続リソース。
名前 |
型 |
説明 |
id
|
string
|
リソースの完全修飾リソース ID。 例: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
name
|
string
|
リソースの名前
|
properties.groupIds
|
string[]
|
プライベート エンドポイント リソースのグループ ID。
|
properties.privateEndpoint
|
PrivateEndpoint
|
プライベート エンドポイント リソース。
|
properties.privateLinkServiceConnectionState
|
PrivateLinkServiceConnectionState
|
サービス コンシューマーとプロバイダー間の接続の状態に関する情報のコレクション。
|
properties.provisioningState
|
PrivateEndpointConnectionProvisioningState
|
プライベート エンドポイント接続リソースのプロビジョニング状態。
|
systemData
|
systemData
|
createdBy および modifiedBy 情報を含む Azure Resource Manager メタデータ。
|
type
|
string
|
リソースの型。 例: "Microsoft.Compute/virtualMachines" または "Microsoft.Storage/storageAccounts"
|
PrivateEndpointConnectionProvisioningState
現在のプロビジョニング状態。
名前 |
型 |
説明 |
Creating
|
string
|
|
Deleting
|
string
|
|
Failed
|
string
|
|
Succeeded
|
string
|
|
PrivateEndpointServiceConnectionStatus
プライベート エンドポイント接続の状態。
名前 |
型 |
説明 |
Approved
|
string
|
|
Pending
|
string
|
|
Rejected
|
string
|
|
PrivateLinkServiceConnectionState
サービス コンシューマーとプロバイダー間の接続の状態に関する情報のコレクション。
名前 |
型 |
説明 |
actionsRequired
|
string
|
サービス プロバイダーの変更にコンシューマーに対する更新が必要かどうかを示すメッセージ。
|
description
|
string
|
接続の承認/拒否の理由。
|
status
|
PrivateEndpointServiceConnectionStatus
|
サービスの所有者によって接続が承認/拒否/削除されたかどうかを示します。
|
ReplicationRole
レプリケーション ロール。
名前 |
型 |
説明 |
None
|
string
|
|
Replica
|
string
|
|
Source
|
string
|
|
Server
サーバーを表します。
名前 |
型 |
説明 |
id
|
string
|
リソースの完全修飾リソース ID。 例: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
identity.principalId
|
string
|
KeyVault からの ObjectId
|
identity.tenantId
|
string
|
KeyVault からの TenantId
|
identity.type
|
ManagedServiceIdentityType
|
マネージド サービス ID の種類。
|
identity.userAssignedIdentities
|
object
|
ユーザー割り当て ID のメタデータ。
|
location
|
string
|
リソースが保存されている地理的な場所
|
name
|
string
|
リソースの名前
|
properties.administratorLogin
|
string
|
サーバーの管理者のログイン名。 サーバーの作成時にのみ指定できます (作成には と が必要です)。
|
properties.administratorLoginPassword
|
string
|
管理者ログインのパスワード (サーバーの作成に必要)。
|
properties.availabilityZone
|
string
|
サーバーの可用性ゾーン情報。
|
properties.backup
|
Backup
|
サーバーのバックアップ関連プロパティ。
|
properties.createMode
|
CreateMode
|
新しい MySQL サーバーを作成するモード。
|
properties.dataEncryption
|
DataEncryption
|
CMK のデータ暗号化。
|
properties.fullyQualifiedDomainName
|
string
|
サーバーの完全修飾ドメイン名。
|
properties.highAvailability
|
HighAvailability
|
サーバーの高可用性関連のプロパティ。
|
properties.importSourceProperties
|
ImportSourceProperties
|
ストレージからのインポートのソース プロパティ。
|
properties.maintenanceWindow
|
MaintenanceWindow
|
サーバーのメンテナンス期間。
|
properties.network
|
Network
|
サーバーのネットワーク関連のプロパティ。
|
properties.privateEndpointConnections
|
PrivateEndpointConnection[]
|
サーバーの PrivateEndpointConnections 関連プロパティ。
|
properties.replicaCapacity
|
integer
|
プライマリ サーバーに含めることができるレプリカの最大数。
|
properties.replicationRole
|
ReplicationRole
|
レプリケーション ロール。
|
properties.restorePointInTime
|
string
|
復元ポイントの作成時刻 (ISO8601形式)、復元元の時刻を指定します。
|
properties.sourceServerResourceId
|
string
|
ソース MySQL サーバー ID。
|
properties.state
|
ServerState
|
サーバーの状態。
|
properties.storage
|
Storage
|
サーバーのストレージ関連のプロパティ。
|
properties.version
|
ServerVersion
|
サーバーのバージョン。
|
sku
|
MySQLServerSku
|
サーバーの SKU (価格レベル)。
|
systemData
|
systemData
|
createdBy および modifiedBy 情報を含む Azure Resource Manager メタデータ。
|
tags
|
object
|
リソース タグ。
|
type
|
string
|
リソースの型。 例: "Microsoft.Compute/virtualMachines" または "Microsoft.Storage/storageAccounts"
|
ServerForUpdate
サーバーの更新が許可されているパラメーター。
名前 |
型 |
説明 |
identity.principalId
|
string
|
KeyVault からの ObjectId
|
identity.tenantId
|
string
|
KeyVault からの TenantId
|
identity.type
|
ManagedServiceIdentityType
|
マネージド サービス ID の種類。
|
identity.userAssignedIdentities
|
object
|
ユーザー割り当て ID のメタデータ。
|
properties.administratorLoginPassword
|
string
|
管理者ログインのパスワード。
|
properties.backup
|
Backup
|
サーバーのバックアップ関連プロパティ。
|
properties.dataEncryption
|
DataEncryption
|
CMK のデータ暗号化。
|
properties.highAvailability
|
HighAvailability
|
サーバーの高可用性関連のプロパティ。
|
properties.maintenanceWindow
|
MaintenanceWindow
|
サーバーのメンテナンス期間。
|
properties.network
|
Network
|
サーバーのネットワーク関連のプロパティ
|
properties.replicationRole
|
ReplicationRole
|
サーバーのレプリケーション ロール。
|
properties.storage
|
Storage
|
サーバーのストレージ関連のプロパティ。
|
properties.version
|
ServerVersion
|
サーバーのバージョン。
|
sku
|
MySQLServerSku
|
サーバーの SKU (価格レベル)。
|
tags
|
object
|
キーと値のペアの形式による、アプリケーション固有のメタデータ。
|
ServerSkuTier
特定の SKU のレベル (GeneralPurpose など)。
名前 |
型 |
説明 |
Burstable
|
string
|
|
GeneralPurpose
|
string
|
|
MemoryOptimized
|
string
|
|
ServerState
サーバーの状態。
名前 |
型 |
説明 |
Disabled
|
string
|
|
Dropping
|
string
|
|
Ready
|
string
|
|
Starting
|
string
|
|
Stopped
|
string
|
|
Stopping
|
string
|
|
Updating
|
string
|
|
ServerVersion
サーバーのバージョン。
名前 |
型 |
説明 |
5.7
|
string
|
|
8.0.21
|
string
|
|
Storage
サーバーのストレージ プロファイルプロパティ
名前 |
型 |
規定値 |
説明 |
autoGrow
|
EnableStatusEnum
|
Disabled
|
ストレージの自動拡張を有効にするかどうか。
|
autoIoScaling
|
EnableStatusEnum
|
Enabled
|
IO 自動スケーリングを有効にするかどうか。
|
iops
|
integer
|
|
サーバーのストレージ IOPS。
|
logOnDisk
|
EnableStatusEnum
|
Disabled
|
[ディスクログオン] を有効にするかどうか。
|
storageSizeGB
|
integer
|
|
サーバーで許可される最大ストレージ サイズ。
|
storageSku
|
string
|
|
サーバー ストレージの SKU 名。
|
systemData
リソースの作成と最後の変更に関連するメタデータ。
名前 |
型 |
説明 |
createdAt
|
string
|
リソース作成のタイムスタンプ (UTC)。
|
createdBy
|
string
|
リソースを作成した ID。
|
createdByType
|
createdByType
|
リソースを作成した ID の種類。
|
lastModifiedAt
|
string
|
リソースの最終変更のタイムスタンプ (UTC)
|
lastModifiedBy
|
string
|
リソースを最後に変更した ID。
|
lastModifiedByType
|
createdByType
|
リソースを最後に変更した ID の種類。
|