From fb2d52c9e3422a7230dab09a405817b641d9c42d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 18 Nov 2022 12:27:12 +0000 Subject: [PATCH] CodeGen from PR 21605 in Azure/azure-rest-api-specs Merge a562ac06533262780c55cc9eb99667122b86aad4 into dcec109c164e69f0f122ff74fc551108da8af20e --- sdk/compute/arm-compute/CHANGELOG.md | 38 ++- sdk/compute/arm-compute/_meta.json | 8 +- sdk/compute/arm-compute/package.json | 17 +- .../arm-compute/review/arm-compute.api.md | 84 ++++- .../src/computeManagementClient.ts | 2 +- sdk/compute/arm-compute/src/models/index.ts | 141 +++++++- sdk/compute/arm-compute/src/models/mappers.ts | 309 +++++++++++++++++- .../arm-compute/src/models/parameters.ts | 4 +- sdk/compute/arm-compute/test/sampleTest.ts | 43 +++ sdk/compute/arm-compute/tsconfig.json | 10 +- 10 files changed, 603 insertions(+), 53 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 0a49cbb2f431..713cc378c0e6 100644 --- a/sdk/compute/arm-compute/CHANGELOG.md +++ b/sdk/compute/arm-compute/CHANGELOG.md @@ -1,15 +1,37 @@ # Release History + +## 20.0.0 (2022-11-18) + +**Features** -## 19.2.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added Interface GalleryApplicationCustomAction + - Added Interface GalleryApplicationCustomActionParameter + - Added Interface GalleryApplicationVersionSafetyProfile + - Added Interface GalleryArtifactSafetyProfileBase + - Added Interface GalleryArtifactVersionFullSource + - Added Interface GalleryDiskImageSource + - Added Interface GalleryImageVersionSafetyProfile + - Added Interface LatestGalleryImageVersion + - Added Interface PolicyViolation + - Added Type Alias GalleryApplicationCustomActionParameterType + - Added Type Alias PolicyViolationCategory + - Interface GalleryApplication has a new optional parameter customActions + - Interface GalleryApplicationUpdate has a new optional parameter customActions + - Interface GalleryApplicationVersion has a new optional parameter safetyProfile + - Interface GalleryApplicationVersionPublishingProfile has a new optional parameter customActions + - Interface GalleryApplicationVersionUpdate has a new optional parameter safetyProfile + - Interface GalleryImageVersion has a new optional parameter safetyProfile + - Interface GalleryImageVersionUpdate has a new optional parameter safetyProfile + - Interface SharedGalleryImage has a new optional parameter eula + - Interface SharedGalleryImage has a new optional parameter privacyStatementUri + - Interface TargetRegion has a new optional parameter excludeFromLatest + - Added Enum KnownPolicyViolationCategory -### Other Changes +**Breaking Changes** + - Interface GalleryArtifactVersionSource no longer has parameter uri + + ## 19.2.0 (2022-09-21) **Features** diff --git a/sdk/compute/arm-compute/_meta.json b/sdk/compute/arm-compute/_meta.json index 2179f6dfb650..4be8bc3ba9a6 100644 --- a/sdk/compute/arm-compute/_meta.json +++ b/sdk/compute/arm-compute/_meta.json @@ -1,8 +1,8 @@ { - "commit": "8ff0e3b8dc12cd793f4f2208d76f9f3a7f51176c", + "commit": "2e4c7fb5c5d6dc79f7b6b995e30b3d41a85c1dc0", "readme": "specification/compute/resource-manager/readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --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-rc.1.20220727.1 --generate-sample=true", + "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --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-rc.2", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.1.20220727.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.5.1", + "use": "@autorest/typescript@6.0.0-rc.2" } \ No newline at end of file diff --git a/sdk/compute/arm-compute/package.json b/sdk/compute/arm-compute/package.json index de94dcd17301..c063476ccb61 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.2.1", + "version": "20.0.0", "engines": { "node": ">=14.0.0" }, @@ -46,8 +46,7 @@ "@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": { @@ -110,13 +109,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 9052c4e28443..89103a58863a 100644 --- a/sdk/compute/arm-compute/review/arm-compute.api.md +++ b/sdk/compute/arm-compute/review/arm-compute.api.md @@ -2198,6 +2198,7 @@ export interface Gallery extends Resource { // @public export interface GalleryApplication extends Resource { + customActions?: GalleryApplicationCustomAction[]; description?: string; endOfLifeDate?: Date; eula?: string; @@ -2206,6 +2207,26 @@ export interface GalleryApplication extends Resource { supportedOSType?: OperatingSystemTypes; } +// @public +export interface GalleryApplicationCustomAction { + description?: string; + name: string; + parameters?: GalleryApplicationCustomActionParameter[]; + script: string; +} + +// @public +export interface GalleryApplicationCustomActionParameter { + defaultValue?: string; + description?: string; + name: string; + required?: boolean; + type?: GalleryApplicationCustomActionParameterType; +} + +// @public +export type GalleryApplicationCustomActionParameterType = "String" | "ConfigurationDataBlob" | "LogOutputBlob"; + // @public export interface GalleryApplicationList { nextLink?: string; @@ -2271,6 +2292,7 @@ export type GalleryApplicationsUpdateResponse = GalleryApplication; // @public export interface GalleryApplicationUpdate extends UpdateResourceDefinition { + customActions?: GalleryApplicationCustomAction[]; description?: string; endOfLifeDate?: Date; eula?: string; @@ -2284,6 +2306,7 @@ export interface GalleryApplicationVersion extends Resource { readonly provisioningState?: GalleryProvisioningState; publishingProfile?: GalleryApplicationVersionPublishingProfile; readonly replicationStatus?: ReplicationStatus; + safetyProfile?: GalleryApplicationVersionSafetyProfile; } // @public @@ -2297,6 +2320,7 @@ export interface GalleryApplicationVersionPublishingProfile extends GalleryArtif advancedSettings?: { [propertyName: string]: string; }; + customActions?: GalleryApplicationCustomAction[]; enableHealthCheck?: boolean; // (undocumented) manageActions?: UserArtifactManage; @@ -2316,6 +2340,10 @@ export interface GalleryApplicationVersions { listByGalleryApplication(resourceGroupName: string, galleryName: string, galleryApplicationName: string, options?: GalleryApplicationVersionsListByGalleryApplicationOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface GalleryApplicationVersionSafetyProfile extends GalleryArtifactSafetyProfileBase { +} + // @public export interface GalleryApplicationVersionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2367,6 +2395,7 @@ export interface GalleryApplicationVersionUpdate extends UpdateResourceDefinitio readonly provisioningState?: GalleryProvisioningState; publishingProfile?: GalleryApplicationVersionPublishingProfile; readonly replicationStatus?: ReplicationStatus; + safetyProfile?: GalleryApplicationVersionSafetyProfile; } // @public @@ -2381,15 +2410,24 @@ export interface GalleryArtifactPublishingProfileBase { targetRegions?: TargetRegion[]; } +// @public +export interface GalleryArtifactSafetyProfileBase { + allowDeletionOfReplicatedLocations?: boolean; +} + // @public export interface GalleryArtifactSource { managedImage: ManagedArtifact; } +// @public +export interface GalleryArtifactVersionFullSource extends GalleryArtifactVersionSource { + communityGalleryImageId?: string; +} + // @public export interface GalleryArtifactVersionSource { id?: string; - uri?: string; } // @public @@ -2401,7 +2439,13 @@ export interface GalleryDataDiskImage extends GalleryDiskImage { export interface GalleryDiskImage { hostCaching?: HostCaching; readonly sizeInGB?: number; - source?: GalleryArtifactVersionSource; + source?: GalleryDiskImageSource; +} + +// @public +export interface GalleryDiskImageSource extends GalleryArtifactVersionSource { + storageAccountId?: string; + uri?: string; } // @public @@ -2541,6 +2585,7 @@ export interface GalleryImageVersion extends Resource { readonly provisioningState?: GalleryProvisioningState; publishingProfile?: GalleryImageVersionPublishingProfile; readonly replicationStatus?: ReplicationStatus; + safetyProfile?: GalleryImageVersionSafetyProfile; storageProfile?: GalleryImageVersionStorageProfile; } @@ -2566,6 +2611,12 @@ export interface GalleryImageVersions { listByGalleryImage(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: GalleryImageVersionsListByGalleryImageOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface GalleryImageVersionSafetyProfile extends GalleryArtifactSafetyProfileBase { + readonly policyViolations?: PolicyViolation[]; + readonly reportedForPolicyViolation?: boolean; +} + // @public export interface GalleryImageVersionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2607,7 +2658,7 @@ export type GalleryImageVersionsListByGalleryImageResponse = GalleryImageVersion export interface GalleryImageVersionStorageProfile { dataDiskImages?: GalleryDataDiskImage[]; osDiskImage?: GalleryOSDiskImage; - source?: GalleryArtifactVersionSource; + source?: GalleryArtifactVersionFullSource; } // @public @@ -2624,6 +2675,7 @@ export interface GalleryImageVersionUpdate extends UpdateResourceDefinition { readonly provisioningState?: GalleryProvisioningState; publishingProfile?: GalleryImageVersionPublishingProfile; readonly replicationStatus?: ReplicationStatus; + safetyProfile?: GalleryImageVersionSafetyProfile; storageProfile?: GalleryImageVersionStorageProfile; } @@ -3290,6 +3342,14 @@ export enum KnownPatchOperationStatus { Unknown = "Unknown" } +// @public +export enum KnownPolicyViolationCategory { + CopyrightValidation = "CopyrightValidation", + ImageFlaggedUnsafe = "ImageFlaggedUnsafe", + IpTheft = "IpTheft", + Other = "Other" +} + // @public export enum KnownPrivateEndpointConnectionProvisioningState { Creating = "Creating", @@ -3723,6 +3783,12 @@ export interface LastPatchInstallationSummary { readonly status?: PatchOperationStatus; } +// @public +export interface LatestGalleryImageVersion { + latestVersionName?: string; + location?: string; +} + // @public export interface LinuxConfiguration { disablePasswordAuthentication?: boolean; @@ -4084,6 +4150,15 @@ export interface Plan { publisher?: string; } +// @public +export interface PolicyViolation { + category?: PolicyViolationCategory; + details?: string; +} + +// @public +export type PolicyViolationCategory = string; + // @public export interface PriorityMixPolicy { baseRegularPriorityCount?: number; @@ -4902,11 +4977,13 @@ export interface SharedGalleryImage extends PirSharedGalleryResource { architecture?: Architecture; disallowed?: Disallowed; endOfLifeDate?: Date; + eula?: string; features?: GalleryImageFeature[]; hyperVGeneration?: HyperVGeneration; identifier?: GalleryImageIdentifier; osState?: OperatingSystemStateTypes; osType?: OperatingSystemTypes; + privacyStatementUri?: string; purchasePlan?: ImagePurchasePlan; recommended?: RecommendedMachineConfiguration; } @@ -5383,6 +5460,7 @@ export interface SystemData { // @public export interface TargetRegion { encryption?: EncryptionImages; + excludeFromLatest?: boolean; name: string; regionalReplicaCount?: number; storageAccountType?: StorageAccountType; diff --git a/sdk/compute/arm-compute/src/computeManagementClient.ts b/sdk/compute/arm-compute/src/computeManagementClient.ts index 094852bc8f74..df1b6ec53f0d 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.2.1`; + const packageDetails = `azsdk-js-arm-compute/20.0.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 fb48e799858c..f913bb87861c 100644 --- a/sdk/compute/arm-compute/src/models/index.ts +++ b/sdk/compute/arm-compute/src/models/index.ts @@ -3419,6 +3419,8 @@ export interface TargetRegion { storageAccountType?: StorageAccountType; /** Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. */ encryption?: EncryptionImages; + /** Contains the flag setting to hide an image when users specify version='latest' */ + excludeFromLatest?: boolean; } /** Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. */ @@ -3465,8 +3467,8 @@ export interface GalleryExtendedLocation { /** This is the storage profile of a Gallery Image Version. */ export interface GalleryImageVersionStorageProfile { - /** The gallery artifact version source. */ - source?: GalleryArtifactVersionSource; + /** The source of the gallery artifact version. */ + source?: GalleryArtifactVersionFullSource; /** This is the OS disk image. */ osDiskImage?: GalleryOSDiskImage; /** A list of data disk images. */ @@ -3477,8 +3479,6 @@ export interface GalleryImageVersionStorageProfile { export interface GalleryArtifactVersionSource { /** The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. */ id?: string; - /** The uri of the gallery artifact version source. Currently used to specify vhd/blob source. */ - uri?: string; } /** This is the disk image base class. */ @@ -3490,8 +3490,22 @@ export interface GalleryDiskImage { readonly sizeInGB?: number; /** The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' */ hostCaching?: HostCaching; - /** The gallery artifact version source. */ - source?: GalleryArtifactVersionSource; + /** The source for the disk image. */ + source?: GalleryDiskImageSource; +} + +/** A policy violation reported against a gallery artifact. */ +export interface PolicyViolation { + /** Describes the nature of the policy violation. */ + category?: PolicyViolationCategory; + /** Describes specific details about why this policy violation was reported. */ + details?: string; +} + +/** This is the safety profile of the Gallery Artifact Version. */ +export interface GalleryArtifactSafetyProfileBase { + /** Indicates whether or not removing this Gallery Image Version from replicated regions is allowed. */ + allowDeletionOfReplicatedLocations?: boolean; } /** This is the replication status of the gallery image version. */ @@ -3532,6 +3546,32 @@ export interface RegionalReplicationStatus { readonly progress?: number; } +/** A custom action that can be performed with a Gallery Application Version. */ +export interface GalleryApplicationCustomAction { + /** The name of the custom action. Must be unique within the Gallery Application Version. */ + name: string; + /** The script to run when executing this custom action. */ + script: string; + /** Description to help the users understand what this custom action does. */ + description?: string; + /** The parameters that this custom action uses */ + parameters?: GalleryApplicationCustomActionParameter[]; +} + +/** The definition of a parameter that can be passed to a custom action of a Gallery Application Version. */ +export interface GalleryApplicationCustomActionParameter { + /** The name of the custom action. Must be unique within the Gallery Application Version. */ + name: string; + /** Indicates whether this parameter must be passed when running the custom action. */ + required?: boolean; + /** Specifies the type of the custom action parameter. Possible values are: String, ConfigurationDataBlob or LogOutputBlob */ + type?: GalleryApplicationCustomActionParameterType; + /** The default value of the parameter. Only applies to string types */ + defaultValue?: string; + /** A description to help users understand what this parameter means */ + description?: string; +} + /** The source image from which the Image Version is going to be created. */ export interface UserArtifactSource { /** Required. The mediaLink of the artifact, must be a readable storage page blob. */ @@ -4340,6 +4380,14 @@ export interface ManagedArtifact { id: string; } +/** The gallery image version with latest version in a particular region. */ +export interface LatestGalleryImageVersion { + /** The name of the latest version in the region. */ + latestVersionName?: string; + /** region of the Gallery Image Version. */ + location?: string; +} + /** Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set. */ export interface ImageReference extends SubResource { /** The image publisher. */ @@ -5487,6 +5535,8 @@ export interface GalleryImageVersion extends Resource { readonly provisioningState?: GalleryProvisioningState; /** This is the storage profile of a Gallery Image Version. */ storageProfile?: GalleryImageVersionStorageProfile; + /** This is the safety profile of the Gallery Image Version. */ + safetyProfile?: GalleryImageVersionSafetyProfile; /** * This is the replication status of the gallery image version. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -5508,12 +5558,16 @@ export interface GalleryApplication extends Resource { endOfLifeDate?: Date; /** This property allows you to specify the supported type of the OS that application is built for.

Possible values are:

**Windows**

**Linux** */ supportedOSType?: OperatingSystemTypes; + /** A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application. */ + customActions?: GalleryApplicationCustomAction[]; } /** Specifies information about the gallery Application Version that you want to create or update. */ export interface GalleryApplicationVersion extends Resource { /** The publishing profile of a gallery image version. */ publishingProfile?: GalleryApplicationVersionPublishingProfile; + /** The safety profile of the Gallery Application Version. */ + safetyProfile?: GalleryApplicationVersionSafetyProfile; /** * The provisioning state, which only appears in the response. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -6115,6 +6169,8 @@ export interface GalleryImageVersionUpdate extends UpdateResourceDefinition { readonly provisioningState?: GalleryProvisioningState; /** This is the storage profile of a Gallery Image Version. */ storageProfile?: GalleryImageVersionStorageProfile; + /** This is the safety profile of the Gallery Image Version. */ + safetyProfile?: GalleryImageVersionSafetyProfile; /** * This is the replication status of the gallery image version. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -6136,6 +6192,8 @@ export interface GalleryApplicationUpdate extends UpdateResourceDefinition { endOfLifeDate?: Date; /** This property allows you to specify the supported type of the OS that application is built for.

Possible values are:

**Windows**

**Linux** */ supportedOSType?: OperatingSystemTypes; + /** A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application. */ + customActions?: GalleryApplicationCustomAction[]; } /** Specifies information about the gallery Application Version that you want to update. */ @@ -6143,6 +6201,8 @@ export interface GalleryApplicationVersionUpdate extends UpdateResourceDefinition { /** The publishing profile of a gallery image version. */ publishingProfile?: GalleryApplicationVersionPublishingProfile; + /** The safety profile of the Gallery Application Version. */ + safetyProfile?: GalleryApplicationVersionSafetyProfile; /** * The provisioning state, which only appears in the response. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -6171,6 +6231,8 @@ export interface GalleryApplicationVersionPublishingProfile advancedSettings?: { [propertyName: string]: string }; /** Optional. Whether or not this application reports health. */ enableHealthCheck?: boolean; + /** A list of custom actions that can be performed with this Gallery Application Version. */ + customActions?: GalleryApplicationCustomAction[]; } /** Contains encryption settings for an OS disk image. */ @@ -6185,6 +6247,21 @@ export interface DataDiskImageEncryption extends DiskImageEncryption { lun: number; } +/** The source of the gallery artifact version. */ +export interface GalleryArtifactVersionFullSource + extends GalleryArtifactVersionSource { + /** The resource Id of the source Community Gallery Image. Only required when using Community Gallery Image as a source. */ + communityGalleryImageId?: string; +} + +/** The source for the disk image. */ +export interface GalleryDiskImageSource extends GalleryArtifactVersionSource { + /** The uri of the gallery artifact version source. Currently used to specify vhd/blob source. */ + uri?: string; + /** The Storage Account Id that contains the vhd blob being used as a source for this artifact version. */ + storageAccountId?: string; +} + /** This is the OS disk image. */ export interface GalleryOSDiskImage extends GalleryDiskImage {} @@ -6194,6 +6271,25 @@ export interface GalleryDataDiskImage extends GalleryDiskImage { lun: number; } +/** This is the safety profile of the Gallery Image Version. */ +export interface GalleryImageVersionSafetyProfile + extends GalleryArtifactSafetyProfileBase { + /** + * Indicates whether this image has been reported as violating Microsoft's policies. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reportedForPolicyViolation?: boolean; + /** + * A list of Policy Violations that have been reported for this Gallery Image Version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly policyViolations?: PolicyViolation[]; +} + +/** The safety profile of the Gallery Application Version. */ +export interface GalleryApplicationVersionSafetyProfile + extends GalleryArtifactSafetyProfileBase {} + /** Base information about the shared gallery resource in pir. */ export interface PirSharedGalleryResource extends PirResource { /** The unique id of this shared gallery. */ @@ -6303,6 +6399,10 @@ export interface SharedGalleryImage extends PirSharedGalleryResource { purchasePlan?: ImagePurchasePlan; /** The architecture of the image. Applicable to OS disks only. */ architecture?: Architecture; + /** Privacy statement uri for the current community gallery image. */ + privacyStatementUri?: string; + /** End-user license agreement for the current community gallery image. */ + eula?: string; } /** Specifies information about the gallery image version that you want to create or update. */ @@ -8492,6 +8592,30 @@ export enum KnownGalleryExtendedLocationType { */ export type GalleryExtendedLocationType = string; +/** Known values of {@link PolicyViolationCategory} that the service accepts. */ +export enum KnownPolicyViolationCategory { + /** Other */ + Other = "Other", + /** ImageFlaggedUnsafe */ + ImageFlaggedUnsafe = "ImageFlaggedUnsafe", + /** CopyrightValidation */ + CopyrightValidation = "CopyrightValidation", + /** IpTheft */ + IpTheft = "IpTheft" +} + +/** + * Defines values for PolicyViolationCategory. \ + * {@link KnownPolicyViolationCategory} can be used interchangeably with PolicyViolationCategory, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Other** \ + * **ImageFlaggedUnsafe** \ + * **CopyrightValidation** \ + * **IpTheft** + */ +export type PolicyViolationCategory = string; + /** Known values of {@link AggregatedReplicationState} that the service accepts. */ export enum KnownAggregatedReplicationState { /** Unknown */ @@ -8738,6 +8862,11 @@ export type ResourceSkuRestrictionsReasonCode = | "NotAvailableForSubscription"; /** Defines values for HostCaching. */ export type HostCaching = "None" | "ReadOnly" | "ReadWrite"; +/** Defines values for GalleryApplicationCustomActionParameterType. */ +export type GalleryApplicationCustomActionParameterType = + | "String" + | "ConfigurationDataBlob" + | "LogOutputBlob"; /** Optional parameters. */ export interface OperationsListOptionalParams diff --git a/sdk/compute/arm-compute/src/models/mappers.ts b/sdk/compute/arm-compute/src/models/mappers.ts index 4e6072824d41..df0bceb8ed58 100644 --- a/sdk/compute/arm-compute/src/models/mappers.ts +++ b/sdk/compute/arm-compute/src/models/mappers.ts @@ -8906,6 +8906,12 @@ export const TargetRegion: coreClient.CompositeMapper = { name: "Composite", className: "EncryptionImages" } + }, + excludeFromLatest: { + serializedName: "excludeFromLatest", + type: { + name: "Boolean" + } } } } @@ -9046,7 +9052,7 @@ export const GalleryImageVersionStorageProfile: coreClient.CompositeMapper = { serializedName: "source", type: { name: "Composite", - className: "GalleryArtifactVersionSource" + className: "GalleryArtifactVersionFullSource" } }, osDiskImage: { @@ -9082,12 +9088,6 @@ export const GalleryArtifactVersionSource: coreClient.CompositeMapper = { type: { name: "String" } - }, - uri: { - serializedName: "uri", - type: { - name: "String" - } } } } @@ -9116,7 +9116,43 @@ export const GalleryDiskImage: coreClient.CompositeMapper = { serializedName: "source", type: { name: "Composite", - className: "GalleryArtifactVersionSource" + className: "GalleryDiskImageSource" + } + } + } + } +}; + +export const PolicyViolation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PolicyViolation", + modelProperties: { + category: { + serializedName: "category", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "String" + } + } + } + } +}; + +export const GalleryArtifactSafetyProfileBase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryArtifactSafetyProfileBase", + modelProperties: { + allowDeletionOfReplicatedLocations: { + serializedName: "allowDeletionOfReplicatedLocations", + type: { + name: "Boolean" } } } @@ -9189,6 +9225,88 @@ export const RegionalReplicationStatus: coreClient.CompositeMapper = { } }; +export const GalleryApplicationCustomAction: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryApplicationCustomAction", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + script: { + serializedName: "script", + required: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + parameters: { + serializedName: "parameters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GalleryApplicationCustomActionParameter" + } + } + } + } + } + } +}; + +export const GalleryApplicationCustomActionParameter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryApplicationCustomActionParameter", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + required: { + serializedName: "required", + type: { + name: "Boolean" + } + }, + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: ["String", "ConfigurationDataBlob", "LogOutputBlob"] + } + }, + defaultValue: { + serializedName: "defaultValue", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + export const UserArtifactSource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -11104,6 +11222,27 @@ export const ManagedArtifact: coreClient.CompositeMapper = { } }; +export const LatestGalleryImageVersion: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LatestGalleryImageVersion", + modelProperties: { + latestVersionName: { + serializedName: "latestVersionName", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + export const ImageReference: coreClient.CompositeMapper = { type: { name: "Composite", @@ -14085,6 +14224,13 @@ export const GalleryImageVersion: coreClient.CompositeMapper = { className: "GalleryImageVersionStorageProfile" } }, + safetyProfile: { + serializedName: "properties.safetyProfile", + type: { + name: "Composite", + className: "GalleryImageVersionSafetyProfile" + } + }, replicationStatus: { serializedName: "properties.replicationStatus", type: { @@ -14138,6 +14284,18 @@ export const GalleryApplication: coreClient.CompositeMapper = { name: "Enum", allowedValues: ["Windows", "Linux"] } + }, + customActions: { + serializedName: "properties.customActions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GalleryApplicationCustomAction" + } + } + } } } } @@ -14156,6 +14314,13 @@ export const GalleryApplicationVersion: coreClient.CompositeMapper = { className: "GalleryApplicationVersionPublishingProfile" } }, + safetyProfile: { + serializedName: "properties.safetyProfile", + type: { + name: "Composite", + className: "GalleryApplicationVersionSafetyProfile" + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -15680,6 +15845,13 @@ export const GalleryImageVersionUpdate: coreClient.CompositeMapper = { className: "GalleryImageVersionStorageProfile" } }, + safetyProfile: { + serializedName: "properties.safetyProfile", + type: { + name: "Composite", + className: "GalleryImageVersionSafetyProfile" + } + }, replicationStatus: { serializedName: "properties.replicationStatus", type: { @@ -15733,6 +15905,18 @@ export const GalleryApplicationUpdate: coreClient.CompositeMapper = { name: "Enum", allowedValues: ["Windows", "Linux"] } + }, + customActions: { + serializedName: "properties.customActions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GalleryApplicationCustomAction" + } + } + } } } } @@ -15751,6 +15935,13 @@ export const GalleryApplicationVersionUpdate: coreClient.CompositeMapper = { className: "GalleryApplicationVersionPublishingProfile" } }, + safetyProfile: { + serializedName: "properties.safetyProfile", + type: { + name: "Composite", + className: "GalleryApplicationVersionSafetyProfile" + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -15818,6 +16009,18 @@ export const GalleryApplicationVersionPublishingProfile: coreClient.CompositeMap type: { name: "Boolean" } + }, + customActions: { + serializedName: "customActions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GalleryApplicationCustomAction" + } + } + } } } } @@ -15857,6 +16060,44 @@ export const DataDiskImageEncryption: coreClient.CompositeMapper = { } }; +export const GalleryArtifactVersionFullSource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryArtifactVersionFullSource", + modelProperties: { + ...GalleryArtifactVersionSource.type.modelProperties, + communityGalleryImageId: { + serializedName: "communityGalleryImageId", + type: { + name: "String" + } + } + } + } +}; + +export const GalleryDiskImageSource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryDiskImageSource", + modelProperties: { + ...GalleryArtifactVersionSource.type.modelProperties, + uri: { + serializedName: "uri", + type: { + name: "String" + } + }, + storageAccountId: { + serializedName: "storageAccountId", + type: { + name: "String" + } + } + } + } +}; + export const GalleryOSDiskImage: coreClient.CompositeMapper = { type: { name: "Composite", @@ -15884,6 +16125,46 @@ export const GalleryDataDiskImage: coreClient.CompositeMapper = { } }; +export const GalleryImageVersionSafetyProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryImageVersionSafetyProfile", + modelProperties: { + ...GalleryArtifactSafetyProfileBase.type.modelProperties, + reportedForPolicyViolation: { + serializedName: "reportedForPolicyViolation", + readOnly: true, + type: { + name: "Boolean" + } + }, + policyViolations: { + serializedName: "policyViolations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PolicyViolation" + } + } + } + } + } + } +}; + +export const GalleryApplicationVersionSafetyProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryApplicationVersionSafetyProfile", + modelProperties: { + ...GalleryArtifactSafetyProfileBase.type.modelProperties + } + } +}; + export const PirSharedGalleryResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -16248,6 +16529,18 @@ export const SharedGalleryImage: coreClient.CompositeMapper = { type: { name: "String" } + }, + privacyStatementUri: { + serializedName: "properties.privacyStatementUri", + type: { + name: "String" + } + }, + eula: { + serializedName: "properties.eula", + type: { + name: "String" + } } } } diff --git a/sdk/compute/arm-compute/src/models/parameters.ts b/sdk/compute/arm-compute/src/models/parameters.ts index 13fbba5e0b90..64f6867d1107 100644 --- a/sdk/compute/arm-compute/src/models/parameters.ts +++ b/sdk/compute/arm-compute/src/models/parameters.ts @@ -110,7 +110,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-08-01", + defaultValue: "2022-11-01", isConstant: true, serializedName: "api-version", type: { @@ -1079,7 +1079,7 @@ export const galleryName: OperationURLParameter = { export const apiVersion3: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-01-03", + defaultValue: "2022-03-03", isConstant: true, serializedName: "api-version", type: { 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"