diff --git a/sdk/avs/arm-avs/package.json b/sdk/avs/arm-avs/package.json index 1a2e860f94ab..574ad837a651 100644 --- a/sdk/avs/arm-avs/package.json +++ b/sdk/avs/arm-avs/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-avs", "author": "Microsoft Corporation", "description": "AvsClient Library with typescript type definitions for node.js and browser.", - "version": "2.0.0", + "version": "2.1.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", diff --git a/sdk/avs/arm-avs/src/avsClient.ts b/sdk/avs/arm-avs/src/avsClient.ts index aaaa5a6236b2..4484c32db551 100644 --- a/sdk/avs/arm-avs/src/avsClient.ts +++ b/sdk/avs/arm-avs/src/avsClient.ts @@ -28,6 +28,8 @@ class AvsClient extends AvsClientContext { workloadNetworks: operations.WorkloadNetworks; cloudLinks: operations.CloudLinks; addons: operations.Addons; + virtualMachines: operations.VirtualMachines; + placementPolicies: operations.PlacementPolicies; scriptPackages: operations.ScriptPackages; scriptCmdlets: operations.ScriptCmdlets; scriptExecutions: operations.ScriptExecutions; @@ -56,6 +58,8 @@ class AvsClient extends AvsClientContext { this.workloadNetworks = new operations.WorkloadNetworks(this); this.cloudLinks = new operations.CloudLinks(this); this.addons = new operations.Addons(this); + this.virtualMachines = new operations.VirtualMachines(this); + this.placementPolicies = new operations.PlacementPolicies(this); this.scriptPackages = new operations.ScriptPackages(this); this.scriptCmdlets = new operations.ScriptCmdlets(this); this.scriptExecutions = new operations.ScriptExecutions(this); diff --git a/sdk/avs/arm-avs/src/avsClientContext.ts b/sdk/avs/arm-avs/src/avsClientContext.ts index ce126894cc98..14cf95b4a76c 100644 --- a/sdk/avs/arm-avs/src/avsClientContext.ts +++ b/sdk/avs/arm-avs/src/avsClientContext.ts @@ -13,7 +13,7 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-avs"; -const packageVersion = "2.0.0"; +const packageVersion = "2.1.0"; export class AvsClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; @@ -49,7 +49,7 @@ export class AvsClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2021-06-01'; + this.apiVersion = '2021-12-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/avs/arm-avs/src/models/addonsMappers.ts b/sdk/avs/arm-avs/src/models/addonsMappers.ts index cf965d12f4b9..bb9ee36d7f71 100644 --- a/sdk/avs/arm-avs/src/models/addonsMappers.ts +++ b/sdk/avs/arm-avs/src/models/addonsMappers.ts @@ -14,6 +14,7 @@ export { AddonProperties, AddonSrmProperties, AddonVrProperties, + AvailabilityProperties, BaseResource, Circuit, CloudError, @@ -22,6 +23,8 @@ export { CommonClusterProperties, Datastore, DiskPoolVolume, + Encryption, + EncryptionKeyVaultProperties, Endpoints, ErrorAdditionalInfo, ErrorResponse, @@ -31,7 +34,10 @@ export { IdentitySource, ManagementCluster, NetAppVolume, + PlacementPolicy, + PlacementPolicyProperties, PrivateCloud, + PrivateCloudIdentity, ProxyResource, PSCredentialExecutionParameter, Resource, @@ -44,6 +50,9 @@ export { ScriptStringExecutionParameter, Sku, TrackedResource, + VirtualMachine, + VmHostPlacementPolicyProperties, + VmVmPlacementPolicyProperties, WorkloadNetworkDhcp, WorkloadNetworkDhcpEntity, WorkloadNetworkDhcpRelay, diff --git a/sdk/avs/arm-avs/src/models/authorizationsMappers.ts b/sdk/avs/arm-avs/src/models/authorizationsMappers.ts index 971a067ca334..415e6d1bc7f3 100644 --- a/sdk/avs/arm-avs/src/models/authorizationsMappers.ts +++ b/sdk/avs/arm-avs/src/models/authorizationsMappers.ts @@ -13,6 +13,7 @@ export { AddonProperties, AddonSrmProperties, AddonVrProperties, + AvailabilityProperties, BaseResource, Circuit, CloudError, @@ -21,6 +22,8 @@ export { CommonClusterProperties, Datastore, DiskPoolVolume, + Encryption, + EncryptionKeyVaultProperties, Endpoints, ErrorAdditionalInfo, ErrorResponse, @@ -31,7 +34,10 @@ export { IdentitySource, ManagementCluster, NetAppVolume, + PlacementPolicy, + PlacementPolicyProperties, PrivateCloud, + PrivateCloudIdentity, ProxyResource, PSCredentialExecutionParameter, Resource, @@ -44,6 +50,9 @@ export { ScriptStringExecutionParameter, Sku, TrackedResource, + VirtualMachine, + VmHostPlacementPolicyProperties, + VmVmPlacementPolicyProperties, WorkloadNetworkDhcp, WorkloadNetworkDhcpEntity, WorkloadNetworkDhcpRelay, diff --git a/sdk/avs/arm-avs/src/models/cloudLinksMappers.ts b/sdk/avs/arm-avs/src/models/cloudLinksMappers.ts index ab66f0a4c077..126f567d5c83 100644 --- a/sdk/avs/arm-avs/src/models/cloudLinksMappers.ts +++ b/sdk/avs/arm-avs/src/models/cloudLinksMappers.ts @@ -13,6 +13,7 @@ export { AddonProperties, AddonSrmProperties, AddonVrProperties, + AvailabilityProperties, BaseResource, Circuit, CloudError, @@ -22,6 +23,8 @@ export { CommonClusterProperties, Datastore, DiskPoolVolume, + Encryption, + EncryptionKeyVaultProperties, Endpoints, ErrorAdditionalInfo, ErrorResponse, @@ -31,7 +34,10 @@ export { IdentitySource, ManagementCluster, NetAppVolume, + PlacementPolicy, + PlacementPolicyProperties, PrivateCloud, + PrivateCloudIdentity, ProxyResource, PSCredentialExecutionParameter, Resource, @@ -44,6 +50,9 @@ export { ScriptStringExecutionParameter, Sku, TrackedResource, + VirtualMachine, + VmHostPlacementPolicyProperties, + VmVmPlacementPolicyProperties, WorkloadNetworkDhcp, WorkloadNetworkDhcpEntity, WorkloadNetworkDhcpRelay, diff --git a/sdk/avs/arm-avs/src/models/clustersMappers.ts b/sdk/avs/arm-avs/src/models/clustersMappers.ts index f63850920810..f6ff0dffe645 100644 --- a/sdk/avs/arm-avs/src/models/clustersMappers.ts +++ b/sdk/avs/arm-avs/src/models/clustersMappers.ts @@ -13,6 +13,7 @@ export { AddonProperties, AddonSrmProperties, AddonVrProperties, + AvailabilityProperties, BaseResource, Circuit, CloudError, @@ -23,6 +24,8 @@ export { CommonClusterProperties, Datastore, DiskPoolVolume, + Encryption, + EncryptionKeyVaultProperties, Endpoints, ErrorAdditionalInfo, ErrorResponse, @@ -32,7 +35,10 @@ export { IdentitySource, ManagementCluster, NetAppVolume, + PlacementPolicy, + PlacementPolicyProperties, PrivateCloud, + PrivateCloudIdentity, ProxyResource, PSCredentialExecutionParameter, Resource, @@ -45,6 +51,9 @@ export { ScriptStringExecutionParameter, Sku, TrackedResource, + VirtualMachine, + VmHostPlacementPolicyProperties, + VmVmPlacementPolicyProperties, WorkloadNetworkDhcp, WorkloadNetworkDhcpEntity, WorkloadNetworkDhcpRelay, diff --git a/sdk/avs/arm-avs/src/models/datastoresMappers.ts b/sdk/avs/arm-avs/src/models/datastoresMappers.ts index 29be66bd71da..82c91fe09e12 100644 --- a/sdk/avs/arm-avs/src/models/datastoresMappers.ts +++ b/sdk/avs/arm-avs/src/models/datastoresMappers.ts @@ -13,6 +13,7 @@ export { AddonProperties, AddonSrmProperties, AddonVrProperties, + AvailabilityProperties, BaseResource, Circuit, CloudError, @@ -22,6 +23,8 @@ export { Datastore, DatastoreList, DiskPoolVolume, + Encryption, + EncryptionKeyVaultProperties, Endpoints, ErrorAdditionalInfo, ErrorResponse, @@ -31,7 +34,10 @@ export { IdentitySource, ManagementCluster, NetAppVolume, + PlacementPolicy, + PlacementPolicyProperties, PrivateCloud, + PrivateCloudIdentity, ProxyResource, PSCredentialExecutionParameter, Resource, @@ -44,6 +50,9 @@ export { ScriptStringExecutionParameter, Sku, TrackedResource, + VirtualMachine, + VmHostPlacementPolicyProperties, + VmVmPlacementPolicyProperties, WorkloadNetworkDhcp, WorkloadNetworkDhcpEntity, WorkloadNetworkDhcpRelay, diff --git a/sdk/avs/arm-avs/src/models/globalReachConnectionsMappers.ts b/sdk/avs/arm-avs/src/models/globalReachConnectionsMappers.ts index 9fb905d075f7..bc5447fd455e 100644 --- a/sdk/avs/arm-avs/src/models/globalReachConnectionsMappers.ts +++ b/sdk/avs/arm-avs/src/models/globalReachConnectionsMappers.ts @@ -13,6 +13,7 @@ export { AddonProperties, AddonSrmProperties, AddonVrProperties, + AvailabilityProperties, BaseResource, Circuit, CloudError, @@ -21,6 +22,8 @@ export { CommonClusterProperties, Datastore, DiskPoolVolume, + Encryption, + EncryptionKeyVaultProperties, Endpoints, ErrorAdditionalInfo, ErrorResponse, @@ -31,7 +34,10 @@ export { IdentitySource, ManagementCluster, NetAppVolume, + PlacementPolicy, + PlacementPolicyProperties, PrivateCloud, + PrivateCloudIdentity, ProxyResource, PSCredentialExecutionParameter, Resource, @@ -44,6 +50,9 @@ export { ScriptStringExecutionParameter, Sku, TrackedResource, + VirtualMachine, + VmHostPlacementPolicyProperties, + VmVmPlacementPolicyProperties, WorkloadNetworkDhcp, WorkloadNetworkDhcpEntity, WorkloadNetworkDhcpRelay, diff --git a/sdk/avs/arm-avs/src/models/hcxEnterpriseSitesMappers.ts b/sdk/avs/arm-avs/src/models/hcxEnterpriseSitesMappers.ts index 083d84e54139..42c2b8f0c371 100644 --- a/sdk/avs/arm-avs/src/models/hcxEnterpriseSitesMappers.ts +++ b/sdk/avs/arm-avs/src/models/hcxEnterpriseSitesMappers.ts @@ -13,6 +13,7 @@ export { AddonProperties, AddonSrmProperties, AddonVrProperties, + AvailabilityProperties, BaseResource, Circuit, CloudError, @@ -21,6 +22,8 @@ export { CommonClusterProperties, Datastore, DiskPoolVolume, + Encryption, + EncryptionKeyVaultProperties, Endpoints, ErrorAdditionalInfo, ErrorResponse, @@ -31,7 +34,10 @@ export { IdentitySource, ManagementCluster, NetAppVolume, + PlacementPolicy, + PlacementPolicyProperties, PrivateCloud, + PrivateCloudIdentity, ProxyResource, PSCredentialExecutionParameter, Resource, @@ -44,6 +50,9 @@ export { ScriptStringExecutionParameter, Sku, TrackedResource, + VirtualMachine, + VmHostPlacementPolicyProperties, + VmVmPlacementPolicyProperties, WorkloadNetworkDhcp, WorkloadNetworkDhcpEntity, WorkloadNetworkDhcpRelay, diff --git a/sdk/avs/arm-avs/src/models/index.ts b/sdk/avs/arm-avs/src/models/index.ts index e55e9bcb1955..7668f6b626d4 100644 --- a/sdk/avs/arm-avs/src/models/index.ts +++ b/sdk/avs/arm-avs/src/models/index.ts @@ -332,6 +332,10 @@ export interface ExpressRouteAuthorization extends Resource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly expressRouteAuthorizationKey?: string; + /** + * The ID of the ExpressRoute Circuit + */ + expressRouteId?: string; } /** @@ -360,6 +364,49 @@ export interface Circuit { readonly expressRoutePrivatePeeringID?: string; } +/** + * An Encryption Key + */ +export interface EncryptionKeyVaultProperties { + /** + * The name of the key. + */ + keyName?: string; + /** + * The version of the key. + */ + keyVersion?: string; + /** + * The URL of the vault. + */ + keyVaultUrl?: string; + /** + * The state of key provided. Possible values include: 'Connected', 'AccessDenied' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly keyState?: EncryptionKeyStatus; + /** + * Property of the key if user provided or auto detected. Possible values include: 'Fixed', + * 'AutoDetected' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly versionType?: EncryptionVersionType; +} + +/** + * The properties of customer managed encryption key + */ +export interface Encryption { + /** + * Status of customer managed encryption key. Possible values include: 'Enabled', 'Disabled' + */ + status?: EncryptionState; + /** + * The key vault where the encryption key is stored + */ + keyVaultProperties?: EncryptionKeyVaultProperties; +} + /** * Endpoint addresses */ @@ -430,6 +477,25 @@ export interface IdentitySource { password?: string; } +/** + * The properties describing private cloud availability zone distribution + */ +export interface AvailabilityProperties { + /** + * The availability strategy for the private cloud. Possible values include: 'SingleZone', + * 'DualZone' + */ + strategy?: AvailabilityStrategy; + /** + * The primary availability zone for the private cloud + */ + zone?: number; + /** + * The secondary availability zone for the private cloud + */ + secondaryZone?: number; +} + /** * The resource model definition representing SKU */ @@ -440,6 +506,30 @@ export interface Sku { name: string; } +/** + * Identity for the virtual machine. + */ +export interface PrivateCloudIdentity { + /** + * The principal ID of private cloud identity. This property will only be provided for a system + * assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The tenant ID associated with the private cloud. This property will only be provided for a + * system assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * The type of identity used for the private cloud. The type 'SystemAssigned' refers to an + * implicitly created identity. The type 'None' will remove any identities from the Private + * Cloud. Possible values include: 'SystemAssigned', 'None' + */ + type?: ResourceIdentityType; +} + /** * A private cloud resource */ @@ -461,6 +551,14 @@ export interface PrivateCloud extends TrackedResource { * vCenter Single Sign On Identity Sources */ identitySources?: IdentitySource[]; + /** + * Properties describing how the cloud is distributed across availability zones + */ + availability?: AvailabilityProperties; + /** + * Customer managed key encryption, can be enabled or disabled + */ + encryption?: Encryption; /** * The provisioning state. Possible values include: 'Succeeded', 'Failed', 'Cancelled', * 'Pending', 'Building', 'Deleting', 'Updating' @@ -520,6 +618,14 @@ export interface PrivateCloud extends TrackedResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly externalCloudLinks?: string[]; + /** + * A secondary expressRoute circuit from a separate AZ. Only present in a stretched private cloud + */ + secondaryCircuit?: Circuit; + /** + * The identity of the private cloud, if configured. + */ + identity?: PrivateCloudIdentity; } /** @@ -542,9 +648,8 @@ export interface CommonClusterProperties { readonly clusterId?: number; /** * The hosts - * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly hosts?: string[]; + hosts?: string[]; } /** @@ -574,6 +679,18 @@ export interface PrivateCloudUpdate { * vCenter Single Sign On Identity Sources */ identitySources?: IdentitySource[]; + /** + * Properties describing how the cloud is distributed across availability zones + */ + availability?: AvailabilityProperties; + /** + * Customer managed key encryption, can be enabled or disabled + */ + encryption?: Encryption; + /** + * The identity of the private cloud, if configured. + */ + identity?: PrivateCloudIdentity; } /** @@ -600,9 +717,8 @@ export interface Cluster extends Resource { readonly clusterId?: number; /** * The hosts - * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly hosts?: string[]; + hosts?: string[]; } /** @@ -613,6 +729,10 @@ export interface ClusterUpdate { * The cluster size */ clusterSize?: number; + /** + * The hosts + */ + hosts?: string[]; } /** @@ -663,7 +783,7 @@ export interface AddonSrmProperties { /** * The Site Recovery Manager (SRM) license */ - licenseKey: string; + licenseKey?: string; } /** @@ -758,6 +878,12 @@ export interface Datastore extends Resource { * An iSCSI volume */ diskPoolVolume?: DiskPoolVolume; + /** + * The operational status of the datastore. Possible values include: 'Unknown', 'Accessible', + * 'Inaccessible', 'Attached', 'Detached', 'LostCommunication', 'DeadOrError' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: DatastoreStatus; } /** @@ -833,6 +959,11 @@ export interface GlobalReachConnection extends Resource { * Identifier of the ExpressRoute Circuit to peer with in the global reach connection */ peerExpressRouteCircuit?: string; + /** + * The ID of the Private Cloud's ExpressRoute Circuit that is participating in the global reach + * connection + */ + expressRouteId?: string; } /** @@ -897,7 +1028,7 @@ export interface WorkloadNetworkSegment extends ProxyResource { */ readonly portVif?: WorkloadNetworkSegmentPortVif[]; /** - * Segment status. Possible values include: 'SUCCESS, FAILURE' + * Segment status. Possible values include: 'SUCCESS', 'FAILURE' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly status?: SegmentStatusEnum; @@ -1036,7 +1167,8 @@ export interface WorkloadNetworkPortMirroring extends ProxyResource { */ displayName?: string; /** - * Direction of port mirroring profile. Possible values include: 'INGRESS, EGRESS, BIDIRECTIONAL' + * Direction of port mirroring profile. Possible values include: 'INGRESS', 'EGRESS', + * 'BIDIRECTIONAL' */ direction?: PortMirroringDirectionEnum; /** @@ -1048,7 +1180,7 @@ export interface WorkloadNetworkPortMirroring extends ProxyResource { */ destination?: string; /** - * Port Mirroring Status. Possible values include: 'SUCCESS, FAILURE' + * Port Mirroring Status. Possible values include: 'SUCCESS', 'FAILURE' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly status?: PortMirroringStatusEnum; @@ -1077,7 +1209,7 @@ export interface WorkloadNetworkVMGroup extends ProxyResource { */ members?: string[]; /** - * VM Group status. Possible values include: 'SUCCESS, FAILURE' + * VM Group status. Possible values include: 'SUCCESS', 'FAILURE' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly status?: VMGroupStatusEnum; @@ -1102,7 +1234,7 @@ export interface WorkloadNetworkVirtualMachine extends ProxyResource { */ displayName?: string; /** - * Virtual machine type. Possible values include: 'REGULAR, EDGE, SERVICE' + * Virtual machine type. Possible values include: 'REGULAR', 'EDGE', 'SERVICE' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly vmType?: VMTypeEnum; @@ -1225,6 +1357,171 @@ export interface WorkloadNetworkPublicIP extends ProxyResource { readonly provisioningState?: WorkloadNetworkPublicIPProvisioningState; } +/** + * Set VM DRS-driven movement to restricted (enabled) or not (disabled) + */ +export interface VirtualMachineRestrictMovement { + /** + * Possible values include: 'Enabled', 'Disabled' + */ + restrictMovement?: VirtualMachineRestrictMovementState; +} + +/** + * Virtual Machine + */ +export interface VirtualMachine extends ProxyResource { + /** + * Display name of the VM. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + /** + * Virtual machine managed object reference id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly moRefId?: string; + /** + * Path to virtual machine's folder starting from datacenter virtual machine folder + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly folderPath?: string; + /** + * Possible values include: 'Enabled', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly restrictMovement?: VirtualMachineRestrictMovementState; +} + +/** + * Contains the possible cases for PlacementPolicyProperties. + */ +export type PlacementPolicyPropertiesUnion = PlacementPolicyProperties | VmVmPlacementPolicyProperties | VmHostPlacementPolicyProperties; + +/** + * Abstract placement policy properties + */ +export interface PlacementPolicyProperties { + /** + * Polymorphic Discriminator + */ + type: "PlacementPolicyProperties"; + /** + * Whether the placement policy is enabled or disabled. Possible values include: 'Enabled', + * 'Disabled' + */ + state?: PlacementPolicyState; + /** + * Display name of the placement policy + */ + displayName?: string; + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', 'Building', + * 'Deleting', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: PlacementPolicyProvisioningState; +} + +/** + * VM-VM placement policy properties + */ +export interface VmVmPlacementPolicyProperties { + /** + * Polymorphic Discriminator + */ + type: "VmVm"; + /** + * Whether the placement policy is enabled or disabled. Possible values include: 'Enabled', + * 'Disabled' + */ + state?: PlacementPolicyState; + /** + * Display name of the placement policy + */ + displayName?: string; + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', 'Building', + * 'Deleting', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: PlacementPolicyProvisioningState; + /** + * Virtual machine members list + */ + vmMembers: string[]; + /** + * placement policy affinity type. Possible values include: 'Affinity', 'AntiAffinity' + */ + affinityType: AffinityType; +} + +/** + * VM-Host placement policy properties + */ +export interface VmHostPlacementPolicyProperties { + /** + * Polymorphic Discriminator + */ + type: "VmHost"; + /** + * Whether the placement policy is enabled or disabled. Possible values include: 'Enabled', + * 'Disabled' + */ + state?: PlacementPolicyState; + /** + * Display name of the placement policy + */ + displayName?: string; + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', 'Building', + * 'Deleting', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: PlacementPolicyProvisioningState; + /** + * Virtual machine members list + */ + vmMembers: string[]; + /** + * Host members list + */ + hostMembers: string[]; + /** + * placement policy affinity type. Possible values include: 'Affinity', 'AntiAffinity' + */ + affinityType: AffinityType; +} + +/** + * A vSphere Distributed Resource Scheduler (DRS) placement policy + */ +export interface PlacementPolicy extends Resource { + /** + * placement policy properties + */ + properties?: PlacementPolicyPropertiesUnion; +} + +/** + * An update of a DRS placement policy resource + */ +export interface PlacementPolicyUpdate { + /** + * Whether the placement policy is enabled or disabled. Possible values include: 'Enabled', + * 'Disabled' + */ + state?: PlacementPolicyState; + /** + * Virtual machine members list + */ + vmMembers?: string[]; + /** + * Host members list + */ + hostMembers?: string[]; +} + /** * Script Package resources available for execution */ @@ -1449,21 +1746,21 @@ export interface PSCredentialExecutionParameter { /** * Optional Parameters. */ -export interface ClustersUpdateOptionalParams extends msRest.RequestOptionsBase { +export interface AuthorizationsCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * The cluster size + * The ID of the ExpressRoute Circuit */ - clusterSize?: number; + expressRouteId?: string; } /** * Optional Parameters. */ -export interface ClustersBeginUpdateOptionalParams extends msRest.RequestOptionsBase { +export interface AuthorizationsBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * The cluster size + * The ID of the ExpressRoute Circuit */ - clusterSize?: number; + expressRouteId?: string; } /** @@ -1546,6 +1843,46 @@ export interface AddonsBeginCreateOrUpdateOptionalParams extends msRest.RequestO properties?: AddonPropertiesUnion; } +/** + * Optional Parameters. + */ +export interface VirtualMachinesRestrictMovementOptionalParams extends msRest.RequestOptionsBase { + /** + * Possible values include: 'Enabled', 'Disabled' + */ + restrictMovementParameter?: VirtualMachineRestrictMovementState; +} + +/** + * Optional Parameters. + */ +export interface VirtualMachinesBeginRestrictMovementOptionalParams extends msRest.RequestOptionsBase { + /** + * Possible values include: 'Enabled', 'Disabled' + */ + restrictMovementParameter?: VirtualMachineRestrictMovementState; +} + +/** + * Optional Parameters. + */ +export interface PlacementPoliciesCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * placement policy properties + */ + properties?: PlacementPolicyPropertiesUnion; +} + +/** + * Optional Parameters. + */ +export interface PlacementPoliciesBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * placement policy properties + */ + properties?: PlacementPolicyPropertiesUnion; +} + /** * Optional Parameters. */ @@ -1798,6 +2135,32 @@ export interface AddonList extends Array { readonly nextLink?: string; } +/** + * @interface + * A list of Virtual Machines + * @extends Array + */ +export interface VirtualMachinesList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Represents list of placement policies + * @extends Array + */ +export interface PlacementPoliciesList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + /** * @interface * A list of the available script packages @@ -1861,6 +2224,30 @@ export type QuotaEnabled = 'Enabled' | 'Disabled'; */ export type ExpressRouteAuthorizationProvisioningState = 'Succeeded' | 'Failed' | 'Updating'; +/** + * Defines values for EncryptionKeyStatus. + * Possible values include: 'Connected', 'AccessDenied' + * @readonly + * @enum {string} + */ +export type EncryptionKeyStatus = 'Connected' | 'AccessDenied'; + +/** + * Defines values for EncryptionVersionType. + * Possible values include: 'Fixed', 'AutoDetected' + * @readonly + * @enum {string} + */ +export type EncryptionVersionType = 'Fixed' | 'AutoDetected'; + +/** + * Defines values for EncryptionState. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type EncryptionState = 'Enabled' | 'Disabled'; + /** * Defines values for SslEnum. * Possible values include: 'Enabled', 'Disabled' @@ -1869,6 +2256,14 @@ export type ExpressRouteAuthorizationProvisioningState = 'Succeeded' | 'Failed' */ export type SslEnum = 'Enabled' | 'Disabled'; +/** + * Defines values for AvailabilityStrategy. + * Possible values include: 'SingleZone', 'DualZone' + * @readonly + * @enum {string} + */ +export type AvailabilityStrategy = 'SingleZone' | 'DualZone'; + /** * Defines values for PrivateCloudProvisioningState. * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Pending', 'Building', 'Deleting', @@ -1878,6 +2273,14 @@ export type SslEnum = 'Enabled' | 'Disabled'; */ export type PrivateCloudProvisioningState = 'Succeeded' | 'Failed' | 'Cancelled' | 'Pending' | 'Building' | 'Deleting' | 'Updating'; +/** + * Defines values for ResourceIdentityType. + * Possible values include: 'SystemAssigned', 'None' + * @readonly + * @enum {string} + */ +export type ResourceIdentityType = 'SystemAssigned' | 'None'; + /** * Defines values for InternetEnum. * Possible values include: 'Enabled', 'Disabled' @@ -1919,6 +2322,15 @@ export type DatastoreProvisioningState = 'Succeeded' | 'Failed' | 'Cancelled' | */ export type MountOptionEnum = 'MOUNT' | 'ATTACH'; +/** + * Defines values for DatastoreStatus. + * Possible values include: 'Unknown', 'Accessible', 'Inaccessible', 'Attached', 'Detached', + * 'LostCommunication', 'DeadOrError' + * @readonly + * @enum {string} + */ +export type DatastoreStatus = 'Unknown' | 'Accessible' | 'Inaccessible' | 'Attached' | 'Detached' | 'LostCommunication' | 'DeadOrError'; + /** * Defines values for HcxEnterpriseSiteStatus. * Possible values include: 'Available', 'Consumed', 'Deactivated', 'Deleted' @@ -1953,11 +2365,11 @@ export type CloudLinkStatus = 'Active' | 'Building' | 'Deleting' | 'Failed' | 'D /** * Defines values for SegmentStatusEnum. - * Possible values include: 'SUCCESS, FAILURE' + * Possible values include: 'SUCCESS', 'FAILURE' * @readonly * @enum {string} */ -export type SegmentStatusEnum = 'SUCCESS, FAILURE'; +export type SegmentStatusEnum = 'SUCCESS' | 'FAILURE'; /** * Defines values for WorkloadNetworkSegmentProvisioningState. @@ -1977,19 +2389,19 @@ export type WorkloadNetworkDhcpProvisioningState = 'Succeeded' | 'Failed' | 'Bui /** * Defines values for PortMirroringDirectionEnum. - * Possible values include: 'INGRESS, EGRESS, BIDIRECTIONAL' + * Possible values include: 'INGRESS', 'EGRESS', 'BIDIRECTIONAL' * @readonly * @enum {string} */ -export type PortMirroringDirectionEnum = 'INGRESS, EGRESS, BIDIRECTIONAL'; +export type PortMirroringDirectionEnum = 'INGRESS' | 'EGRESS' | 'BIDIRECTIONAL'; /** * Defines values for PortMirroringStatusEnum. - * Possible values include: 'SUCCESS, FAILURE' + * Possible values include: 'SUCCESS', 'FAILURE' * @readonly * @enum {string} */ -export type PortMirroringStatusEnum = 'SUCCESS, FAILURE'; +export type PortMirroringStatusEnum = 'SUCCESS' | 'FAILURE'; /** * Defines values for WorkloadNetworkPortMirroringProvisioningState. @@ -2001,11 +2413,11 @@ export type WorkloadNetworkPortMirroringProvisioningState = 'Succeeded' | 'Faile /** * Defines values for VMGroupStatusEnum. - * Possible values include: 'SUCCESS, FAILURE' + * Possible values include: 'SUCCESS', 'FAILURE' * @readonly * @enum {string} */ -export type VMGroupStatusEnum = 'SUCCESS, FAILURE'; +export type VMGroupStatusEnum = 'SUCCESS' | 'FAILURE'; /** * Defines values for WorkloadNetworkVMGroupProvisioningState. @@ -2017,11 +2429,11 @@ export type WorkloadNetworkVMGroupProvisioningState = 'Succeeded' | 'Failed' | ' /** * Defines values for VMTypeEnum. - * Possible values include: 'REGULAR, EDGE, SERVICE' + * Possible values include: 'REGULAR', 'EDGE', 'SERVICE' * @readonly * @enum {string} */ -export type VMTypeEnum = 'REGULAR, EDGE, SERVICE'; +export type VMTypeEnum = 'REGULAR' | 'EDGE' | 'SERVICE'; /** * Defines values for DnsServiceLogLevelEnum. @@ -2063,6 +2475,38 @@ export type WorkloadNetworkDnsZoneProvisioningState = 'Succeeded' | 'Failed' | ' */ export type WorkloadNetworkPublicIPProvisioningState = 'Succeeded' | 'Failed' | 'Building' | 'Deleting' | 'Updating'; +/** + * Defines values for VirtualMachineRestrictMovementState. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type VirtualMachineRestrictMovementState = 'Enabled' | 'Disabled'; + +/** + * Defines values for PlacementPolicyState. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PlacementPolicyState = 'Enabled' | 'Disabled'; + +/** + * Defines values for PlacementPolicyProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Building', 'Deleting', 'Updating' + * @readonly + * @enum {string} + */ +export type PlacementPolicyProvisioningState = 'Succeeded' | 'Failed' | 'Building' | 'Deleting' | 'Updating'; + +/** + * Defines values for AffinityType. + * Possible values include: 'Affinity', 'AntiAffinity' + * @readonly + * @enum {string} + */ +export type AffinityType = 'Affinity' | 'AntiAffinity'; + /** * Defines values for ScriptParameterTypes. * Possible values include: 'String', 'SecureString', 'Credential', 'Int', 'Bool', 'Float' @@ -4164,6 +4608,206 @@ export type AddonsListNextResponse = AddonList & { }; }; +/** + * Contains response data for the list operation. + */ +export type VirtualMachinesListResponse = VirtualMachinesList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualMachinesList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type VirtualMachinesGetResponse = VirtualMachine & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualMachine; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type VirtualMachinesListNextResponse = VirtualMachinesList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualMachinesList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type PlacementPoliciesListResponse = PlacementPoliciesList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PlacementPoliciesList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PlacementPoliciesGetResponse = PlacementPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PlacementPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type PlacementPoliciesCreateOrUpdateResponse = PlacementPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PlacementPolicy; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type PlacementPoliciesUpdateResponse = PlacementPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PlacementPolicy; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type PlacementPoliciesBeginCreateOrUpdateResponse = PlacementPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PlacementPolicy; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type PlacementPoliciesBeginUpdateResponse = PlacementPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PlacementPolicy; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type PlacementPoliciesListNextResponse = PlacementPoliciesList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PlacementPoliciesList; + }; +}; + /** * Contains response data for the list operation. */ diff --git a/sdk/avs/arm-avs/src/models/mappers.ts b/sdk/avs/arm-avs/src/models/mappers.ts index fb43aa751017..5138dad99589 100644 --- a/sdk/avs/arm-avs/src/models/mappers.ts +++ b/sdk/avs/arm-avs/src/models/mappers.ts @@ -542,6 +542,12 @@ export const ExpressRouteAuthorization: msRest.CompositeMapper = { type: { name: "String" } + }, + expressRouteId: { + serializedName: "properties.expressRouteId", + type: { + name: "String" + } } } } @@ -585,6 +591,71 @@ export const Circuit: msRest.CompositeMapper = { } }; +export const EncryptionKeyVaultProperties: msRest.CompositeMapper = { + serializedName: "EncryptionKeyVaultProperties", + type: { + name: "Composite", + className: "EncryptionKeyVaultProperties", + modelProperties: { + keyName: { + serializedName: "keyName", + type: { + name: "String" + } + }, + keyVersion: { + serializedName: "keyVersion", + type: { + name: "String" + } + }, + keyVaultUrl: { + serializedName: "keyVaultUrl", + type: { + name: "String" + } + }, + keyState: { + readOnly: true, + serializedName: "keyState", + type: { + name: "String" + } + }, + versionType: { + readOnly: true, + serializedName: "versionType", + type: { + name: "String" + } + } + } + } +}; + +export const Encryption: msRest.CompositeMapper = { + serializedName: "Encryption", + type: { + name: "Composite", + className: "Encryption", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + keyVaultProperties: { + serializedName: "keyVaultProperties", + type: { + name: "Composite", + className: "EncryptionKeyVaultProperties" + } + } + } + } +}; + export const Endpoints: msRest.CompositeMapper = { serializedName: "Endpoints", type: { @@ -686,6 +757,34 @@ export const IdentitySource: msRest.CompositeMapper = { } }; +export const AvailabilityProperties: msRest.CompositeMapper = { + serializedName: "AvailabilityProperties", + type: { + name: "Composite", + className: "AvailabilityProperties", + modelProperties: { + strategy: { + serializedName: "strategy", + type: { + name: "String" + } + }, + zone: { + serializedName: "zone", + type: { + name: "Number" + } + }, + secondaryZone: { + serializedName: "secondaryZone", + type: { + name: "Number" + } + } + } + } +}; + export const Sku: msRest.CompositeMapper = { serializedName: "Sku", type: { @@ -703,6 +802,36 @@ export const Sku: msRest.CompositeMapper = { } }; +export const PrivateCloudIdentity: msRest.CompositeMapper = { + serializedName: "PrivateCloudIdentity", + type: { + name: "Composite", + className: "PrivateCloudIdentity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + export const PrivateCloud: msRest.CompositeMapper = { serializedName: "PrivateCloud", type: { @@ -744,6 +873,20 @@ export const PrivateCloud: msRest.CompositeMapper = { } } }, + availability: { + serializedName: "properties.availability", + type: { + name: "Composite", + className: "AvailabilityProperties" + } + }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "Encryption" + } + }, provisioningState: { readOnly: true, serializedName: "properties.provisioningState", @@ -831,6 +974,20 @@ export const PrivateCloud: msRest.CompositeMapper = { } } } + }, + secondaryCircuit: { + serializedName: "properties.secondaryCircuit", + type: { + name: "Composite", + className: "Circuit" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "PrivateCloudIdentity" + } } } } @@ -862,7 +1019,6 @@ export const CommonClusterProperties: msRest.CompositeMapper = { } }, hosts: { - readOnly: true, serializedName: "hosts", type: { name: "Sequence", @@ -930,6 +1086,27 @@ export const PrivateCloudUpdate: msRest.CompositeMapper = { } } } + }, + availability: { + serializedName: "properties.availability", + type: { + name: "Composite", + className: "AvailabilityProperties" + } + }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "Encryption" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "PrivateCloudIdentity" + } } } } @@ -970,7 +1147,6 @@ export const Cluster: msRest.CompositeMapper = { } }, hosts: { - readOnly: true, serializedName: "properties.hosts", type: { name: "Sequence", @@ -996,6 +1172,17 @@ export const ClusterUpdate: msRest.CompositeMapper = { type: { name: "Number" } + }, + hosts: { + serializedName: "properties.hosts", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -1058,7 +1245,6 @@ export const AddonSrmProperties: msRest.CompositeMapper = { modelProperties: { ...AddonProperties.type.modelProperties, licenseKey: { - required: true, serializedName: "licenseKey", type: { name: "String" @@ -1190,6 +1376,13 @@ export const Datastore: msRest.CompositeMapper = { name: "Composite", className: "DiskPoolVolume" } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } } } } @@ -1297,6 +1490,12 @@ export const GlobalReachConnection: msRest.CompositeMapper = { type: { name: "String" } + }, + expressRouteId: { + serializedName: "properties.expressRouteId", + type: { + name: "String" + } } } } @@ -1874,6 +2073,234 @@ export const WorkloadNetworkPublicIP: msRest.CompositeMapper = { } }; +export const VirtualMachineRestrictMovement: msRest.CompositeMapper = { + serializedName: "VirtualMachineRestrictMovement", + type: { + name: "Composite", + className: "VirtualMachineRestrictMovement", + modelProperties: { + restrictMovement: { + serializedName: "restrictMovement", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachine: msRest.CompositeMapper = { + serializedName: "VirtualMachine", + type: { + name: "Composite", + className: "VirtualMachine", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + readOnly: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + moRefId: { + readOnly: true, + serializedName: "properties.moRefId", + type: { + name: "String" + } + }, + folderPath: { + readOnly: true, + serializedName: "properties.folderPath", + type: { + name: "String" + } + }, + restrictMovement: { + readOnly: true, + serializedName: "properties.restrictMovement", + type: { + name: "String" + } + } + } + } +}; + +export const PlacementPolicyProperties: msRest.CompositeMapper = { + serializedName: "PlacementPolicyProperties", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + uberParent: "PlacementPolicyProperties", + className: "PlacementPolicyProperties", + modelProperties: { + state: { + serializedName: "state", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + }, + type: { + required: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const VmVmPlacementPolicyProperties: msRest.CompositeMapper = { + serializedName: "VmVm", + type: { + name: "Composite", + polymorphicDiscriminator: PlacementPolicyProperties.type.polymorphicDiscriminator, + uberParent: "PlacementPolicyProperties", + className: "VmVmPlacementPolicyProperties", + modelProperties: { + ...PlacementPolicyProperties.type.modelProperties, + vmMembers: { + required: true, + serializedName: "vmMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + affinityType: { + required: true, + serializedName: "affinityType", + type: { + name: "String" + } + } + } + } +}; + +export const VmHostPlacementPolicyProperties: msRest.CompositeMapper = { + serializedName: "VmHost", + type: { + name: "Composite", + polymorphicDiscriminator: PlacementPolicyProperties.type.polymorphicDiscriminator, + uberParent: "PlacementPolicyProperties", + className: "VmHostPlacementPolicyProperties", + modelProperties: { + ...PlacementPolicyProperties.type.modelProperties, + vmMembers: { + required: true, + serializedName: "vmMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + hostMembers: { + required: true, + serializedName: "hostMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + affinityType: { + required: true, + serializedName: "affinityType", + type: { + name: "String" + } + } + } + } +}; + +export const PlacementPolicy: msRest.CompositeMapper = { + serializedName: "PlacementPolicy", + type: { + name: "Composite", + className: "PlacementPolicy", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PlacementPolicyProperties" + } + } + } + } +}; + +export const PlacementPolicyUpdate: msRest.CompositeMapper = { + serializedName: "PlacementPolicyUpdate", + type: { + name: "Composite", + className: "PlacementPolicyUpdate", + modelProperties: { + state: { + serializedName: "properties.state", + type: { + name: "String" + } + }, + vmMembers: { + serializedName: "properties.vmMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + hostMembers: { + serializedName: "properties.hostMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const ScriptPackage: msRest.CompositeMapper = { serializedName: "ScriptPackage", type: { @@ -2759,6 +3186,66 @@ export const AddonList: msRest.CompositeMapper = { } }; +export const VirtualMachinesList: msRest.CompositeMapper = { + serializedName: "VirtualMachinesList", + type: { + name: "Composite", + className: "VirtualMachinesList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachine" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PlacementPoliciesList: msRest.CompositeMapper = { + serializedName: "PlacementPoliciesList", + type: { + name: "Composite", + className: "PlacementPoliciesList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PlacementPolicy" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const ScriptPackagesList: msRest.CompositeMapper = { serializedName: "ScriptPackagesList", type: { @@ -2857,6 +3344,9 @@ export const discriminators = { 'WorkloadNetworkDhcpEntity' : WorkloadNetworkDhcpEntity, 'WorkloadNetworkDhcpEntity.SERVER' : WorkloadNetworkDhcpServer, 'WorkloadNetworkDhcpEntity.RELAY' : WorkloadNetworkDhcpRelay, + 'PlacementPolicyProperties' : PlacementPolicyProperties, + 'PlacementPolicyProperties.VmVm' : VmVmPlacementPolicyProperties, + 'PlacementPolicyProperties.VmHost' : VmHostPlacementPolicyProperties, 'ScriptExecutionParameter' : ScriptExecutionParameter, 'ScriptExecutionParameter.SecureValue' : ScriptSecureStringExecutionParameter, 'ScriptExecutionParameter.Value' : ScriptStringExecutionParameter, diff --git a/sdk/avs/arm-avs/src/models/parameters.ts b/sdk/avs/arm-avs/src/models/parameters.ts index 2ebe6b72c6a3..dac2063e3717 100644 --- a/sdk/avs/arm-avs/src/models/parameters.ts +++ b/sdk/avs/arm-avs/src/models/parameters.ts @@ -163,6 +163,16 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const placementPolicyName: msRest.OperationURLParameter = { + parameterPath: "placementPolicyName", + mapper: { + required: true, + serializedName: "placementPolicyName", + type: { + name: "String" + } + } +}; export const portMirroringId: msRest.OperationURLParameter = { parameterPath: "portMirroringId", mapper: { diff --git a/sdk/avs/arm-avs/src/models/placementPoliciesMappers.ts b/sdk/avs/arm-avs/src/models/placementPoliciesMappers.ts new file mode 100644 index 000000000000..5da855c71fce --- /dev/null +++ b/sdk/avs/arm-avs/src/models/placementPoliciesMappers.ts @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Addon, + AddonHcxProperties, + AddonProperties, + AddonSrmProperties, + AddonVrProperties, + AvailabilityProperties, + BaseResource, + Circuit, + CloudError, + CloudLink, + Cluster, + CommonClusterProperties, + Datastore, + DiskPoolVolume, + Encryption, + EncryptionKeyVaultProperties, + Endpoints, + ErrorAdditionalInfo, + ErrorResponse, + ExpressRouteAuthorization, + GlobalReachConnection, + HcxEnterpriseSite, + IdentitySource, + ManagementCluster, + NetAppVolume, + PlacementPoliciesList, + PlacementPolicy, + PlacementPolicyProperties, + PlacementPolicyUpdate, + PrivateCloud, + PrivateCloudIdentity, + ProxyResource, + PSCredentialExecutionParameter, + Resource, + ScriptCmdlet, + ScriptExecution, + ScriptExecutionParameter, + ScriptPackage, + ScriptParameter, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, + Sku, + TrackedResource, + VirtualMachine, + VmHostPlacementPolicyProperties, + VmVmPlacementPolicyProperties, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpRelay, + WorkloadNetworkDhcpServer, + WorkloadNetworkDnsService, + WorkloadNetworkDnsZone, + WorkloadNetworkGateway, + WorkloadNetworkPortMirroring, + WorkloadNetworkPublicIP, + WorkloadNetworkSegment, + WorkloadNetworkSegmentPortVif, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVMGroup +} from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/privateCloudsMappers.ts b/sdk/avs/arm-avs/src/models/privateCloudsMappers.ts index 4d28dbae9f81..14964eb15359 100644 --- a/sdk/avs/arm-avs/src/models/privateCloudsMappers.ts +++ b/sdk/avs/arm-avs/src/models/privateCloudsMappers.ts @@ -14,6 +14,7 @@ export { AddonSrmProperties, AddonVrProperties, AdminCredentials, + AvailabilityProperties, BaseResource, Circuit, CloudError, @@ -22,6 +23,8 @@ export { CommonClusterProperties, Datastore, DiskPoolVolume, + Encryption, + EncryptionKeyVaultProperties, Endpoints, ErrorAdditionalInfo, ErrorResponse, @@ -31,7 +34,10 @@ export { IdentitySource, ManagementCluster, NetAppVolume, + PlacementPolicy, + PlacementPolicyProperties, PrivateCloud, + PrivateCloudIdentity, PrivateCloudList, PrivateCloudUpdate, ProxyResource, @@ -46,6 +52,9 @@ export { ScriptStringExecutionParameter, Sku, TrackedResource, + VirtualMachine, + VmHostPlacementPolicyProperties, + VmVmPlacementPolicyProperties, WorkloadNetworkDhcp, WorkloadNetworkDhcpEntity, WorkloadNetworkDhcpRelay, diff --git a/sdk/avs/arm-avs/src/models/scriptCmdletsMappers.ts b/sdk/avs/arm-avs/src/models/scriptCmdletsMappers.ts index 2943c74d4ddc..078d6a0651af 100644 --- a/sdk/avs/arm-avs/src/models/scriptCmdletsMappers.ts +++ b/sdk/avs/arm-avs/src/models/scriptCmdletsMappers.ts @@ -13,6 +13,7 @@ export { AddonProperties, AddonSrmProperties, AddonVrProperties, + AvailabilityProperties, BaseResource, Circuit, CloudError, @@ -21,6 +22,8 @@ export { CommonClusterProperties, Datastore, DiskPoolVolume, + Encryption, + EncryptionKeyVaultProperties, Endpoints, ErrorAdditionalInfo, ErrorResponse, @@ -30,7 +33,10 @@ export { IdentitySource, ManagementCluster, NetAppVolume, + PlacementPolicy, + PlacementPolicyProperties, PrivateCloud, + PrivateCloudIdentity, ProxyResource, PSCredentialExecutionParameter, Resource, @@ -44,6 +50,9 @@ export { ScriptStringExecutionParameter, Sku, TrackedResource, + VirtualMachine, + VmHostPlacementPolicyProperties, + VmVmPlacementPolicyProperties, WorkloadNetworkDhcp, WorkloadNetworkDhcpEntity, WorkloadNetworkDhcpRelay, diff --git a/sdk/avs/arm-avs/src/models/scriptExecutionsMappers.ts b/sdk/avs/arm-avs/src/models/scriptExecutionsMappers.ts index 7aff1c90f446..8b9e07e5f4ec 100644 --- a/sdk/avs/arm-avs/src/models/scriptExecutionsMappers.ts +++ b/sdk/avs/arm-avs/src/models/scriptExecutionsMappers.ts @@ -13,6 +13,7 @@ export { AddonProperties, AddonSrmProperties, AddonVrProperties, + AvailabilityProperties, BaseResource, Circuit, CloudError, @@ -21,6 +22,8 @@ export { CommonClusterProperties, Datastore, DiskPoolVolume, + Encryption, + EncryptionKeyVaultProperties, Endpoints, ErrorAdditionalInfo, ErrorResponse, @@ -30,7 +33,10 @@ export { IdentitySource, ManagementCluster, NetAppVolume, + PlacementPolicy, + PlacementPolicyProperties, PrivateCloud, + PrivateCloudIdentity, ProxyResource, PSCredentialExecutionParameter, Resource, @@ -44,6 +50,9 @@ export { ScriptStringExecutionParameter, Sku, TrackedResource, + VirtualMachine, + VmHostPlacementPolicyProperties, + VmVmPlacementPolicyProperties, WorkloadNetworkDhcp, WorkloadNetworkDhcpEntity, WorkloadNetworkDhcpRelay, diff --git a/sdk/avs/arm-avs/src/models/scriptPackagesMappers.ts b/sdk/avs/arm-avs/src/models/scriptPackagesMappers.ts index 89ed471cebd5..a2b2f4d6cdc5 100644 --- a/sdk/avs/arm-avs/src/models/scriptPackagesMappers.ts +++ b/sdk/avs/arm-avs/src/models/scriptPackagesMappers.ts @@ -13,6 +13,7 @@ export { AddonProperties, AddonSrmProperties, AddonVrProperties, + AvailabilityProperties, BaseResource, Circuit, CloudError, @@ -21,6 +22,8 @@ export { CommonClusterProperties, Datastore, DiskPoolVolume, + Encryption, + EncryptionKeyVaultProperties, Endpoints, ErrorAdditionalInfo, ErrorResponse, @@ -30,7 +33,10 @@ export { IdentitySource, ManagementCluster, NetAppVolume, + PlacementPolicy, + PlacementPolicyProperties, PrivateCloud, + PrivateCloudIdentity, ProxyResource, PSCredentialExecutionParameter, Resource, @@ -44,6 +50,9 @@ export { ScriptStringExecutionParameter, Sku, TrackedResource, + VirtualMachine, + VmHostPlacementPolicyProperties, + VmVmPlacementPolicyProperties, WorkloadNetworkDhcp, WorkloadNetworkDhcpEntity, WorkloadNetworkDhcpRelay, diff --git a/sdk/avs/arm-avs/src/models/virtualMachinesMappers.ts b/sdk/avs/arm-avs/src/models/virtualMachinesMappers.ts new file mode 100644 index 000000000000..2c3916fdc121 --- /dev/null +++ b/sdk/avs/arm-avs/src/models/virtualMachinesMappers.ts @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Addon, + AddonHcxProperties, + AddonProperties, + AddonSrmProperties, + AddonVrProperties, + AvailabilityProperties, + BaseResource, + Circuit, + CloudError, + CloudLink, + Cluster, + CommonClusterProperties, + Datastore, + DiskPoolVolume, + Encryption, + EncryptionKeyVaultProperties, + Endpoints, + ErrorAdditionalInfo, + ErrorResponse, + ExpressRouteAuthorization, + GlobalReachConnection, + HcxEnterpriseSite, + IdentitySource, + ManagementCluster, + NetAppVolume, + PlacementPolicy, + PlacementPolicyProperties, + PrivateCloud, + PrivateCloudIdentity, + ProxyResource, + PSCredentialExecutionParameter, + Resource, + ScriptCmdlet, + ScriptExecution, + ScriptExecutionParameter, + ScriptPackage, + ScriptParameter, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, + Sku, + TrackedResource, + VirtualMachine, + VirtualMachineRestrictMovement, + VirtualMachinesList, + VmHostPlacementPolicyProperties, + VmVmPlacementPolicyProperties, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpRelay, + WorkloadNetworkDhcpServer, + WorkloadNetworkDnsService, + WorkloadNetworkDnsZone, + WorkloadNetworkGateway, + WorkloadNetworkPortMirroring, + WorkloadNetworkPublicIP, + WorkloadNetworkSegment, + WorkloadNetworkSegmentPortVif, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVMGroup +} from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/workloadNetworksMappers.ts b/sdk/avs/arm-avs/src/models/workloadNetworksMappers.ts index 5a85a4df625a..f928492bb05c 100644 --- a/sdk/avs/arm-avs/src/models/workloadNetworksMappers.ts +++ b/sdk/avs/arm-avs/src/models/workloadNetworksMappers.ts @@ -13,6 +13,7 @@ export { AddonProperties, AddonSrmProperties, AddonVrProperties, + AvailabilityProperties, BaseResource, Circuit, CloudError, @@ -21,6 +22,8 @@ export { CommonClusterProperties, Datastore, DiskPoolVolume, + Encryption, + EncryptionKeyVaultProperties, Endpoints, ErrorAdditionalInfo, ErrorResponse, @@ -30,7 +33,10 @@ export { IdentitySource, ManagementCluster, NetAppVolume, + PlacementPolicy, + PlacementPolicyProperties, PrivateCloud, + PrivateCloudIdentity, ProxyResource, PSCredentialExecutionParameter, Resource, @@ -43,6 +49,9 @@ export { ScriptStringExecutionParameter, Sku, TrackedResource, + VirtualMachine, + VmHostPlacementPolicyProperties, + VmVmPlacementPolicyProperties, WorkloadNetworkDhcp, WorkloadNetworkDhcpEntity, WorkloadNetworkDhcpList, diff --git a/sdk/avs/arm-avs/src/operations/authorizations.ts b/sdk/avs/arm-avs/src/operations/authorizations.ts index a1b4337f2904..236723111c74 100644 --- a/sdk/avs/arm-avs/src/operations/authorizations.ts +++ b/sdk/avs/arm-avs/src/operations/authorizations.ts @@ -102,7 +102,7 @@ export class Authorizations { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, privateCloudName: string, authorizationName: string, options?: msRest.RequestOptionsBase): Promise { + createOrUpdate(resourceGroupName: string, privateCloudName: string, authorizationName: string, options?: Models.AuthorizationsCreateOrUpdateOptionalParams): Promise { return this.beginCreateOrUpdate(resourceGroupName,privateCloudName,authorizationName,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -128,7 +128,7 @@ export class Authorizations { * @param [options] The optional parameters * @returns Promise */ - beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, authorizationName: string, options?: msRest.RequestOptionsBase): Promise { + beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, authorizationName: string, options?: Models.AuthorizationsBeginCreateOrUpdateOptionalParams): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -258,7 +258,12 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], requestBody: { - parameterPath: "authorization", + parameterPath: { + expressRouteId: [ + "options", + "expressRouteId" + ] + }, mapper: { ...Mappers.ExpressRouteAuthorization, required: true diff --git a/sdk/avs/arm-avs/src/operations/clusters.ts b/sdk/avs/arm-avs/src/operations/clusters.ts index 300a524a845c..b5ac43910d47 100644 --- a/sdk/avs/arm-avs/src/operations/clusters.ts +++ b/sdk/avs/arm-avs/src/operations/clusters.ts @@ -113,11 +113,12 @@ export class Clusters { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated * @param [options] The optional parameters * @returns Promise */ - update(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: Models.ClustersUpdateOptionalParams): Promise { - return this.beginUpdate(resourceGroupName,privateCloudName,clusterName,options) + update(resourceGroupName: string, privateCloudName: string, clusterName: string, clusterUpdate: Models.ClusterUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,privateCloudName,clusterName,clusterUpdate,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -161,15 +162,17 @@ export class Clusters { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated * @param [options] The optional parameters * @returns Promise */ - beginUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: Models.ClustersBeginUpdateOptionalParams): Promise { + beginUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, clusterUpdate: Models.ClusterUpdate, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, privateCloudName, clusterName, + clusterUpdate, options }, beginUpdateOperationSpec, @@ -330,12 +333,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], requestBody: { - parameterPath: { - clusterSize: [ - "options", - "clusterSize" - ] - }, + parameterPath: "clusterUpdate", mapper: { ...Mappers.ClusterUpdate, required: true diff --git a/sdk/avs/arm-avs/src/operations/index.ts b/sdk/avs/arm-avs/src/operations/index.ts index 0e75ff3ae113..0776f160c3e0 100644 --- a/sdk/avs/arm-avs/src/operations/index.ts +++ b/sdk/avs/arm-avs/src/operations/index.ts @@ -18,6 +18,8 @@ export * from "./globalReachConnections"; export * from "./workloadNetworks"; export * from "./cloudLinks"; export * from "./addons"; +export * from "./virtualMachines"; +export * from "./placementPolicies"; export * from "./scriptPackages"; export * from "./scriptCmdlets"; export * from "./scriptExecutions"; diff --git a/sdk/avs/arm-avs/src/operations/placementPolicies.ts b/sdk/avs/arm-avs/src/operations/placementPolicies.ts new file mode 100644 index 000000000000..68ded5520517 --- /dev/null +++ b/sdk/avs/arm-avs/src/operations/placementPolicies.ts @@ -0,0 +1,437 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/placementPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { AvsClientContext } from "../avsClientContext"; + +/** Class representing a PlacementPolicies. */ +export class PlacementPolicies { + private readonly client: AvsClientContext; + + /** + * Create a PlacementPolicies. + * @param {AvsClientContext} client Reference to the service client. + */ + constructor(client: AvsClientContext) { + this.client = client; + } + + /** + * @summary List placement policies in a private cloud cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + clusterName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * @summary Get a placement policy by name in a private cloud cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) + * placement policy + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) + * placement policy + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) + * placement policy + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Create or update a placement policy in a private cloud cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) + * placement policy + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, options?: Models.PlacementPoliciesCreateOrUpdateOptionalParams): Promise { + return this.beginCreateOrUpdate(resourceGroupName,privateCloudName,clusterName,placementPolicyName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Update a placement policy in a private cloud cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) + * placement policy + * @param placementPolicyUpdate The placement policy properties that may be updated + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, placementPolicyUpdate: Models.PlacementPolicyUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,privateCloudName,clusterName,placementPolicyName,placementPolicyUpdate,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Delete a placement policy in a private cloud cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) + * placement policy + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,privateCloudName,clusterName,placementPolicyName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary Create or update a placement policy in a private cloud cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) + * placement policy + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, options?: Models.PlacementPoliciesBeginCreateOrUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * @summary Update a placement policy in a private cloud cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) + * placement policy + * @param placementPolicyUpdate The placement policy properties that may be updated + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, placementPolicyUpdate: Models.PlacementPolicyUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + placementPolicyUpdate, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * @summary Delete a placement policy in a private cloud cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) + * placement policy + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * @summary List placement policies in a private cloud cluster + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PlacementPoliciesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.clusterName, + Parameters.placementPolicyName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PlacementPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.clusterName, + Parameters.placementPolicyName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + properties: [ + "options", + "properties" + ] + }, + mapper: { + ...Mappers.PlacementPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PlacementPolicy + }, + 201: { + bodyMapper: Mappers.PlacementPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.clusterName, + Parameters.placementPolicyName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "placementPolicyUpdate", + mapper: { + ...Mappers.PlacementPolicyUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PlacementPolicy + }, + 202: { + bodyMapper: Mappers.PlacementPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.clusterName, + Parameters.placementPolicyName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PlacementPoliciesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/avs/arm-avs/src/operations/scriptCmdlets.ts b/sdk/avs/arm-avs/src/operations/scriptCmdlets.ts index 00250ba63797..8c24daeed583 100644 --- a/sdk/avs/arm-avs/src/operations/scriptCmdlets.ts +++ b/sdk/avs/arm-avs/src/operations/scriptCmdlets.ts @@ -26,8 +26,8 @@ export class ScriptCmdlets { } /** - * Return script cmdlet resources available for a private cloud to create a script execution - * resource on their Private Cloud + * List script cmdlet resources available for a private cloud to create a script execution resource + * on a private cloud * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param scriptPackageName Name of the script package in the private cloud @@ -106,8 +106,8 @@ export class ScriptCmdlets { } /** - * Return script cmdlet resources available for a private cloud to create a script execution - * resource on their Private Cloud + * List script cmdlet resources available for a private cloud to create a script execution resource + * on a private cloud * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise diff --git a/sdk/avs/arm-avs/src/operations/scriptExecutions.ts b/sdk/avs/arm-avs/src/operations/scriptExecutions.ts index 5ceca22b6fed..4a59480ff3a7 100644 --- a/sdk/avs/arm-avs/src/operations/scriptExecutions.ts +++ b/sdk/avs/arm-avs/src/operations/scriptExecutions.ts @@ -27,7 +27,7 @@ export class ScriptExecutions { } /** - * @summary Get an script execution resource by name in a private cloud + * @summary List script executions in a private cloud * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param [options] The optional parameters @@ -59,7 +59,7 @@ export class ScriptExecutions { } /** - * @summary Get an script execution resource by name in a private cloud + * @summary Get an script execution by name in a private cloud * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param scriptExecutionName Name of the user-invoked script execution resource @@ -95,7 +95,7 @@ export class ScriptExecutions { } /** - * @summary Create or update a script execution resource in a private cloud + * @summary Create or update a script execution in a private cloud * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName The name of the private cloud. * @param scriptExecutionName Name of the user-invoked script execution resource @@ -158,7 +158,7 @@ export class ScriptExecutions { } /** - * @summary Create or update a script execution resource in a private cloud + * @summary Create or update a script execution in a private cloud * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName The name of the private cloud. * @param scriptExecutionName Name of the user-invoked script execution resource @@ -200,7 +200,7 @@ export class ScriptExecutions { } /** - * @summary Get an script execution resource by name in a private cloud + * @summary List script executions in a private cloud * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise diff --git a/sdk/avs/arm-avs/src/operations/scriptPackages.ts b/sdk/avs/arm-avs/src/operations/scriptPackages.ts index 9dec8dd568ee..755637d73a7e 100644 --- a/sdk/avs/arm-avs/src/operations/scriptPackages.ts +++ b/sdk/avs/arm-avs/src/operations/scriptPackages.ts @@ -26,7 +26,7 @@ export class ScriptPackages { } /** - * Return script packages available for a private cloud to run on their Private Cloud + * List script packages available to run on the private cloud * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param [options] The optional parameters @@ -58,7 +58,7 @@ export class ScriptPackages { } /** - * Return script package available to run on an Private Cloud + * Get a script package available to run on a private cloud * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param scriptPackageName Name of the script package in the private cloud @@ -94,7 +94,7 @@ export class ScriptPackages { } /** - * Return script packages available for a private cloud to run on their Private Cloud + * List script packages available to run on the private cloud * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise diff --git a/sdk/avs/arm-avs/src/operations/virtualMachines.ts b/sdk/avs/arm-avs/src/operations/virtualMachines.ts new file mode 100644 index 000000000000..94e3833bb2bf --- /dev/null +++ b/sdk/avs/arm-avs/src/operations/virtualMachines.ts @@ -0,0 +1,284 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/virtualMachinesMappers"; +import * as Parameters from "../models/parameters"; +import { AvsClientContext } from "../avsClientContext"; + +/** Class representing a VirtualMachines. */ +export class VirtualMachines { + private readonly client: AvsClientContext; + + /** + * Create a VirtualMachines. + * @param {AvsClientContext} client Reference to the service client. + */ + constructor(client: AvsClientContext) { + this.client = client; + } + + /** + * @summary List of virtual machines in a private cloud cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + clusterName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * @summary Get a virtual machine by id in a private cloud cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param virtualMachineId Virtual Machine identifier + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, privateCloudName: string, clusterName: string, virtualMachineId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param virtualMachineId Virtual Machine identifier + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, clusterName: string, virtualMachineId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param virtualMachineId Virtual Machine identifier + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, clusterName: string, virtualMachineId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, privateCloudName: string, clusterName: string, virtualMachineId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + clusterName, + virtualMachineId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Enable or disable DRS-driven VM movement restriction + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param virtualMachineId Virtual Machine identifier + * @param [options] The optional parameters + * @returns Promise + */ + restrictMovement(resourceGroupName: string, privateCloudName: string, clusterName: string, virtualMachineId: string, options?: Models.VirtualMachinesRestrictMovementOptionalParams): Promise { + return this.beginRestrictMovement(resourceGroupName,privateCloudName,clusterName,virtualMachineId,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary Enable or disable DRS-driven VM movement restriction + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param virtualMachineId Virtual Machine identifier + * @param [options] The optional parameters + * @returns Promise + */ + beginRestrictMovement(resourceGroupName: string, privateCloudName: string, clusterName: string, virtualMachineId: string, options?: Models.VirtualMachinesBeginRestrictMovementOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + clusterName, + virtualMachineId, + options + }, + beginRestrictMovementOperationSpec, + options); + } + + /** + * @summary List of virtual machines in a private cloud cluster + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachinesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.clusterName, + Parameters.virtualMachineId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachine + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginRestrictMovementOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.clusterName, + Parameters.virtualMachineId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + restrictMovement: [ + "options", + "restrictMovementParameter" + ] + }, + mapper: { + ...Mappers.VirtualMachineRestrictMovement, + required: true + } + }, + responses: { + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachinesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +};