Migrations Name Availability - Check Migration Name Availability
Check the validity and availability of the given name, to assign it to a new migration.
Checks if a proposed migration name is valid and available.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/checkMigrationNameAvailability?api-version=2024-08-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
resource
|
path | True |
string pattern: ^[-a-z0-9A-Z._()]+[^.]$ |
Name of resource group of target database server. |
|
subscription
|
path | True |
string pattern: ([a-z0-9]){8,8}[-]([a-z0-9]){4,4}[-]([a-z0-9]){4,4}[-]([a-z0-9]){4,4}[-]([a-z0-9]){12,12} |
Identifier of subscription of target database server. |
|
target
|
path | True |
string pattern: ([-a-z0-9]){3,63} |
Name of target database server. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| name | True |
string |
Name of the migration to check for validity and availability. |
| type | True |
string |
Type of resource. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK |
|
| Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Microsoft Entra 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
Check the validity and availability of the given name, to assign it to a new migration.
Sample request
POST https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampletarget/checkMigrationNameAvailability?api-version=2024-08-01
{
"name": "examplemigration",
"type": "Microsoft.DBforPostgreSQL/flexibleServers/migrations"
}
Sample response
{
"name": "naexamplemigration",
"type": "Microsoft.DBforPostgreSQL/flexibleServers/migrations",
"nameAvailable": true,
"reason": null,
"message": null
}
Definitions
| Name | Description |
|---|---|
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Migration |
Migration name availability reason. |
|
Migration |
Availability of a migration name. |
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 |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
MigrationNameAvailabilityReason
Migration name availability reason.
| Value | Description |
|---|---|
| Invalid | |
| AlreadyExists |
MigrationNameAvailabilityResource
Availability of a migration name.
| Name | Type | Description |
|---|---|---|
| message |
string |
Migration name availability message. |
| name |
string |
Name of the migration to check for validity and availability. |
| nameAvailable |
boolean |
Indicates if the migration name is available. |
| reason |
Migration name availability reason. |
|
| type |
string |
Type of resource. |