Skip to content

Commit

Permalink
Fix linter issue and add fast provisioning properties
Browse files Browse the repository at this point in the history
  • Loading branch information
DaeunYim committed Sep 8, 2022
1 parent fb7b2b0 commit ef4e8bc
Show file tree
Hide file tree
Showing 7 changed files with 250 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
{
"swagger": "2.0",
"info": {
"version": "2022-03-08-preview",
"title": "PostgreSQLManagementClient",
"description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model."
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/getCachedServerName": {
"post": {
"tags": [
"GetCachedServerName"
],
"operationId": "GetCachedServerName_Execute",
"x-ms-examples": {
"GetCachedServerName": {
"$ref": "./examples/CachedServerName.json"
}
},
"description": "Get available cached server name for fast provisioning",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/LocationNameParameter"
},
{
"name": "cachedServerNameRequest",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CachedServerNameRequest"
},
"description": "The required parameters for get cached name available for fast provisioning."
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/CachedServerName"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
}
}
}
},
"definitions": {
"CachedServerNameRequest": {
"type": "object",
"required": [
"version",
"storage",
"sku"
],
"properties": {
"version": {
"$ref": "FlexibleServers.json#/definitions/ServerVersion",
"description": "PostgreSQL Server version."
},
"storage": {
"$ref": "FlexibleServers.json#/definitions/Storage",
"default": null,
"description": "Storage properties of a server."
},
"sku": {
"$ref": "FlexibleServers.json#/definitions/Sku",
"description": "The SKU (pricing tier) of the server."
}
},
"description": "Request from client to get available cached server name"
},
"CachedServerName": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of available cached server",
"readOnly": true
}
},
"description": "Represents a resource name of a cached server"
},
"CloudError": {
"type": "object",
"x-ms-external": true,
"properties": {
"error": {
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse"
}
},
"description": "An error response from the Batch service."
}
},
"parameters": {
"LocationNameParameter": {
"name": "locationName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the location.",
"x-ms-parameter-location": "method"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,27 @@
},
"description": "node type capability"
},
"FastProvisioningEditionCapability": {
"type": "object",
"properties": {
"supportedSku": {
"type": "string",
"description": "Fast provisioning supported sku name",
"readOnly": true
},
"supportedStorageGb": {
"type": "integer",
"format": "int64",
"description": "Fast provisioning supported storage in Gb",
"readOnly": true
},
"supportedServerVersions": {
"type": "string",
"description": "Fast provisioning supported version",
"readOnly": true
}
}
},
"FlexibleServerEditionCapability": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -333,6 +354,19 @@
"x-ms-identifiers": [],
"readOnly": true
},
"fastProvisioningSupported": {
"type": "boolean",
"description": "A value indicating whether fast provisioning is supported in this region.",
"readOnly": true
},
"supportedFastProvisioningEditions": {
"type": "array",
"items": {
"$ref": "#/definitions/FastProvisioningEditionCapability"
},
"x-ms-identifiers": [],
"readOnly": true
},
"status": {
"type": "string",
"description": "The status",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@
},
"replicationRole": {
"$ref": "#/definitions/ReplicationRole",
"description": "ReplicationRole"
"description": "Replication role of the server"
},
"replicaCapacity": {
"type": "integer",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"parameters": {
"api-version": "2022-03-08-preview",
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"resourceGroupName": "testrg",
"locationName": "WestUS",
"cachedServerNameRequest": {
"version": "12",
"storage": {
"storageSizeGB": 32
},
"sku": {
"tier": "Burstable",
"name": "Standard_B1ms"
}
}
},
"responses": {
"200": {
"body": {
"name": "servername"
}
}
}
}
10 changes: 10 additions & 0 deletions specification/postgresql/resource-manager/readme.go.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ namespace: postgresqlflexibleservers
output-folder: $(go-sdk-folder)/services/$(rpname)/mgmt/2022-03-08-preview/$(namespace)
```

### Tag: package-flexibleserver-2022-03-privatepreview and go

These settings apply only when `--tag=package-flexibleserver-2022-03-privatepreview --go` is specified on the command line.
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.

``` yaml $(tag) == 'package-flexibleserver-2022-03-privatepreview' && $(go)
rpname: postgresql
namespace: postgresqlflexibleservers
output-folder: $(go-sdk-folder)/services/$(rpname)/mgmt/2022-03-08-privatepreview/$(namespace)
```

### Tag: package-flexibleserver-2021-06 and go

Expand Down
14 changes: 13 additions & 1 deletion specification/postgresql/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,19 @@ input-file:
- Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/PrivateDnsZone.json
- Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/VirtualNetwork.json
- Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/ServerStartStopRestart.json
- Microsoft.DBforPostgreSQL/preview/2022-03-08-privatepreview/getCachedServerName.json
- Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/CachedServerName.json
```

### Tag: package-flexibleserver-2022-03-privatepreview

These settings apply only when `--tag=package-flexibleserver-2022-03-privatepreview` is specified on the command line.

``` yaml $(tag) == 'package-flexibleserver-2022-03-privatepreview'
input-file:
- Microsoft.DBforPostgreSQL/preview/2022-03-08-privatepreview/getCachedServerName.json
- Microsoft.DBforPostgreSQL/preview/2022-01-20-preview/Databases.json
- Microsoft.DBforPostgreSQL/preview/2022-01-20-preview/PrivateDnsZone.json
- Microsoft.DBforPostgreSQL/preview/2022-01-20-preview/postgresql.json
```

### Tag: package-flexibleserver-2022-01-preview
Expand Down
22 changes: 21 additions & 1 deletion specification/postgresql/resource-manager/readme.python.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,30 @@ Generate all API versions currently shipped for this package
```yaml $(python)
clear-output-folder: true
batch:
- tag: package-flexibleserver-2022-01-preview
- tag: package-flexibleserver-2022-03-preview
- tag: package-2020-01-01
```
### Tag: package-flexibleserver-2022-03-preview and python
These settings apply only when `--tag=package-flexibleserver-2022-03-preview --python` is specified on the command line.
Please also specify `--python-sdk-folder=<path to the root directory of your azure-sdk-for-python clone>`.

``` yaml $(tag) == 'package-flexibleserver-2022-03-preview' && $(python)
namespace: azure.mgmt.rdbms.postgresql_flexibleservers
output-folder: $(python-sdks-folder)/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers
```

### Tag: package-flexibleserver-2022-03-privatepreview and python

These settings apply only when `--tag=package-flexibleserver-2022-03-privatepreview --python` is specified on the command line.
Please also specify `--python-sdk-folder=<path to the root directory of your azure-sdk-for-python clone>`.

``` yaml $(tag) == 'package-flexibleserver-2022-03-privatepreview' && $(python)
namespace: azure.mgmt.rdbms.postgresql_flexibleservers
output-folder: $(python-sdks-folder)/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers
```


### Tag: package-flexibleserver-2022-01-preview and python

Expand Down

0 comments on commit ef4e8bc

Please sign in to comment.