diff --git a/sdk/postgresql/arm-postgresql-flexible/package.json b/sdk/postgresql/arm-postgresql-flexible/package.json index 52a91db57acb..37b88e49423b 100644 --- a/sdk/postgresql/arm-postgresql-flexible/package.json +++ b/sdk/postgresql/arm-postgresql-flexible/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-postgresql-flexible", "author": "Microsoft Corporation", "description": "PostgreSQLManagementClient Library with typescript type definitions for node.js and browser.", - "version": "3.1.0", + "version": "4.0.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/configurationsMappers.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/configurationsMappers.ts index e63c693ddc6d..b0360a66b2d8 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/configurationsMappers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/configurationsMappers.ts @@ -18,16 +18,10 @@ export { ErrorResponse, FirewallRule, HighAvailability, - Identity, MaintenanceWindow, Network, - Plan, ProxyResource, Resource, - ResourceModelWithAllowedPropertySet, - ResourceModelWithAllowedPropertySetIdentity, - ResourceModelWithAllowedPropertySetPlan, - ResourceModelWithAllowedPropertySetSku, Server, Sku, Storage, diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/databasesMappers.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/databasesMappers.ts index 3ac50955c92d..9ee17a04d68a 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/databasesMappers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/databasesMappers.ts @@ -18,16 +18,10 @@ export { ErrorResponse, FirewallRule, HighAvailability, - Identity, MaintenanceWindow, Network, - Plan, ProxyResource, Resource, - ResourceModelWithAllowedPropertySet, - ResourceModelWithAllowedPropertySetIdentity, - ResourceModelWithAllowedPropertySetPlan, - ResourceModelWithAllowedPropertySetSku, Server, Sku, Storage, diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/firewallRulesMappers.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/firewallRulesMappers.ts index 19d3f36b91aa..bed8e891f6ba 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/firewallRulesMappers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/firewallRulesMappers.ts @@ -18,16 +18,10 @@ export { FirewallRule, FirewallRuleListResult, HighAvailability, - Identity, MaintenanceWindow, Network, - Plan, ProxyResource, Resource, - ResourceModelWithAllowedPropertySet, - ResourceModelWithAllowedPropertySetIdentity, - ResourceModelWithAllowedPropertySetPlan, - ResourceModelWithAllowedPropertySetSku, Server, Sku, Storage, diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/index.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/index.ts index 9ad7cffe0b82..dc79fe5b0f07 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/index.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/index.ts @@ -352,26 +352,6 @@ export interface MaintenanceWindow { dayOfWeek?: number; } -/** - * Identity for the resource. - */ -export interface Identity { - /** - * The principal ID of resource identity. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly principalId?: string; - /** - * The tenant ID of resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tenantId?: string; - /** - * The identity type. Possible values include: 'SystemAssigned' - */ - type?: ResourceIdentityType; -} - /** * Sku information related properties of a server. */ @@ -463,10 +443,6 @@ export interface TrackedResource extends Resource { * Represents a server. */ export interface Server extends TrackedResource { - /** - * The Azure Active Directory identity of the server. - */ - identity?: Identity; /** * The SKU (pricing tier) of the server. */ @@ -776,9 +752,10 @@ export interface RestartParameter { */ restartWithFailover?: boolean; /** - * Failover mode. + * Failover mode. Possible values include: 'PlannedFailover', 'ForcedFailover', + * 'PlannedSwitchover', 'ForcedSwitchover' */ - failoverMode?: string; + failoverMode?: FailoverMode; } /** @@ -842,109 +819,6 @@ export interface AzureEntityResource extends Resource { readonly etag?: string; } -/** - * An interface representing ResourceModelWithAllowedPropertySetIdentity. - */ -export interface ResourceModelWithAllowedPropertySetIdentity extends Identity { -} - -/** - * An interface representing ResourceModelWithAllowedPropertySetSku. - */ -export interface ResourceModelWithAllowedPropertySetSku extends Sku { -} - -/** - * Plan for the resource. - */ -export interface Plan { - /** - * A user defined name of the 3rd Party Artifact that is being procured. - */ - name: string; - /** - * The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic - */ - publisher: string; - /** - * The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID - * specified for the artifact at the time of Data Market onboarding. - */ - product: string; - /** - * A publisher provided promotion code as provisioned in Data Market for the said - * product/artifact. - */ - promotionCode?: string; - /** - * The version of the desired product/artifact. - */ - version?: string; -} - -/** - * An interface representing ResourceModelWithAllowedPropertySetPlan. - */ -export interface ResourceModelWithAllowedPropertySetPlan extends Plan { -} - -/** - * The resource model definition containing the full set of allowed properties for a resource. - * Except properties bag, there cannot be a top level property outside of this set. - */ -export interface ResourceModelWithAllowedPropertySet extends BaseResource { - /** - * Fully qualified resource ID for the resource. Ex - - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The name of the resource - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - * "Microsoft.Storage/storageAccounts" - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * The geo-location where the resource lives - */ - location?: string; - /** - * The fully qualified resource ID of the resource that manages this resource. Indicates if this - * resource is managed by another Azure resource. If this is present, complete mode deployment - * will not delete the resource if it is removed from the template since it is managed by another - * resource. - */ - managedBy?: string; - /** - * Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource - * provider must validate and persist this value. - */ - kind?: string; - /** - * The etag field is *not* required. If it is provided in the response body, it must also be - * provided as a header per the normal etag convention. Entity tags are used for comparing two - * or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag - * (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range - * (section 14.27) header fields. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly etag?: string; - /** - * Resource tags. - */ - tags?: { [propertyName: string]: string }; - identity?: ResourceModelWithAllowedPropertySetIdentity; - sku?: ResourceModelWithAllowedPropertySetSku; - plan?: ResourceModelWithAllowedPropertySetPlan; -} - /** * Represents a Database. */ @@ -1110,14 +984,6 @@ export type ServerHAState = 'NotEnabled' | 'CreatingStandby' | 'ReplicatingData' */ export type CreateMode = 'Default' | 'Create' | 'Update' | 'PointInTimeRestore'; -/** - * Defines values for ResourceIdentityType. - * Possible values include: 'SystemAssigned' - * @readonly - * @enum {string} - */ -export type ResourceIdentityType = 'SystemAssigned'; - /** * Defines values for SkuTier. * Possible values include: 'Burstable', 'GeneralPurpose', 'MemoryOptimized' @@ -1158,6 +1024,15 @@ export type ConfigurationDataType = 'Boolean' | 'Numeric' | 'Integer' | 'Enumera */ export type OperationOrigin = 'NotSpecified' | 'user' | 'system'; +/** + * Defines values for FailoverMode. + * Possible values include: 'PlannedFailover', 'ForcedFailover', 'PlannedSwitchover', + * 'ForcedSwitchover' + * @readonly + * @enum {string} + */ +export type FailoverMode = 'PlannedFailover' | 'ForcedFailover' | 'PlannedSwitchover' | 'ForcedSwitchover'; + /** * Contains response data for the create operation. */ diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/mappers.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/mappers.ts index 0069331612de..e8b7e0f9b682 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/mappers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/mappers.ts @@ -584,39 +584,6 @@ export const MaintenanceWindow: msRest.CompositeMapper = { } }; -export const Identity: msRest.CompositeMapper = { - serializedName: "Identity", - type: { - name: "Composite", - className: "Identity", - modelProperties: { - principalId: { - readOnly: true, - serializedName: "principalId", - type: { - name: "String" - } - }, - tenantId: { - readOnly: true, - serializedName: "tenantId", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - type: { - name: "Enum", - allowedValues: [ - "SystemAssigned" - ] - } - } - } - } -}; - export const Sku: msRest.CompositeMapper = { serializedName: "Sku", type: { @@ -754,13 +721,6 @@ export const Server: msRest.CompositeMapper = { className: "Server", modelProperties: { ...TrackedResource.type.modelProperties, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "Identity" - } - }, sku: { serializedName: "sku", type: { @@ -1366,173 +1326,6 @@ export const AzureEntityResource: msRest.CompositeMapper = { } }; -export const ResourceModelWithAllowedPropertySetIdentity: msRest.CompositeMapper = { - serializedName: "ResourceModelWithAllowedPropertySet_identity", - type: { - name: "Composite", - className: "ResourceModelWithAllowedPropertySetIdentity", - modelProperties: { - ...Identity.type.modelProperties - } - } -}; - -export const ResourceModelWithAllowedPropertySetSku: msRest.CompositeMapper = { - serializedName: "ResourceModelWithAllowedPropertySet_sku", - type: { - name: "Composite", - className: "ResourceModelWithAllowedPropertySetSku", - modelProperties: { - ...Sku.type.modelProperties - } - } -}; - -export const Plan: msRest.CompositeMapper = { - serializedName: "Plan", - type: { - name: "Composite", - className: "Plan", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - publisher: { - required: true, - serializedName: "publisher", - type: { - name: "String" - } - }, - product: { - required: true, - serializedName: "product", - type: { - name: "String" - } - }, - promotionCode: { - serializedName: "promotionCode", - type: { - name: "String" - } - }, - version: { - serializedName: "version", - type: { - name: "String" - } - } - } - } -}; - -export const ResourceModelWithAllowedPropertySetPlan: msRest.CompositeMapper = { - serializedName: "ResourceModelWithAllowedPropertySet_plan", - type: { - name: "Composite", - className: "ResourceModelWithAllowedPropertySetPlan", - modelProperties: { - ...Plan.type.modelProperties - } - } -}; - -export const ResourceModelWithAllowedPropertySet: msRest.CompositeMapper = { - serializedName: "ResourceModelWithAllowedPropertySet", - type: { - name: "Composite", - className: "ResourceModelWithAllowedPropertySet", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - }, - location: { - serializedName: "location", - type: { - name: "String" - } - }, - managedBy: { - serializedName: "managedBy", - type: { - name: "String" - } - }, - kind: { - serializedName: "kind", - constraints: { - Pattern: /^[-\w\._,\(\)]+$/ - }, - type: { - name: "String" - } - }, - etag: { - readOnly: true, - serializedName: "etag", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ResourceModelWithAllowedPropertySetIdentity" - } - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "ResourceModelWithAllowedPropertySetSku" - } - }, - plan: { - serializedName: "plan", - type: { - name: "Composite", - className: "ResourceModelWithAllowedPropertySetPlan" - } - } - } - } -}; - export const Database: msRest.CompositeMapper = { serializedName: "Database", type: { diff --git a/sdk/postgresql/arm-postgresql-flexible/src/models/serversMappers.ts b/sdk/postgresql/arm-postgresql-flexible/src/models/serversMappers.ts index 121df0cf53d1..c9941dd31966 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/models/serversMappers.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/models/serversMappers.ts @@ -17,16 +17,10 @@ export { ErrorResponse, FirewallRule, HighAvailability, - Identity, MaintenanceWindow, Network, - Plan, ProxyResource, Resource, - ResourceModelWithAllowedPropertySet, - ResourceModelWithAllowedPropertySetIdentity, - ResourceModelWithAllowedPropertySetPlan, - ResourceModelWithAllowedPropertySetSku, RestartParameter, Server, ServerForUpdate, diff --git a/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClientContext.ts b/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClientContext.ts index df6a4bf10937..814e0a04a33a 100644 --- a/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClientContext.ts +++ b/sdk/postgresql/arm-postgresql-flexible/src/postgreSQLManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-postgresql-flexible"; -const packageVersion = "3.1.0"; +const packageVersion = "4.0.0"; export class PostgreSQLManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential;