From fbcb0e857a1d2d746dd56f4db5efb62322265636 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 23 Jun 2022 02:19:17 +0000 Subject: [PATCH] CodeGen from PR 19468 in Azure/azure-rest-api-specs CloudService 2022-04-04 release (#19468) * set up branch * Feature/cplat 2022 04 04 (#19467) * set up feature branch * Update cloud service swagger file and examples (#19311) * Update cloud service swagger file and examples * Update cloudService.json Co-authored-by: Arpit Khandelwal * move systemData object to common.json * Add CloudServiceSlotType to swagger api 2022-04-04 (#19361) Co-authored-by: Arpit Khandelwal * update with prettier * resolve readme input * add missing example * fix example error, update common with latest change. * set up branch * change folder name * change folder name Co-authored-by: Arpit Khandelwal Co-authored-by: Arpit Khandelwal Co-authored-by: Theodore Chang * prettier fix Co-authored-by: Theodore Chang Co-authored-by: Arpit Khandelwal Co-authored-by: Arpit Khandelwal --- sdk/compute/arm-compute/CHANGELOG.md | 21 ++-- sdk/compute/arm-compute/_meta.json | 8 +- sdk/compute/arm-compute/package.json | 19 +--- .../arm-compute/review/arm-compute.api.md | 87 +++++++++-------- .../src/computeManagementClient.ts | 2 +- sdk/compute/arm-compute/src/models/index.ts | 97 ++++++++++++++++--- sdk/compute/arm-compute/src/models/mappers.ts | 42 +++++++- .../arm-compute/src/models/parameters.ts | 2 +- .../operations/cloudServiceRoleInstances.ts | 56 +++++------ .../src/operations/cloudServiceRoles.ts | 16 +-- .../cloudServiceRoleInstances.ts | 48 ++++----- .../operationsInterfaces/cloudServiceRoles.ts | 8 +- sdk/compute/arm-compute/test/sampleTest.ts | 43 ++++++++ sdk/compute/arm-compute/tsconfig.json | 10 +- 14 files changed, 299 insertions(+), 160 deletions(-) create mode 100644 sdk/compute/arm-compute/test/sampleTest.ts diff --git a/sdk/compute/arm-compute/CHANGELOG.md b/sdk/compute/arm-compute/CHANGELOG.md index f686e7d1c9b7..a5ca844cd03c 100644 --- a/sdk/compute/arm-compute/CHANGELOG.md +++ b/sdk/compute/arm-compute/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History + +## 19.1.0 (2022-06-23) + +**Features** -## 19.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added Interface SystemData + - Added Type Alias CloudServiceSlotType + - Interface CloudService has a new optional parameter systemData + - Interface CloudServiceNetworkProfile has a new optional parameter slotType + - Added Enum KnownCloudServiceSlotType + + ## 19.0.0 (2022-06-06) **Features** diff --git a/sdk/compute/arm-compute/_meta.json b/sdk/compute/arm-compute/_meta.json index 9e18a7eef044..983253b1f361 100644 --- a/sdk/compute/arm-compute/_meta.json +++ b/sdk/compute/arm-compute/_meta.json @@ -1,8 +1,8 @@ { - "commit": "7168ecde052e9797d31d74c40ad00ac68c74ec6a", + "commit": "e50265479cae5da79144cce18a80751214a4ceca", "readme": "specification/compute/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\compute\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-beta.20 --generate-sample=true", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/compute/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220425.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.3.0", - "use": "@autorest/typescript@6.0.0-beta.20" + "release_tool": "@azure-tools/js-sdk-release-tools@2.3.2", + "use": "@autorest/typescript@6.0.0-alpha.19.20220425.1" } \ No newline at end of file diff --git a/sdk/compute/arm-compute/package.json b/sdk/compute/arm-compute/package.json index 1f5a1ed32478..5e9288b85145 100644 --- a/sdk/compute/arm-compute/package.json +++ b/sdk/compute/arm-compute/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ComputeManagementClient.", - "version": "19.0.1", + "version": "19.1.0", "engines": { "node": ">=12.0.0" }, @@ -43,11 +43,8 @@ "@azure-tools/test-recorder": "^2.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "@types/chai": "^4.2.8", - "chai": "^4.2.0", "cross-env": "^7.0.2", - "@azure/dev-tool": "^1.0.0", - "@azure/arm-network": "^26.0.0" + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/compute/arm-compute", "repository": { @@ -111,13 +108,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-compute?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/compute/arm-compute/review/arm-compute.api.md b/sdk/compute/arm-compute/review/arm-compute.api.md index 1be28f1b6b70..020db37e6894 100644 --- a/sdk/compute/arm-compute/review/arm-compute.api.md +++ b/sdk/compute/arm-compute/review/arm-compute.api.md @@ -443,6 +443,7 @@ export interface CloudService { location: string; readonly name?: string; properties?: CloudServiceProperties; + systemData?: SystemData; tags?: { [propertyName: string]: string; }; @@ -458,13 +459,12 @@ export interface CloudServiceExtensionProfile { export interface CloudServiceExtensionProperties { autoUpgradeMinorVersion?: boolean; forceUpdateTag?: string; - protectedSettings?: string; - // (undocumented) + protectedSettings?: Record; protectedSettingsFromKeyVault?: CloudServiceVaultAndSecretReference; readonly provisioningState?: string; publisher?: string; rolesAppliedTo?: string[]; - settings?: string; + settings?: Record; type?: string; typeHandlerVersion?: string; } @@ -477,17 +477,16 @@ export interface CloudServiceInstanceView { readonly statuses?: ResourceInstanceViewStatus[]; } -// @public (undocumented) +// @public export interface CloudServiceListResult { - // (undocumented) nextLink?: string; - // (undocumented) value: CloudService[]; } // @public export interface CloudServiceNetworkProfile { loadBalancerConfigurations?: LoadBalancerConfiguration[]; + slotType?: CloudServiceSlotType; swappableCloudService?: SubResource; } @@ -567,7 +566,6 @@ export interface CloudServiceRole { readonly id?: string; readonly location?: string; readonly name?: string; - // (undocumented) properties?: CloudServiceRoleProperties; sku?: CloudServiceRoleSku; readonly type?: string; @@ -654,11 +652,9 @@ export interface CloudServiceRoleInstancesRestartOptionalParams extends coreClie updateIntervalInMs?: number; } -// @public (undocumented) +// @public export interface CloudServiceRoleListResult { - // (undocumented) nextLink?: string; - // (undocumented) value: CloudServiceRole[]; } @@ -673,7 +669,7 @@ export interface CloudServiceRoleProfileProperties { sku?: CloudServiceRoleSku; } -// @public (undocumented) +// @public export interface CloudServiceRoleProperties { readonly uniqueId?: string; } @@ -803,6 +799,9 @@ export interface CloudServicesListOptionalParams extends coreClient.OperationOpt // @public export type CloudServicesListResponse = CloudServiceListResult; +// @public +export type CloudServiceSlotType = string; + // @public export interface CloudServicesPowerOffOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -892,11 +891,9 @@ export interface CloudServiceUpdate { // @public export type CloudServiceUpgradeMode = string; -// @public (undocumented) +// @public export interface CloudServiceVaultAndSecretReference { - // (undocumented) secretUrl?: string; - // (undocumented) sourceVault?: SubResource; } @@ -924,7 +921,7 @@ export interface CommunityGalleriesGetOptionalParams extends coreClient.Operatio export type CommunityGalleriesGetResponse = CommunityGallery; // @public -export type CommunityGallery = PirCommunityGalleryResource; +export type CommunityGallery = PirCommunityGalleryResource & {}; // @public export type CommunityGalleryImage = PirCommunityGalleryResource & { @@ -1685,7 +1682,7 @@ export interface DiskEncryptionSetList { } // @public -export type DiskEncryptionSetParameters = SubResource; +export type DiskEncryptionSetParameters = SubResource & {}; // @public export interface DiskEncryptionSets { @@ -2541,7 +2538,7 @@ export interface GalleryImageVersionList { } // @public -export type GalleryImageVersionPublishingProfile = GalleryArtifactPublishingProfileBase; +export type GalleryImageVersionPublishingProfile = GalleryArtifactPublishingProfileBase & {}; // @public export interface GalleryImageVersions { @@ -2623,7 +2620,7 @@ export interface GalleryList { } // @public -export type GalleryOSDiskImage = GalleryDiskImage; +export type GalleryOSDiskImage = GalleryDiskImage & {}; // @public export type GalleryProvisioningState = string; @@ -2849,7 +2846,7 @@ export interface InnerError { exceptiontype?: string; } -// @public (undocumented) +// @public export interface InstanceSku { readonly name?: string; readonly tier?: string; @@ -2969,6 +2966,14 @@ export enum KnownCapacityReservationInstanceViewTypes { InstanceView = "instanceView" } +// @public +export enum KnownCloudServiceSlotType { + // (undocumented) + Production = "Production", + // (undocumented) + Staging = "Staging" +} + // @public export enum KnownCloudServiceUpgradeMode { // (undocumented) @@ -4120,12 +4125,12 @@ export interface LoadBalancerConfiguration { properties: LoadBalancerConfigurationProperties; } -// @public (undocumented) +// @public export interface LoadBalancerConfigurationProperties { frontendIPConfigurations: LoadBalancerFrontendIPConfiguration[]; } -// @public (undocumented) +// @public export interface LoadBalancerFrontendIPConfiguration { name: string; properties: LoadBalancerFrontendIPConfigurationProperties; @@ -4317,11 +4322,9 @@ export interface OSFamily { readonly type?: string; } -// @public (undocumented) +// @public export interface OSFamilyListResult { - // (undocumented) nextLink?: string; - // (undocumented) value: OSFamily[]; } @@ -4354,11 +4357,9 @@ export interface OSVersion { readonly type?: string; } -// @public (undocumented) +// @public export interface OSVersionListResult { - // (undocumented) nextLink?: string; - // (undocumented) value: OSVersion[]; } @@ -4581,7 +4582,7 @@ export type ProximityPlacementGroupsUpdateResponse = ProximityPlacementGroup; export type ProximityPlacementGroupType = string; // @public -export type ProximityPlacementGroupUpdate = UpdateResource; +export type ProximityPlacementGroupUpdate = UpdateResource & {}; // @public export interface ProxyOnlyResource { @@ -5026,14 +5027,12 @@ export interface RetrieveBootDiagnosticsDataResult { readonly serialConsoleLogBlobUri?: string; } -// @public (undocumented) +// @public export interface RoleInstance { readonly id?: string; readonly location?: string; readonly name?: string; - // (undocumented) properties?: RoleInstanceProperties; - // (undocumented) sku?: InstanceSku; readonly tags?: { [propertyName: string]: string; @@ -5041,11 +5040,9 @@ export interface RoleInstance { readonly type?: string; } -// @public (undocumented) +// @public export interface RoleInstanceListResult { - // (undocumented) nextLink?: string; - // (undocumented) value: RoleInstance[]; } @@ -5054,7 +5051,7 @@ export interface RoleInstanceNetworkProfile { readonly networkInterfaces?: SubResource[]; } -// @public (undocumented) +// @public export interface RoleInstanceProperties { instanceView?: RoleInstanceView; networkProfile?: RoleInstanceNetworkProfile; @@ -5227,7 +5224,7 @@ export interface SharedGalleriesListOptionalParams extends coreClient.OperationO export type SharedGalleriesListResponse = SharedGalleryList; // @public -export type SharedGallery = PirSharedGalleryResource; +export type SharedGallery = PirSharedGalleryResource & {}; // @public export type SharedGalleryDataDiskImage = SharedGalleryDiskImage & { @@ -5348,7 +5345,7 @@ export interface SharedGalleryList { } // @public -export type SharedGalleryOSDiskImage = SharedGalleryDiskImage; +export type SharedGalleryOSDiskImage = SharedGalleryDiskImage & {}; // @public export type SharedToValues = string; @@ -5673,7 +5670,7 @@ export type SshPublicKeyUpdateResource = UpdateResource & { publicKey?: string; }; -// @public (undocumented) +// @public export interface StatusCodeCount { readonly code?: string; readonly count?: number; @@ -5716,6 +5713,12 @@ export interface SupportedCapabilities { architecture?: Architecture; } +// @public +export interface SystemData { + readonly createdAt?: Date; + readonly lastModifiedAt?: Date; +} + // @public export interface TargetRegion { encryption?: EncryptionImages; @@ -5731,7 +5734,7 @@ export interface TerminateNotificationProfile { } // @public -export type ThrottledRequestsInput = LogAnalyticsInputBase; +export type ThrottledRequestsInput = LogAnalyticsInputBase & {}; // @public export interface UefiSettings { @@ -5745,11 +5748,9 @@ export interface UpdateDomain { readonly name?: string; } -// @public (undocumented) +// @public export interface UpdateDomainListResult { - // (undocumented) nextLink?: string; - // (undocumented) value: UpdateDomain[]; } @@ -7449,7 +7450,7 @@ export interface VirtualMachineScaleSetVMProtectionPolicy { } // @public -export type VirtualMachineScaleSetVMReimageParameters = VirtualMachineReimageParameters; +export type VirtualMachineScaleSetVMReimageParameters = VirtualMachineReimageParameters & {}; // @public export interface VirtualMachineScaleSetVMRunCommands { diff --git a/sdk/compute/arm-compute/src/computeManagementClient.ts b/sdk/compute/arm-compute/src/computeManagementClient.ts index 723c7030fecc..a6fae2e8ec2e 100644 --- a/sdk/compute/arm-compute/src/computeManagementClient.ts +++ b/sdk/compute/arm-compute/src/computeManagementClient.ts @@ -145,7 +145,7 @@ export class ComputeManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-compute/19.0.1`; + const packageDetails = `azsdk-js-arm-compute/19.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/compute/arm-compute/src/models/index.ts b/sdk/compute/arm-compute/src/models/index.ts index c538fea54b0f..9c190c06125a 100644 --- a/sdk/compute/arm-compute/src/models/index.ts +++ b/sdk/compute/arm-compute/src/models/index.ts @@ -3646,6 +3646,7 @@ export interface CommunityGalleryImageVersionList { nextLink?: string; } +/** Describes the cloud service role instance. */ export interface RoleInstance { /** * Resource Id @@ -3672,10 +3673,13 @@ export interface RoleInstance { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly tags?: { [propertyName: string]: string }; + /** The role instance SKU. */ sku?: InstanceSku; + /** Role instance properties. */ properties?: RoleInstanceProperties; } +/** The role instance SKU. */ export interface InstanceSku { /** * The sku name. @@ -3689,6 +3693,7 @@ export interface InstanceSku { readonly tier?: string; } +/** Role instance properties. */ export interface RoleInstanceProperties { /** Describes the network profile for the role instance. */ networkProfile?: RoleInstanceNetworkProfile; @@ -3752,8 +3757,11 @@ export interface ResourceInstanceViewStatus { level?: StatusLevelTypes; } +/** The list operation result. */ export interface RoleInstanceListResult { + /** The list of resources. */ value: RoleInstance[]; + /** The URI to fetch the next page of resources. Use this to get the next page of resources. Do this till nextLink is null to fetch all the resources. */ nextLink?: string; } @@ -3781,6 +3789,7 @@ export interface CloudServiceRole { readonly location?: string; /** Describes the cloud service role sku. */ sku?: CloudServiceRoleSku; + /** The cloud service role properties. */ properties?: CloudServiceRoleProperties; } @@ -3794,6 +3803,7 @@ export interface CloudServiceRoleSku { capacity?: number; } +/** The cloud service role properties. */ export interface CloudServiceRoleProperties { /** * Specifies the ID which uniquely identifies a cloud service role. @@ -3802,8 +3812,11 @@ export interface CloudServiceRoleProperties { readonly uniqueId?: string; } +/** The list operation result. */ export interface CloudServiceRoleListResult { + /** The list of resources. */ value: CloudServiceRole[]; + /** The URI to fetch the next page of resources. Use this to get the next page of resources. Do this till nextLink is null to fetch all the resources. */ nextLink?: string; } @@ -3830,6 +3843,8 @@ export interface CloudService { tags?: { [propertyName: string]: string }; /** Cloud service properties */ properties?: CloudServiceProperties; + /** The system meta data relating to this resource. */ + systemData?: SystemData; } /** Cloud service properties */ @@ -3920,6 +3935,12 @@ export interface CloudServiceVaultCertificate { export interface CloudServiceNetworkProfile { /** List of Load balancer configurations. Cloud service can have up to two load balancer configurations, corresponding to a Public Load Balancer and an Internal Load Balancer. */ loadBalancerConfigurations?: LoadBalancerConfiguration[]; + /** + * Slot type for the cloud service. + * Possible values are

**Production**

**Staging**

+ * If not specified, the default value is Production. + */ + slotType?: CloudServiceSlotType; /** The id reference of the cloud service containing the target IP with which the subject cloud service can perform a swap. This property cannot be updated once it is set. The swappable cloud service referred by this id must be present otherwise an error will be thrown. */ swappableCloudService?: SubResource; } @@ -3934,11 +3955,13 @@ export interface LoadBalancerConfiguration { properties: LoadBalancerConfigurationProperties; } +/** Describes the properties of the load balancer configuration. */ export interface LoadBalancerConfigurationProperties { /** Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration. */ frontendIPConfigurations: LoadBalancerFrontendIPConfiguration[]; } +/** Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration. */ export interface LoadBalancerFrontendIPConfiguration { /** The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource. */ name: string; @@ -3981,9 +4004,10 @@ export interface CloudServiceExtensionProperties { /** Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available. */ autoUpgradeMinorVersion?: boolean; /** Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension. */ - settings?: string; + settings?: Record; /** Protected settings for the extension which are encrypted before sent to the role instance. */ - protectedSettings?: string; + protectedSettings?: Record; + /** Protected settings for the extension, referenced using KeyVault which are encrypted before sent to the role instance. */ protectedSettingsFromKeyVault?: CloudServiceVaultAndSecretReference; /** * Tag to force apply the provided public and protected settings. @@ -4002,11 +4026,28 @@ export interface CloudServiceExtensionProperties { rolesAppliedTo?: string[]; } +/** Protected settings for the extension, referenced using KeyVault which are encrypted before sent to the role instance. */ export interface CloudServiceVaultAndSecretReference { + /** The ARM Resource ID of the Key Vault */ sourceVault?: SubResource; + /** Secret URL which contains the protected settings of the extension */ secretUrl?: string; } +/** The system meta data relating to this resource. */ +export interface SystemData { + /** + * Specifies the time in UTC at which the Cloud Service (extended support) resource was created.
Minimum api-version: 2022-04-04. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdAt?: Date; + /** + * Specifies the time in UTC at which the Cloud Service (extended support) resource was last modified.
Minimum api-version: 2022-04-04. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastModifiedAt?: Date; +} + export interface CloudServiceUpdate { /** Resource tags */ tags?: { [propertyName: string]: string }; @@ -4032,10 +4073,14 @@ export interface CloudServiceInstanceView { /** Instance view statuses. */ export interface InstanceViewStatusesSummary { - /** NOTE: This property will not be serialized. It can only be populated by the server. */ + /** + * The summary. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ readonly statusesSummary?: StatusCodeCount[]; } +/** The status code and count of the cloud service instance view statuses */ export interface StatusCodeCount { /** * The instance view status code @@ -4049,8 +4094,11 @@ export interface StatusCodeCount { readonly count?: number; } +/** The list operation result. */ export interface CloudServiceListResult { + /** The list of resources. */ value: CloudService[]; + /** The URI to fetch the next page of resources. Use this to get the next page of resources. Do this till nextLink is null to fetch all the resources. */ nextLink?: string; } @@ -4074,8 +4122,11 @@ export interface UpdateDomain { readonly name?: string; } +/** The list operation result. */ export interface UpdateDomainListResult { + /** The list of resources. */ value: UpdateDomain[]; + /** The URI to fetch the next page of resources. Use this to get the next page of resources. Do this till nextLink is null to fetch all the resources. */ nextLink?: string; } @@ -4139,8 +4190,11 @@ export interface OSVersionProperties { readonly isActive?: boolean; } +/** The list operation result. */ export interface OSVersionListResult { + /** The list of resources. */ value: OSVersion[]; + /** The URI to fetch the next page of resources. Use this to get the next page of resources. Do this till nextLink is null to fetch all the resources. */ nextLink?: string; } @@ -4213,8 +4267,11 @@ export interface OSVersionPropertiesBase { readonly isActive?: boolean; } +/** The list operation result. */ export interface OSFamilyListResult { + /** The list of resources. */ value: OSFamily[]; + /** The URI to fetch the next page of resources. Use this to get the next page of resources. Do this till nextLink is null to fetch all the resources. */ nextLink?: string; } @@ -4274,7 +4331,7 @@ export type ImageReference = SubResource & { }; /** Describes the parameter of customer managed disk encryption set resource id that can be specified for disk.

NOTE: The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details. */ -export type DiskEncryptionSetParameters = SubResource; +export type DiskEncryptionSetParameters = SubResource & {}; /** Describes a virtual machine scale set network profile's IP configuration. */ export type VirtualMachineScaleSetIPConfiguration = SubResource & { @@ -5556,7 +5613,7 @@ export type AvailabilitySetUpdate = UpdateResource & { }; /** Specifies information about the proximity placement group. */ -export type ProximityPlacementGroupUpdate = UpdateResource; +export type ProximityPlacementGroupUpdate = UpdateResource & {}; /** Specifies information about the dedicated host group that the dedicated host should be assigned to. Only tags may be updated. */ export type DedicatedHostGroupUpdate = UpdateResource & { @@ -5750,7 +5807,7 @@ export type VirtualMachineRunCommandUpdate = UpdateResource & { }; /** Describes a Virtual Machine Scale Set VM Reimage Parameters. */ -export type VirtualMachineScaleSetVMReimageParameters = VirtualMachineReimageParameters; +export type VirtualMachineScaleSetVMReimageParameters = VirtualMachineReimageParameters & {}; /** Describes a Virtual Machine Extension. */ export type VirtualMachineExtension = ResourceWithOptionalLocation & { @@ -5849,7 +5906,7 @@ export type RequestRateByIntervalInput = LogAnalyticsInputBase & { }; /** Api request input for LogAnalytics getThrottledRequests Api. */ -export type ThrottledRequestsInput = LogAnalyticsInputBase; +export type ThrottledRequestsInput = LogAnalyticsInputBase & {}; /** Describes the properties of a Run Command. */ export type RunCommandDocument = RunCommandDocumentBase & { @@ -6031,7 +6088,7 @@ export type GalleryApplicationVersionUpdate = UpdateResourceDefinition & { }; /** The publishing profile of a gallery image Version. */ -export type GalleryImageVersionPublishingProfile = GalleryArtifactPublishingProfileBase; +export type GalleryImageVersionPublishingProfile = GalleryArtifactPublishingProfileBase & {}; /** The publishing profile of a gallery image version. */ export type GalleryApplicationVersionPublishingProfile = GalleryArtifactPublishingProfileBase & { @@ -6059,7 +6116,7 @@ export type DataDiskImageEncryption = DiskImageEncryption & { }; /** This is the OS disk image. */ -export type GalleryOSDiskImage = GalleryDiskImage; +export type GalleryOSDiskImage = GalleryDiskImage & {}; /** This is the data disk image. */ export type GalleryDataDiskImage = GalleryDiskImage & { @@ -6074,7 +6131,7 @@ export type PirSharedGalleryResource = PirResource & { }; /** This is the OS disk image. */ -export type SharedGalleryOSDiskImage = SharedGalleryDiskImage; +export type SharedGalleryOSDiskImage = SharedGalleryDiskImage & {}; /** This is the data disk image. */ export type SharedGalleryDataDiskImage = SharedGalleryDiskImage & { @@ -6083,7 +6140,7 @@ export type SharedGalleryDataDiskImage = SharedGalleryDiskImage & { }; /** Specifies information about the Community Gallery that you want to create or update. */ -export type CommunityGallery = PirCommunityGalleryResource; +export type CommunityGallery = PirCommunityGalleryResource & {}; /** Specifies information about the gallery image definition that you want to create or update. */ export type CommunityGalleryImage = PirCommunityGalleryResource & { @@ -6150,7 +6207,7 @@ export type VirtualMachineScaleSetReimageParameters = VirtualMachineScaleSetVMRe }; /** Specifies information about the Shared Gallery that you want to create or update. */ -export type SharedGallery = PirSharedGalleryResource; +export type SharedGallery = PirSharedGalleryResource & {}; /** Specifies information about the gallery image definition that you want to create or update. */ export type SharedGalleryImage = PirSharedGalleryResource & { @@ -8120,6 +8177,22 @@ export enum KnownCloudServiceUpgradeMode { */ export type CloudServiceUpgradeMode = string; +/** Known values of {@link CloudServiceSlotType} that the service accepts. */ +export enum KnownCloudServiceSlotType { + Production = "Production", + Staging = "Staging" +} + +/** + * Defines values for CloudServiceSlotType. \ + * {@link KnownCloudServiceSlotType} can be used interchangeably with CloudServiceSlotType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Production** \ + * **Staging** + */ +export type CloudServiceSlotType = string; + /** Known values of {@link AvailabilitySetSkuTypes} that the service accepts. */ export enum KnownAvailabilitySetSkuTypes { Classic = "Classic", diff --git a/sdk/compute/arm-compute/src/models/mappers.ts b/sdk/compute/arm-compute/src/models/mappers.ts index c7f754dd5649..b9e162ab7ba9 100644 --- a/sdk/compute/arm-compute/src/models/mappers.ts +++ b/sdk/compute/arm-compute/src/models/mappers.ts @@ -9939,6 +9939,13 @@ export const CloudService: coreClient.CompositeMapper = { name: "Composite", className: "CloudServiceProperties" } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } @@ -10155,6 +10162,12 @@ export const CloudServiceNetworkProfile: coreClient.CompositeMapper = { } } }, + slotType: { + serializedName: "slotType", + type: { + name: "String" + } + }, swappableCloudService: { serializedName: "swappableCloudService", type: { @@ -10344,13 +10357,15 @@ export const CloudServiceExtensionProperties: coreClient.CompositeMapper = { settings: { serializedName: "settings", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "any" } } } }, protectedSettings: { serializedName: "protectedSettings", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "any" } } } }, protectedSettingsFromKeyVault: { @@ -10410,6 +10425,29 @@ export const CloudServiceVaultAndSecretReference: coreClient.CompositeMapper = { } }; +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdAt: { + serializedName: "createdAt", + readOnly: true, + type: { + name: "DateTime" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + readOnly: true, + type: { + name: "DateTime" + } + } + } + } +}; + export const CloudServiceUpdate: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/compute/arm-compute/src/models/parameters.ts b/sdk/compute/arm-compute/src/models/parameters.ts index d6c75cd1e446..cb61af9aba6d 100644 --- a/sdk/compute/arm-compute/src/models/parameters.ts +++ b/sdk/compute/arm-compute/src/models/parameters.ts @@ -1269,7 +1269,7 @@ export const cloudServiceName: OperationURLParameter = { export const apiVersion4: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-03-01", + defaultValue: "2022-04-04", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/compute/arm-compute/src/operations/cloudServiceRoleInstances.ts b/sdk/compute/arm-compute/src/operations/cloudServiceRoleInstances.ts index d378b6897722..711f2bdc0e0b 100644 --- a/sdk/compute/arm-compute/src/operations/cloudServiceRoleInstances.ts +++ b/sdk/compute/arm-compute/src/operations/cloudServiceRoleInstances.ts @@ -49,8 +49,8 @@ export class CloudServiceRoleInstancesImpl /** * Gets the list of all role instances in a cloud service. Use nextLink property in the response to get * the next page of role instances. Do this till nextLink is null to fetch all the role instances. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ public list( @@ -117,8 +117,8 @@ export class CloudServiceRoleInstancesImpl /** * Deletes a role instance from a cloud service. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginDelete( @@ -182,8 +182,8 @@ export class CloudServiceRoleInstancesImpl /** * Deletes a role instance from a cloud service. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginDeleteAndWait( @@ -204,8 +204,8 @@ export class CloudServiceRoleInstancesImpl /** * Gets a role instance from a cloud service. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ get( @@ -223,8 +223,8 @@ export class CloudServiceRoleInstancesImpl /** * Retrieves information about the run-time state of a role instance in a cloud service. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ getInstanceView( @@ -242,8 +242,8 @@ export class CloudServiceRoleInstancesImpl /** * Gets the list of all role instances in a cloud service. Use nextLink property in the response to get * the next page of role instances. Do this till nextLink is null to fetch all the role instances. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ private _list( @@ -261,8 +261,8 @@ export class CloudServiceRoleInstancesImpl * The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud * service. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginRestart( @@ -327,8 +327,8 @@ export class CloudServiceRoleInstancesImpl * The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud * service. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginRestartAndWait( @@ -350,8 +350,8 @@ export class CloudServiceRoleInstancesImpl * The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web * roles or worker roles. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginReimage( @@ -416,8 +416,8 @@ export class CloudServiceRoleInstancesImpl * The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web * roles or worker roles. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginReimageAndWait( @@ -440,8 +440,8 @@ export class CloudServiceRoleInstancesImpl * roles or worker roles and initializes the storage resources that are used by them. If you do not * want to initialize storage resources, you can use Reimage Role Instance. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginRebuild( @@ -507,8 +507,8 @@ export class CloudServiceRoleInstancesImpl * roles or worker roles and initializes the storage resources that are used by them. If you do not * want to initialize storage resources, you can use Reimage Role Instance. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginRebuildAndWait( @@ -529,8 +529,8 @@ export class CloudServiceRoleInstancesImpl /** * Gets a remote desktop file for a role instance in a cloud service. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ getRemoteDesktopFile( @@ -547,8 +547,8 @@ export class CloudServiceRoleInstancesImpl /** * ListNext - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. */ diff --git a/sdk/compute/arm-compute/src/operations/cloudServiceRoles.ts b/sdk/compute/arm-compute/src/operations/cloudServiceRoles.ts index 024c8eb25201..8467d0d614e5 100644 --- a/sdk/compute/arm-compute/src/operations/cloudServiceRoles.ts +++ b/sdk/compute/arm-compute/src/operations/cloudServiceRoles.ts @@ -38,8 +38,8 @@ export class CloudServiceRolesImpl implements CloudServiceRoles { /** * Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next * page of roles. Do this till nextLink is null to fetch all the roles. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ public list( @@ -106,8 +106,8 @@ export class CloudServiceRolesImpl implements CloudServiceRoles { /** * Gets a role from a cloud service. * @param roleName Name of the role. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ get( @@ -125,8 +125,8 @@ export class CloudServiceRolesImpl implements CloudServiceRoles { /** * Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next * page of roles. Do this till nextLink is null to fetch all the roles. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ private _list( @@ -142,8 +142,8 @@ export class CloudServiceRolesImpl implements CloudServiceRoles { /** * ListNext - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. */ diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoleInstances.ts b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoleInstances.ts index 082c3ccb6529..0a6312599448 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoleInstances.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoleInstances.ts @@ -29,8 +29,8 @@ export interface CloudServiceRoleInstances { /** * Gets the list of all role instances in a cloud service. Use nextLink property in the response to get * the next page of role instances. Do this till nextLink is null to fetch all the role instances. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ list( @@ -41,8 +41,8 @@ export interface CloudServiceRoleInstances { /** * Deletes a role instance from a cloud service. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ beginDelete( @@ -54,8 +54,8 @@ export interface CloudServiceRoleInstances { /** * Deletes a role instance from a cloud service. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ beginDeleteAndWait( @@ -67,8 +67,8 @@ export interface CloudServiceRoleInstances { /** * Gets a role instance from a cloud service. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ get( @@ -80,8 +80,8 @@ export interface CloudServiceRoleInstances { /** * Retrieves information about the run-time state of a role instance in a cloud service. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ getInstanceView( @@ -94,8 +94,8 @@ export interface CloudServiceRoleInstances { * The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud * service. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ beginRestart( @@ -108,8 +108,8 @@ export interface CloudServiceRoleInstances { * The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud * service. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ beginRestartAndWait( @@ -122,8 +122,8 @@ export interface CloudServiceRoleInstances { * The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web * roles or worker roles. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ beginReimage( @@ -136,8 +136,8 @@ export interface CloudServiceRoleInstances { * The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web * roles or worker roles. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ beginReimageAndWait( @@ -151,8 +151,8 @@ export interface CloudServiceRoleInstances { * roles or worker roles and initializes the storage resources that are used by them. If you do not * want to initialize storage resources, you can use Reimage Role Instance. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ beginRebuild( @@ -166,8 +166,8 @@ export interface CloudServiceRoleInstances { * roles or worker roles and initializes the storage resources that are used by them. If you do not * want to initialize storage resources, you can use Reimage Role Instance. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ beginRebuildAndWait( @@ -179,8 +179,8 @@ export interface CloudServiceRoleInstances { /** * Gets a remote desktop file for a role instance in a cloud service. * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ getRemoteDesktopFile( diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoles.ts b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoles.ts index 8dae38f480f8..f35bf8b2f3ba 100644 --- a/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoles.ts +++ b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoles.ts @@ -20,8 +20,8 @@ export interface CloudServiceRoles { /** * Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next * page of roles. Do this till nextLink is null to fetch all the roles. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ list( @@ -32,8 +32,8 @@ export interface CloudServiceRoles { /** * Gets a role from a cloud service. * @param roleName Name of the role. - * @param resourceGroupName - * @param cloudServiceName + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ get( diff --git a/sdk/compute/arm-compute/test/sampleTest.ts b/sdk/compute/arm-compute/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/compute/arm-compute/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * 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 { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/compute/arm-compute/tsconfig.json b/sdk/compute/arm-compute/tsconfig.json index b84abc8423ab..3e6ae96443f3 100644 --- a/sdk/compute/arm-compute/tsconfig.json +++ b/sdk/compute/arm-compute/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-compute": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"